--- a/UndefinedObject.st Mon Oct 10 01:29:01 1994 +0100
+++ b/UndefinedObject.st Mon Oct 10 01:29:28 1994 +0100
@@ -1,6 +1,6 @@
"
COPYRIGHT (c) 1988 by Claus Gittinger
- All Rights Reserved
+ All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
@@ -19,9 +19,9 @@
UndefinedObject comment:'
COPYRIGHT (c) 1988 by Claus Gittinger
- All Rights Reserved
+ All Rights Reserved
-$Header: /cvs/stx/stx/libbasic/UndefinedObject.st,v 1.11 1994-08-05 01:02:56 claus Exp $
+$Header: /cvs/stx/stx/libbasic/UndefinedObject.st,v 1.12 1994-10-10 00:29:03 claus Exp $
'!
!UndefinedObject class methodsFor:'documentation'!
@@ -29,7 +29,7 @@
copyright
"
COPYRIGHT (c) 1988 by Claus Gittinger
- All Rights Reserved
+ All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
@@ -42,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libbasic/UndefinedObject.st,v 1.11 1994-08-05 01:02:56 claus Exp $
+$Header: /cvs/stx/stx/libbasic/UndefinedObject.st,v 1.12 1994-10-10 00:29:03 claus Exp $
"
!
@@ -149,6 +149,13 @@
!UndefinedObject methodsFor:'copying'!
+copy
+ "return a shallow copy of myself
+ - since there is only one nil in the system return self"
+
+ ^ self
+!
+
shallowCopy
"return a shallow copy of myself
- since there is only one nil in the system return self"
@@ -156,6 +163,13 @@
^ self
!
+deepCopy
+ "return a deep copy of myself
+ - since there is only one nil in the system return self"
+
+ ^ self
+!
+
simpleDeepCopy
"return a deep copy of myself
- since there is only one nil in the system return self"
@@ -168,13 +182,6 @@
- since there is only one nil in the system return self"
^ self
-!
-
-deepCopy
- "return a deep copy of myself
- - since there is only one nil in the system return self"
-
- ^ self
! !
!UndefinedObject methodsFor:'printing & storing'!
@@ -218,70 +225,73 @@
!UndefinedObject methodsFor:'subclass creation'!
subclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat
- "create a new class which has nil as superclass - i.e. traps into doesNotUnderstand: for
- all of its messages."
+ "create a new class which has nil as superclass
+ - i.e. traps into doesNotUnderstand: for all of its messages."
|newClass upd|
upd := Class updateChanges:false.
[
- newClass := Object subclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat.
+ newClass := Object subclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat.
] valueNowOrOnUnwindDo:[
- Class updateChanges:upd
+ Class updateChanges:upd
].
newClass notNil ifTrue:[
- newClass setSuperclass:nil.
- newClass setMethodArray:(Array with:(Object compiledMethodAt:#class)
- with:(Object compiledMethodAt:#doesNotUnderstand:)).
- newClass setSelectorArray:(Array with:#class
- with:#doesNotUnderstand:).
- Class addChangeRecordForClass:newClass.
+ newClass setSuperclass:nil.
+ newClass
+ setSelectors:(Array with:#class
+ with:#doesNotUnderstand:)
+ methods:(Array with:(Object compiledMethodAt:#class)
+ with:(Object compiledMethodAt:#doesNotUnderstand:)).
+ Class addChangeRecordForClass:newClass.
].
^ newClass
!
variableSubclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat
- "create a new class which has nil as superclass - i.e. traps into doesNotUnderstand: for
- all of its messages."
+ "create a new class which has nil as superclass
+ - i.e. traps into doesNotUnderstand: for all of its messages."
|newClass upd|
upd := Class updateChanges:false.
[
- newClass := Object variableSubclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat.
+ newClass := Object variableSubclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat.
] valueNowOrOnUnwindDo:[
- Class updateChanges:upd
+ Class updateChanges:upd
].
newClass notNil ifTrue:[
- newClass setSuperclass:nil.
- newClass setMethodArray:(Array with:(Object compiledMethodAt:#class)
- with:(Object compiledMethodAt:#doesNotUnderstand:)).
- newClass setSelectorArray:(Array with:#class
- with:#doesNotUnderstand:).
- Class addChangeRecordForClass:newClass.
+ newClass setSuperclass:nil.
+ newClass
+ setSelectors:(Array with:#class
+ with:#doesNotUnderstand:)
+ methods:(Array with:(Object compiledMethodAt:#class)
+ with:(Object compiledMethodAt:#doesNotUnderstand:)).
+ Class addChangeRecordForClass:newClass.
].
^ newClass
!
variableByteSubclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat
- "create a new class which has nil as superclass - i.e. traps into doesNotUnderstand: for
- all of its messages."
+ "create a new class which has nil as superclass
+ - i.e. traps into doesNotUnderstand: for all of its messages."
|newClass upd|
upd := Class updateChanges:false.
[
- newClass := Object variableByteSubclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat.
+ newClass := Object variableByteSubclass:t instanceVariableNames:f classVariableNames:d poolDictionaries:s category:cat.
] valueNowOrOnUnwindDo:[
- Class updateChanges:upd
+ Class updateChanges:upd
].
newClass notNil ifTrue:[
- newClass setSuperclass:nil.
- newClass setMethodArray:(Array with:(Object compiledMethodAt:#class)
- with:(Object compiledMethodAt:#doesNotUnderstand:)).
- newClass setSelectorArray:(Array with:#class
- with:#doesNotUnderstand:).
- Class addChangeRecordForClass:newClass.
+ newClass setSuperclass:nil.
+ newClass
+ setSelectors:(Array with:#class
+ with:#doesNotUnderstand:)
+ methods:(Array with:(Object compiledMethodAt:#class)
+ with:(Object compiledMethodAt:#doesNotUnderstand:)).
+ Class addChangeRecordForClass:newClass.
].
^ newClass
! !