File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
Userland/Libraries/LibJS/JIT Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -1269,6 +1269,20 @@ void Compiler::compile_throw_if_nullish(Bytecode::Op::ThrowIfNullish const&)
1269
1269
check_exception ();
1270
1270
}
1271
1271
1272
+ static Value cxx_iterator_result_value (VM& vm, Value iterator)
1273
+ {
1274
+ auto iterator_result = TRY_OR_SET_EXCEPTION (iterator.to_object (vm));
1275
+ return TRY_OR_SET_EXCEPTION (iterator_value (vm, iterator_result));
1276
+ }
1277
+
1278
+ void Compiler::compile_iterator_result_value (Bytecode::Op::IteratorResultValue const &)
1279
+ {
1280
+ load_vm_register (ARG1, Bytecode::Register::accumulator ());
1281
+ native_call ((void *)cxx_iterator_result_value);
1282
+ store_vm_register (Bytecode::Register::accumulator (), RET);
1283
+ check_exception ();
1284
+ }
1285
+
1272
1286
void Compiler::jump_to_exit ()
1273
1287
{
1274
1288
m_assembler.jump (m_exit_label);
Original file line number Diff line number Diff line change @@ -110,7 +110,8 @@ class Compiler {
110
110
O (IteratorNext, iterator_next) \
111
111
O (IteratorResultDone, iterator_result_done) \
112
112
O (ThrowIfNotObject, throw_if_not_object) \
113
- O (ThrowIfNullish, throw_if_nullish)
113
+ O (ThrowIfNullish, throw_if_nullish) \
114
+ O (IteratorResultValue, iterator_result_value)
114
115
115
116
# define DECLARE_COMPILE_OP (OpTitleCase, op_snake_case ) \
116
117
void compile_##op_snake_case(Bytecode::Op::OpTitleCase const &);
You can’t perform that action at this time.
0 commit comments