[Vm-dev] About Primitives

Santiago Bragagnolo santiagobragagnolo at gmail.com
Fri May 25 18:46:40 UTC 2012


Hi All

Im analyzing primtives to use them for the concrete type inference project.

Im currently working with primitiveArrayBecomeOneWayCopyHash


primitiveArrayBecomeOneWayCopyHash
      "Similar to primitiveArrayBecomeOneWay but accepts a third argument
whether to copy
      the receiver's identity hash over the argument's identity hash."

      | copyHashFlag arg rcvr |
      copyHashFlag := self booleanValueOf: (self stackTop).
      arg := self stackValue: 1.
      rcvr := self stackValue: 2.
      self success: (self become: rcvr with: arg twoWay: false copyHash:
copyHashFlag).
      successFlag ifTrue: [ self pop: 2 ].


Well, i'm seeing that pop:2, in a method which don't receive any argument.
If pop was 1, i could think in self, but is 2, so the questions are:

1) what is pop:2 in this context
2) why? there's any generalization or rules for understand the stack manage?

Thanks!

Santiago.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20120525/8ab2ac72/attachment.htm


More information about the Vm-dev mailing list