From a6b14a62e4c347c6459d7aee6590581aff17f001 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Mon, 27 Apr 2009 01:41:53 +0000 Subject: * interp/sys-macros.lisp (makeSimpleArrayFromList): New. * algebra/array1.spad.pamphlet (construct$PrimitiveArray): Implement. (copy$PrimitiveArray): Likewise. (IndexedOneDimensionalArray): Rework. Explicitly use PrimitiveArray(S) as representation domain. --- src/interp/sys-macros.lisp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/interp/sys-macros.lisp') diff --git a/src/interp/sys-macros.lisp b/src/interp/sys-macros.lisp index 1564206b..db4b08ec 100644 --- a/src/interp/sys-macros.lisp +++ b/src/interp/sys-macros.lisp @@ -334,6 +334,9 @@ (defmacro |makeFilledSimpleArray| (|t| |n| |v|) `(make-array ,|n| :element-type ,|t| :initial-element ,|v|)) +(defmacro |makeSimpleArrayFromList| (|t| |l|) + `(make-array (list-length ,|l|) :element-type ,|t| :initial-contents ,|l|)) + (defmacro |getSimpleArrayEntry| (|a| |i|) `(aref (the simple-array ,|a|) (the fixnum ,|i|))) -- cgit v1.2.3