Changeset 12638
- Timestamp:
- 04/28/10 21:04:28 (13 years ago)
- Location:
- branches/less-reflection/abcl/src/org/armedbear/lisp
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/less-reflection/abcl/src/org/armedbear/lisp/Lisp.java
r12630 r12638 2740 2740 } 2741 2741 2742 private static final SpecialOperator WITH_INLINE_CODE = new with_inline_code(); 2743 private static class with_inline_code extends SpecialOperator { 2744 with_inline_code() { 2745 super("with-inline-code", PACKAGE_JVM, true, "(&optional target repr) &body body"); 2746 } 2747 @Override 2748 public LispObject execute(LispObject args, Environment env) 2749 { 2750 return error(new SimpleError("This is a placeholder. It should only be called in compiled code, and tranformed by the compiler using special form handlers.")); 2751 } 2752 } 2753 2742 2754 } -
branches/less-reflection/abcl/src/org/armedbear/lisp/compiler-pass1.lisp
r12630 r12638 1433 1433 (UNWIND-PROTECT p1-unwind-protect) 1434 1434 (THREADS:SYNCHRONIZED-ON 1435 p1-threads-synchronized-on))) 1435 p1-threads-synchronized-on) 1436 (JVM::WITH-INLINE-CODE identity))) 1436 1437 (install-p1-handler (%car pair) (%cadr pair)))) 1437 1438 -
branches/less-reflection/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
r12630 r12638 2180 2180 (*code* *static-code*)) 2181 2181 ;; fixme *declare-inline* 2182 (declare-field g +lisp-object+ +field-access- default+)2182 (declare-field g +lisp-object+ +field-access-private+) 2183 2183 (emit 'new class-name) 2184 2184 (emit 'dup) … … 8609 8609 t) 8610 8610 8611 (defun p2-with-inline-code (form target representation) 8612 ;;form = (with-inline-code (&optional target-var repr-var) ...body...) 8613 (destructuring-bind (&optional target-var repr-var) (cadr form) 8614 (eval `(let (,@(when target-var `((,target-var ,target))) 8615 ,@(when repr-var `((,repr-var ,representation)))) 8616 ,@(cddr form))))) 8617 8611 8618 (defun compile-1 (compiland stream) 8612 8619 (let ((*all-variables* nil) … … 8987 8994 (install-p2-handler 'write-8-bits 'p2-write-8-bits) 8988 8995 (install-p2-handler 'zerop 'p2-zerop) 8996 (install-p2-handler 'with-inline-code 'p2-with-inline-code) 8989 8997 t) 8990 8998 -
branches/less-reflection/abcl/src/org/armedbear/lisp/precompiler.lisp
r12630 r12638 1022 1022 1023 1023 (THREADS:SYNCHRONIZED-ON 1024 precompile-threads-synchronized-on))) 1024 precompile-threads-synchronized-on) 1025 1026 (JVM::WITH-INLINE-CODE precompile-identity))) 1025 1027 (install-handler (first pair) (second pair)))) 1026 1028
Note: See TracChangeset
for help on using the changeset viewer.