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_X64 | 5 #if V8_TARGET_ARCH_X64 |
6 | 6 |
7 #include "src/codegen.h" | 7 #include "src/codegen.h" |
8 #include "src/ic/ic.h" | 8 #include "src/ic/ic.h" |
9 #include "src/ic/ic-compiler.h" | 9 #include "src/ic/ic-compiler.h" |
10 #include "src/ic/stub-cache.h" | 10 #include "src/ic/stub-cache.h" |
11 | 11 |
12 namespace v8 { | 12 namespace v8 { |
13 namespace internal { | 13 namespace internal { |
14 | 14 |
15 // ---------------------------------------------------------------------------- | 15 // ---------------------------------------------------------------------------- |
16 // Static IC stub generators. | 16 // Static IC stub generators. |
17 // | 17 // |
18 | 18 |
19 #define __ ACCESS_MASM(masm) | 19 #define __ ACCESS_MASM(masm) |
20 | 20 |
21 | 21 |
22 static void GenerateGlobalInstanceTypeCheck(MacroAssembler* masm, Register type, | 22 static void GenerateGlobalInstanceTypeCheck(MacroAssembler* masm, Register type, |
23 Label* global_object) { | 23 Label* global_object) { |
24 // Register usage: | 24 // Register usage: |
25 // type: holds the receiver instance type on entry. | 25 // type: holds the receiver instance type on entry. |
26 __ cmpb(type, Immediate(JS_GLOBAL_OBJECT_TYPE)); | 26 __ cmpb(type, Immediate(JS_GLOBAL_OBJECT_TYPE)); |
27 __ j(equal, global_object); | 27 __ j(equal, global_object); |
28 __ cmpb(type, Immediate(JS_BUILTINS_OBJECT_TYPE)); | |
29 __ j(equal, global_object); | |
30 __ cmpb(type, Immediate(JS_GLOBAL_PROXY_TYPE)); | 28 __ cmpb(type, Immediate(JS_GLOBAL_PROXY_TYPE)); |
31 __ j(equal, global_object); | 29 __ j(equal, global_object); |
32 } | 30 } |
33 | 31 |
34 | 32 |
35 // Helper function used to load a property from a dictionary backing storage. | 33 // Helper function used to load a property from a dictionary backing storage. |
36 // This function may return false negatives, so miss_label | 34 // This function may return false negatives, so miss_label |
37 // must always call a backup property load that is complete. | 35 // must always call a backup property load that is complete. |
38 // This function is safe to call if name is not an internalized string, | 36 // This function is safe to call if name is not an internalized string, |
39 // and will jump to the miss_label in that case. | 37 // and will jump to the miss_label in that case. |
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
886 Condition cc = | 884 Condition cc = |
887 (check == ENABLE_INLINED_SMI_CHECK) | 885 (check == ENABLE_INLINED_SMI_CHECK) |
888 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) | 886 ? (*jmp_address == Assembler::kJncShortOpcode ? not_zero : zero) |
889 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); | 887 : (*jmp_address == Assembler::kJnzShortOpcode ? not_carry : carry); |
890 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 888 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
891 } | 889 } |
892 } // namespace internal | 890 } // namespace internal |
893 } // namespace v8 | 891 } // namespace v8 |
894 | 892 |
895 #endif // V8_TARGET_ARCH_X64 | 893 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |