diff --git a/js-assembler/runtime-src/baselib-primitives.js b/js-assembler/runtime-src/baselib-primitives.js index 0334d0e..9c1965a 100644 --- a/js-assembler/runtime-src/baselib-primitives.js +++ b/js-assembler/runtime-src/baselib-primitives.js @@ -541,6 +541,25 @@ }); + installPrimitiveProcedure( + 'make-vector', + makeList(1, 2), + function (MACHINE) { + var value = 0; + var length = baselib.numbers.toFixnum( + checkNatural(MACHINE, 'make-vector', 0)); + if (MACHINE.argcount === 2) { + value = MACHINE.env[MACHINE.env.length - 2]; + } + var arr = []; + var i; + for(i = 0; i < length; i++) { + arr[i] = value; + } + return makeVector.apply(null, arr); + }); + + installPrimitiveProcedure( 'vector->list', 1, @@ -690,24 +709,6 @@ - installPrimitiveProcedure( - 'make-vector', - makeList(1, 2), - function (MACHINE) { - var value = 0; - var length = baselib.numbers.toFixnum( - checkNatural(MACHINE, 'make-vector', 0)); - if (MACHINE.argcount === 2) { - value = MACHINE.env[MACHINE.env.length - 2]; - } - var arr = []; - var i; - for(i = 0; i < length; i++) { - arr[i] = value; - } - return makeVector.apply(null, arr); - }); - installPrimitiveProcedure( diff --git a/lang/base.rkt b/lang/base.rkt index 9c5e3cf..43ee2b8 100644 --- a/lang/base.rkt +++ b/lang/base.rkt @@ -1,10 +1,10 @@ #lang s-exp "kernel.rkt" -(provide (except-out (all-from-out "kernel.rkt") - ) - ;;(all-from-out "private/list.rkt") - ) +(provide (except-out (all-from-out "kernel.rkt")) + (all-from-out "private/list.rkt")) -(require racket/private/modbeg - ;"private/list.rkt" - ) \ No newline at end of file +(require "private/list.rkt") + + +;; Kludge: This forces modbeg to be compiled and packaged. +(require racket/private/modbeg) \ No newline at end of file