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
Forgive me if this statement is not true in its generality, but I found at least a couple of occurrences. For example, the perform primitives do not emit proper error codes at the moment such as #'bad number of arguments' or #'bad argument'. This is inconsistent with the OSVM and the image-side simulator and, if I did not overlook anything, the last reason after my recent PRs that keeps all the ContextTests from going green.
Would this be desired? Would this pattern be the right approach?
primitivePerform: function(argCount) {
var selector = this.stackValue(argCount-1);
var rcvr = this.stackValue(argCount);
var trueArgCount = argCount - 1;
var entry = this.findSelectorInClass(selector, trueArgCount, this.getClass(rcvr), argCount);
if (entry.selector === selector) {
// selector has been found, rearrange stack
- if (entry.argCount !== trueArgCount)+ if (entry.argCount !== trueArgCount) {+ this.vm.primFailCode = Squeak.PrimErrBadNumArgs;
return false;
+ }
var stack = this.activeContext.pointers; // slide eveything down...
var selectorIndex = this.sp - trueArgCount;
this.arrayCopy(stack, selectorIndex+1, stack, selectorIndex, trueArgCount);
this.sp--; // adjust sp accordingly
} else {
// stack has already been arranged for #doesNotUnderstand:/#cannotInterpret:
rcvr = this.stackValue(entry.argCount);
}
this.executeNewMethod(rcvr, entry.method, entry.argCount, entry.primIndex, entry.mClass, selector);
return true;
},
The text was updated successfully, but these errors were encountered:
Forgive me if this statement is not true in its generality, but I found at least a couple of occurrences. For example, the perform primitives do not emit proper error codes at the moment such as
#'bad number of arguments'
or#'bad argument'
. This is inconsistent with the OSVM and the image-side simulator and, if I did not overlook anything, the last reason after my recent PRs that keeps all the ContextTests from going green.Would this be desired? Would this pattern be the right approach?
The text was updated successfully, but these errors were encountered: