Skip to content

Commit

Permalink
Merge pull request #4084 from noha/Pharo7.0
Browse files Browse the repository at this point in the history
BackPort Pharo7: Moved becomeForward from Object to ProtoObject where it belongs
  • Loading branch information
MarcusDenker committed Jul 24, 2019
2 parents b8c5878 + b8ff537 commit ccd1f64
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
18 changes: 0 additions & 18 deletions src/Kernel/Object.class.st
Expand Up @@ -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
Expand Down
18 changes: 18 additions & 0 deletions src/Kernel/ProtoObject.class.st
Expand Up @@ -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."
Expand Down

0 comments on commit ccd1f64

Please sign in to comment.