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 #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/arguments.h" | 9 #include "src/arguments.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1227 | 1227 |
1228 Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types, | 1228 Handle<Code> PropertyICCompiler::CompilePolymorphic(TypeHandleList* types, |
1229 CodeHandleList* handlers, | 1229 CodeHandleList* handlers, |
1230 Handle<Name> name, | 1230 Handle<Name> name, |
1231 Code::StubType type, | 1231 Code::StubType type, |
1232 IcCheckType check) { | 1232 IcCheckType check) { |
1233 Label miss; | 1233 Label miss; |
1234 | 1234 |
1235 if (check == PROPERTY && | 1235 if (check == PROPERTY && |
1236 (kind() == Code::KEYED_LOAD_IC || kind() == Code::KEYED_STORE_IC)) { | 1236 (kind() == Code::KEYED_LOAD_IC || kind() == Code::KEYED_STORE_IC)) { |
1237 __ Cmp(this->name(), name); | 1237 // In case we are compiling an IC for dictionary loads and stores, just |
1238 __ j(not_equal, &miss); | 1238 // check whether the name is unique. |
| 1239 if (name.is_identical_to(isolate()->factory()->normal_ic_symbol())) { |
| 1240 __ JumpIfNotUniqueName(this->name(), &miss); |
| 1241 } else { |
| 1242 __ Cmp(this->name(), name); |
| 1243 __ j(not_equal, &miss); |
| 1244 } |
1239 } | 1245 } |
1240 | 1246 |
1241 Label number_case; | 1247 Label number_case; |
1242 Label* smi_target = IncludesNumberType(types) ? &number_case : &miss; | 1248 Label* smi_target = IncludesNumberType(types) ? &number_case : &miss; |
1243 __ JumpIfSmi(receiver(), smi_target); | 1249 __ JumpIfSmi(receiver(), smi_target); |
1244 | 1250 |
1245 // Polymorphic keyed stores may use the map register | 1251 // Polymorphic keyed stores may use the map register |
1246 Register map_reg = scratch1(); | 1252 Register map_reg = scratch1(); |
1247 ASSERT(kind() != Code::KEYED_STORE_IC || | 1253 ASSERT(kind() != Code::KEYED_STORE_IC || |
1248 map_reg.is(KeyedStoreIC::MapRegister())); | 1254 map_reg.is(KeyedStoreIC::MapRegister())); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1321 // ----------------------------------- | 1327 // ----------------------------------- |
1322 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 1328 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
1323 } | 1329 } |
1324 | 1330 |
1325 | 1331 |
1326 #undef __ | 1332 #undef __ |
1327 | 1333 |
1328 } } // namespace v8::internal | 1334 } } // namespace v8::internal |
1329 | 1335 |
1330 #endif // V8_TARGET_ARCH_X64 | 1336 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |