GithubHelp home page GithubHelp logo

cpplox's People

Contributors

jeff-mott-or avatar jtmott-intel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cpplox's Issues

Support virtual functions invoked from least specific to most specific, with the keyword "inner" being used to invoke the next more specific method

When you call a method, it starts at the top of the class hierarchy and works down. A superclass method wins over a subclass method. In order to get to the subclass method, the superclass method can call inner, which is sort of like the inverse of super. It chains to the next method down the hierarchy.

The superclass method controls when and where the subclass is allowed to refine its behavior. If the superclass method doesn’t call inner at all, then the subclass has no way of overriding or modifying the superclass’s behavior.

Have to include <sstream> in chunk.cpp

Hiya, I'm trying to get this to compile on macos (M1). So far I'm using homebrew Boost and had to add a find_package(Boost etc...) and edit the cmake file a bit.

But the main compile error was
[ 20%] Building CXX object CMakeFiles/cpploxbc_lib.dir/src/lox.cpp.o [ 22%] Building CXX object CMakeFiles/cpploxbc_lib.dir/src/value.cpp.o [ 25%] Building CXX object CMakeFiles/cpploxbc_lib.dir/src/vm.cpp.o [ 85%] Built target benchmark [ 91%] Built target benchmark_main /Users/danielelliott/Documents/projects/cpploxJeff/src/chunk.cpp:228:32: error: implicit instantiation of undefined template 'std::basic_ostringstream<char>' 228 | std::ostringstream line; | ^ /opt/homebrew/opt/llvm/bin/../include/c++/v1/__fwd/sstream.h:27:28: note: template is declared here 27 | class _LIBCPP_TEMPLATE_VIS basic_ostringstream; | ^ 1 error generated.

...that adding the sstream file solved.

Now I just have a linker error to sort out :)

Look up local variables by index

Extend the resolver to associate a unique index for each local variable declared in a scope. When resolving a variable access, look up both the scope the variable is in and its index and store that. In the interpreter, use that to quickly access a variable by its index instead of using a map.

Better express interpreter/resolver relationship

The resolver isn't some optional optimizing pass. It's required for the interpreter to work correctly. If the resolver is required by the interpreter, then we should express that relationship directly in code, perhaps by requiring a resolver as a constructor argument for the interpreter, so that you can't make an interpreter without also making a resolver.

Consider also making resolver return its map as a result rather than causing side-effects to the interpreter.

Allow use of any GC strategy

The interpreter and related code should be able to use deferred_ptr or shared_ptr or hboehm or raw pointer or any other arbitrary strategy.

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.