Chromium Code Reviews| 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_ARM | 5 #if V8_TARGET_ARCH_ARM |
| 6 | 6 |
| 7 #include "src/ic/call-optimization.h" | 7 #include "src/ic/call-optimization.h" |
| 8 #include "src/ic/handler-compiler.h" | 8 #include "src/ic/handler-compiler.h" |
| 9 #include "src/ic/ic.h" | 9 #include "src/ic/ic.h" |
| 10 #include "src/isolate-inl.h" | 10 #include "src/isolate-inl.h" |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 387 DCHECK(!map_reg.is(scratch)); | 387 DCHECK(!map_reg.is(scratch)); |
| 388 DCHECK(!map_reg.is(value_reg)); | 388 DCHECK(!map_reg.is(value_reg)); |
| 389 DCHECK(!value_reg.is(scratch)); | 389 DCHECK(!value_reg.is(scratch)); |
| 390 __ LoadInstanceDescriptors(map_reg, scratch); | 390 __ LoadInstanceDescriptors(map_reg, scratch); |
| 391 __ ldr(scratch, | 391 __ ldr(scratch, |
| 392 FieldMemOperand(scratch, DescriptorArray::GetValueOffset(descriptor))); | 392 FieldMemOperand(scratch, DescriptorArray::GetValueOffset(descriptor))); |
| 393 __ cmp(value_reg, scratch); | 393 __ cmp(value_reg, scratch); |
| 394 __ b(ne, miss_label); | 394 __ b(ne, miss_label); |
| 395 } | 395 } |
| 396 | 396 |
| 397 | 397 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(FieldType* field_type, |
| 398 void NamedStoreHandlerCompiler::GenerateFieldTypeChecks(HeapType* field_type, | |
| 399 Register value_reg, | 398 Register value_reg, |
| 400 Label* miss_label) { | 399 Label* miss_label) { |
| 401 Register map_reg = scratch1(); | 400 Register map_reg = scratch1(); |
| 402 Register scratch = scratch2(); | 401 Register scratch = scratch2(); |
| 403 DCHECK(!value_reg.is(map_reg)); | 402 DCHECK(!value_reg.is(map_reg)); |
| 404 DCHECK(!value_reg.is(scratch)); | 403 DCHECK(!value_reg.is(scratch)); |
| 405 __ JumpIfSmi(value_reg, miss_label); | 404 __ JumpIfSmi(value_reg, miss_label); |
| 406 HeapType::Iterator<Map> it = field_type->Classes(); | 405 FieldType::Iterator it = field_type->Classes(); |
|
Benedikt Meurer
2016/01/26 14:22:47
No Iterator please, assume there's only 0 or 1 map
Jarin
2016/01/26 14:30:41
The Iterator will go away in the next CL.
| |
| 407 if (!it.Done()) { | 406 if (!it.Done()) { |
| 408 __ ldr(map_reg, FieldMemOperand(value_reg, HeapObject::kMapOffset)); | 407 __ ldr(map_reg, FieldMemOperand(value_reg, HeapObject::kMapOffset)); |
| 409 Label do_store; | 408 Label do_store; |
| 410 while (true) { | 409 while (true) { |
| 411 __ CmpWeakValue(map_reg, Map::WeakCellForMap(it.Current()), scratch); | 410 __ CmpWeakValue(map_reg, Map::WeakCellForMap(it.Current()), scratch); |
| 412 it.Advance(); | 411 it.Advance(); |
| 413 if (it.Done()) { | 412 if (it.Done()) { |
| 414 __ b(ne, miss_label); | 413 __ b(ne, miss_label); |
| 415 break; | 414 break; |
| 416 } | 415 } |
| (...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 793 // Return the generated code. | 792 // Return the generated code. |
| 794 return GetCode(kind(), Code::NORMAL, name); | 793 return GetCode(kind(), Code::NORMAL, name); |
| 795 } | 794 } |
| 796 | 795 |
| 797 | 796 |
| 798 #undef __ | 797 #undef __ |
| 799 } // namespace internal | 798 } // namespace internal |
| 800 } // namespace v8 | 799 } // namespace v8 |
| 801 | 800 |
| 802 #endif // V8_TARGET_ARCH_ARM | 801 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |