I have noticed that the execution simulation (ContextPart) and the VM differ in how they handle primitives with extra arguments. The execution simulation takes arguments relative to the base of the stack, but the VM takes them relative to the top of the stack. Most uses of primitives don&#39;t have extra arguments and this distinction does not affect them, but Newspeak takes advantage of the VM&#39;s behavior to implement primitives-as-capabilities without a VM change.<br>
<div><br></div><div>For example, primitive 188:</div><div><br></div><div>Normal code</div><div>a withArguments: {b. c} executeMethod: m</div><div>&quot;Execute the method m, with a as the receiver, and with b and c as the arguments&quot;</div>
<div><br></div><div>VMMirror</div><div>vmmirror on: a withArguments: {b. c} executeMethod: m</div><div>&quot;VM: Execute the method m, with a as the receiver, and with b and c as the arguments. &quot;</div><div>&quot;Debugger: Try to execute {b. c}, fail because it doesn&#39;t behave like a method&quot;</div>
<div><br></div><div>Are there any objections to making the execution simulation behave like the VM?</div><div><br></div><div>Ryan</div>