Skip to content

Commit 209576a

Browse files
authored
Merge pull request #44 from dionisiydk/pharo9Compatibility
Pharo9 compatibility
2 parents 38c41b2 + 82bd604 commit 209576a

6 files changed

+40
-8
lines changed

Seamless-GTSupport/SeamlessRemoteClassScope.class.st

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
Class {
22
#name : #SeamlessRemoteClassScope,
33
#superclass : #OCClassScope,
4-
#category : 'Seamless-GTSupport'
4+
#category : #'Seamless-GTSupport'
55
}
66

77
{ #category : #lookup }
88
SeamlessRemoteClassScope >> lookupVar: name [
99
"Return a SemVar for my pool var with this name. Return nil if none found"
10+
| ocClass |
1011
^(class bindingOf: name asSymbol) ifNotNil: [:assoc |
11-
OCLiteralVariable new
12+
"Compatibility with Pharo 9 where all variables were unified under single Variable hierarchy"
13+
(self class environment hasClassNamed: #OCLiteralVariable) ifFalse: [ ^assoc ].
14+
ocClass := self class environment classNamed: #OCLiteralVariable.
15+
ocClass isDeprecated ifTrue: [ ^ assoc ].
16+
ocClass new
1217
assoc: assoc;
1318
scope: self;
1419
yourself]

Seamless/CompiledBlock.extension.st

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Extension { #name : #CompiledBlock }
2+
3+
{ #category : #'*Seamless' }
4+
CompiledBlock >> isOnlyDefaultTransferStrategyAllowed [
5+
"CompiledBlock is an essential part of CompiledMethod with strong requirements from the VM.
6+
So it must be always transferred by value"
7+
^true
8+
]
9+
10+
{ #category : #'*Seamless' }
11+
CompiledBlock >> seamlessDefaultTransferStrategy [
12+
"CompiledBlock is an essential part of CompiledMethod with strong requirements from the VM.
13+
So it must be always transferred by value"
14+
^SeamlessTransferStrategy defaultByValue
15+
]

Seamless/CompiledCode.extension.st

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Extension { #name : #CompiledCode }
2+
3+
{ #category : #'*Seamless' }
4+
CompiledCode >> prepareValueTransferBy: aSeamlessTransporter [
5+
6+
self literalsDo: [ :each | each prepareMethodTransferBy: aSeamlessTransporter ]
7+
]

Seamless/CompiledMethod.extension.st

-6
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,3 @@ Extension { #name : #CompiledMethod }
44
CompiledMethod class >> definesWellKnownSeamlessClass [
55
^true
66
]
7-
8-
{ #category : #'*Seamless' }
9-
CompiledMethod >> prepareValueTransferBy: aSeamlessTransporter [
10-
11-
self literalsDo: [ :each | each prepareMethodTransferBy: aSeamlessTransporter ]
12-
]

Seamless/LiteralVariable.extension.st

+5
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,8 @@ Extension { #name : #LiteralVariable }
44
LiteralVariable class >> definesWellKnownSeamlessClass [
55
^true
66
]
7+
8+
{ #category : #'*Seamless' }
9+
LiteralVariable >> seamlessDefaultTransferStrategy [
10+
^SeamlessTransferStrategy defaultByValue
11+
]

Seamless/Slot.extension.st

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Extension { #name : #Slot }
2+
3+
{ #category : #'*Seamless' }
4+
Slot >> seamlessDefaultTransferStrategy [
5+
^SeamlessTransferStrategy defaultByValue
6+
]

0 commit comments

Comments
 (0)