| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 ASSERT(!representation.IsNone()); | 423 ASSERT(!representation.IsNone()); |
| 424 | 424 |
| 425 if (details.type() == CONSTANT) { | 425 if (details.type() == CONSTANT) { |
| 426 Handle<Object> constant(descriptors->GetValue(descriptor), masm->isolate()); | 426 Handle<Object> constant(descriptors->GetValue(descriptor), masm->isolate()); |
| 427 __ Move(scratch1, constant); | 427 __ Move(scratch1, constant); |
| 428 __ cmp(value_reg, scratch1); | 428 __ cmp(value_reg, scratch1); |
| 429 __ b(ne, miss_label); | 429 __ b(ne, miss_label); |
| 430 } else if (representation.IsSmi()) { | 430 } else if (representation.IsSmi()) { |
| 431 __ JumpIfNotSmi(value_reg, miss_label); | 431 __ JumpIfNotSmi(value_reg, miss_label); |
| 432 } else if (representation.IsHeapObject()) { | 432 } else if (representation.IsHeapObject()) { |
| 433 __ JumpIfSmi(value_reg, miss_label); | 433 HeapType* field_type = descriptors->GetFieldType(descriptor); |
| 434 if (field_type->IsClass()) { |
| 435 __ CheckMap(value_reg, scratch1, field_type->AsClass(), |
| 436 miss_label, DO_SMI_CHECK); |
| 437 } else { |
| 438 __ JumpIfSmi(value_reg, miss_label); |
| 439 } |
| 434 } else if (representation.IsDouble()) { | 440 } else if (representation.IsDouble()) { |
| 435 Label do_store, heap_number; | 441 Label do_store, heap_number; |
| 436 __ LoadRoot(scratch3, Heap::kHeapNumberMapRootIndex); | 442 __ LoadRoot(scratch3, Heap::kHeapNumberMapRootIndex); |
| 437 __ AllocateHeapNumber(storage_reg, scratch1, scratch2, scratch3, slow); | 443 __ AllocateHeapNumber(storage_reg, scratch1, scratch2, scratch3, slow); |
| 438 | 444 |
| 439 __ JumpIfNotSmi(value_reg, &heap_number); | 445 __ JumpIfNotSmi(value_reg, &heap_number); |
| 440 __ SmiUntag(scratch1, value_reg); | 446 __ SmiUntag(scratch1, value_reg); |
| 441 __ vmov(s0, scratch1); | 447 __ vmov(s0, scratch1); |
| 442 __ vcvt_f64_s32(d0, s0); | 448 __ vcvt_f64_s32(d0, s0); |
| 443 __ jmp(&do_store); | 449 __ jmp(&do_store); |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 // Adjust for the number of properties stored in the object. Even in the | 591 // Adjust for the number of properties stored in the object. Even in the |
| 586 // face of a transition we can use the old map here because the size of the | 592 // face of a transition we can use the old map here because the size of the |
| 587 // object and the number of in-object properties is not going to change. | 593 // object and the number of in-object properties is not going to change. |
| 588 index -= object->map()->inobject_properties(); | 594 index -= object->map()->inobject_properties(); |
| 589 | 595 |
| 590 Representation representation = lookup->representation(); | 596 Representation representation = lookup->representation(); |
| 591 ASSERT(!representation.IsNone()); | 597 ASSERT(!representation.IsNone()); |
| 592 if (representation.IsSmi()) { | 598 if (representation.IsSmi()) { |
| 593 __ JumpIfNotSmi(value_reg, miss_label); | 599 __ JumpIfNotSmi(value_reg, miss_label); |
| 594 } else if (representation.IsHeapObject()) { | 600 } else if (representation.IsHeapObject()) { |
| 595 __ JumpIfSmi(value_reg, miss_label); | 601 HeapType* field_type = lookup->GetFieldType(); |
| 602 if (field_type->IsClass()) { |
| 603 __ CheckMap(value_reg, scratch1, field_type->AsClass(), |
| 604 miss_label, DO_SMI_CHECK); |
| 605 } else { |
| 606 __ JumpIfSmi(value_reg, miss_label); |
| 607 } |
| 596 } else if (representation.IsDouble()) { | 608 } else if (representation.IsDouble()) { |
| 597 // Load the double storage. | 609 // Load the double storage. |
| 598 if (index < 0) { | 610 if (index < 0) { |
| 599 int offset = object->map()->instance_size() + (index * kPointerSize); | 611 int offset = object->map()->instance_size() + (index * kPointerSize); |
| 600 __ ldr(scratch1, FieldMemOperand(receiver_reg, offset)); | 612 __ ldr(scratch1, FieldMemOperand(receiver_reg, offset)); |
| 601 } else { | 613 } else { |
| 602 __ ldr(scratch1, | 614 __ ldr(scratch1, |
| 603 FieldMemOperand(receiver_reg, JSObject::kPropertiesOffset)); | 615 FieldMemOperand(receiver_reg, JSObject::kPropertiesOffset)); |
| 604 int offset = index * kPointerSize + FixedArray::kHeaderSize; | 616 int offset = index * kPointerSize + FixedArray::kHeaderSize; |
| 605 __ ldr(scratch1, FieldMemOperand(scratch1, offset)); | 617 __ ldr(scratch1, FieldMemOperand(scratch1, offset)); |
| (...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1522 // ----------------------------------- | 1534 // ----------------------------------- |
| 1523 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 1535 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
| 1524 } | 1536 } |
| 1525 | 1537 |
| 1526 | 1538 |
| 1527 #undef __ | 1539 #undef __ |
| 1528 | 1540 |
| 1529 } } // namespace v8::internal | 1541 } } // namespace v8::internal |
| 1530 | 1542 |
| 1531 #endif // V8_TARGET_ARCH_ARM | 1543 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |