From b8ff537e81fc742c8374eee7208f5855db9c8cd7 Mon Sep 17 00:00:00 2001 From: Norbert Hartl Date: Wed, 24 Jul 2019 08:45:08 +0200 Subject: [PATCH] Moved becomeForward from Object to ProtoObject where it belongs --- src/Kernel/Object.class.st | 18 ------------------ src/Kernel/ProtoObject.class.st | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/Kernel/Object.class.st b/src/Kernel/Object.class.st index f5816be3a1e..17caab82acd 100644 --- a/src/Kernel/Object.class.st +++ b/src/Kernel/Object.class.st @@ -499,24 +499,6 @@ Object >> beWritableObject [ ^self setIsReadOnlyObject: false ] -{ #category : #'reflective operations' } -Object >> becomeForward: otherObject [ - "Primitive. All variables in the entire system that used to point - to the receiver now point to the argument. - Fails if either argument is a SmallInteger." - - {self} elementsForwardIdentityTo: {otherObject} -] - -{ #category : #'reflective operations' } -Object >> becomeForward: otherObject copyHash: copyHash [ - "Primitive. All variables in the entire system that used to point to the receiver now point to the argument. - If copyHash is true, the argument's identity hash bits will be set to those of the receiver. - Fails if either argument is a SmallInteger." - - {self} elementsForwardIdentityTo: {otherObject} copyHash: copyHash -] - { #category : #binding } Object >> bindingOf: aString [ ^nil diff --git a/src/Kernel/ProtoObject.class.st b/src/Kernel/ProtoObject.class.st index 994d80f72ba..dc14457fef6 100644 --- a/src/Kernel/ProtoObject.class.st +++ b/src/Kernel/ProtoObject.class.st @@ -45,6 +45,24 @@ ProtoObject >> become: otherObject [ {self} elementsExchangeIdentityWith: {otherObject} ] +{ #category : #'reflective operations' } +ProtoObject >> becomeForward: otherObject [ + "Primitive. All variables in the entire system that used to point + to the receiver now point to the argument. + Fails if either argument is a SmallInteger." + + {self} elementsForwardIdentityTo: {otherObject} +] + +{ #category : #'reflective operations' } +ProtoObject >> becomeForward: otherObject copyHash: copyHash [ + "Primitive. All variables in the entire system that used to point to the receiver now point to the argument. + If copyHash is true, the argument's identity hash bits will be set to those of the receiver. + Fails if either argument is a SmallInteger." + + {self} elementsForwardIdentityTo: {otherObject} copyHash: copyHash +] + { #category : #'reflective operations' } ProtoObject >> cannotInterpret: aMessage [ "Handle the fact that there was an attempt to send the given message to the receiver but a null methodDictionary was encountered while looking up the message selector. Hopefully this is the result of encountering a stub for a swapped out class which induces this exception on purpose."