Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions src/Moose-SmalltalkImporter/AbstractCandidateListOperator.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -84,30 +84,6 @@ AbstractCandidateListOperator >> computeInstanceVariableCandidateListFor: anInvo
^ roelTyperResult
]

{ #category : 'running' }
AbstractCandidateListOperator >> computeTemporaryVariableCandidateListFor: anInvocation [
"For now, I am call by noone because I am a work in progress."

| roelTyperResult allCandidates classContainingInvocation tmpVarSymbol methodSelector compiledMethod key types |
classContainingInvocation := Smalltalk at: anInvocation receiver belongsTo belongsTo name.
tmpVarSymbol := anInvocation receiver name.
methodSelector := anInvocation receiver belongsTo name.
compiledMethod := classContainingInvocation methodDict at: methodSelector.
roelTyperResult := TypeCollector typeTmpsIn: compiledMethod ofClass: classContainingInvocation.
key := roelTyperResult keys detect: [ :each | each = tmpVarSymbol asString ].
types := (roelTyperResult at: key) types.

allCandidates := self allCandidatesFor: anInvocation.

types
ifEmpty: [ anInvocation candidates: (self allCandidatesFor: anInvocation) ]
ifNotEmpty: [ allCandidates := allCandidates select: [ :each | types includes: each belongsTo name ].
anInvocation candidates: allCandidates ].


^ types
]

{ #category : 'accessing' }
AbstractCandidateListOperator >> description [

Expand Down
10 changes: 0 additions & 10 deletions src/Moose-SmalltalkImporter/CandidateListOperator.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,6 @@ CandidateListOperator >> computeInstanceVariableCandidateListFor: anInvocation [
^ roelTyperResult
]

{ #category : 'running' }
CandidateListOperator >> computeTemporaryVariableCandidateListFor: anInvocation [
| aClass |
self flag: #todo. "Cyril: This code can never be executed but there is a different implementation in the super class. We should look into this."
aClass
ifNotNil: [ | candidate |
candidate := aClass lookUp: anInvocation signature.
(candidate isNotNil and: [ candidate isAbstract not ]) ifTrue: [ anInvocation candidates: (Array with: candidate) ] ]
]

{ #category : 'private' }
CandidateListOperator >> containerOf: anInstVarName startingAt: aClass [
"When we see that the receiver of an Invocation is an Instance Variable, this instance variable may be defined in the class containing the invocation or maybe in one of the superclass.
Expand Down
Loading