Changeset 13157
- Timestamp:
- 01/19/11 13:09:14 (13 years ago)
- Location:
- branches/unsafe-p-removal/abcl/src/org/armedbear/lisp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/unsafe-p-removal/abcl/src/org/armedbear/lisp/compiler-pass1.lisp
r13153 r13157 1154 1154 '( 1155 1155 1156 %ldb1157 and1158 aset1159 1156 char 1160 1157 char-code … … 1192 1189 mod 1193 1190 not 1194 nthcdr1195 1191 null 1196 1192 or … … 1221 1217 vector-push-extend 1222 1218 write-8-bits 1223 with-inline-code)1219 ) 1224 1220 "The functions named in the list bound to this variable 1225 1221 need to be rewritten if UNSAFE-P returns non-NIL for their -
branches/unsafe-p-removal/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
r13155 r13157 4663 4663 ((and (fixnum-type-p size-type) 4664 4664 (fixnum-type-p position-type)) 4665 (compile-forms-and-maybe-emit-clear-values size-arg 'stack :int 4666 position-arg 'stack :int 4667 arg3 'stack nil) 4665 (with-operand-accumulation 4666 ((compile-operand size-arg :int) 4667 (compile-operand position-arg :int) 4668 (compile-operand arg3 nil) 4669 (maybe-emit-clear-values size-arg position-arg arg3))) 4668 4670 (emit 'dup_x2) ;; use not supported by emit-dup: 3 values involved 4669 4671 (emit 'pop) … … 5975 5977 (*register* *register*) 5976 5978 (value-register (unless (null target) (allocate-register nil)))) 5979 (with-operand-accumulation 5980 ( 5977 5981 ;; array 5978 (compile-form arg1 'stacknil)5982 (compile-operand arg1 nil) 5979 5983 ;; index 5980 (compile-form arg2 'stack:int)5984 (compile-operand arg2 :int) 5981 5985 ;; value 5982 (cond ((fixnum-type-p type3) 5983 (compile-form arg3 'stack :int) 5984 (when value-register 5985 (emit 'dup) 5986 (emit-move-from-stack value-register :int))) 5987 (t 5988 (compile-form arg3 'stack nil) 5989 (when value-register 5990 (emit 'dup) 5991 (emit-move-from-stack value-register nil)))) 5986 (accumulate-operand 5987 ((when (fixnum-type-p type3) :int) 5988 :unsafe-p (some-nested-block 5989 #'node-opstack-unsafe-p 5990 (find-enclosed-blocks arg3))) 5991 (cond ((fixnum-type-p type3) 5992 (compile-form arg3 'stack :int) 5993 (when value-register 5994 (emit 'dup) 5995 (emit-move-from-stack value-register :int))) 5996 (t 5997 (compile-form arg3 'stack nil) 5998 (when value-register 5999 (emit 'dup) 6000 (emit-move-from-stack value-register nil))))))) 5992 6001 (maybe-emit-clear-values arg1 arg2 arg3) 5993 6002 (cond ((fixnum-type-p type3) 5994 6003 (emit-invokevirtual +lisp-object+ "aset" '(:int :int) nil)) 5995 6004 (t 5996 (emit-invokevirtual +lisp-object+ "aset" (list :int +lisp-object+) nil))) 6005 (emit-invokevirtual +lisp-object+ "aset" 6006 (list :int +lisp-object+) nil))) 5997 6007 (when value-register 5998 6008 (cond ((fixnum-type-p type3) … … 6148 6158 (arg2 (%cadr args))) 6149 6159 (cond ((fixnum-type-p (derive-compiler-type arg1)) 6150 (compile-forms-and-maybe-emit-clear-values arg1 'stack :int 6151 arg2 'stack nil) 6160 (with-operand-accumulation 6161 ((compile-operand arg1 :int) 6162 (compile-operand arg2 nil) 6163 (maybe-emit-clear-values arg1 arg2))) 6152 6164 (emit 'swap) 6153 6165 (emit-invokevirtual +lisp-object+ "nthcdr" '(:int) +lisp-object+)
Note: See TracChangeset
for help on using the changeset viewer.