codefrau / SqueakJS

A Squeak Smalltalk VM in Javascript
https://squeak.js.org
MIT License
365 stars 75 forks source link

primitiveHashMultiply (159) missing #98

Closed pavel-krivanek closed 3 years ago

pavel-krivanek commented 4 years ago

The primitive primitiveHashMultiply from the set of new primitives is missing. It should at least fail. I use this workaround:

            case 159: if (this.oldPrims) return this.primitiveFileRename(argCount);
                else return this.primitiveHashMultiply(argCount);

where this funciton is defined behind primitiveNotEqualLargeIntegers as:

    primitiveHashMultiply: function(numArgs) {
        false;
    },
codefrau commented 4 years ago

Failing the primitive should be the default behavior. Isn't that working?

Or is it just that we repeatedly log the missing numbered primitive as an error?