| 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_X87 | 5 #if V8_TARGET_ARCH_X87 |
| 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 1973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1984 Expression *value, | 1984 Expression *value, |
| 1985 JSGeneratorObject::ResumeMode resume_mode) { | 1985 JSGeneratorObject::ResumeMode resume_mode) { |
| 1986 // The value stays in eax, and is ultimately read by the resumed generator, as | 1986 // The value stays in eax, and is ultimately read by the resumed generator, as |
| 1987 // if CallRuntime(Runtime::kSuspendJSGeneratorObject) returned it. Or it | 1987 // if CallRuntime(Runtime::kSuspendJSGeneratorObject) returned it. Or it |
| 1988 // is read to throw the value when the resumed generator is already closed. | 1988 // is read to throw the value when the resumed generator is already closed. |
| 1989 // ebx will hold the generator object until the activation has been resumed. | 1989 // ebx will hold the generator object until the activation has been resumed. |
| 1990 VisitForStackValue(generator); | 1990 VisitForStackValue(generator); |
| 1991 VisitForAccumulatorValue(value); | 1991 VisitForAccumulatorValue(value); |
| 1992 __ pop(ebx); | 1992 __ pop(ebx); |
| 1993 | 1993 |
| 1994 // Store input value into generator object. |
| 1995 __ mov(FieldOperand(ebx, JSGeneratorObject::kInputOffset), result_register()); |
| 1996 __ mov(edx, result_register()); |
| 1997 __ RecordWriteField(ebx, JSGeneratorObject::kInputOffset, edx, ecx, |
| 1998 kDontSaveFPRegs); |
| 1999 |
| 1994 // Load suspended function and context. | 2000 // Load suspended function and context. |
| 1995 __ mov(esi, FieldOperand(ebx, JSGeneratorObject::kContextOffset)); | 2001 __ mov(esi, FieldOperand(ebx, JSGeneratorObject::kContextOffset)); |
| 1996 __ mov(edi, FieldOperand(ebx, JSGeneratorObject::kFunctionOffset)); | 2002 __ mov(edi, FieldOperand(ebx, JSGeneratorObject::kFunctionOffset)); |
| 1997 | 2003 |
| 1998 // Push receiver. | 2004 // Push receiver. |
| 1999 __ push(FieldOperand(ebx, JSGeneratorObject::kReceiverOffset)); | 2005 __ push(FieldOperand(ebx, JSGeneratorObject::kReceiverOffset)); |
| 2000 | 2006 |
| 2001 // Push holes for arguments to generator function. | 2007 // Push holes for arguments to generator function. |
| 2002 __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); | 2008 __ mov(edx, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); |
| 2003 __ mov(edx, | 2009 __ mov(edx, |
| (...skipping 2704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4708 Assembler::target_address_at(call_target_address, | 4714 Assembler::target_address_at(call_target_address, |
| 4709 unoptimized_code)); | 4715 unoptimized_code)); |
| 4710 return OSR_AFTER_STACK_CHECK; | 4716 return OSR_AFTER_STACK_CHECK; |
| 4711 } | 4717 } |
| 4712 | 4718 |
| 4713 | 4719 |
| 4714 } // namespace internal | 4720 } // namespace internal |
| 4715 } // namespace v8 | 4721 } // namespace v8 |
| 4716 | 4722 |
| 4717 #endif // V8_TARGET_ARCH_X87 | 4723 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |