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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 }; | 361 }; |
362 | 362 |
363 | 363 |
364 class Assembler : public ValueObject { | 364 class Assembler : public ValueObject { |
365 public: | 365 public: |
366 explicit Assembler(bool use_far_branches = false) | 366 explicit Assembler(bool use_far_branches = false) |
367 : buffer_(), | 367 : buffer_(), |
368 prologue_offset_(-1), | 368 prologue_offset_(-1), |
369 use_far_branches_(use_far_branches), | 369 use_far_branches_(use_far_branches), |
370 comments_(), | 370 comments_(), |
371 constant_pool_allowed_(false) { } | 371 constant_pool_allowed_(false) { |
| 372 MonomorphicCheckedEntry(); |
| 373 } |
372 | 374 |
373 ~Assembler() { } | 375 ~Assembler() { } |
374 | 376 |
375 void PopRegister(Register r) { Pop(r); } | 377 void PopRegister(Register r) { Pop(r); } |
376 | 378 |
377 void Bind(Label* label); | 379 void Bind(Label* label); |
378 void Jump(Label* label) { b(label); } | 380 void Jump(Label* label) { b(label); } |
379 | 381 |
380 // Misc. functionality | 382 // Misc. functionality |
381 intptr_t CodeSize() const { return buffer_.Size(); } | 383 intptr_t CodeSize() const { return buffer_.Size(); } |
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
937 // Set up a Dart frame for a function compiled for on-stack replacement. | 939 // Set up a Dart frame for a function compiled for on-stack replacement. |
938 // The frame layout is a normal Dart frame, but the frame is partially set | 940 // The frame layout is a normal Dart frame, but the frame is partially set |
939 // up on entry (it is the frame of the unoptimized code). | 941 // up on entry (it is the frame of the unoptimized code). |
940 void EnterOsrFrame(intptr_t extra_size); | 942 void EnterOsrFrame(intptr_t extra_size); |
941 | 943 |
942 // Set up a stub frame so that the stack traversal code can easily identify | 944 // Set up a stub frame so that the stack traversal code can easily identify |
943 // a stub frame. | 945 // a stub frame. |
944 void EnterStubFrame(); | 946 void EnterStubFrame(); |
945 void LeaveStubFrame(); | 947 void LeaveStubFrame(); |
946 | 948 |
| 949 void NoMonomorphicCheckedEntry(); |
| 950 void MonomorphicCheckedEntry(); |
| 951 |
947 // The register into which the allocation stats table is loaded with | 952 // The register into which the allocation stats table is loaded with |
948 // LoadAllocationStatsAddress should be passed to | 953 // LoadAllocationStatsAddress should be passed to |
949 // IncrementAllocationStats(WithSize) as stats_addr_reg to update the | 954 // IncrementAllocationStats(WithSize) as stats_addr_reg to update the |
950 // allocation stats. These are separate assembler macros so we can | 955 // allocation stats. These are separate assembler macros so we can |
951 // avoid a dependent load too nearby the load of the table address. | 956 // avoid a dependent load too nearby the load of the table address. |
952 void LoadAllocationStatsAddress(Register dest, | 957 void LoadAllocationStatsAddress(Register dest, |
953 intptr_t cid); | 958 intptr_t cid); |
954 void IncrementAllocationStats(Register stats_addr, | 959 void IncrementAllocationStats(Register stats_addr, |
955 intptr_t cid, | 960 intptr_t cid, |
956 Heap::Space space); | 961 Heap::Space space); |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1167 Register value, | 1172 Register value, |
1168 Label* no_update); | 1173 Label* no_update); |
1169 | 1174 |
1170 DISALLOW_ALLOCATION(); | 1175 DISALLOW_ALLOCATION(); |
1171 DISALLOW_COPY_AND_ASSIGN(Assembler); | 1176 DISALLOW_COPY_AND_ASSIGN(Assembler); |
1172 }; | 1177 }; |
1173 | 1178 |
1174 } // namespace dart | 1179 } // namespace dart |
1175 | 1180 |
1176 #endif // VM_ASSEMBLER_ARM_H_ | 1181 #endif // VM_ASSEMBLER_ARM_H_ |
OLD | NEW |