diff --git a/src/Sindarin-Tests/SindarinDebuggerTest.class.st b/src/Sindarin-Tests/SindarinDebuggerTest.class.st index c007b18..2422606 100644 --- a/src/Sindarin-Tests/SindarinDebuggerTest.class.st +++ b/src/Sindarin-Tests/SindarinDebuggerTest.class.st @@ -1106,8 +1106,9 @@ SindarinDebuggerTest >> testMoveToNodeWhenNodeIsInIfTrueIfFalseBlock [ self assert: (sdbg readVariableNamed: #a) equals: 3. - sdbg stepOver. "When you perform a stepOver, you quit the block and continue just after the ifTrue: message" + sdbg stepOver. + sdbg stepOver. self assert: (sdbg readVariableNamed: #a) equals: 4 ] @@ -1407,9 +1408,8 @@ SindarinDebuggerTest >> testSkipCannotSkipReturnIfItIsTheLastReturn [ "we step until we arrive on the method node in `SindarinDebuggerTest>>#methodWithSeveralReturns`, which is mapped to the implicit return bycode." scdbg step. nodeWithImplicitReturn := scdbg methodNode. - 3 timesRepeat: [ scdbg step ]. - - self assert: scdbg node identicalTo: nodeWithImplicitReturn. + [scdbg node == nodeWithImplicitReturn] + whileFalse: [ scdbg step ]. self assert: scdbg instructionStream willReturn. "We skip the return node" diff --git a/src/Sindarin/InstructionStream.extension.st b/src/Sindarin/InstructionStream.extension.st deleted file mode 100644 index b434729..0000000 --- a/src/Sindarin/InstructionStream.extension.st +++ /dev/null @@ -1,63 +0,0 @@ -Extension { #name : 'InstructionStream' } - -{ #category : '*Sindarin' } -InstructionStream >> willCreateBlock [ - "next bytecode is a block creation" - - ^ (self method encoderClass isCreateBlockAt: pc in: self method) or: - [ self method encoderClass isCreateFullBlockAt: pc in: self method] -] - -{ #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 >> willReturn [ - "Answer whether the next bytecode is a return." - - ^ self method encoderClass isReturnAt: pc in: self method -] - -{ #category : '*Sindarin' } -InstructionStream >> willSend [ - "Answer whether the next bytecode is a message-send." - - ^ self method encoderClass isSendAt: 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 -]