diff --git a/examples/snip.rkt b/examples/snip.rkt index 031f97a..b80c9f1 100644 --- a/examples/snip.rkt +++ b/examples/snip.rkt @@ -210,7 +210,7 @@ -1 -1 2 1 #"\0" 0 -1 1 #"\0" 0 10 -1 -1 -1 -1 -1 -1 0 0 0 0 0 0 1.0 1.0 1.0 1.0 1.0 1.0 0 0 0 0 0 0 --1 -1 0 34 0 26 3 12 #"#lang planet" +-1 -1 0 35 0 26 3 12 #"#lang planet" 0 0 26 3 15 #" dyoo/whalesong" 0 0 4 29 1 #"\n" 0 0 22 3 1 #"(" @@ -595,4 +595,5 @@ 0 0 22 3 1 #")" 0 0 4 29 1 #"\n" 0 0 14 3 6 #"a-snip" +0 0 4 29 1 #"\n" 0 0 diff --git a/image/private/js-impl.js b/image/private/js-impl.js index 4d8663a..d06d1b6 100644 --- a/image/private/js-impl.js +++ b/image/private/js-impl.js @@ -280,12 +280,12 @@ EXPORTS['text/font'] = }); -EXPORTS['image-url'] = +EXPORTS['bitmap/url'] = makeClosure( - 'image-url', + 'bitmap/url', 1, function(MACHINE) { - var url = checkString(MACHINE, 'image-url', 0); + var url = checkString(MACHINE, 'bitmap/url', 0); var oldArgcount = MACHINE.argcount; PAUSE( function(restart) { @@ -315,9 +315,14 @@ EXPORTS['image-url'] = }); EXPORTS['open-image-url'] = - plt.baselib.functions.renameProcedure(EXPORTS['image-url'], + plt.baselib.functions.renameProcedure(EXPORTS['bitmap/url'], 'open-image-url'); +EXPORTS['image-url'] = + plt.baselib.functions.renameProcedure(EXPORTS['bitmap/url'], + 'image-url'); + + EXPORTS['overlay'] = diff --git a/image/private/main.rkt b/image/private/main.rkt index c6cae6b..18e168f 100644 --- a/image/private/main.rkt +++ b/image/private/main.rkt @@ -12,8 +12,11 @@ "js-impl.js") #:provided-values (text text/font - image-url - open-image-url + + bitmap/url + image-url ;; older name for bitmap/url + open-image-url ;; older name for bitmap/url + overlay overlay/xy overlay/align diff --git a/image/private/racket-impl.rkt b/image/private/racket-impl.rkt index 0b79622..825a0c2 100644 --- a/image/private/racket-impl.rkt +++ b/image/private/racket-impl.rkt @@ -5,8 +5,6 @@ (provide text text/font - image-url - open-image-url overlay overlay/xy overlay/align @@ -57,11 +55,11 @@ image? - ;; Something funky is happening on the Racket side of things with regards ;; to step-count? See: http://bugs.racket-lang.org/query/?cmd=view&pr=12031 ;; step-count? + bitmap/url ) @@ -75,13 +73,10 @@ -(define-stubs - image-url - open-image-url - color-list->image - ) +(define-stubs color-list->image) + (define (my-step-count? x) (and (integer? x) @@ -92,5 +87,10 @@ (error 'png-bytes->image "not implemented yet")) +(define image-url (procedure-rename bitmap/url 'image-url)) +(define open-image-url (procedure-rename bitmap/url 'open-image-url)) -(provide (rename-out [my-step-count? step-count?])) \ No newline at end of file + +(provide (rename-out [my-step-count? step-count?] + [bitmap/url image-url] + [bitmap/url open-image-url])) \ No newline at end of file diff --git a/js-assembler/runtime-src/baselib-functions.js b/js-assembler/runtime-src/baselib-functions.js index d3589c5..5b8dac9 100644 --- a/js-assembler/runtime-src/baselib-functions.js +++ b/js-assembler/runtime-src/baselib-functions.js @@ -329,15 +329,11 @@ return makePrimitiveProcedure( name, f.racketArity, - function () { - return f.apply(null, arguments); + function (MACHINE) { + return f(MACHINE); }); } else { - return new Closure( - f.label, - f.racketArity, - f.closedVals, - name); + return makeClosure(name, f.racketArity, f.label, f.closedVals); } }; diff --git a/js-assembler/runtime-src/baselib-primitives.js b/js-assembler/runtime-src/baselib-primitives.js index 8a021bd..d643443 100644 --- a/js-assembler/runtime-src/baselib-primitives.js +++ b/js-assembler/runtime-src/baselib-primitives.js @@ -881,6 +881,17 @@ }); + installPrimitiveProcedure( + 'procedure-rename', + 2, + function (MACHINE) { + var proc = checkProcedure(MACHINE, 'procedure-rename', 0); + var name = checkSymbol(MACHINE, 'procedure-rename', 1); + return baselib.functions.renameProcedure(proc, name); + }); + + + installPrimitiveProcedure( 'member', 2, diff --git a/lang/kernel.rkt b/lang/kernel.rkt index 088d035..6526f4f 100644 --- a/lang/kernel.rkt +++ b/lang/kernel.rkt @@ -255,6 +255,7 @@ raise-mismatch-error procedure? procedure-arity procedure-arity-includes? + procedure-rename pair? list? ;; (undefined? -undefined?)