diff --git a/NOTES b/NOTES index 95acdba..b78af7f 100644 --- a/NOTES +++ b/NOTES @@ -679,4 +679,8 @@ How do I test what I'm integrating? I should at least absorb the js-vm test suite, at the very least. 11am: I'm going to spend the next hour trying to disentangle the -circularity between helpers and types. \ No newline at end of file +circularity between helpers and types. + + +The parameters I'm using to control bounce are too high for Firefox, +leading it to raise the dialog about an out of control jva process. Not good. \ No newline at end of file diff --git a/js-assembler/get-runtime.rkt b/js-assembler/get-runtime.rkt index 9af9c3b..d3562a1 100644 --- a/js-assembler/get-runtime.rkt +++ b/js-assembler/get-runtime.rkt @@ -21,7 +21,8 @@ (require racket/contract racket/runtime-path - racket/port) + racket/port + (planet dyoo/closure-compile:1:1)) (provide/contract [get-runtime (-> string?)]) @@ -56,8 +57,9 @@ (port->string ip)))) -(define text (apply string-append - (map path->string files))) +(define text (closure-compile + (apply string-append + (map path->string files)))) (define (get-runtime) diff --git a/js-assembler/runtime-src/primitives.js b/js-assembler/runtime-src/primitives.js index 2bd09f5..208b799 100644 --- a/js-assembler/runtime-src/primitives.js +++ b/js-assembler/runtime-src/primitives.js @@ -1173,7 +1173,7 @@ That way, we can do a simple grep. PRIMITIVES['random'] = new CasePrimitive('random', [new PrimProc('random', 0, false, false, - function() {return types.float(Math.random());}), + function() {return types.floatpoint(Math.random());}), new PrimProc('random', 1, false, false, function(n) { check(n, isNatural, 'random', 'non-negative exact integer', 1, arguments); @@ -3315,7 +3315,7 @@ That way, we can do a simple grep. 1, false, false, function(n) { - return makeStringImpl(n, types.char(String.fromCharCode(0))); + return makeStringImpl(n, types.character(String.fromCharCode(0))); })]); @@ -3376,7 +3376,7 @@ That way, we can do a simple grep. helpers.toDisplayedString(str)); raise( types.incompleteExn(types.exnFailContract, msg, []) ); } - return types.char(str.charAt(n)); + return types.character(str.charAt(n)); }); @@ -3599,7 +3599,7 @@ That way, we can do a simple grep. str = str.toString(); var lst = types.EMPTY; for (var i = str.length-1; i >= 0; i--) { - lst = types.cons(types.char(str.charAt(i)), lst); + lst = types.cons(types.character(str.charAt(i)), lst); } return lst; }); @@ -4542,7 +4542,7 @@ That way, we can do a simple grep. 'exact integer in [0,#x10FFFF], not in [#xD800,#xDFFF]', 1); - return types.char( String.fromCharCode(jsnums.toFixnum(num)) ); + return types.character( String.fromCharCode(jsnums.toFixnum(num)) ); }); @@ -4552,7 +4552,7 @@ That way, we can do a simple grep. false, false, function(c) { check(c, isChar, 'char-upcase', 'char', 1); - return types.char( c.val.toUpperCase() ); + return types.character( c.val.toUpperCase() ); }); @@ -4562,7 +4562,7 @@ That way, we can do a simple grep. false, false, function(c) { check(c, isChar, 'char-downcase', 'char', 1); - return types.char( c.val.toLowerCase() ); + return types.character( c.val.toLowerCase() ); }); diff --git a/js-assembler/runtime-src/types.js b/js-assembler/runtime-src/types.js index 1cc9b44..ff70603 100644 --- a/js-assembler/runtime-src/types.js +++ b/js-assembler/runtime-src/types.js @@ -2117,7 +2117,7 @@ String.prototype.toDisplayedString = function(cache) { types.symbol = Symbol.makeInstance; types.rational = jsnums.makeRational; - types.float = jsnums.makeFloat; + types.floatpoint = jsnums.makeFloat; types.complex = jsnums.makeComplex; types.bignum = jsnums.makeBignum; types.list = makeList; @@ -2125,7 +2125,7 @@ String.prototype.toDisplayedString = function(cache) { types.vectorImmutable = makeVectorImmutable; types.regexp = function(p) { return new RegularExpression(p) ; } types.byteRegexp = function(p) { return new ByteRegularExpression(p) ; } - types['char'] = Char.makeInstance; + types.character = Char.makeInstance; types['string'] = makeString; types.box = function(x) { return new Box(x, true); }; types.placeholder = function(x) { return new Placeholder(x); };