| Index: src/mips/full-codegen-mips.cc
|
| diff --git a/src/mips/full-codegen-mips.cc b/src/mips/full-codegen-mips.cc
|
| index a16e478afa882d4b9f0c5b0af26b1262d2a73b46..57964efdf3dba56173b0e8496c7c4442055e216f 100644
|
| --- a/src/mips/full-codegen-mips.cc
|
| +++ b/src/mips/full-codegen-mips.cc
|
| @@ -2042,18 +2042,14 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
| __ LoadRoot(a0, Heap::kUndefinedValueRootIndex);
|
| __ Branch(&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);
|
| __ mov(a0, v0);
|
| handler_table()->set(expr->index(), Smi::FromInt(l_catch.pos()));
|
| + __ LoadRoot(a2, Heap::kthrow_stringRootIndex); // "throw"
|
| __ lw(a3, MemOperand(sp, 1 * kPointerSize)); // iter
|
| __ push(a3); // iter
|
| __ push(a0); // exception
|
| - __ mov(a0, a3); // iter
|
| - __ LoadRoot(a2, Heap::kthrow_stringRootIndex); // "throw"
|
| - Handle<Code> throw_ic = isolate()->builtins()->LoadIC_Initialize();
|
| - CallIC(throw_ic); // iter.throw in a0
|
| - __ mov(a0, v0);
|
| __ jmp(&l_call);
|
|
|
| // try { received = yield result.value }
|
| @@ -2076,32 +2072,18 @@ void FullCodeGenerator::VisitYield(Yield* expr) {
|
| __ bind(&l_resume); // received in a0
|
| __ PopTryHandler();
|
|
|
| - // receiver = iter; f = iter.next; arg = received;
|
| + // receiver = iter; f = 'next'; arg = received;
|
| __ bind(&l_next);
|
| + __ LoadRoot(a2, Heap::knext_stringRootIndex); // "next"
|
| __ lw(a3, MemOperand(sp, 1 * kPointerSize)); // iter
|
| __ push(a3); // iter
|
| __ push(a0); // received
|
| - __ mov(a0, a3); // iter
|
| - __ LoadRoot(a2, Heap::knext_stringRootIndex); // "next"
|
| - Handle<Code> next_ic = isolate()->builtins()->LoadIC_Initialize();
|
| - CallIC(next_ic); // iter.next in a0
|
| - __ mov(a0, v0);
|
|
|
| - // result = f.call(receiver, arg);
|
| + // result = receiver[f](arg);
|
| __ bind(&l_call);
|
| - Label l_call_runtime;
|
| - __ JumpIfSmi(a0, &l_call_runtime);
|
| - __ GetObjectType(a0, a1, a1);
|
| - __ Branch(&l_call_runtime, ne, a1, Operand(JS_FUNCTION_TYPE));
|
| - __ mov(a1, a0);
|
| - ParameterCount count(1);
|
| - __ InvokeFunction(a1, count, CALL_FUNCTION,
|
| - NullCallWrapper(), CALL_AS_METHOD);
|
| + Handle<Code> ic = isolate()->stub_cache()->ComputeKeyedCallInitialize(1);
|
| + CallIC(ic);
|
| __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset));
|
| - __ jmp(&l_loop);
|
| - __ bind(&l_call_runtime);
|
| - __ push(a0);
|
| - __ CallRuntime(Runtime::kCall, 3);
|
|
|
| // val = result.value; if (!result.done) goto l_try;
|
| __ bind(&l_loop);
|
|
|