Skip to content

Commit 232f446

Browse files
committed
Adapt to new FAST
1 parent 4e93fc7 commit 232f446

4 files changed

Lines changed: 5 additions & 20 deletions

File tree

‎src/FAST-Python-Tools/FASTPyEntity.extension.st‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@ FASTPyEntity >> allSSABasicVersions [
7272
7373
Requires SSA resolution."
7474

75-
^ (self localDeclaration allAccesses
76-
collect: #ssaVersion
77-
thenReject: #isPhi) asSet
75+
^ ((self localDeclaration allAccesses collect: #ssaVersion) reject: #isPhi) asSet
7876
]
7977

8078
{ #category : '*FAST-Python-Tools' }
@@ -164,9 +162,7 @@ FASTPyEntity >> internalAccesses [
164162
- subscript `x[3]`
165163
- attribute `x.y`"
166164

167-
^ self allAccesses
168-
collect: #internalAccess
169-
thenReject: #isNil
165+
^ (self allAccesses collect: #internalAccess) reject: #isNil
170166
]
171167

172168
{ #category : '*FAST-Python-Tools' }

‎src/FAST-Python-Tools/FASTPythonLocalResolverVisitor.class.st‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ FASTPythonLocalResolverVisitor >> bind: aFASTNode toDeclarationNamed: aName ifAb
4949
| declaration |
5050
declaration := (self declarationNamed: aName) ifNil: [ aBlock cull: aFASTNode cull: aName ].
5151

52-
aFASTNode localDeclaration: declaration.
53-
declaration addLocalUse: aFASTNode
52+
aFASTNode localDeclaration: declaration
5453
]
5554

5655
{ #category : 'declarations' }
@@ -88,12 +87,8 @@ FASTPythonLocalResolverVisitor >> ensureDeclarationOf: aName declaration: aFASTN
8887
declaration shadowedBy: aFASTNode.
8988

9089
"If the kind is different, we save a new declaration."
91-
aFASTNode ensureLocalUses.
9290
scope at: aName put: aFASTNode ] ]
93-
ifAbsentPut: [
94-
aFASTNode
95-
ensureLocalUses;
96-
yourself ]
91+
ifAbsentPut: [ aFASTNode ]
9792
]
9893

9994
{ #category : 'declarations' }

‎src/FAST-Python-Tools/FASTTCanBeLocalDeclaration.extension.st‎

Lines changed: 0 additions & 7 deletions
This file was deleted.

‎src/FAST-Python-Tools/FASTTEntity.extension.st‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Extension { #name : 'FASTTEntity' }
33
{ #category : '*FAST-Python-Tools' }
44
FASTTEntity >> resetLocalResolution [
55

6+
(self attributeAt: #localUses ifAbsent: [ nil ]) ifNotNil: [ :uses | uses removeAll ].
67
self removeAttribute: #localDeclaration.
78
self removeAttribute: #localUses
89
]

0 commit comments

Comments
 (0)