You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the method SindaringDebugger>>#pc: there is some fishy code here:
"If the first pc of the first statement is mapped to a block creation. That means that it needs the associated temp vector on top of the stack. The bytecode that pushes this vector on the stack precedes the block creation. So, here, this bytecode is mapped to the method node and has been skipped. Thus, we go back to the previous bytecode to execute it."self instructionStream willCreateBlock ifTrue: [
self context pc:self instructionStream previousPc.
self stepBytecode ].
This code seems to assume that a push closure bytecode is always preceded by a (single?) push temp vector instruction (which are not essentially temp vectors but copied variables from which some may be temp vectors).
This is however not always the case, some examples:
the push closure may be preceded by more than one copied variables
the push closure may be precedded by no copied variables => it could be a pop (if preceded by a statement) or a send, or any other instruction.
In those cases, executing partially the pushes will create an inconsistent closure.
Executing instructions that perform pops may corrupt/break the stack (pop more stuff that is there for example).
Some code examples, check the methods of the following:
So, after a first investigation, it seems in the current state it's not a bug.
The willCreateBlock: will always check if we're in the case of a block creation.
In these scenarios it is never the case and the incriminated code is never executed.
Already discussed with @StevenCostiou
In the method
SindaringDebugger>>#pc:
there is some fishy code here:This code seems to assume that a push closure bytecode is always preceded by a (single?) push temp vector instruction (which are not essentially temp vectors but copied variables from which some may be temp vectors).
This is however not always the case, some examples:
In those cases, executing partially the pushes will create an inconsistent closure.
Executing instructions that perform pops may corrupt/break the stack (pop more stuff that is there for example).
Some code examples, check the methods of the following:
=>
=>
=>
The text was updated successfully, but these errors were encountered: