Il 06/11/2013 20:56, Gwenaël Casaccio ha scritto:
> 
> Yes I agree for the stack, I'm thinking about the bytecode combination
> if in the bc 80
> I send a message when it leave the message the ip is the next ip and it
> will go to the next
> instruction and for the bc 80 it's bad because it's the last
> instruction, if I'm  right.

Ah, I see now.

In general if a (basic) bytecode can send, it can only be the
last message of a compound bytecode.  See this part of superops.cc

    " allSuperoperatorBreaks ["
    "     | breaks |"
    "     breaks := SortedCollection new."
    "     self allByteCodeIndicesDo: [ :i :b :op |"
    ///////// "Split where jumps land"
    "         (b >= 40 and: [ b <= 43 ])"
    "            ifTrue: [ breaks add: (self jumpDestinationAt: i forward: b > 
40) ]."

    ///////// "Split after returns"
    "         (b >= 50 and: [ b <= 51 ])"
    "            ifTrue: [ breaks add: (self nextBytecodeIndex: i) ]."

    ///////// "Split after jumps"
    "         (b >= 40 and: [ b <= 43 ])"
    "            ifTrue: [ breaks add: (self nextBytecodeIndex: i) ]."

    ///////// "Split after push/store literal variable"
    "         (b = 34 or: [ b = 38 ])"
    "            ifTrue: [ breaks add: (self nextBytecodeIndex: i) ]."

    ///////// "Split after sends"
    "         (b < 32 and: [ (b + 12 bitAnd: 250) ~= 32 ])"
    "            ifTrue: [ breaks add: (self nextBytecodeIndex: i) ]"
    "     ]."
    "     ^breaks ]"

It splits after push/store literal variable because it sends #value and
#value: respectively.  You would have to split after store instance variable
too, and regenerate the superoperators.

Paolo

_______________________________________________
help-smalltalk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to