| 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 #if V8_TARGET_ARCH_ARM | 5 #if V8_TARGET_ARCH_ARM |
| 6 | 6 |
| 7 #include "src/ic/handler-compiler.h" | 7 #include "src/ic/handler-compiler.h" |
| 8 | 8 |
| 9 #include "src/api-arguments.h" | 9 #include "src/api-arguments.h" |
| 10 #include "src/field-type.h" | 10 #include "src/field-type.h" |
| (...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 DCHECK(!current_map->IsJSGlobalProxyMap()); // Proxy maps are fast. | 480 DCHECK(!current_map->IsJSGlobalProxyMap()); // Proxy maps are fast. |
| 481 if (!name->IsUniqueName()) { | 481 if (!name->IsUniqueName()) { |
| 482 DCHECK(name->IsString()); | 482 DCHECK(name->IsString()); |
| 483 name = factory()->InternalizeString(Handle<String>::cast(name)); | 483 name = factory()->InternalizeString(Handle<String>::cast(name)); |
| 484 } | 484 } |
| 485 DCHECK(current.is_null() || | 485 DCHECK(current.is_null() || |
| 486 current->property_dictionary()->FindEntry(name) == | 486 current->property_dictionary()->FindEntry(name) == |
| 487 NameDictionary::kNotFound); | 487 NameDictionary::kNotFound); |
| 488 | 488 |
| 489 if (depth > 1) { | 489 if (depth > 1) { |
| 490 // TODO(jkummerow): Cache and re-use weak cell. | 490 Handle<WeakCell> weak_cell = |
| 491 __ LoadWeakValue(reg, isolate()->factory()->NewWeakCell(current), miss); | 491 Map::GetOrCreatePrototypeWeakCell(current, isolate()); |
| 492 __ LoadWeakValue(reg, weak_cell, miss); |
| 492 } | 493 } |
| 493 GenerateDictionaryNegativeLookup(masm(), miss, reg, name, scratch1, | 494 GenerateDictionaryNegativeLookup(masm(), miss, reg, name, scratch1, |
| 494 scratch2); | 495 scratch2); |
| 495 } | 496 } |
| 496 | 497 |
| 497 reg = holder_reg; // From now on the object will be in holder_reg. | 498 reg = holder_reg; // From now on the object will be in holder_reg. |
| 498 // Go to the next object in the prototype chain. | 499 // Go to the next object in the prototype chain. |
| 499 current = prototype; | 500 current = prototype; |
| 500 current_map = handle(current->map()); | 501 current_map = handle(current->map()); |
| 501 } | 502 } |
| 502 | 503 |
| 503 DCHECK(!current_map->IsJSGlobalProxyMap()); | 504 DCHECK(!current_map->IsJSGlobalProxyMap()); |
| 504 | 505 |
| 505 // Log the check depth. | 506 // Log the check depth. |
| 506 LOG(isolate(), IntEvent("check-maps-depth", depth + 1)); | 507 LOG(isolate(), IntEvent("check-maps-depth", depth + 1)); |
| 507 | 508 |
| 508 bool return_holder = return_what == RETURN_HOLDER; | 509 bool return_holder = return_what == RETURN_HOLDER; |
| 509 if (return_holder && depth != 0) { | 510 if (return_holder && depth != 0) { |
| 510 __ LoadWeakValue(reg, isolate()->factory()->NewWeakCell(current), miss); | 511 Handle<WeakCell> weak_cell = |
| 512 Map::GetOrCreatePrototypeWeakCell(current, isolate()); |
| 513 __ LoadWeakValue(reg, weak_cell, miss); |
| 511 } | 514 } |
| 512 | 515 |
| 513 // Return the register containing the holder. | 516 // Return the register containing the holder. |
| 514 return return_holder ? reg : no_reg; | 517 return return_holder ? reg : no_reg; |
| 515 } | 518 } |
| 516 | 519 |
| 517 | 520 |
| 518 void NamedLoadHandlerCompiler::FrontendFooter(Handle<Name> name, Label* miss) { | 521 void NamedLoadHandlerCompiler::FrontendFooter(Handle<Name> name, Label* miss) { |
| 519 if (!miss->is_unused()) { | 522 if (!miss->is_unused()) { |
| 520 Label success; | 523 Label success; |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 // Return the generated code. | 692 // Return the generated code. |
| 690 return GetCode(kind(), name); | 693 return GetCode(kind(), name); |
| 691 } | 694 } |
| 692 | 695 |
| 693 | 696 |
| 694 #undef __ | 697 #undef __ |
| 695 } // namespace internal | 698 } // namespace internal |
| 696 } // namespace v8 | 699 } // namespace v8 |
| 697 | 700 |
| 698 #endif // V8_TARGET_ARCH_ARM | 701 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |