diff --git a/NOTES b/NOTES index 4a2d7af..53acc55 100644 --- a/NOTES +++ b/NOTES @@ -731,7 +731,9 @@ Working out the type mappings between values in Racket and values in JavaScript ---------------------------------------------------------------------- -get-viewport-width +I should add the functions: -get-viewport-height + get-viewport-width + get-viewport-height +Other notes from Shriram: too slow, inconsistent positioning from jsworld. \ No newline at end of file diff --git a/js-assembler/runtime-src/helpers.js b/js-assembler/runtime-src/helpers.js index 65bac89..8574b97 100644 --- a/js-assembler/runtime-src/helpers.js +++ b/js-assembler/runtime-src/helpers.js @@ -687,7 +687,7 @@ if (! this['plt']) { this['plt'] = {}; } } if (jsnums.isSchemeNumber(x)) { - return numberToDomNode(x); + return numberToDomNode(x, params); } if (typeof(x) == 'object') { @@ -750,7 +750,7 @@ if (! this['plt']) { this['plt'] = {}; } // numberToDomNode: jsnum -> dom // Given a jsnum, produces a dom-node representation. - var numberToDomNode = function(n) { + var numberToDomNode = function(n, params) { var node; if (jsnums.isExact(n)) { if (jsnums.isInteger(n)) { diff --git a/tests/test-browser-evaluate.rkt b/tests/test-browser-evaluate.rkt index 204ff36..3860db5 100644 --- a/tests/test-browser-evaluate.rkt +++ b/tests/test-browser-evaluate.rkt @@ -479,6 +479,31 @@ EOF "false\n") +;;(test '(displayln 2/3) +;; "2/3\n") + + +;;(test '(displayln -2/3) +;; "-2/3\n") + + +(test '(displayln -0.0) + "-0.0\n") + +(test '(displayln +nan.0) + "+nan.0\n") + +(test '(displayln +inf.0) + "+inf.0\n") + +(test '(displayln -inf.0) + "-inf.0\n") + + + + + + ;; Knuth's Man-or-boy-test. diff --git a/tests/test-compiler.rkt b/tests/test-compiler.rkt index 1bf1baf..2818d55 100644 --- a/tests/test-compiler.rkt +++ b/tests/test-compiler.rkt @@ -1368,7 +1368,6 @@ 20116) - (test '(let () (define (f x y z) (values y x z)) (call-with-values (lambda () (f 3 1 4)) @@ -1376,6 +1375,7 @@ '((1 3 4)) #:with-bootstrapping? #t) + (test '(let () (define (f x y z) (begin0 (values y x z) (display "")))