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/arm64/frames-arm64.h" | 7 #include "src/arm64/frames-arm64.h" |
8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
9 #include "src/debug/debug.h" | 9 #include "src/debug/debug.h" |
10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
11 #include "src/full-codegen/full-codegen.h" | 11 #include "src/full-codegen/full-codegen.h" |
12 #include "src/runtime/runtime.h" | 12 #include "src/runtime/runtime.h" |
13 | 13 |
14 namespace v8 { | 14 namespace v8 { |
15 namespace internal { | 15 namespace internal { |
16 | 16 |
17 | 17 |
18 #define __ ACCESS_MASM(masm) | 18 #define __ ACCESS_MASM(masm) |
19 | 19 |
20 | 20 |
21 // Load the built-in Array function from the current context. | 21 // Load the built-in Array function from the current context. |
22 static void GenerateLoadArrayFunction(MacroAssembler* masm, Register result) { | 22 static void GenerateLoadArrayFunction(MacroAssembler* masm, Register result) { |
23 // Load the native context. | 23 // Load the native context. |
24 __ Ldr(result, GlobalObjectMemOperand()); | 24 __ Ldr(result, GlobalObjectMemOperand()); |
25 __ Ldr(result, | 25 __ Ldr(result, FieldMemOperand(result, JSGlobalObject::kNativeContextOffset)); |
26 FieldMemOperand(result, GlobalObject::kNativeContextOffset)); | |
27 // Load the InternalArray function from the native context. | 26 // Load the InternalArray function from the native context. |
28 __ Ldr(result, | 27 __ Ldr(result, |
29 MemOperand(result, | 28 MemOperand(result, |
30 Context::SlotOffset(Context::ARRAY_FUNCTION_INDEX))); | 29 Context::SlotOffset(Context::ARRAY_FUNCTION_INDEX))); |
31 } | 30 } |
32 | 31 |
33 | 32 |
34 // Load the built-in InternalArray function from the current context. | 33 // Load the built-in InternalArray function from the current context. |
35 static void GenerateLoadInternalArrayFunction(MacroAssembler* masm, | 34 static void GenerateLoadInternalArrayFunction(MacroAssembler* masm, |
36 Register result) { | 35 Register result) { |
37 // Load the native context. | 36 // Load the native context. |
38 __ Ldr(result, GlobalObjectMemOperand()); | 37 __ Ldr(result, GlobalObjectMemOperand()); |
39 __ Ldr(result, | 38 __ Ldr(result, FieldMemOperand(result, JSGlobalObject::kNativeContextOffset)); |
40 FieldMemOperand(result, GlobalObject::kNativeContextOffset)); | |
41 // Load the InternalArray function from the native context. | 39 // Load the InternalArray function from the native context. |
42 __ Ldr(result, ContextMemOperand(result, | 40 __ Ldr(result, ContextMemOperand(result, |
43 Context::INTERNAL_ARRAY_FUNCTION_INDEX)); | 41 Context::INTERNAL_ARRAY_FUNCTION_INDEX)); |
44 } | 42 } |
45 | 43 |
46 | 44 |
47 void Builtins::Generate_Adaptor(MacroAssembler* masm, | 45 void Builtins::Generate_Adaptor(MacroAssembler* masm, |
48 CFunctionId id, | 46 CFunctionId id, |
49 BuiltinExtraArguments extra_args) { | 47 BuiltinExtraArguments extra_args) { |
50 // ----------- S t a t e ------------- | 48 // ----------- S t a t e ------------- |
(...skipping 1956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2007 } | 2005 } |
2008 } | 2006 } |
2009 | 2007 |
2010 | 2008 |
2011 #undef __ | 2009 #undef __ |
2012 | 2010 |
2013 } // namespace internal | 2011 } // namespace internal |
2014 } // namespace v8 | 2012 } // namespace v8 |
2015 | 2013 |
2016 #endif // V8_TARGET_ARCH_ARM | 2014 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |