-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathInstructionStream.extension.st
More file actions
41 lines (30 loc) · 1.16 KB
/
InstructionStream.extension.st
File metadata and controls
41 lines (30 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Extension { #name : 'InstructionStream' }
{ #category : '*Sindarin' }
InstructionStream >> willJump [
"Answer whether the next bytecode will jump."
^ self willJumpIfFalse or:[ self willJumpIfTrue or: [ self willJumpTo ] ]
]
{ #category : '*Sindarin' }
InstructionStream >> willJumpIfTrue [
"Answer whether the next bytecode is a jump-if-false."
^ self method encoderClass isBranchIfTrueAt: pc in: self method
]
{ #category : '*Sindarin' }
InstructionStream >> willJumpTo [
"Answer whether the next bytecode is a jump-if-false."
^ self method encoderClass isJumpAt: pc in: self method
]
{ #category : '*Sindarin' }
InstructionStream >> willSendOrReturnOrStoreOrCreateBlock [
"Answer whether the next bytecode will be interesting for the debugger to stop."
^ self willSend or: [
self willReturn or: [ self willStore or: [ self willCreateBlock ] ] ]
]
{ #category : '*Sindarin' }
InstructionStream >> willStoreButNotPop [
"Answer whether the next bytecode is a store that are not store-pop"
| encoderClass byte |
encoderClass := self method encoderClass.
byte := encoderClass nonExtensionBytecodeAt: pc in: self method.
^ #( 243 244 245 252 ) includes: byte
]