remove code-table slot from methods
[bpt/guile.git] / module / oop / goops.scm
index a47c4ee..b67c4d4 100644 (file)
@@ -73,7 +73,7 @@
           primitive-generic-generic enable-primitive-generic!
           method-procedure accessor-method-slot-definition
           slot-exists? make find-method get-keyword)
-  :replace (<class> <operator-class> <entity-class> <entity>)
+  :replace (<class> <entity-class> <entity>)
   :no-backtrace)
 
 (define *goops-module* (current-module))
 (eval-when (eval load compile)
   (%init-goops-builtins))
 
+(eval-when (eval load compile)
+  (use-modules ((language tree-il primitives) :select (add-interesting-primitive!)))
+  (add-interesting-primitive! 'class-of)
+  (add-interesting-primitive! '@slot-ref)
+  (add-interesting-primitive! '@slot-set!))
+
 ;; Then load the rest of GOOPS
 (use-modules (oop goops util)
             (oop goops dispatch)
 ;; the idea is to compile the index into the procedure, for fastest
 ;; lookup. Also, @slot-ref and @slot-set! have their own bytecodes.
 
-(eval-when (compile)
-  (use-modules ((language tree-il primitives) :select (add-interesting-primitive!)))
-  (add-interesting-primitive! '@slot-ref)
-  (add-interesting-primitive! '@slot-set!))
-
 (eval-when (eval load compile)
   (define num-standard-pre-cache 20))
 
 (define-standard-accessor-method ((bound-check-get n) o)
   (let ((x (@slot-ref o n)))
     (if (unbound? x)
-        (slot-unbound obj)
+        (slot-unbound o)
         x)))
 
 (define-standard-accessor-method ((standard-get n) o)
           (set-object-procedure! object
                                  (lambda args (apply proc args)))))))
 
-(define-method (initialize (class <operator-class>) initargs)
-  (next-method)
-  (initialize-object-procedure class initargs))
-
-(define-method (initialize (owsc <operator-with-setter-class>) initargs)
-  (next-method)
-  (%set-object-setter! owsc (get-keyword #:setter initargs #f)))
-
 (define-method (initialize (entity <entity>) initargs)
   (next-method)
   (initialize-object-procedure entity initargs))
   (slot-set! method 'specializers (get-keyword #:specializers initargs '()))
   (slot-set! method 'procedure
             (get-keyword #:procedure initargs #f))
-  (slot-set! method 'code-table '())
   (slot-set! method 'formals (get-keyword #:formals initargs '()))
   (slot-set! method 'body (get-keyword #:body initargs '()))
   (slot-set! method 'make-procedure (get-keyword #:make-procedure initargs #f)))