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 1793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1804 __ mov(eax, ebp); | 1804 __ mov(eax, ebp); |
1805 __ sub(eax, esp); | 1805 __ sub(eax, esp); |
1806 __ cmp(eax, Immediate(expected_diff)); | 1806 __ cmp(eax, Immediate(expected_diff)); |
1807 __ Assert(equal, kUnexpectedStackDepth); | 1807 __ Assert(equal, kUnexpectedStackDepth); |
1808 } | 1808 } |
1809 } | 1809 } |
1810 | 1810 |
1811 void FullCodeGenerator::EmitCreateIteratorResult(bool done) { | 1811 void FullCodeGenerator::EmitCreateIteratorResult(bool done) { |
1812 Label allocate, done_allocate; | 1812 Label allocate, done_allocate; |
1813 | 1813 |
1814 __ Allocate(JSIteratorResult::kSize, eax, ecx, edx, &allocate, TAG_OBJECT); | 1814 __ Allocate(JSIteratorResult::kSize, eax, ecx, edx, &allocate, |
| 1815 NO_ALLOCATION_FLAGS); |
1815 __ jmp(&done_allocate, Label::kNear); | 1816 __ jmp(&done_allocate, Label::kNear); |
1816 | 1817 |
1817 __ bind(&allocate); | 1818 __ bind(&allocate); |
1818 __ Push(Smi::FromInt(JSIteratorResult::kSize)); | 1819 __ Push(Smi::FromInt(JSIteratorResult::kSize)); |
1819 __ CallRuntime(Runtime::kAllocateInNewSpace); | 1820 __ CallRuntime(Runtime::kAllocateInNewSpace); |
1820 | 1821 |
1821 __ bind(&done_allocate); | 1822 __ bind(&done_allocate); |
1822 __ mov(ebx, NativeContextOperand()); | 1823 __ mov(ebx, NativeContextOperand()); |
1823 __ mov(ebx, ContextOperand(ebx, Context::ITERATOR_RESULT_MAP_INDEX)); | 1824 __ mov(ebx, ContextOperand(ebx, Context::ITERATOR_RESULT_MAP_INDEX)); |
1824 __ mov(FieldOperand(eax, HeapObject::kMapOffset), ebx); | 1825 __ mov(FieldOperand(eax, HeapObject::kMapOffset), ebx); |
(...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3088 | 3089 |
3089 | 3090 |
3090 void FullCodeGenerator::EmitCreateIterResultObject(CallRuntime* expr) { | 3091 void FullCodeGenerator::EmitCreateIterResultObject(CallRuntime* expr) { |
3091 ZoneList<Expression*>* args = expr->arguments(); | 3092 ZoneList<Expression*>* args = expr->arguments(); |
3092 DCHECK_EQ(2, args->length()); | 3093 DCHECK_EQ(2, args->length()); |
3093 VisitForStackValue(args->at(0)); | 3094 VisitForStackValue(args->at(0)); |
3094 VisitForStackValue(args->at(1)); | 3095 VisitForStackValue(args->at(1)); |
3095 | 3096 |
3096 Label runtime, done; | 3097 Label runtime, done; |
3097 | 3098 |
3098 __ Allocate(JSIteratorResult::kSize, eax, ecx, edx, &runtime, TAG_OBJECT); | 3099 __ Allocate(JSIteratorResult::kSize, eax, ecx, edx, &runtime, |
| 3100 NO_ALLOCATION_FLAGS); |
3099 __ mov(ebx, NativeContextOperand()); | 3101 __ mov(ebx, NativeContextOperand()); |
3100 __ mov(ebx, ContextOperand(ebx, Context::ITERATOR_RESULT_MAP_INDEX)); | 3102 __ mov(ebx, ContextOperand(ebx, Context::ITERATOR_RESULT_MAP_INDEX)); |
3101 __ mov(FieldOperand(eax, HeapObject::kMapOffset), ebx); | 3103 __ mov(FieldOperand(eax, HeapObject::kMapOffset), ebx); |
3102 __ mov(FieldOperand(eax, JSObject::kPropertiesOffset), | 3104 __ mov(FieldOperand(eax, JSObject::kPropertiesOffset), |
3103 isolate()->factory()->empty_fixed_array()); | 3105 isolate()->factory()->empty_fixed_array()); |
3104 __ mov(FieldOperand(eax, JSObject::kElementsOffset), | 3106 __ mov(FieldOperand(eax, JSObject::kElementsOffset), |
3105 isolate()->factory()->empty_fixed_array()); | 3107 isolate()->factory()->empty_fixed_array()); |
3106 __ pop(FieldOperand(eax, JSIteratorResult::kDoneOffset)); | 3108 __ pop(FieldOperand(eax, JSIteratorResult::kDoneOffset)); |
3107 __ pop(FieldOperand(eax, JSIteratorResult::kValueOffset)); | 3109 __ pop(FieldOperand(eax, JSIteratorResult::kValueOffset)); |
3108 STATIC_ASSERT(JSIteratorResult::kSize == 5 * kPointerSize); | 3110 STATIC_ASSERT(JSIteratorResult::kSize == 5 * kPointerSize); |
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3871 isolate->builtins()->OnStackReplacement()->entry(), | 3873 isolate->builtins()->OnStackReplacement()->entry(), |
3872 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3874 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3873 return ON_STACK_REPLACEMENT; | 3875 return ON_STACK_REPLACEMENT; |
3874 } | 3876 } |
3875 | 3877 |
3876 | 3878 |
3877 } // namespace internal | 3879 } // namespace internal |
3878 } // namespace v8 | 3880 } // namespace v8 |
3879 | 3881 |
3880 #endif // V8_TARGET_ARCH_IA32 | 3882 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |