Skip to content

Commit

Permalink
[js] Fix some bugs after null -> Null transition.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmurias committed Nov 7, 2016
1 parent b48c448 commit 91dd06e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/vm/js/Perl6/Ops.nqp
Expand Up @@ -43,7 +43,7 @@ $ops.add_op('p6bindsig', :!inlinable, sub ($comp, $node, :$want, :$cps) {
my $tmp := $*BLOCK.add_tmp;
$ops.new_chunk($ops.VOID, "", [
"$tmp = nqp.p6binder.bind_sig($*CTX, null, nqp.p6binder, nqp.op.savecapture(Array.prototype.slice.call(arguments)));\n",
"if ($tmp !== null) return $tmp;\n"
"if ($tmp !== Null) return $tmp;\n"
]);
});

Expand Down
5 changes: 3 additions & 2 deletions src/vm/js/perl6-runtime/runtime.js
@@ -1,4 +1,5 @@
var nqp = require('nqp-runtime');
var Null = nqp.Null;
var CodeRef = require('nqp-runtime/code-ref');
var NQPArray = require('nqp-runtime/array');
var op = {};
Expand Down Expand Up @@ -59,7 +60,7 @@ op.p6box_s = function(str) {
op.p6captureouters2 = function(ctx, capList, target) {
var cf = (target.outerCtx || closure.forcedOuter);

if (cf === null) {
if (cf === Null) {
return capList;
}

Expand Down Expand Up @@ -106,7 +107,7 @@ op.p6capturelex = function(ctx, codeObj) {
};

op.p6var = function(cont) {
if (cont != null && cont.$$iscont && cont.$$iscont()) {
if (cont.$$iscont && cont.$$iscont()) {
var wrapper = Scalar._STable.REPR.allocate(Scalar._STable);
wrapper.$$bindattr(Scalar, '$!value', cont);
return wrapper;
Expand Down

0 comments on commit 91dd06e

Please sign in to comment.