Skip to content

Commit 62d489b

Browse files
committed
[js] Stub ops
1 parent fd84940 commit 62d489b

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/vm/js/Operations.nqp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1492,6 +1492,8 @@ class QAST::OperationsJS {
14921492
add_simple_op('getlexrelcaller', $T_OBJ, [$T_OBJ, $T_STR], sub ($ctx, $name) {"$ctx.lookupWithCallers($name)"});
14931493
add_simple_op('getlexrel', $T_OBJ, [$T_OBJ, $T_STR]);
14941494

1495+
add_simple_op('getlex', $T_OBJ, [$T_STR], sub ($name) {"{$*CTX}.lookupOrNull($name)"});
1496+
14951497
add_simple_op('captureexistsnamed', $T_INT, [$T_OBJ, $T_STR]);
14961498
add_simple_op('capturehasnameds', $T_INT, [$T_OBJ]);
14971499
add_simple_op('captureposelems', $T_INT, [$T_OBJ]);
@@ -1503,6 +1505,8 @@ class QAST::OperationsJS {
15031505

15041506
add_simple_op('captureposprimspec', $T_INT, [$T_OBJ, $T_INT]);
15051507

1508+
add_simple_op('captureinnerlex', $T_OBJ, [$T_OBJ], :!inlinable, :side_effects);
1509+
15061510
add_simple_op('invokewithcapture', $T_OBJ, [$T_OBJ, $T_OBJ], sub ($invokee, $capture) {
15071511
"$invokee.\$\$apply([{$*CTX}].concat($capture.named, $capture.pos))"
15081512
}, :side_effects);

src/vm/js/nqp-runtime/core.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1514,4 +1514,8 @@ op.eqaticim = function(haystack, needle, offset) {
15141514
op.eqatim = function(haystack, needle, offset) {
15151515
return stripMarks(haystack.substr(offset)).startsWith(stripMarks(needle));
15161516
};
1517+
1518+
// STUB
1519+
op.captureinnerlex = function(codeRef) {
1520+
return codeRef;
15171521
};

0 commit comments

Comments
 (0)