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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
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 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 // object_reg and holder_reg registers can alias. | 471 // object_reg and holder_reg registers can alias. |
472 DCHECK(!AreAliased(object_reg, scratch1, scratch2)); | 472 DCHECK(!AreAliased(object_reg, scratch1, scratch2)); |
473 DCHECK(!AreAliased(holder_reg, scratch1, scratch2)); | 473 DCHECK(!AreAliased(holder_reg, scratch1, scratch2)); |
474 | 474 |
475 Handle<Cell> validity_cell = | 475 Handle<Cell> validity_cell = |
476 Map::GetOrCreatePrototypeChainValidityCell(receiver_map, isolate()); | 476 Map::GetOrCreatePrototypeChainValidityCell(receiver_map, isolate()); |
477 if (!validity_cell.is_null()) { | 477 if (!validity_cell.is_null()) { |
478 DCHECK_EQ(Smi::FromInt(Map::kPrototypeChainValid), validity_cell->value()); | 478 DCHECK_EQ(Smi::FromInt(Map::kPrototypeChainValid), validity_cell->value()); |
479 __ Mov(scratch1, Operand(validity_cell)); | 479 __ Mov(scratch1, Operand(validity_cell)); |
480 __ Ldr(scratch1, FieldMemOperand(scratch1, Cell::kValueOffset)); | 480 __ Ldr(scratch1, FieldMemOperand(scratch1, Cell::kValueOffset)); |
481 __ Cmp(scratch1, Operand(Smi::FromInt(Map::kPrototypeChainValid))); | 481 // Compare scratch1 against Map::kPrototypeChainValid. |
482 __ B(ne, miss); | 482 static_assert(Map::kPrototypeChainValid == 0, |
| 483 "Map::kPrototypeChainValid has unexpected value"); |
| 484 __ Cbnz(scratch1, miss); |
483 } | 485 } |
484 | 486 |
485 // Keep track of the current object in register reg. | 487 // Keep track of the current object in register reg. |
486 Register reg = object_reg; | 488 Register reg = object_reg; |
487 int depth = 0; | 489 int depth = 0; |
488 | 490 |
489 Handle<JSObject> current = Handle<JSObject>::null(); | 491 Handle<JSObject> current = Handle<JSObject>::null(); |
490 if (receiver_map->IsJSGlobalObjectMap()) { | 492 if (receiver_map->IsJSGlobalObjectMap()) { |
491 current = isolate()->global_object(); | 493 current = isolate()->global_object(); |
492 } | 494 } |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 // Return the generated code. | 684 // Return the generated code. |
683 return GetCode(kind(), name); | 685 return GetCode(kind(), name); |
684 } | 686 } |
685 | 687 |
686 | 688 |
687 #undef __ | 689 #undef __ |
688 } // namespace internal | 690 } // namespace internal |
689 } // namespace v8 | 691 } // namespace v8 |
690 | 692 |
691 #endif // V8_TARGET_ARCH_IA32 | 693 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |