OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 3352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3363 | 3363 |
3364 // Check that both operands are unique names. This leaves the instance | 3364 // Check that both operands are unique names. This leaves the instance |
3365 // types loaded in tmp1 and tmp2. | 3365 // types loaded in tmp1 and tmp2. |
3366 __ Ldr(x10, FieldMemOperand(lhs, HeapObject::kMapOffset)); | 3366 __ Ldr(x10, FieldMemOperand(lhs, HeapObject::kMapOffset)); |
3367 __ Ldr(x11, FieldMemOperand(rhs, HeapObject::kMapOffset)); | 3367 __ Ldr(x11, FieldMemOperand(rhs, HeapObject::kMapOffset)); |
3368 __ Ldrb(lhs_instance_type, FieldMemOperand(x10, Map::kInstanceTypeOffset)); | 3368 __ Ldrb(lhs_instance_type, FieldMemOperand(x10, Map::kInstanceTypeOffset)); |
3369 __ Ldrb(rhs_instance_type, FieldMemOperand(x11, Map::kInstanceTypeOffset)); | 3369 __ Ldrb(rhs_instance_type, FieldMemOperand(x11, Map::kInstanceTypeOffset)); |
3370 | 3370 |
3371 // To avoid a miss, each instance type should be either SYMBOL_TYPE or it | 3371 // To avoid a miss, each instance type should be either SYMBOL_TYPE or it |
3372 // should have kInternalizedTag set. | 3372 // should have kInternalizedTag set. |
3373 __ JumpIfNotUniqueName(lhs_instance_type, &miss); | 3373 __ JumpIfNotUniqueNameInstanceType(lhs_instance_type, &miss); |
3374 __ JumpIfNotUniqueName(rhs_instance_type, &miss); | 3374 __ JumpIfNotUniqueNameInstanceType(rhs_instance_type, &miss); |
3375 | 3375 |
3376 // Unique names are compared by identity. | 3376 // Unique names are compared by identity. |
3377 STATIC_ASSERT(EQUAL == 0); | 3377 STATIC_ASSERT(EQUAL == 0); |
3378 __ Cmp(lhs, rhs); | 3378 __ Cmp(lhs, rhs); |
3379 __ Cset(result, ne); | 3379 __ Cset(result, ne); |
3380 __ Ret(); | 3380 __ Ret(); |
3381 | 3381 |
3382 __ Bind(&miss); | 3382 __ Bind(&miss); |
3383 GenerateMiss(masm); | 3383 GenerateMiss(masm); |
3384 } | 3384 } |
(...skipping 1096 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4481 __ Cmp(entity_name, Operand(name)); | 4481 __ Cmp(entity_name, Operand(name)); |
4482 __ B(eq, miss); | 4482 __ B(eq, miss); |
4483 | 4483 |
4484 Label good; | 4484 Label good; |
4485 __ JumpIfRoot(entity_name, Heap::kTheHoleValueRootIndex, &good); | 4485 __ JumpIfRoot(entity_name, Heap::kTheHoleValueRootIndex, &good); |
4486 | 4486 |
4487 // Check if the entry name is not a unique name. | 4487 // Check if the entry name is not a unique name. |
4488 __ Ldr(entity_name, FieldMemOperand(entity_name, HeapObject::kMapOffset)); | 4488 __ Ldr(entity_name, FieldMemOperand(entity_name, HeapObject::kMapOffset)); |
4489 __ Ldrb(entity_name, | 4489 __ Ldrb(entity_name, |
4490 FieldMemOperand(entity_name, Map::kInstanceTypeOffset)); | 4490 FieldMemOperand(entity_name, Map::kInstanceTypeOffset)); |
4491 __ JumpIfNotUniqueName(entity_name, miss); | 4491 __ JumpIfNotUniqueNameInstanceType(entity_name, miss); |
4492 __ Bind(&good); | 4492 __ Bind(&good); |
4493 } | 4493 } |
4494 | 4494 |
4495 CPURegList spill_list(CPURegister::kRegister, kXRegSizeInBits, 0, 6); | 4495 CPURegList spill_list(CPURegister::kRegister, kXRegSizeInBits, 0, 6); |
4496 spill_list.Combine(lr); | 4496 spill_list.Combine(lr); |
4497 spill_list.Remove(scratch0); // Scratch registers don't need to be preserved. | 4497 spill_list.Remove(scratch0); // Scratch registers don't need to be preserved. |
4498 | 4498 |
4499 __ PushCPURegList(spill_list); | 4499 __ PushCPURegList(spill_list); |
4500 | 4500 |
4501 __ Ldr(x0, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); | 4501 __ Ldr(x0, FieldMemOperand(receiver, JSObject::kPropertiesOffset)); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4568 __ B(eq, ¬_in_dictionary); | 4568 __ B(eq, ¬_in_dictionary); |
4569 | 4569 |
4570 // Stop if found the property. | 4570 // Stop if found the property. |
4571 __ Cmp(entry_key, key); | 4571 __ Cmp(entry_key, key); |
4572 __ B(eq, &in_dictionary); | 4572 __ B(eq, &in_dictionary); |
4573 | 4573 |
4574 if (i != kTotalProbes - 1 && mode() == NEGATIVE_LOOKUP) { | 4574 if (i != kTotalProbes - 1 && mode() == NEGATIVE_LOOKUP) { |
4575 // Check if the entry name is not a unique name. | 4575 // Check if the entry name is not a unique name. |
4576 __ Ldr(entry_key, FieldMemOperand(entry_key, HeapObject::kMapOffset)); | 4576 __ Ldr(entry_key, FieldMemOperand(entry_key, HeapObject::kMapOffset)); |
4577 __ Ldrb(entry_key, FieldMemOperand(entry_key, Map::kInstanceTypeOffset)); | 4577 __ Ldrb(entry_key, FieldMemOperand(entry_key, Map::kInstanceTypeOffset)); |
4578 __ JumpIfNotUniqueName(entry_key, &maybe_in_dictionary); | 4578 __ JumpIfNotUniqueNameInstanceType(entry_key, &maybe_in_dictionary); |
4579 } | 4579 } |
4580 } | 4580 } |
4581 | 4581 |
4582 __ Bind(&maybe_in_dictionary); | 4582 __ Bind(&maybe_in_dictionary); |
4583 // If we are doing negative lookup then probing failure should be | 4583 // If we are doing negative lookup then probing failure should be |
4584 // treated as a lookup success. For positive lookup, probing failure | 4584 // treated as a lookup success. For positive lookup, probing failure |
4585 // should be treated as lookup failure. | 4585 // should be treated as lookup failure. |
4586 if (mode() == POSITIVE_LOOKUP) { | 4586 if (mode() == POSITIVE_LOOKUP) { |
4587 __ Mov(result, 0); | 4587 __ Mov(result, 0); |
4588 __ Ret(); | 4588 __ Ret(); |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5072 MemOperand(fp, 6 * kPointerSize), | 5072 MemOperand(fp, 6 * kPointerSize), |
5073 NULL); | 5073 NULL); |
5074 } | 5074 } |
5075 | 5075 |
5076 | 5076 |
5077 #undef __ | 5077 #undef __ |
5078 | 5078 |
5079 } } // namespace v8::internal | 5079 } } // namespace v8::internal |
5080 | 5080 |
5081 #endif // V8_TARGET_ARCH_ARM64 | 5081 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |