Giter Site home page Giter Site logo

zua's People

Contributors

brianush1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

zua's Issues

instruction pointer is problematic

The instruction pointer for the VM must be stored per coroutine. However, as D does not offer built-in thread-local storage, it is currently stored in a hashmap with the current Fiber being the key (Solution 1).

An alternative solution (Solution 2), if there were no coroutines in Lua, would be to store a single, global IP.

When comparing 7 runs of solutions 1 and 2, taking the best of 1 and the worst of 2 on the given benchmark.lua file, the times being 375.109 and 184.882 milliseconds respectively, solution 2 outperforms the current solution, being over 2.02 times faster.

More than half the runtime of a given program is spent accessing the instruction pointer. This is not good!

add basic semantic analysis stage

Currently, erroneous code may produce unwanted output due to the lack of a semantic analysis stage. Some examples of such code:

break -- outside of a loop
(function()
	print(...) -- outside of a variadic context
end)()
return true
print'a'

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.