Changeset 15034
- Timestamp:
- 06/03/17 04:35:20 (6 years ago)
- Location:
- trunk/abcl
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
r14951 r15034 5532 5532 (define-inlined-function compile-nth (form target representation) 5533 5533 ((check-arg-count form 2)) 5534 (let ((index-form (second form)) 5535 (list-form (third form))) 5534 (let* ((index-form (second form)) 5535 (list-form (third form)) 5536 (index-type (derive-compiler-type index-form))) 5537 (unless (fixnum-type-p index-type) 5538 (compile-function-call form target representation) 5539 (return-from compile-nth)) 5536 5540 (with-operand-accumulation 5537 5541 ((compile-operand index-form :int) … … 5539 5543 (maybe-emit-clear-values index-form list-form)) 5540 5544 (emit 'swap) 5541 (emit-invokevirtual +lisp-object+ "NTH" '(:int) +lisp-object+)) 5542 (fix-boxing representation nil) ; FIXME use derived result type 5543 (emit-move-from-stack target representation))) 5545 (emit-invokevirtual +lisp-object+ "NTH" '(:int) +lisp-object+)))) 5544 5546 5545 5547 (defun p2-times (form target representation) -
trunk/abcl/test/lisp/abcl/misc-tests.lisp
r15004 r15034 131 131 (destructuring-bind (a . b) '(1) (list a b)) 132 132 (1 NIL)) 133 134 ;; this used to fail during byte code verification 135 (deftest nth.inlined.1 136 (prog1 T (compile NIL (lambda (list) (nth (lambda ()) list)))) 137 T)
Note: See TracChangeset
for help on using the changeset viewer.