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_ARM | 5 #if V8_TARGET_ARCH_ARM |
6 | 6 |
7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
8 #include "src/debug/debug.h" | 8 #include "src/debug/debug.h" |
9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 } | 64 } |
65 | 65 |
66 | 66 |
67 // Load the built-in InternalArray function from the current context. | 67 // Load the built-in InternalArray function from the current context. |
68 static void GenerateLoadInternalArrayFunction(MacroAssembler* masm, | 68 static void GenerateLoadInternalArrayFunction(MacroAssembler* masm, |
69 Register result) { | 69 Register result) { |
70 // Load the native context. | 70 // Load the native context. |
71 | 71 |
72 __ ldr(result, | 72 __ ldr(result, |
73 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); | 73 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); |
74 __ ldr(result, | 74 __ ldr(result, FieldMemOperand(result, JSGlobalObject::kNativeContextOffset)); |
75 FieldMemOperand(result, GlobalObject::kNativeContextOffset)); | |
76 // Load the InternalArray function from the native context. | 75 // Load the InternalArray function from the native context. |
77 __ ldr(result, | 76 __ ldr(result, |
78 MemOperand(result, | 77 MemOperand(result, |
79 Context::SlotOffset( | 78 Context::SlotOffset( |
80 Context::INTERNAL_ARRAY_FUNCTION_INDEX))); | 79 Context::INTERNAL_ARRAY_FUNCTION_INDEX))); |
81 } | 80 } |
82 | 81 |
83 | 82 |
84 // Load the built-in Array function from the current context. | 83 // Load the built-in Array function from the current context. |
85 static void GenerateLoadArrayFunction(MacroAssembler* masm, Register result) { | 84 static void GenerateLoadArrayFunction(MacroAssembler* masm, Register result) { |
86 // Load the native context. | 85 // Load the native context. |
87 | 86 |
88 __ ldr(result, | 87 __ ldr(result, |
89 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); | 88 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); |
90 __ ldr(result, | 89 __ ldr(result, FieldMemOperand(result, JSGlobalObject::kNativeContextOffset)); |
91 FieldMemOperand(result, GlobalObject::kNativeContextOffset)); | |
92 // Load the Array function from the native context. | 90 // Load the Array function from the native context. |
93 __ ldr(result, | 91 __ ldr(result, |
94 MemOperand(result, | 92 MemOperand(result, |
95 Context::SlotOffset(Context::ARRAY_FUNCTION_INDEX))); | 93 Context::SlotOffset(Context::ARRAY_FUNCTION_INDEX))); |
96 } | 94 } |
97 | 95 |
98 | 96 |
99 void Builtins::Generate_InternalArrayCode(MacroAssembler* masm) { | 97 void Builtins::Generate_InternalArrayCode(MacroAssembler* masm) { |
100 // ----------- S t a t e ------------- | 98 // ----------- S t a t e ------------- |
101 // -- r0 : number of arguments | 99 // -- r0 : number of arguments |
(...skipping 1818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1920 } | 1918 } |
1921 } | 1919 } |
1922 | 1920 |
1923 | 1921 |
1924 #undef __ | 1922 #undef __ |
1925 | 1923 |
1926 } // namespace internal | 1924 } // namespace internal |
1927 } // namespace v8 | 1925 } // namespace v8 |
1928 | 1926 |
1929 #endif // V8_TARGET_ARCH_ARM | 1927 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |