OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
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 3082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3093 | 3093 |
3094 void FullCodeGenerator::EmitCreateIterResultObject(CallRuntime* expr) { | 3094 void FullCodeGenerator::EmitCreateIterResultObject(CallRuntime* expr) { |
3095 ZoneList<Expression*>* args = expr->arguments(); | 3095 ZoneList<Expression*>* args = expr->arguments(); |
3096 DCHECK_EQ(2, args->length()); | 3096 DCHECK_EQ(2, args->length()); |
3097 VisitForStackValue(args->at(0)); | 3097 VisitForStackValue(args->at(0)); |
3098 VisitForStackValue(args->at(1)); | 3098 VisitForStackValue(args->at(1)); |
3099 | 3099 |
3100 Label runtime, done; | 3100 Label runtime, done; |
3101 | 3101 |
3102 Register result = x0; | 3102 Register result = x0; |
3103 __ Allocate(JSIteratorResult::kSize, result, x10, x11, &runtime, TAG_OBJECT); | 3103 __ Allocate(JSIteratorResult::kSize, result, x10, x11, &runtime, |
| 3104 NO_ALLOCATION_FLAGS); |
3104 Register map_reg = x1; | 3105 Register map_reg = x1; |
3105 Register result_value = x2; | 3106 Register result_value = x2; |
3106 Register boolean_done = x3; | 3107 Register boolean_done = x3; |
3107 Register empty_fixed_array = x4; | 3108 Register empty_fixed_array = x4; |
3108 Register untagged_result = x5; | 3109 Register untagged_result = x5; |
3109 __ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, map_reg); | 3110 __ LoadNativeContextSlot(Context::ITERATOR_RESULT_MAP_INDEX, map_reg); |
3110 __ Pop(boolean_done); | 3111 __ Pop(boolean_done); |
3111 __ Pop(result_value); | 3112 __ Pop(result_value); |
3112 __ LoadRoot(empty_fixed_array, Heap::kEmptyFixedArrayRootIndex); | 3113 __ LoadRoot(empty_fixed_array, Heap::kEmptyFixedArrayRootIndex); |
3113 STATIC_ASSERT(JSObject::kPropertiesOffset + kPointerSize == | 3114 STATIC_ASSERT(JSObject::kPropertiesOffset + kPointerSize == |
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3792 __ Assert(eq, kUnexpectedStackDepth); | 3793 __ Assert(eq, kUnexpectedStackDepth); |
3793 } | 3794 } |
3794 } | 3795 } |
3795 | 3796 |
3796 void FullCodeGenerator::EmitCreateIteratorResult(bool done) { | 3797 void FullCodeGenerator::EmitCreateIteratorResult(bool done) { |
3797 Label allocate, done_allocate; | 3798 Label allocate, done_allocate; |
3798 | 3799 |
3799 // Allocate and populate an object with this form: { value: VAL, done: DONE } | 3800 // Allocate and populate an object with this form: { value: VAL, done: DONE } |
3800 | 3801 |
3801 Register result = x0; | 3802 Register result = x0; |
3802 __ Allocate(JSIteratorResult::kSize, result, x10, x11, &allocate, TAG_OBJECT); | 3803 __ Allocate(JSIteratorResult::kSize, result, x10, x11, &allocate, |
| 3804 NO_ALLOCATION_FLAGS); |
3803 __ B(&done_allocate); | 3805 __ B(&done_allocate); |
3804 | 3806 |
3805 __ Bind(&allocate); | 3807 __ Bind(&allocate); |
3806 __ Push(Smi::FromInt(JSIteratorResult::kSize)); | 3808 __ Push(Smi::FromInt(JSIteratorResult::kSize)); |
3807 __ CallRuntime(Runtime::kAllocateInNewSpace); | 3809 __ CallRuntime(Runtime::kAllocateInNewSpace); |
3808 | 3810 |
3809 __ Bind(&done_allocate); | 3811 __ Bind(&done_allocate); |
3810 Register map_reg = x1; | 3812 Register map_reg = x1; |
3811 Register result_value = x2; | 3813 Register result_value = x2; |
3812 Register boolean_done = x3; | 3814 Register boolean_done = x3; |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4030 } | 4032 } |
4031 | 4033 |
4032 return INTERRUPT; | 4034 return INTERRUPT; |
4033 } | 4035 } |
4034 | 4036 |
4035 | 4037 |
4036 } // namespace internal | 4038 } // namespace internal |
4037 } // namespace v8 | 4039 } // namespace v8 |
4038 | 4040 |
4039 #endif // V8_TARGET_ARCH_ARM64 | 4041 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |