0xd34d10cc / nox-rs Goto Github PK
View Code? Open in Web Editor NEWYet another toy language
License: MIT License
Yet another toy language
License: MIT License
Extend Memory
interface to make it possible to use with JIT
Required for #26
Statement/SM functions were implemented in #14. The next step is compile them to amd64 machine code.
There is a problem in #15, following program:
fun lol() { return 42 } // function
fun kek() {} // procedure
lol();
write(kek())
Fails to execute in Statements language (call to procedure kek
in expression), but runs successfully in SM (writes 42 to output). Fix: add returns_value
flag to Function
and check that every Call
in Expr
.
Invariant to maintain: stack of StackMachine should be empty after execution of program.
To allow code reuse for JIT & AOT compilers
See https://crates.io/crates/object
Depends on #33 #35
The size of these files makes compilation very slow. This is especially painful for typical use-case like re-running a single test after code changes.
See https://github.com/fflorent/nom_locate
Also, there is https://crates.io/crates/nom-tracable for debugging
https://github.com/0xd34d10cc/nox/blob/55c6f4a5b52e355d454943e894ed5085a24e8d49/src/jit.rs#L327-L341
This code will cause CPU exception if rhs is zero
Current checks for "attempt to reference uninitialized value" are not exhaustive. For example, this program passed all checks:
fun kek(b) {
if b == 0 then
x := 42
fi
}
kek(1337);
write(x)
To make such programs determenistic we have to always initialize global and local variables with some constant value.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.