Giter VIP home page Giter VIP logo

Comments (8)

nguyenhoan avatar nguyenhoan commented on August 21, 2024

To resolve types in Java, we would parse all source (and class/jar) files in the project instead of single files.

How are we going about the language versions of files?

I am thinking of:

  • one pass of parsing single files to get language version
  • another pass using the highest version to parse all files to build Boa ast with types

from compiler.

psybers avatar psybers commented on August 21, 2024

There isn't a way to avoid parsing every file twice? Why does the language version matter for this task?

from compiler.

nguyenhoan avatar nguyenhoan commented on August 21, 2024

If we tried to parse every file once then it matter because we will only have language version for the entire project.

If we parse twice then each parsing will do a separate task.

I cannot think of anyway to avoid parsing twice.

from compiler.

psybers avatar psybers commented on August 21, 2024

But why do we need the language version for the project? In reality, a single repo might actually contain multiple language versions.

from compiler.

nguyenhoan avatar nguyenhoan commented on August 21, 2024

No, I didn't mean that.
I just meant that we should not use language version that works for all files as the language version of every single file.

from compiler.

nguyenhoan avatar nguyenhoan commented on August 21, 2024

Since we are not resolving types for all snapshots, would it be better to store a head snapshot with types separately?

from compiler.

nguyenhoan avatar nguyenhoan commented on August 21, 2024

Code
https://github.com/boalang/compiler/blob/datagen2017/src/java/boa/datagen/scm/AbstractConnector.java#L68

Commits
ca964b7
e7b3c5d
c727ede
e3c10c2
e9c490b
5153c47

from compiler.

nguyenhoan avatar nguyenhoan commented on August 21, 2024

Use in-project jar files to resolve types
ef1c86a
99e08f8

from compiler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.