| 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 1723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1734 // this. It stays on the stack while we update the iterator. | 1734 // this. It stays on the stack while we update the iterator. |
| 1735 VisitForStackValue(expr->expression()); | 1735 VisitForStackValue(expr->expression()); |
| 1736 | 1736 |
| 1737 Label suspend, continuation, post_runtime, resume, exception; | 1737 Label suspend, continuation, post_runtime, resume, exception; |
| 1738 | 1738 |
| 1739 __ jmp(&suspend); | 1739 __ jmp(&suspend); |
| 1740 __ bind(&continuation); | 1740 __ bind(&continuation); |
| 1741 // When we arrive here, eax holds the generator object. | 1741 // When we arrive here, eax holds the generator object. |
| 1742 __ RecordGeneratorContinuation(); | 1742 __ RecordGeneratorContinuation(); |
| 1743 __ mov(ebx, FieldOperand(eax, JSGeneratorObject::kResumeModeOffset)); | 1743 __ mov(ebx, FieldOperand(eax, JSGeneratorObject::kResumeModeOffset)); |
| 1744 __ mov(eax, FieldOperand(eax, JSGeneratorObject::kInputOffset)); | 1744 __ mov(eax, FieldOperand(eax, JSGeneratorObject::kInputOrDebugPosOffset)); |
| 1745 STATIC_ASSERT(JSGeneratorObject::kNext < JSGeneratorObject::kReturn); | 1745 STATIC_ASSERT(JSGeneratorObject::kNext < JSGeneratorObject::kReturn); |
| 1746 STATIC_ASSERT(JSGeneratorObject::kThrow > JSGeneratorObject::kReturn); | 1746 STATIC_ASSERT(JSGeneratorObject::kThrow > JSGeneratorObject::kReturn); |
| 1747 __ cmp(ebx, Immediate(Smi::FromInt(JSGeneratorObject::kReturn))); | 1747 __ cmp(ebx, Immediate(Smi::FromInt(JSGeneratorObject::kReturn))); |
| 1748 __ j(less, &resume); | 1748 __ j(less, &resume); |
| 1749 __ Push(result_register()); | 1749 __ Push(result_register()); |
| 1750 __ j(greater, &exception); | 1750 __ j(greater, &exception); |
| 1751 EmitCreateIteratorResult(true); | 1751 EmitCreateIteratorResult(true); |
| 1752 EmitUnwindAndReturn(); | 1752 EmitUnwindAndReturn(); |
| 1753 | 1753 |
| 1754 __ bind(&exception); | 1754 __ bind(&exception); |
| (...skipping 1936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3691 isolate->builtins()->OnStackReplacement()->entry(), | 3691 isolate->builtins()->OnStackReplacement()->entry(), |
| 3692 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3692 Assembler::target_address_at(call_target_address, unoptimized_code)); |
| 3693 return ON_STACK_REPLACEMENT; | 3693 return ON_STACK_REPLACEMENT; |
| 3694 } | 3694 } |
| 3695 | 3695 |
| 3696 | 3696 |
| 3697 } // namespace internal | 3697 } // namespace internal |
| 3698 } // namespace v8 | 3698 } // namespace v8 |
| 3699 | 3699 |
| 3700 #endif // V8_TARGET_ARCH_X87 | 3700 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |