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_X64 | 7 #if V8_TARGET_ARCH_X64 |
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 72 |
73 Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types, | 73 Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types, |
74 CodeHandleList* handlers, | 74 CodeHandleList* handlers, |
75 Handle<Name> name, | 75 Handle<Name> name, |
76 Code::StubType type, | 76 Code::StubType type, |
77 IcCheckType check) { | 77 IcCheckType check) { |
78 Label miss; | 78 Label miss; |
79 | 79 |
80 if (check == PROPERTY && | 80 if (check == PROPERTY && |
81 (kind() == Code::KEYED_LOAD_IC || kind() == Code::KEYED_STORE_IC)) { | 81 (kind() == Code::KEYED_LOAD_IC || kind() == Code::KEYED_STORE_IC)) { |
82 // In case we are compiling an IC for dictionary loads and stores, just | 82 // In case we are compiling an IC for dictionary loads or stores, just |
83 // check whether the name is unique. | 83 // check whether the name is unique. |
84 if (name.is_identical_to(isolate()->factory()->normal_ic_symbol())) { | 84 if (name.is_identical_to(isolate()->factory()->normal_ic_symbol())) { |
| 85 // Keyed loads with dictionaries shouldn't be here, they go generic. |
| 86 // The DCHECK is to protect assumptions when --vector-ics is on. |
| 87 DCHECK(kind() != Code::KEYED_LOAD_IC); |
85 Register tmp = scratch1(); | 88 Register tmp = scratch1(); |
86 __ JumpIfSmi(this->name(), &miss); | 89 __ JumpIfSmi(this->name(), &miss); |
87 __ movp(tmp, FieldOperand(this->name(), HeapObject::kMapOffset)); | 90 __ movp(tmp, FieldOperand(this->name(), HeapObject::kMapOffset)); |
88 __ movzxbp(tmp, FieldOperand(tmp, Map::kInstanceTypeOffset)); | 91 __ movzxbp(tmp, FieldOperand(tmp, Map::kInstanceTypeOffset)); |
89 __ JumpIfNotUniqueNameInstanceType(tmp, &miss); | 92 __ JumpIfNotUniqueNameInstanceType(tmp, &miss); |
90 } else { | 93 } else { |
91 __ Cmp(this->name(), name); | 94 __ Cmp(this->name(), name); |
92 __ j(not_equal, &miss); | 95 __ j(not_equal, &miss); |
93 } | 96 } |
94 } | 97 } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 number_of_handled_maps > 1 ? POLYMORPHIC : MONOMORPHIC; | 131 number_of_handled_maps > 1 ? POLYMORPHIC : MONOMORPHIC; |
129 return GetCode(kind(), type, name, state); | 132 return GetCode(kind(), type, name, state); |
130 } | 133 } |
131 | 134 |
132 | 135 |
133 #undef __ | 136 #undef __ |
134 } | 137 } |
135 } // namespace v8::internal | 138 } // namespace v8::internal |
136 | 139 |
137 #endif // V8_TARGET_ARCH_X64 | 140 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |