OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #if V8_TARGET_ARCH_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1992 Expression *value, | 1992 Expression *value, |
1993 JSGeneratorObject::ResumeMode resume_mode) { | 1993 JSGeneratorObject::ResumeMode resume_mode) { |
1994 // The value stays in eax, and is ultimately read by the resumed generator, as | 1994 // The value stays in eax, and is ultimately read by the resumed generator, as |
1995 // if CallRuntime(Runtime::kSuspendJSGeneratorObject) returned it. Or it | 1995 // if CallRuntime(Runtime::kSuspendJSGeneratorObject) returned it. Or it |
1996 // is read to throw the value when the resumed generator is already closed. | 1996 // is read to throw the value when the resumed generator is already closed. |
1997 // ebx will hold the generator object until the activation has been resumed. | 1997 // ebx will hold the generator object until the activation has been resumed. |
1998 VisitForStackValue(generator); | 1998 VisitForStackValue(generator); |
1999 VisitForAccumulatorValue(value); | 1999 VisitForAccumulatorValue(value); |
2000 __ pop(ebx); | 2000 __ pop(ebx); |
2001 | 2001 |
| 2002 // Store input value into generator object. |
| 2003 __ mov(FieldOperand(ebx, JSGeneratorObject::kInputOffset), result_register()); |
| 2004 __ mov(ecx, result_register()); |
| 2005 __ RecordWriteField(ebx, JSGeneratorObject::kInputOffset, ecx, edx, |
| 2006 kDontSaveFPRegs); |
| 2007 |
2002 // Load suspended function and context. | 2008 // Load suspended function and context. |
2003 __ mov(esi, FieldOperand(ebx, JSGeneratorObject::kContextOffset)); | 2009 __ mov(esi, FieldOperand(ebx, JSGeneratorObject::kContextOffset)); |
2004 __ mov(edi, FieldOperand(ebx, JSGeneratorObject::kFunctionOffset)); | 2010 __ mov(edi, FieldOperand(ebx, JSGeneratorObject::kFunctionOffset)); |
2005 | 2011 |
2006 // Push receiver. | 2012 // Push receiver. |
2007 __ push(FieldOperand(ebx, JSGeneratorObject::kReceiverOffset)); | 2013 __ push(FieldOperand(ebx, JSGeneratorObject::kReceiverOffset)); |
2008 | 2014 |
2009 // Push holes for arguments to generator function. | 2015 // Push holes for arguments to generator function. |
2010 __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); | 2016 __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); |
2011 __ mov(edx, | 2017 __ mov(edx, |
(...skipping 2704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4716 Assembler::target_address_at(call_target_address, | 4722 Assembler::target_address_at(call_target_address, |
4717 unoptimized_code)); | 4723 unoptimized_code)); |
4718 return OSR_AFTER_STACK_CHECK; | 4724 return OSR_AFTER_STACK_CHECK; |
4719 } | 4725 } |
4720 | 4726 |
4721 | 4727 |
4722 } // namespace internal | 4728 } // namespace internal |
4723 } // namespace v8 | 4729 } // namespace v8 |
4724 | 4730 |
4725 #endif // V8_TARGET_ARCH_IA32 | 4731 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |