| Index: src/ia32/full-codegen-ia32.cc
|
| diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc
|
| index 26a64d73e32f6b7379f56516c25cb77661e7f122..9536ccefdf56e74b252d71ecfa54243a425ddf7e 100644
|
| --- a/src/ia32/full-codegen-ia32.cc
|
| +++ b/src/ia32/full-codegen-ia32.cc
|
| @@ -1996,15 +1996,13 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
| __ mov(eax, isolate()->factory()->undefined_value());
|
| __ jmp(&l_next);
|
|
|
| - // catch (e) { receiver = iter; f = iter.throw; arg = e; goto l_call; }
|
| + // catch (e) { receiver = iter; f = 'throw'; arg = e; goto l_call; }
|
| __ bind(&l_catch);
|
| handler_table()->set(expr->index(), Smi::FromInt(l_catch.pos()));
|
| - __ mov(edx, Operand(esp, 1 * kPointerSize)); // iter
|
| - __ push(edx); // iter
|
| - __ push(eax); // exception
|
| __ mov(ecx, isolate()->factory()->throw_string()); // "throw"
|
| - Handle<Code> throw_ic = isolate()->builtins()->LoadIC_Initialize();
|
| - CallIC(throw_ic); // iter.throw in eax
|
| + __ push(ecx); // "throw"
|
| + __ push(Operand(esp, 2 * kPointerSize)); // iter
|
| + __ push(eax); // exception
|
| __ jmp(&l_call);
|
|
|
| // try { received = yield result.value }
|
| @@ -2026,28 +2024,17 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
|
|
| // receiver = iter; f = iter.next; arg = received;
|
| __ bind(&l_next);
|
| - __ mov(edx, Operand(esp, 1 * kPointerSize)); // iter
|
| - __ push(edx); // iter
|
| - __ push(eax); // received
|
| __ mov(ecx, isolate()->factory()->next_string()); // "next"
|
| - Handle<Code> next_ic = isolate()->builtins()->LoadIC_Initialize();
|
| - CallIC(next_ic); // iter.next in eax
|
| + __ push(ecx);
|
| + __ push(Operand(esp, 2 * kPointerSize)); // iter
|
| + __ push(eax); // received
|
|
|
| - // result = f.call(receiver, arg);
|
| + // result = receiver[f](arg);
|
| __ bind(&l_call);
|
| - Label l_call_runtime;
|
| - __ JumpIfSmi(eax, &l_call_runtime);
|
| - __ CmpObjectType(eax, JS_FUNCTION_TYPE, ebx);
|
| - __ j(not_equal, &l_call_runtime);
|
| - __ mov(edi, eax);
|
| - ParameterCount count(1);
|
| - __ InvokeFunction(edi, count, CALL_FUNCTION,
|
| - NullCallWrapper(), CALL_AS_METHOD);
|
| + Handle<Code> ic = isolate()->stub_cache()->ComputeKeyedCallInitialize(1);
|
| + CallIC(ic);
|
| __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset));
|
| - __ jmp(&l_loop);
|
| - __ bind(&l_call_runtime);
|
| - __ push(eax);
|
| - __ CallRuntime(Runtime::kCall, 3);
|
| + __ Drop(1); // The key is still on the stack; drop it.
|
|
|
| // val = result.value; if (!result.done) goto l_try;
|
| __ bind(&l_loop);
|
|
|