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