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 1785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1796 __ mov(eax, ebp); | 1796 __ mov(eax, ebp); |
1797 __ sub(eax, esp); | 1797 __ sub(eax, esp); |
1798 __ cmp(eax, Immediate(expected_diff)); | 1798 __ cmp(eax, Immediate(expected_diff)); |
1799 __ Assert(equal, kUnexpectedStackDepth); | 1799 __ Assert(equal, kUnexpectedStackDepth); |
1800 } | 1800 } |
1801 } | 1801 } |
1802 | 1802 |
1803 void FullCodeGenerator::EmitCreateIteratorResult(bool done) { | 1803 void FullCodeGenerator::EmitCreateIteratorResult(bool done) { |
1804 Label allocate, done_allocate; | 1804 Label allocate, done_allocate; |
1805 | 1805 |
1806 __ Allocate(JSIteratorResult::kSize, eax, ecx, edx, &allocate, TAG_OBJECT); | 1806 __ Allocate(JSIteratorResult::kSize, eax, ecx, edx, &allocate, |
| 1807 NO_ALLOCATION_FLAGS); |
1807 __ jmp(&done_allocate, Label::kNear); | 1808 __ jmp(&done_allocate, Label::kNear); |
1808 | 1809 |
1809 __ bind(&allocate); | 1810 __ bind(&allocate); |
1810 __ Push(Smi::FromInt(JSIteratorResult::kSize)); | 1811 __ Push(Smi::FromInt(JSIteratorResult::kSize)); |
1811 __ CallRuntime(Runtime::kAllocateInNewSpace); | 1812 __ CallRuntime(Runtime::kAllocateInNewSpace); |
1812 | 1813 |
1813 __ bind(&done_allocate); | 1814 __ bind(&done_allocate); |
1814 __ mov(ebx, NativeContextOperand()); | 1815 __ mov(ebx, NativeContextOperand()); |
1815 __ mov(ebx, ContextOperand(ebx, Context::ITERATOR_RESULT_MAP_INDEX)); | 1816 __ mov(ebx, ContextOperand(ebx, Context::ITERATOR_RESULT_MAP_INDEX)); |
1816 __ mov(FieldOperand(eax, HeapObject::kMapOffset), ebx); | 1817 __ mov(FieldOperand(eax, HeapObject::kMapOffset), ebx); |
(...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3080 | 3081 |
3081 | 3082 |
3082 void FullCodeGenerator::EmitCreateIterResultObject(CallRuntime* expr) { | 3083 void FullCodeGenerator::EmitCreateIterResultObject(CallRuntime* expr) { |
3083 ZoneList<Expression*>* args = expr->arguments(); | 3084 ZoneList<Expression*>* args = expr->arguments(); |
3084 DCHECK_EQ(2, args->length()); | 3085 DCHECK_EQ(2, args->length()); |
3085 VisitForStackValue(args->at(0)); | 3086 VisitForStackValue(args->at(0)); |
3086 VisitForStackValue(args->at(1)); | 3087 VisitForStackValue(args->at(1)); |
3087 | 3088 |
3088 Label runtime, done; | 3089 Label runtime, done; |
3089 | 3090 |
3090 __ Allocate(JSIteratorResult::kSize, eax, ecx, edx, &runtime, TAG_OBJECT); | 3091 __ Allocate(JSIteratorResult::kSize, eax, ecx, edx, &runtime, |
| 3092 NO_ALLOCATION_FLAGS); |
3091 __ mov(ebx, NativeContextOperand()); | 3093 __ mov(ebx, NativeContextOperand()); |
3092 __ mov(ebx, ContextOperand(ebx, Context::ITERATOR_RESULT_MAP_INDEX)); | 3094 __ mov(ebx, ContextOperand(ebx, Context::ITERATOR_RESULT_MAP_INDEX)); |
3093 __ mov(FieldOperand(eax, HeapObject::kMapOffset), ebx); | 3095 __ mov(FieldOperand(eax, HeapObject::kMapOffset), ebx); |
3094 __ mov(FieldOperand(eax, JSObject::kPropertiesOffset), | 3096 __ mov(FieldOperand(eax, JSObject::kPropertiesOffset), |
3095 isolate()->factory()->empty_fixed_array()); | 3097 isolate()->factory()->empty_fixed_array()); |
3096 __ mov(FieldOperand(eax, JSObject::kElementsOffset), | 3098 __ mov(FieldOperand(eax, JSObject::kElementsOffset), |
3097 isolate()->factory()->empty_fixed_array()); | 3099 isolate()->factory()->empty_fixed_array()); |
3098 __ pop(FieldOperand(eax, JSIteratorResult::kDoneOffset)); | 3100 __ pop(FieldOperand(eax, JSIteratorResult::kDoneOffset)); |
3099 __ pop(FieldOperand(eax, JSIteratorResult::kValueOffset)); | 3101 __ pop(FieldOperand(eax, JSIteratorResult::kValueOffset)); |
3100 STATIC_ASSERT(JSIteratorResult::kSize == 5 * kPointerSize); | 3102 STATIC_ASSERT(JSIteratorResult::kSize == 5 * kPointerSize); |
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3863 isolate->builtins()->OnStackReplacement()->entry(), | 3865 isolate->builtins()->OnStackReplacement()->entry(), |
3864 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3866 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3865 return ON_STACK_REPLACEMENT; | 3867 return ON_STACK_REPLACEMENT; |
3866 } | 3868 } |
3867 | 3869 |
3868 | 3870 |
3869 } // namespace internal | 3871 } // namespace internal |
3870 } // namespace v8 | 3872 } // namespace v8 |
3871 | 3873 |
3872 #endif // V8_TARGET_ARCH_X87 | 3874 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |