Commit 88f4f695 authored by rschlatte@1c010e3e-69d0-11dd-93a8-456734b0d56f's avatar rschlatte@1c010e3e-69d0-11dd-93a8-456734b0d56f
Browse files

Move generic-function definition into Lisp

parent b1727612
......@@ -460,10 +460,6 @@ public class StandardClass extends SlotClass
addFuncallableStandardClass(Symbol.FUNCALLABLE_STANDARD_OBJECT,
list(STANDARD_OBJECT, BuiltInClass.FUNCTION));
public static final StandardClass GENERIC_FUNCTION =
addFuncallableStandardClass(Symbol.GENERIC_FUNCTION,
list(METAOBJECT, FUNCALLABLE_STANDARD_OBJECT));
public static final StandardClass CLASS =
addStandardClass(Symbol.CLASS, list(SPECIALIZER));
......@@ -581,9 +577,6 @@ public class StandardClass extends SlotClass
STANDARD_CLASS.setDirectSuperclass(CLASS);
STANDARD_OBJECT.setDirectSuperclass(BuiltInClass.CLASS_T);
FUNCALLABLE_STANDARD_OBJECT.setDirectSuperclasses(list(STANDARD_OBJECT, BuiltInClass.FUNCTION));
GENERIC_FUNCTION.setDirectSuperclasses(list(METAOBJECT,
FUNCALLABLE_STANDARD_OBJECT));
ARITHMETIC_ERROR.setCPL(ARITHMETIC_ERROR, ERROR, SERIOUS_CONDITION,
CONDITION, STANDARD_OBJECT, BuiltInClass.CLASS_T);
ARITHMETIC_ERROR.setDirectSlotDefinitions(
......@@ -639,10 +632,6 @@ public class StandardClass extends SlotClass
FUNCALLABLE_STANDARD_OBJECT.setCPL(FUNCALLABLE_STANDARD_OBJECT,
STANDARD_OBJECT, BuiltInClass.FUNCTION,
BuiltInClass.CLASS_T);
GENERIC_FUNCTION.setCPL(GENERIC_FUNCTION, METAOBJECT,
FUNCALLABLE_STANDARD_OBJECT, STANDARD_OBJECT,
BuiltInClass.FUNCTION,
BuiltInClass.CLASS_T);
JAVA_EXCEPTION.setCPL(JAVA_EXCEPTION, ERROR, SERIOUS_CONDITION, CONDITION,
STANDARD_OBJECT, BuiltInClass.CLASS_T);
JAVA_EXCEPTION.setDirectSlotDefinitions(
......@@ -741,7 +730,6 @@ public class StandardClass extends SlotClass
STANDARD_OBJECT.finalizeClass();
FUNCALLABLE_STANDARD_OBJECT.finalizeClass();
FUNCALLABLE_STANDARD_CLASS.finalizeClass();
GENERIC_FUNCTION.finalizeClass();
ARITHMETIC_ERROR.finalizeClass();
CELL_ERROR.finalizeClass();
CONDITION.finalizeClass();
......
......@@ -189,9 +189,8 @@
(add-subclasses 'function 'funcallable-standard-object)
(add-subclasses 'standard-object '(funcallable-standard-object metaobject))
(add-subclasses 'metaobject
'(generic-function method slot-definition specializer))
'(method slot-definition specializer))
(add-subclasses 'specializer '(class))
(add-subclasses 'funcallable-standard-object 'generic-function)
(add-subclasses 'method 'standard-method)
(add-subclasses 'slot-definition
'(direct-slot-definition effective-slot-definition
......@@ -996,6 +995,10 @@ Will not modify existing classes to avoid breaking std-generic-function-p."
(defconstant +the-forward-referenced-class+
(find-class 'forward-referenced-class))
(define-funcallable-primordial-class generic-function
(metaobject funcallable-standard-object)
())
(define-funcallable-primordial-class standard-generic-function (generic-function)
((sys::name :initarg :name :initform nil)
(sys::lambda-list :initarg :lambda-list :initform nil)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment