Index: src/x64/full-codegen-x64.cc |
diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc |
index 62c6073a2fe96c333f07192ac156ed8b88aaa048..53d7027764d6a8ab742bc8eea30b2d6aeceaa06d 100644 |
--- a/src/x64/full-codegen-x64.cc |
+++ b/src/x64/full-codegen-x64.cc |
@@ -2012,10 +2012,10 @@ void FullCodeGenerator::VisitYield(Yield* expr) { |
// [sp + 1 * kPointerSize] iter |
// [sp + 0 * kPointerSize] g |
- Label l_catch, l_try, l_resume, l_send, l_call, l_loop; |
+ Label l_catch, l_try, l_resume, l_next, l_call, l_loop; |
// Initial send value is undefined. |
__ LoadRoot(rax, Heap::kUndefinedValueRootIndex); |
- __ jmp(&l_send); |
+ __ jmp(&l_next); |
// catch (e) { receiver = iter; f = iter.throw; arg = e; goto l_call; } |
__ bind(&l_catch); |
@@ -2045,15 +2045,15 @@ void FullCodeGenerator::VisitYield(Yield* expr) { |
__ bind(&l_resume); // received in rax |
__ PopTryHandler(); |
- // receiver = iter; f = iter.send; arg = received; |
- __ bind(&l_send); |
+ // receiver = iter; f = iter.next; arg = received; |
+ __ bind(&l_next); |
__ movq(rcx, Operand(rsp, 1 * kPointerSize)); // iter |
__ push(rcx); // iter |
__ push(rax); // received |
__ movq(rax, rcx); // iter |
- __ LoadRoot(rcx, Heap::ksend_stringRootIndex); // "send" |
- Handle<Code> send_ic = isolate()->builtins()->LoadIC_Initialize(); |
- CallIC(send_ic); // iter.send in rax |
+ __ LoadRoot(rcx, Heap::knext_stringRootIndex); // "next" |
+ Handle<Code> next_ic = isolate()->builtins()->LoadIC_Initialize(); |
+ CallIC(next_ic); // iter.next in rax |
// result = f.call(receiver, arg); |
__ bind(&l_call); |
@@ -2155,7 +2155,7 @@ void FullCodeGenerator::EmitGeneratorResume(Expression *generator, |
// If we are sending a value and there is no operand stack, we can jump back |
// in directly. |
- if (resume_mode == JSGeneratorObject::SEND) { |
+ if (resume_mode == JSGeneratorObject::NEXT) { |
Label slow_resume; |
__ cmpq(rdx, Immediate(0)); |
__ j(not_zero, &slow_resume); |