Skip to content

Commit 1f7721e

Browse files
committed
[js] Use $obj.$$iterator instead of nqp.op.iterator($obj) everywhere.
1 parent e61fa7c commit 1f7721e

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/vm/js/Operations.nqp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,7 @@ class QAST::OperationsJS {
11691169

11701170
ChunkCPS.new($T_OBJ, $result, [
11711171
$list,
1172-
"$iterator = nqp.op.iterator({$list.expr});\n",
1172+
"$iterator = {$list.expr}.\$\$iterator();\n",
11731173
"var $loop = function() \{\n",
11741174
"if ($iterator.idx < $iterator.target) \{\n",
11751175
$*BLOCK.set_cont($body, $loop),
@@ -1184,7 +1184,7 @@ class QAST::OperationsJS {
11841184
else {
11851185
Chunk.new($T_OBJ, 'null', [
11861186
$list,
1187-
"$iterator = nqp.op.iterator({$list.expr});\n",
1187+
"$iterator = {$list.expr}.\$\$iterator();\n",
11881188
"while ($iterator.idx < $iterator.target) \{\n",
11891189
$comp.handle_control($loop, $body),
11901190
"\}\n"

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,6 @@ op.setdebugtypename = function(type, debugName) {
8585
return type;
8686
};
8787

88-
op.iterator = function(obj) {
89-
return obj.$$iterator();
90-
};
91-
92-
9388
exports.hash = function() {
9489
return new Hash();
9590
};

0 commit comments

Comments
 (0)