Changeset 11398 for trunk/tests


Ignore:
Timestamp:
Nov 18, 2008, 8:56:50 PM (11 years ago)
Author:
gz
Message:

Add regression test for overeager make-instance optimization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/ansi-tests/ccl.lsp

    r11366 r11398  
    649649      (ccl.50911-slot-a (make-instance 'ccl.50911-class :a :test)))
    650650  :test)
     651
     652(deftest ccl.50911-a
     653    (let ((called 0))
     654      (defclass ccl.50911-a () ())
     655      (defun ccl.50911-a-fn () (make-instance 'ccl.50911-a))
     656      (defmethod initialize-instance ((x ccl.50911-a) &rest keys) keys (incf called))
     657      (ccl.50911-a-fn)
     658      (defmethod initialize-instance :after ((x ccl.50911-a) &rest keys) keys (incf called))
     659      (ccl.50911-a-fn)
     660      (ccl::optimize-make-instance-for-class-name 'ccl.50911-a)
     661      (ccl.50911-a-fn)
     662      called)
     663  5)
     664
    651665
    652666;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Note: See TracChangeset for help on using the changeset viewer.