| 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_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 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 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 // checks are allowed in stubs. | 468 // checks are allowed in stubs. |
| 469 DCHECK(current_map->IsJSGlobalProxyMap() || | 469 DCHECK(current_map->IsJSGlobalProxyMap() || |
| 470 !current_map->is_access_check_needed()); | 470 !current_map->is_access_check_needed()); |
| 471 | 471 |
| 472 prototype = handle(JSObject::cast(current_map->prototype())); | 472 prototype = handle(JSObject::cast(current_map->prototype())); |
| 473 if (current_map->IsJSGlobalObjectMap()) { | 473 if (current_map->IsJSGlobalObjectMap()) { |
| 474 GenerateCheckPropertyCell(masm(), Handle<JSGlobalObject>::cast(current), | 474 GenerateCheckPropertyCell(masm(), Handle<JSGlobalObject>::cast(current), |
| 475 name, scratch2, miss); | 475 name, scratch2, miss); |
| 476 } else if (current_map->is_dictionary_map()) { | 476 } else if (current_map->is_dictionary_map()) { |
| 477 DCHECK(!current_map->IsJSGlobalProxyMap()); // Proxy maps are fast. | 477 DCHECK(!current_map->IsJSGlobalProxyMap()); // Proxy maps are fast. |
| 478 if (!name->IsUniqueName()) { | 478 DCHECK(name->IsUniqueName()); |
| 479 DCHECK(name->IsString()); | |
| 480 name = factory()->InternalizeString(Handle<String>::cast(name)); | |
| 481 } | |
| 482 DCHECK(current.is_null() || | 479 DCHECK(current.is_null() || |
| 483 current->property_dictionary()->FindEntry(name) == | 480 current->property_dictionary()->FindEntry(name) == |
| 484 NameDictionary::kNotFound); | 481 NameDictionary::kNotFound); |
| 485 | 482 |
| 486 if (depth > 1) { | 483 if (depth > 1) { |
| 487 Handle<WeakCell> weak_cell = | 484 Handle<WeakCell> weak_cell = |
| 488 Map::GetOrCreatePrototypeWeakCell(current, isolate()); | 485 Map::GetOrCreatePrototypeWeakCell(current, isolate()); |
| 489 __ LoadWeakValue(reg, weak_cell, miss); | 486 __ LoadWeakValue(reg, weak_cell, miss); |
| 490 } | 487 } |
| 491 GenerateDictionaryNegativeLookup(masm(), miss, reg, name, scratch1, | 488 GenerateDictionaryNegativeLookup(masm(), miss, reg, name, scratch1, |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 695 // Return the generated code. | 692 // Return the generated code. |
| 696 return GetCode(kind(), name); | 693 return GetCode(kind(), name); |
| 697 } | 694 } |
| 698 | 695 |
| 699 | 696 |
| 700 #undef __ | 697 #undef __ |
| 701 } // namespace internal | 698 } // namespace internal |
| 702 } // namespace v8 | 699 } // namespace v8 |
| 703 | 700 |
| 704 #endif // V8_TARGET_ARCH_X64 | 701 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |