Code Monkey home page Code Monkey logo

univ-lib's Introduction

univ-lib

Library for Gambit compiler universal backend

univ-lib's People

Contributors

feeley avatar

Stargazers

Tom Elam avatar Masanori Ogino avatar James Baker avatar Alvatar avatar

Watchers

James Baker avatar Alvatar avatar  avatar James Cloos avatar astlouisf avatar

Forkers

astlouisf

univ-lib's Issues

+ function fails with (declare (not constant-fold))

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-flonumand -repr-fixnum are set to class (I didn't tested it though)

##make-condvar and make-mutex require a name

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 276

Passing #!void seems to fix it, but better names might be good.

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.