OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #ifndef VM_ASSEMBLER_ARM_H_ | 5 #ifndef VM_ASSEMBLER_ARM_H_ |
6 #define VM_ASSEMBLER_ARM_H_ | 6 #define VM_ASSEMBLER_ARM_H_ |
7 | 7 |
8 #ifndef VM_ASSEMBLER_H_ | 8 #ifndef VM_ASSEMBLER_H_ |
9 #error Do not include assembler_arm.h directly; use assembler.h instead. | 9 #error Do not include assembler_arm.h directly; use assembler.h instead. |
10 #endif | 10 #endif |
(...skipping 715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 // calls. Jump to 'failure' if the instance cannot be allocated here. | 726 // calls. Jump to 'failure' if the instance cannot be allocated here. |
727 // Allocated instance is returned in 'instance_reg'. | 727 // Allocated instance is returned in 'instance_reg'. |
728 // Only the tags field of the object is initialized. | 728 // Only the tags field of the object is initialized. |
729 void TryAllocate(const Class& cls, | 729 void TryAllocate(const Class& cls, |
730 Label* failure, | 730 Label* failure, |
731 Register instance_reg); | 731 Register instance_reg); |
732 | 732 |
733 // Emit data (e.g encoded instruction or immediate) in instruction stream. | 733 // Emit data (e.g encoded instruction or immediate) in instruction stream. |
734 void Emit(int32_t value); | 734 void Emit(int32_t value); |
735 | 735 |
| 736 // On some other platforms, we draw a distinction between safe and unsafe |
| 737 // smis. |
| 738 static bool IsSafe(const Object& object) { return true; } |
| 739 static bool IsSafeSmi(const Object& object) { return true; } |
| 740 |
736 private: | 741 private: |
737 AssemblerBuffer buffer_; // Contains position independent code. | 742 AssemblerBuffer buffer_; // Contains position independent code. |
738 GrowableObjectArray& object_pool_; // Objects and patchable jump targets. | 743 GrowableObjectArray& object_pool_; // Objects and patchable jump targets. |
739 int32_t prologue_offset_; | 744 int32_t prologue_offset_; |
740 | 745 |
741 const bool use_far_branches_; | 746 const bool use_far_branches_; |
742 | 747 |
743 int32_t AddObject(const Object& obj); | 748 int32_t AddObject(const Object& obj); |
744 int32_t AddExternalLabel(const ExternalLabel* label); | 749 int32_t AddExternalLabel(const ExternalLabel* label); |
745 | 750 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
868 Register value, | 873 Register value, |
869 Label* no_update); | 874 Label* no_update); |
870 | 875 |
871 DISALLOW_ALLOCATION(); | 876 DISALLOW_ALLOCATION(); |
872 DISALLOW_COPY_AND_ASSIGN(Assembler); | 877 DISALLOW_COPY_AND_ASSIGN(Assembler); |
873 }; | 878 }; |
874 | 879 |
875 } // namespace dart | 880 } // namespace dart |
876 | 881 |
877 #endif // VM_ASSEMBLER_ARM_H_ | 882 #endif // VM_ASSEMBLER_ARM_H_ |
OLD | NEW |