Library for Gambit compiler universal backend
feeley / univ-lib Goto Github PK
View Code? Open in Web Editor NEWLibrary for Gambit compiler universal backend
Library for Gambit compiler universal backend
The following program
(include "univ-lib/lib.scm")
(declare (not constant-fold))
(+ 1 1)
crash with the error
SyntaxError: Unexpected token ILLEGAL
gambit_r1 = new Gambit_Flonum(1.val + 1.val);
^^
SyntaxError: Unexpected token ILLEGAL
when compiled with gsc -c -target js program-name.scm
The same problem arises with -target
equals to python and php. I could not assess if ruby is also victim of this bug (it crashed on what seemed to be another bug).
The error seems to be that + gets inlined, which generate a test case for when its operands are flonums. This generate an attribute access which is not allowed on fixnums by the syntax of the target languages (Ruby might be immune to this bug because "everything is an object").
Note: The code should work when both -repr-flonum
and -repr-fixnum
are set to class
(I didn't tested it though)
Both funcitons (##make-condvar
and #make-mutex
) require a name as argument.
In lib/io.scm
there are calls to those functions that don't provide one.
##make-condvar
: on line 142 and 277##make-mutex
: on line 141 and 276Passing #!void
seems to fix it, but better names might be good.
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.