-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3def3fe
commit 603a4e9
Showing
3 changed files
with
72 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
src/BaselineOfGToolkitPrerequisites/BaselineOfGToolkitPrerequisites.class.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
Class { | ||
#name : #BaselineOfGToolkitPrerequisites, | ||
#superclass : #BaselineOf, | ||
#classVars : [ | ||
'PostLoaded' | ||
], | ||
#category : #BaselineOfGToolkitPrerequisites | ||
} | ||
|
||
{ #category : #accessing } | ||
BaselineOfGToolkitPrerequisites >> baseline: spec [ | ||
|
||
<baseline> | ||
spec for: #common do: [ | ||
spec postLoadDoIt: #postLoadGToolkit:. | ||
spec | ||
package: 'GToolkit-Pharo9-Deprecations'; | ||
package: 'GToolkit-Pharo9-Debugger'; | ||
package: 'GToolkit-Pharo9-Subscriptions'; | ||
package: 'GToolkit-Pharo9-Iceberg'; | ||
package: 'GToolkit-PharoMigrations'; | ||
package: 'GToolkit-Pharo9' ] | ||
] | ||
|
||
{ #category : #accessing } | ||
BaselineOfGToolkitPrerequisites >> postLoadGToolkit: spec [ | ||
(PostLoaded isNotNil and: [ PostLoaded ]) ifTrue: [ ^ self ]. | ||
PostLoaded := true. | ||
|
||
self | ||
forPharo11AndPharo12: [ | ||
#(#FinalizationRegistryEntry #WeakKeyAssociation) do: [ :aClassName | | ||
aClassName asClass classSide | ||
compile: 'leJsonV4Name | ||
^ nil' classified: 'serialisation' ]. | ||
|
||
RBInlineMethodRefactoring addSlot: #inlineClass. | ||
RBInlineMethodRefactoring compile: 'inlineClass | ||
^ inlineClass | ||
ifNil: [ inlineClass := ( sourceMessage receiver name = ''super'' | ||
ifTrue: [ class superclass ] | ||
ifFalse: [ class ] ) whoDefinesMethod: self inlineSelector | ||
] | ||
ifNotNil: [ inlineClass ]' classified: 'transforming'. | ||
|
||
RBInlineMethodFromComponentRefactoring compile: 'inlineClass | ||
| imps | | ||
inlineClass ifNotNil: [ ^ inlineClass ]. | ||
imps := ( self model allImplementorsOf: self inlineSelector ) asOrderedCollection. | ||
imps size = 1 | ||
ifTrue: [ ^ inlineClass := imps first ]. | ||
imps ifEmpty: [ self refactoringFailure: ''Nobody defines a method named '' , self inlineSelector ]. | ||
inlineClass := self requestImplementorToInline: imps. | ||
inlineClass ifNil: [ self refactoringFailure: ''No implementor selected'' ]. | ||
^ inlineClass' classified: 'transforming'. | ||
|
||
] | ||
forPharo10: [ | ||
#Ephemeron asClass classSide | ||
compile: 'leJsonV4Name | ||
^ nil' classified: 'serialisation']. | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Package { #name : #BaselineOfGToolkitPrerequisites } |