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_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
8 | 8 |
9 #include "src/ic/call-optimization.h" | 9 #include "src/ic/call-optimization.h" |
10 #include "src/ic/handler-compiler.h" | 10 #include "src/ic/handler-compiler.h" |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 GenerateDictionaryNegativeLookup(masm(), miss, reg, name, scratch1, | 516 GenerateDictionaryNegativeLookup(masm(), miss, reg, name, scratch1, |
517 scratch2); | 517 scratch2); |
518 | 518 |
519 __ Ldr(scratch1, FieldMemOperand(reg, HeapObject::kMapOffset)); | 519 __ Ldr(scratch1, FieldMemOperand(reg, HeapObject::kMapOffset)); |
520 reg = holder_reg; // From now on the object will be in holder_reg. | 520 reg = holder_reg; // From now on the object will be in holder_reg. |
521 __ Ldr(reg, FieldMemOperand(scratch1, Map::kPrototypeOffset)); | 521 __ Ldr(reg, FieldMemOperand(scratch1, Map::kPrototypeOffset)); |
522 } else { | 522 } else { |
523 Register map_reg = scratch1; | 523 Register map_reg = scratch1; |
524 __ Ldr(map_reg, FieldMemOperand(reg, HeapObject::kMapOffset)); | 524 __ Ldr(map_reg, FieldMemOperand(reg, HeapObject::kMapOffset)); |
525 | 525 |
526 if (depth != 1 || check == CHECK_ALL_MAPS) { | 526 if (current_map->IsJSGlobalObjectMap()) { |
| 527 GenerateCheckPropertyCell(masm(), Handle<JSGlobalObject>::cast(current), |
| 528 name, scratch2, miss); |
| 529 } else if (depth != 1 || check == CHECK_ALL_MAPS) { |
527 Handle<WeakCell> cell = Map::WeakCellForMap(current_map); | 530 Handle<WeakCell> cell = Map::WeakCellForMap(current_map); |
528 __ CmpWeakValue(map_reg, cell, scratch2); | 531 __ CmpWeakValue(map_reg, cell, scratch2); |
529 __ B(ne, miss); | 532 __ B(ne, miss); |
530 } | 533 } |
531 | 534 |
532 if (current_map->IsJSGlobalObjectMap()) { | |
533 GenerateCheckPropertyCell(masm(), Handle<JSGlobalObject>::cast(current), | |
534 name, scratch2, miss); | |
535 } | |
536 | |
537 reg = holder_reg; // From now on the object will be in holder_reg. | 535 reg = holder_reg; // From now on the object will be in holder_reg. |
538 | 536 |
539 __ Ldr(reg, FieldMemOperand(map_reg, Map::kPrototypeOffset)); | 537 __ Ldr(reg, FieldMemOperand(map_reg, Map::kPrototypeOffset)); |
540 } | 538 } |
541 | 539 |
542 // Go to the next object in the prototype chain. | 540 // Go to the next object in the prototype chain. |
543 current = prototype; | 541 current = prototype; |
544 current_map = handle(current->map()); | 542 current_map = handle(current->map()); |
545 } | 543 } |
546 | 544 |
| 545 DCHECK(!current_map->IsJSGlobalProxyMap()); |
| 546 |
547 // Log the check depth. | 547 // Log the check depth. |
548 LOG(isolate(), IntEvent("check-maps-depth", depth + 1)); | 548 LOG(isolate(), IntEvent("check-maps-depth", depth + 1)); |
549 | 549 |
550 // Check the holder map. | 550 // Check the holder map. |
551 if (depth != 0 || check == CHECK_ALL_MAPS) { | 551 if (depth != 0 || check == CHECK_ALL_MAPS) { |
552 // Check the holder map. | 552 // Check the holder map. |
553 __ Ldr(scratch1, FieldMemOperand(reg, HeapObject::kMapOffset)); | 553 __ Ldr(scratch1, FieldMemOperand(reg, HeapObject::kMapOffset)); |
554 Handle<WeakCell> cell = Map::WeakCellForMap(current_map); | 554 Handle<WeakCell> cell = Map::WeakCellForMap(current_map); |
555 __ CmpWeakValue(scratch1, cell, scratch2); | 555 __ CmpWeakValue(scratch1, cell, scratch2); |
556 __ B(ne, miss); | 556 __ B(ne, miss); |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
761 // Return the generated code. | 761 // Return the generated code. |
762 return GetCode(kind(), Code::FAST, name); | 762 return GetCode(kind(), Code::FAST, name); |
763 } | 763 } |
764 | 764 |
765 | 765 |
766 #undef __ | 766 #undef __ |
767 } | 767 } |
768 } // namespace v8::internal | 768 } // namespace v8::internal |
769 | 769 |
770 #endif // V8_TARGET_ARCH_IA32 | 770 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |