Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BackPort Pharo7: Moved becomeForward from Object to ProtoObject where it belongs #4084

Merged
merged 1 commit into from Jul 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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