| 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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 Register map_reg = StoreTransitionDescriptor::MapRegister(); | 373 Register map_reg = StoreTransitionDescriptor::MapRegister(); |
| 374 DCHECK(!map_reg.is(scratch)); | 374 DCHECK(!map_reg.is(scratch)); |
| 375 __ LoadWeakValue(map_reg, cell, miss); | 375 __ LoadWeakValue(map_reg, cell, miss); |
| 376 if (transition->CanBeDeprecated()) { | 376 if (transition->CanBeDeprecated()) { |
| 377 __ Ldrsw(scratch, FieldMemOperand(map_reg, Map::kBitField3Offset)); | 377 __ Ldrsw(scratch, FieldMemOperand(map_reg, Map::kBitField3Offset)); |
| 378 __ TestAndBranchIfAnySet(scratch, Map::Deprecated::kMask, miss); | 378 __ TestAndBranchIfAnySet(scratch, Map::Deprecated::kMask, miss); |
| 379 } | 379 } |
| 380 } | 380 } |
| 381 | 381 |
| 382 | 382 |
| 383 void NamedStoreHandlerCompiler::GenerateConstantCheck(Register map_reg, | 383 void NamedStoreHandlerCompiler::GenerateConstantCheck(Object* constant, |
| 384 int descriptor, | |
| 385 Register value_reg, | 384 Register value_reg, |
| 386 Register scratch, | |
| 387 Label* miss_label) { | 385 Label* miss_label) { |
| 388 DCHECK(!map_reg.is(scratch)); | 386 __ LoadObject(scratch1(), handle(constant, isolate())); |
| 389 DCHECK(!map_reg.is(value_reg)); | 387 __ Cmp(value_reg, scratch1()); |
| 390 DCHECK(!value_reg.is(scratch)); | |
| 391 __ LoadInstanceDescriptors(map_reg, scratch); | |
| 392 __ Ldr(scratch, | |
| 393 FieldMemOperand(scratch, DescriptorArray::GetValueOffset(descriptor))); | |
| 394 __ Cmp(value_reg, scratch); | |
| 395 __ B(ne, miss_label); | 388 __ B(ne, miss_label); |
| 396 } | 389 } |
| 397 | 390 |
| 398 | 391 |
| 399 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(HeapType* field_type, | 392 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(HeapType* field_type, |
| 400 Register value_reg, | 393 Register value_reg, |
| 401 Label* miss_label) { | 394 Label* miss_label) { |
| 402 __ JumpIfSmi(value_reg, miss_label); | 395 __ JumpIfSmi(value_reg, miss_label); |
| 403 HeapType::Iterator<Map> it = field_type->Classes(); | 396 HeapType::Iterator<Map> it = field_type->Classes(); |
| 404 if (!it.Done()) { | 397 if (!it.Done()) { |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 // Return the generated code. | 701 // Return the generated code. |
| 709 return GetCode(kind(), Code::FAST, name); | 702 return GetCode(kind(), Code::FAST, name); |
| 710 } | 703 } |
| 711 | 704 |
| 712 | 705 |
| 713 #undef __ | 706 #undef __ |
| 714 } | 707 } |
| 715 } // namespace v8::internal | 708 } // namespace v8::internal |
| 716 | 709 |
| 717 #endif // V8_TARGET_ARCH_IA32 | 710 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |