diff options
author | dos-reis <gdr@axiomatics.org> | 2009-05-19 04:36:48 +0000 |
---|---|---|
committer | dos-reis <gdr@axiomatics.org> | 2009-05-19 04:36:48 +0000 |
commit | 85ffb95ec1d15c5467784f00bdc2e22cfb319162 (patch) | |
tree | dd156c85fb1745e11f2035260c8c1bde50cc435c /src | |
parent | d04de33ba92d864ae4e4f80fce2261a35fc79c31 (diff) | |
download | open-axiom-85ffb95ec1d15c5467784f00bdc2e22cfb319162.tar.gz |
* interp/vmlisp.lisp (LIST2VEC): Tidy.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 6 | ||||
-rw-r--r-- | src/interp/c-util.boot | 3 | ||||
-rw-r--r-- | src/interp/i-map.boot | 2 | ||||
-rw-r--r-- | src/interp/i-spec1.boot | 2 | ||||
-rw-r--r-- | src/interp/slam.boot | 2 | ||||
-rw-r--r-- | src/interp/vmlisp.lisp | 10 |
6 files changed, 11 insertions, 14 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 9a81c214..80597b5f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,4 +1,8 @@ -2009-05-18 Gabriel Dos Reis <gdr@cse.tamu.edu> +2009-05-18 Gabriel Dos Reis <gdr@cs.tamu.edu> + + * interp/vmlisp.lisp (LIST2VEC): Tidy. + +2009-05-18 Gabriel Dos Reis <gdr@cs.tamu.edu> * interp/i-analy.boot (bottomUpDefaultEval): A declared variable with no definition may be a symbolic variable with a specified type. diff --git a/src/interp/c-util.boot b/src/interp/c-util.boot index cfb1b9da..d5e78051 100644 --- a/src/interp/c-util.boot +++ b/src/interp/c-util.boot @@ -800,8 +800,7 @@ sublisV(p,e) == suba(p,e) == STRINGP e => e -- no need to descend vectors unless they are categories - --REFVECP e => LIST2REFVEC [suba(p,e.i) for i in 0..MAXINDEX e] - isCategory e => LIST2REFVEC [suba(p,e.i) for i in 0..MAXINDEX e] + isCategory e => LIST2VEC [suba(p,e.i) for i in 0..MAXINDEX e] atom e => (y:= ASSQ(e,p) => rest y; e) u:= suba(p,QCAR e) v:= suba(p,QCDR e) diff --git a/src/interp/i-map.boot b/src/interp/i-map.boot index 241ba8e0..2199f298 100644 --- a/src/interp/i-map.boot +++ b/src/interp/i-map.boot @@ -759,7 +759,7 @@ compileCoerceMap(op,argTypes,mm) == body := ['SPADCALL,:argCode,['LIST,['function,imp]]] minivectorName := makeInternalMapMinivectorName(name) body := substitute(minivectorName,"$$$",body) - setDynamicBinding(minivectorName,LIST2REFVEC $minivector) + setDynamicBinding(minivectorName,LIST2VEC $minivector) compileInteractive [name,['LAMBDA,parms,declareGlobalVariables [minivectorName],body]] CAR sig diff --git a/src/interp/i-spec1.boot b/src/interp/i-spec1.boot index 7f9600c0..f9b1fb60 100644 --- a/src/interp/i-spec1.boot +++ b/src/interp/i-spec1.boot @@ -156,7 +156,7 @@ compileADEFBody(t,vars,types,body,computedResultType) == $compiledOpNameList := [$mapName] minivectorName := makeInternalMapMinivectorName(PNAME $mapName) body := substitute(minivectorName,"$$$",body) - setDynamicBinding(minivectorName,LIST2REFVEC $minivector) + setDynamicBinding(minivectorName,LIST2VEC $minivector) -- The use of the three variables $definingMap, $genValue and $compilingMap -- is to cover the following cases: diff --git a/src/interp/slam.boot b/src/interp/slam.boot index 8adf4882..9e950e61 100644 --- a/src/interp/slam.boot +++ b/src/interp/slam.boot @@ -45,7 +45,7 @@ reportFunctionCompilation(op,nam,argl,body,isRecursive) == $compiledOpNameList := [nam] minivectorName := makeInternalMapMinivectorName(nam) body := substitute(minivectorName,"$$$",body) - setDynamicBinding(minivectorName,LIST2REFVEC $minivector) + setDynamicBinding(minivectorName,LIST2VEC $minivector) argl := COPY argl -- play it safe for optimization init := not(isRecursive and $compileRecurrence and #argl = 1) => nil diff --git a/src/interp/vmlisp.lisp b/src/interp/vmlisp.lisp index d47b763c..72d79e12 100644 --- a/src/interp/vmlisp.lisp +++ b/src/interp/vmlisp.lisp @@ -962,14 +962,8 @@ (defun LIST2VEC (list) (if (consp list) - (let* ((len (length list)) - (vec (make-array len))) - (dotimes (i len) - (setf (aref vec i) (pop list))) - vec) - (coerce list 'vector))) - -(define-function 'LIST2REFVEC #'LIST2VEC) + (make-array (list-length list) :initial-contents list) + (coerce list 'vector))) ; 16.2 Accessing |