Changeset 11926
- Timestamp:
- 05/22/09 18:04:53 (14 years ago)
- Location:
- trunk/abcl/src/org/armedbear/lisp
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/Environment.java
r11924 r11926 348 348 } 349 349 }; 350 351 // ### environment-all-functions 352 private static final Primitive ENVIRONMENT_ALL_FUNS = 353 new Primitive("environment-all-functions", PACKAGE_SYS, true, "environment") 354 { 355 @Override 356 public LispObject execute(LispObject arg) throws ConditionThrowable 357 { 358 Environment env = checkEnvironment(arg); 359 LispObject result = NIL; 360 for (FunctionBinding binding = env.lastFunctionBinding; 361 binding != null; binding = binding.next) 362 result = result.push(new Cons(binding.name, binding.value)); 363 return result.nreverse(); 364 } 365 }; 350 366 } -
trunk/abcl/src/org/armedbear/lisp/Primitives.java
r11924 r11926 1787 1787 } 1788 1788 }; 1789 1790 // ### macro-function-p 1791 private static final Primitive MACRO_FUNCTION_P = 1792 new Primitive("macro-function-p", PACKAGE_SYS, true, "value") 1793 { 1794 @Override 1795 public LispObject execute(LispObject arg) throws ConditionThrowable 1796 { 1797 return (arg instanceof MacroObject) ? T : NIL; 1798 } 1799 }; 1800 1789 1801 1790 1802 // ### make-symbol-macro -
trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
r11925 r11926 3029 3029 (local-function-variable local-function)) 3030 3030 'stack nil)) 3031 ((local-function-environment local-function) 3032 (assert (local-function-references-allowed-p local-function)) 3033 (assert (not *file-compilation*)) 3034 (emit 'getstatic *this-class* 3035 (declare-object (local-function-environment local-function) 3036 +lisp-environment+ 3037 +lisp-environment-class+) 3038 +lisp-environment+) 3039 (emit 'getstatic *this-class* 3040 (declare-object (local-function-name local-function)) 3041 +lisp-object+) 3042 (emit-invokevirtual +lisp-environment-class+ "lookupFunction" 3043 (list +lisp-object+) 3044 +lisp-object+)) 3031 3045 (t 3032 3046 (dformat t "compile-local-function-call default case~%") … … 8241 8255 (*closure-variables* nil) 8242 8256 (*undefined-variables* nil) 8243 (*local-functions* nil)8257 (*local-functions* *local-functions*) 8244 8258 (*current-compiland* compiland)) 8245 8259 (with-saved-compiler-policy … … 8418 8432 (*file-compilation* nil) 8419 8433 (*visible-variables* nil) 8434 (*local-functions* nil) 8420 8435 (*pathnames-generator* #'make-temp-file) 8421 8436 (sys::*fasl-anonymous-package* (sys::%make-package)) … … 8442 8457 (not (sys:symbol-macro-p (cdr var))) 8443 8458 :compiland NIL) *visible-variables*))) 8459 (when environment 8460 (dolist (fun (reverse (environment-all-functions environment))) 8461 (push (make-local-function :name (car fun) 8462 :references-allowed-p 8463 (not (macro-function-p (cdr fun))) 8464 :environment environment) 8465 *local-functions*))) 8444 8466 ;; FIXME: we still need to add local functions, ofcourse. 8445 8467 (handler-bind -
trunk/abcl/src/org/armedbear/lisp/jvm.lisp
r11924 r11926 338 338 compiland 339 339 inline-expansion 340 function ;; the function loaded through load-compiled-function 341 class-file 342 variable ;; the variable which contains the loaded compiled function 343 ;; or compiled closure 340 function ;; the function loaded through load-compiled-function 341 class-file ;; the class file structure for this function 342 variable ;; the variable which contains the loaded compiled function 343 ;; or compiled closure 344 environment ;; the environment in which the function is stored in 345 ;; case of a function from an enclosing lexical environment 346 ;; which itself isn't being compiled 347 (references-allowed-p t) 344 348 ) 345 349
Note: See TracChangeset
for help on using the changeset viewer.