Changeset 12620
- Timestamp:
- 04/16/10 13:41:21 (14 years ago)
- Location:
- trunk/abcl/src/org/armedbear/lisp
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/StandardClass.java
r12583 r12620 495 495 public static final StandardClass COMPILER_ERROR = 496 496 addStandardClass(Symbol.COMPILER_ERROR, list(CONDITION)); 497 498 public static final StandardClass INTERNAL_COMPILER_ERROR = 499 addStandardClass(Symbol.INTERNAL_COMPILER_ERROR, list(CONDITION)); 497 500 498 501 public static final StandardClass COMPILER_UNSUPPORTED_FEATURE_ERROR = … … 554 557 COMPILER_ERROR.setCPL(COMPILER_ERROR, CONDITION, STANDARD_OBJECT, 555 558 BuiltInClass.CLASS_T); 559 INTERNAL_COMPILER_ERROR.setCPL(INTERNAL_COMPILER_ERROR, CONDITION, STANDARD_OBJECT, 560 BuiltInClass.CLASS_T); 556 561 COMPILER_UNSUPPORTED_FEATURE_ERROR.setCPL(COMPILER_UNSUPPORTED_FEATURE_ERROR, 557 562 CONDITION, STANDARD_OBJECT, … … 676 681 CELL_ERROR.finalizeClass(); 677 682 COMPILER_ERROR.finalizeClass(); 683 INTERNAL_COMPILER_ERROR.finalizeClass(); 678 684 COMPILER_UNSUPPORTED_FEATURE_ERROR.finalizeClass(); 679 685 CONDITION.finalizeClass(); -
trunk/abcl/src/org/armedbear/lisp/Symbol.java
r12617 r12620 2893 2893 public static final Symbol COMPILER_ERROR = 2894 2894 PACKAGE_EXT.addExternalSymbol("COMPILER-ERROR"); 2895 public static final Symbol INTERNAL_COMPILER_ERROR = 2896 PACKAGE_EXT.addExternalSymbol("INTERNAL-COMPILER-ERROR"); 2895 2897 public static final Symbol COMPILER_UNSUPPORTED_FEATURE_ERROR = 2896 2898 PACKAGE_EXT.addExternalSymbol("COMPILER-UNSUPPORTED-FEATURE-ERROR"); -
trunk/abcl/src/org/armedbear/lisp/compile-file.lisp
r12619 r12620 146 146 ,@decls (block ,block-name ,@body))) 147 147 (classfile (next-classfile-name)) 148 (compilation-failure-p nil) 148 149 (result (with-open-file 149 150 (f classfile … … 151 152 :element-type '(unsigned-byte 8) 152 153 :if-exists :supersede) 153 (report-error 154 (jvm:compile-defun name expr nil 155 classfile f nil)))) 156 (compiled-function (verify-load classfile))) 154 (handler-bind 155 ((internal-compiler-error 156 #'(lambda (e) 157 (setf compilation-failure-p e) 158 (continue)))) 159 (report-error 160 (jvm:compile-defun name expr nil 161 classfile f nil))))) 162 (compiled-function (and (not compilation-failure-p) 163 (verify-load classfile)))) 157 164 (declare (ignore result)) 158 165 (cond 159 (compiled-function 166 ((and (not compilation-failure-p) 167 compiled-function) 160 168 (setf form 161 169 `(fset ',name … … 170 178 (format *error-output* 171 179 "; Unable to compile function ~A~%" name) 180 (when compilation-failure-p 181 (format *error-output* 182 "; ~A~%" compilation-failure-p)) 172 183 (let ((precompiled-function 173 184 (precompiler:precompile-form expr nil … … 514 525 *forms-for-output*) 515 526 (jvm::with-saved-compiler-policy 516 (jvm::with-file-compilation 517 (handler-bind ((style-warning #'(lambda (c) 518 (setf warnings-p t) 519 ;; let outer handlers 520 ;; do their thing 521 (signal c) 522 ;; prevent the next 523 ;; handler from running: 524 ;; we're a WARNING subclass 525 (continue))) 526 ((or warning 527 compiler-error) #'(lambda (c) 527 (jvm::with-file-compilation 528 (handler-bind ((style-warning 529 #'(lambda (c) 530 (setf warnings-p t) 531 ;; let outer handlers do their thing 532 (signal c) 533 ;; prevent the next handler 534 ;; from running: we're a 535 ;; WARNING subclass 536 (continue))) 537 ((or warning 538 compiler-error) 539 #'(lambda (c) 528 540 (declare (ignore c)) 529 541 (setf warnings-p t -
trunk/abcl/src/org/armedbear/lisp/compiler-error.lisp
r11391 r12620 36 36 compiler-warn 37 37 compiler-error 38 internal-compiler-error 38 39 compiler-unsupported)) 39 40 … … 55 56 :format-arguments format-arguments)) 56 57 58 (defun internal-compiler-error (format-control &rest format-arguments) 59 (signal 'internal-compiler-error 60 :format-control format-control 61 :format-arguments format-arguments)) 62 57 63 (defun compiler-unsupported (format-control &rest format-arguments) 58 64 (error 'compiler-unsupported-feature-error -
trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
r12581 r12620 1343 1343 (unless (= (the fixnum instruction-depth) (the fixnum (+ depth instruction-stack))) 1344 1344 (format t "~&Stack inconsistency at index ~D: found ~S, expected ~S.~%" 1345 i instruction-depth (+ depth instruction-stack))) 1345 i instruction-depth (+ depth instruction-stack)) 1346 (internal-compiler-error "Stack inconsistency detected in ~A." 1347 (compiland-name *current-compiland*))) 1346 1348 (return-from walk-code)) 1347 1349 (let ((opcode (instruction-opcode instruction))) -
trunk/abcl/src/org/armedbear/lisp/make_condition.java
r12481 r12620 122 122 if (symbol == Symbol.COMPILER_ERROR) 123 123 return new CompilerError(initArgs); 124 if (symbol == Symbol.INTERNAL_COMPILER_ERROR) 125 return new InternalCompilerError(initArgs); 124 126 if (symbol == Symbol.COMPILER_UNSUPPORTED_FEATURE_ERROR) 125 127 return new CompilerUnsupportedFeatureError(initArgs);
Note: See TracChangeset
for help on using the changeset viewer.