Skip to content

Commit

Permalink
Merge pull request RMODINRIA#11 from adri09070/8-Tests-are-red-becaus…
Browse files Browse the repository at this point in the history
…e-a-byte-symbol-DNU-cachePragmas-message

Fixing valueToBlock method
  • Loading branch information
guillep committed Sep 16, 2022
2 parents a5533e3 + 88b84b4 commit 34491bb
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions DebuggableASTInterpreter/DASTContext.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ DASTContext class >> newWithSender: aDASTContext receiver: aReceiver messageNode
| context |
context := ((aDASTEvaluator isEPDASTBlockMirror: aReceiver )
and: [ " Check if the message is one of the variants of value. This is very ugly and must be changed when implementing environments "
self valueToBlockMessages keys includes: aRBMessageNode selector ])
self valueToBlockMessages includes: aRBMessageNode selector ])
ifTrue: [ DASTBlockContext new ]
ifFalse: [ DASTMethodContext new ].
context sender: aDASTContext;
Expand All @@ -68,8 +68,14 @@ DASTContext class >> newWithSender: aDASTContext receiver: aReceiver messageNode

{ #category : #'instance creation' }
DASTContext class >> valueToBlockMessages [
^ valueToBlockMessages
ifNil: [ valueToBlockMessages := (BlockClosure methodDict select: [ :e | (201 to: 206) includes: e primitive ]) collect: [ :e | e selector ] ]

^ valueToBlockMessages ifNil: [
valueToBlockMessages := #( #value #value: #value:value:
#value:value:value: #value:value:value:value:
#value #value:value: #value:value:
#valueNoContextSwitch
valueNoContextSwitch:
#valueWithArguments ) ]
]

{ #category : #'accessing variables' }
Expand Down

0 comments on commit 34491bb

Please sign in to comment.