adding in the list library as part of the base language. Output .xhtml has ballooned a bit.

This commit is contained in:
Danny Yoo 2011-08-19 17:27:24 -04:00
parent 45783388ba
commit 304a951490
2 changed files with 26 additions and 25 deletions

View File

@ -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( installPrimitiveProcedure(
'vector->list', 'vector->list',
1, 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( installPrimitiveProcedure(

View File

@ -1,10 +1,10 @@
#lang s-exp "kernel.rkt" #lang s-exp "kernel.rkt"
(provide (except-out (all-from-out "kernel.rkt") (provide (except-out (all-from-out "kernel.rkt"))
) (all-from-out "private/list.rkt"))
;;(all-from-out "private/list.rkt")
)
(require racket/private/modbeg (require "private/list.rkt")
;"private/list.rkt"
)
;; Kludge: This forces modbeg to be compiled and packaged.
(require racket/private/modbeg)