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_ARM | 7 #if V8_TARGET_ARCH_ARM |
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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
329 DCHECK(!map_reg.is(scratch)); | 329 DCHECK(!map_reg.is(scratch)); |
330 __ LoadWeakValue(map_reg, cell, miss); | 330 __ LoadWeakValue(map_reg, cell, miss); |
331 if (transition->CanBeDeprecated()) { | 331 if (transition->CanBeDeprecated()) { |
332 __ ldr(scratch, FieldMemOperand(map_reg, Map::kBitField3Offset)); | 332 __ ldr(scratch, FieldMemOperand(map_reg, Map::kBitField3Offset)); |
333 __ tst(scratch, Operand(Map::Deprecated::kMask)); | 333 __ tst(scratch, Operand(Map::Deprecated::kMask)); |
334 __ b(ne, miss); | 334 __ b(ne, miss); |
335 } | 335 } |
336 } | 336 } |
337 | 337 |
338 | 338 |
339 void NamedStoreHandlerCompiler::GenerateConstantCheck(Object* constant, | 339 void NamedStoreHandlerCompiler::GenerateConstantCheck(Register map_reg, |
| 340 int descriptor, |
340 Register value_reg, | 341 Register value_reg, |
| 342 Register scratch, |
341 Label* miss_label) { | 343 Label* miss_label) { |
342 __ Move(scratch1(), handle(constant, isolate())); | 344 DCHECK(!map_reg.is(scratch)); |
343 __ cmp(value_reg, scratch1()); | 345 DCHECK(!map_reg.is(value_reg)); |
| 346 DCHECK(!value_reg.is(scratch)); |
| 347 __ LoadInstanceDescriptors(map_reg, scratch); |
| 348 __ ldr(scratch, |
| 349 FieldMemOperand(scratch, DescriptorArray::GetValueOffset(descriptor))); |
| 350 __ cmp(value_reg, scratch); |
344 __ b(ne, miss_label); | 351 __ b(ne, miss_label); |
345 } | 352 } |
346 | 353 |
347 | 354 |
348 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(HeapType* field_type, | 355 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(HeapType* field_type, |
349 Register value_reg, | 356 Register value_reg, |
350 Label* miss_label) { | 357 Label* miss_label) { |
351 __ JumpIfSmi(value_reg, miss_label); | 358 __ JumpIfSmi(value_reg, miss_label); |
352 HeapType::Iterator<Map> it = field_type->Classes(); | 359 HeapType::Iterator<Map> it = field_type->Classes(); |
353 if (!it.Done()) { | 360 if (!it.Done()) { |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
685 // Return the generated code. | 692 // Return the generated code. |
686 return GetCode(kind(), Code::NORMAL, name); | 693 return GetCode(kind(), Code::NORMAL, name); |
687 } | 694 } |
688 | 695 |
689 | 696 |
690 #undef __ | 697 #undef __ |
691 } | 698 } |
692 } // namespace v8::internal | 699 } // namespace v8::internal |
693 | 700 |
694 #endif // V8_TARGET_ARCH_ARM | 701 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |