| 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 |
| 11 | 11 |
| 12 #include "platform/assert.h" | 12 #include "platform/assert.h" |
| 13 #include "platform/utils.h" | 13 #include "platform/utils.h" |
| 14 #include "vm/constants_arm.h" | 14 #include "vm/constants_arm.h" |
| 15 #include "vm/object.h" |
| 15 #include "vm/simulator.h" | 16 #include "vm/simulator.h" |
| 16 | 17 |
| 17 namespace dart { | 18 namespace dart { |
| 18 | 19 |
| 19 // Forward declarations. | 20 // Forward declarations. |
| 20 class RuntimeEntry; | 21 class RuntimeEntry; |
| 21 | 22 |
| 22 class Label : public ValueObject { | 23 class Label : public ValueObject { |
| 23 public: | 24 public: |
| 24 Label() : position_(0) { } | 25 Label() : position_(0) { } |
| (...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 // calls. Jump to 'failure' if the instance cannot be allocated here. | 727 // calls. Jump to 'failure' if the instance cannot be allocated here. |
| 727 // Allocated instance is returned in 'instance_reg'. | 728 // Allocated instance is returned in 'instance_reg'. |
| 728 // Only the tags field of the object is initialized. | 729 // Only the tags field of the object is initialized. |
| 729 void TryAllocate(const Class& cls, | 730 void TryAllocate(const Class& cls, |
| 730 Label* failure, | 731 Label* failure, |
| 731 Register instance_reg); | 732 Register instance_reg); |
| 732 | 733 |
| 733 // Emit data (e.g encoded instruction or immediate) in instruction stream. | 734 // Emit data (e.g encoded instruction or immediate) in instruction stream. |
| 734 void Emit(int32_t value); | 735 void Emit(int32_t value); |
| 735 | 736 |
| 737 // On some other platforms, we draw a distinction between safe and unsafe |
| 738 // smis. |
| 739 static bool IsSafe(const Object& object) { return true; } |
| 740 static bool IsSafeSmi(const Object& object) { return object.IsSmi(); } |
| 741 |
| 736 private: | 742 private: |
| 737 AssemblerBuffer buffer_; // Contains position independent code. | 743 AssemblerBuffer buffer_; // Contains position independent code. |
| 738 GrowableObjectArray& object_pool_; // Objects and patchable jump targets. | 744 GrowableObjectArray& object_pool_; // Objects and patchable jump targets. |
| 739 int32_t prologue_offset_; | 745 int32_t prologue_offset_; |
| 740 | 746 |
| 741 const bool use_far_branches_; | 747 const bool use_far_branches_; |
| 742 | 748 |
| 743 int32_t AddObject(const Object& obj); | 749 int32_t AddObject(const Object& obj); |
| 744 int32_t AddExternalLabel(const ExternalLabel* label); | 750 int32_t AddExternalLabel(const ExternalLabel* label); |
| 745 | 751 |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 868 Register value, | 874 Register value, |
| 869 Label* no_update); | 875 Label* no_update); |
| 870 | 876 |
| 871 DISALLOW_ALLOCATION(); | 877 DISALLOW_ALLOCATION(); |
| 872 DISALLOW_COPY_AND_ASSIGN(Assembler); | 878 DISALLOW_COPY_AND_ASSIGN(Assembler); |
| 873 }; | 879 }; |
| 874 | 880 |
| 875 } // namespace dart | 881 } // namespace dart |
| 876 | 882 |
| 877 #endif // VM_ASSEMBLER_ARM_H_ | 883 #endif // VM_ASSEMBLER_ARM_H_ |
| OLD | NEW |