| 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 1720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1731 STATIC_ASSERT(JSGeneratorObject::kNext < JSGeneratorObject::kReturn); | 1731 STATIC_ASSERT(JSGeneratorObject::kNext < JSGeneratorObject::kReturn); |
| 1732 STATIC_ASSERT(JSGeneratorObject::kThrow > JSGeneratorObject::kReturn); | 1732 STATIC_ASSERT(JSGeneratorObject::kThrow > JSGeneratorObject::kReturn); |
| 1733 __ cmp(ebx, Immediate(Smi::FromInt(JSGeneratorObject::kReturn))); | 1733 __ cmp(ebx, Immediate(Smi::FromInt(JSGeneratorObject::kReturn))); |
| 1734 __ j(less, &resume); | 1734 __ j(less, &resume); |
| 1735 __ Push(result_register()); | 1735 __ Push(result_register()); |
| 1736 __ j(greater, &exception); | 1736 __ j(greater, &exception); |
| 1737 EmitCreateIteratorResult(true); | 1737 EmitCreateIteratorResult(true); |
| 1738 EmitUnwindAndReturn(); | 1738 EmitUnwindAndReturn(); |
| 1739 | 1739 |
| 1740 __ bind(&exception); | 1740 __ bind(&exception); |
| 1741 __ CallRuntime(Runtime::kThrow); | 1741 __ CallRuntime(expr->rethrow_on_exception() ? Runtime::kReThrow |
| 1742 : Runtime::kThrow); |
| 1742 | 1743 |
| 1743 __ bind(&suspend); | 1744 __ bind(&suspend); |
| 1744 OperandStackDepthIncrement(1); // Not popped on this path. | 1745 OperandStackDepthIncrement(1); // Not popped on this path. |
| 1745 VisitForAccumulatorValue(expr->generator_object()); | 1746 VisitForAccumulatorValue(expr->generator_object()); |
| 1746 DCHECK(continuation.pos() > 0 && Smi::IsValid(continuation.pos())); | 1747 DCHECK(continuation.pos() > 0 && Smi::IsValid(continuation.pos())); |
| 1747 __ mov(FieldOperand(eax, JSGeneratorObject::kContinuationOffset), | 1748 __ mov(FieldOperand(eax, JSGeneratorObject::kContinuationOffset), |
| 1748 Immediate(Smi::FromInt(continuation.pos()))); | 1749 Immediate(Smi::FromInt(continuation.pos()))); |
| 1749 __ mov(FieldOperand(eax, JSGeneratorObject::kContextOffset), esi); | 1750 __ mov(FieldOperand(eax, JSGeneratorObject::kContextOffset), esi); |
| 1750 __ mov(ecx, esi); | 1751 __ mov(ecx, esi); |
| 1751 __ RecordWriteField(eax, JSGeneratorObject::kContextOffset, ecx, edx, | 1752 __ RecordWriteField(eax, JSGeneratorObject::kContextOffset, ecx, edx, |
| (...skipping 1908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3660 isolate->builtins()->OnStackReplacement()->entry(), | 3661 isolate->builtins()->OnStackReplacement()->entry(), |
| 3661 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3662 Assembler::target_address_at(call_target_address, unoptimized_code)); |
| 3662 return ON_STACK_REPLACEMENT; | 3663 return ON_STACK_REPLACEMENT; |
| 3663 } | 3664 } |
| 3664 | 3665 |
| 3665 | 3666 |
| 3666 } // namespace internal | 3667 } // namespace internal |
| 3667 } // namespace v8 | 3668 } // namespace v8 |
| 3668 | 3669 |
| 3669 #endif // V8_TARGET_ARCH_X87 | 3670 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |