Skip to content

Commit

Permalink
[js] Decont the result of the boolification method like the JVM does
Browse files Browse the repository at this point in the history
The MoarVM seems to accepts less result values from that method, might
be able to to some minor optimization with that knowledge
  • Loading branch information
pmurias committed Jun 17, 2017
1 parent 7e4d32e commit e66b737
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vm/js/nqp-runtime/sixmodel.js
Expand Up @@ -126,7 +126,7 @@ class STable {
this.boolificationSpec = {mode: mode, method: method};
if (mode == 0) {
this.ObjConstructor.prototype.$$toBool = function(ctx) {
return method.$$call(ctx, {}, this).$$toBool(ctx);
return method.$$call(ctx, {}, this).$$decont().$$toBool(ctx);
};
} else if (mode == 1) {
this.ObjConstructor.prototype.$$toBool = function(ctx) {
Expand Down

0 comments on commit e66b737

Please sign in to comment.