OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
8 | 8 |
9 #include "src/ic/ic.h" | 9 #include "src/ic/ic.h" |
10 #include "src/ic/ic-compiler.h" | 10 #include "src/ic/ic-compiler.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 | 35 |
36 Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types, | 36 Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types, |
37 CodeHandleList* handlers, | 37 CodeHandleList* handlers, |
38 Handle<Name> name, | 38 Handle<Name> name, |
39 Code::StubType type, | 39 Code::StubType type, |
40 IcCheckType check) { | 40 IcCheckType check) { |
41 Label miss; | 41 Label miss; |
42 | 42 |
43 if (check == PROPERTY && | 43 if (check == PROPERTY && |
44 (kind() == Code::KEYED_LOAD_IC || kind() == Code::KEYED_STORE_IC)) { | 44 (kind() == Code::KEYED_LOAD_IC || kind() == Code::KEYED_STORE_IC)) { |
45 // In case we are compiling an IC for dictionary loads and stores, just | 45 // In case we are compiling an IC for dictionary loads or stores, just |
46 // check whether the name is unique. | 46 // check whether the name is unique. |
47 if (name.is_identical_to(isolate()->factory()->normal_ic_symbol())) { | 47 if (name.is_identical_to(isolate()->factory()->normal_ic_symbol())) { |
| 48 // Keyed loads with dictionaries shouldn't be here, they go generic. |
| 49 // The DCHECK is to protect assumptions when --vector-ics is on. |
| 50 DCHECK(kind() != Code::KEYED_LOAD_IC); |
48 Register tmp = scratch1(); | 51 Register tmp = scratch1(); |
49 __ JumpIfSmi(this->name(), &miss); | 52 __ JumpIfSmi(this->name(), &miss); |
50 __ Ldr(tmp, FieldMemOperand(this->name(), HeapObject::kMapOffset)); | 53 __ Ldr(tmp, FieldMemOperand(this->name(), HeapObject::kMapOffset)); |
51 __ Ldrb(tmp, FieldMemOperand(tmp, Map::kInstanceTypeOffset)); | 54 __ Ldrb(tmp, FieldMemOperand(tmp, Map::kInstanceTypeOffset)); |
52 __ JumpIfNotUniqueNameInstanceType(tmp, &miss); | 55 __ JumpIfNotUniqueNameInstanceType(tmp, &miss); |
53 } else { | 56 } else { |
54 __ CompareAndBranch(this->name(), Operand(name), ne, &miss); | 57 __ CompareAndBranch(this->name(), Operand(name), ne, &miss); |
55 } | 58 } |
56 } | 59 } |
57 | 60 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 | 130 |
128 return GetCode(kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC); | 131 return GetCode(kind(), Code::NORMAL, factory()->empty_string(), POLYMORPHIC); |
129 } | 132 } |
130 | 133 |
131 | 134 |
132 #undef __ | 135 #undef __ |
133 } | 136 } |
134 } // namespace v8::internal | 137 } // namespace v8::internal |
135 | 138 |
136 #endif // V8_TARGET_ARCH_ARM64 | 139 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |