OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_ARM64_H_ | 5 #ifndef VM_ASSEMBLER_ARM64_H_ |
6 #define VM_ASSEMBLER_ARM64_H_ | 6 #define VM_ASSEMBLER_ARM64_H_ |
7 | 7 |
8 #ifndef VM_ASSEMBLER_H_ | 8 #ifndef VM_ASSEMBLER_H_ |
9 #error Do not include assembler_arm64.h directly; use assembler.h instead. | 9 #error Do not include assembler_arm64.h directly; use assembler.h instead. |
10 #endif | 10 #endif |
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 | 469 |
470 // Count the fixups that produce a pointer offset, without processing | 470 // Count the fixups that produce a pointer offset, without processing |
471 // the fixups. On ARM64 there are no pointers in code. | 471 // the fixups. On ARM64 there are no pointers in code. |
472 intptr_t CountPointerOffsets() const { return 0; } | 472 intptr_t CountPointerOffsets() const { return 0; } |
473 | 473 |
474 const ZoneGrowableArray<intptr_t>& GetPointerOffsets() const { | 474 const ZoneGrowableArray<intptr_t>& GetPointerOffsets() const { |
475 ASSERT(buffer_.pointer_offsets().length() == 0); // No pointers in code. | 475 ASSERT(buffer_.pointer_offsets().length() == 0); // No pointers in code. |
476 return buffer_.pointer_offsets(); | 476 return buffer_.pointer_offsets(); |
477 } | 477 } |
478 | 478 |
479 const GrowableObjectArray& object_pool_data() const { | 479 ObjectPoolWrapper& object_pool_wrapper() { return object_pool_wrapper_; } |
480 return object_pool_.data(); | 480 |
| 481 RawObjectPool* MakeObjectPool() { |
| 482 return object_pool_wrapper_.MakeObjectPool(); |
481 } | 483 } |
482 | 484 |
483 ObjectPool& object_pool() { return object_pool_; } | |
484 | |
485 bool use_far_branches() const { | 485 bool use_far_branches() const { |
486 return FLAG_use_far_branches || use_far_branches_; | 486 return FLAG_use_far_branches || use_far_branches_; |
487 } | 487 } |
488 | 488 |
489 void set_use_far_branches(bool b) { | 489 void set_use_far_branches(bool b) { |
490 ASSERT(buffer_.Size() == 0); | 490 ASSERT(buffer_.Size() == 0); |
491 use_far_branches_ = b; | 491 use_far_branches_ = b; |
492 } | 492 } |
493 | 493 |
494 void FinalizeInstructions(const MemoryRegion& region) { | 494 void FinalizeInstructions(const MemoryRegion& region) { |
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1411 Address ElementAddressForRegIndex(bool is_load, | 1411 Address ElementAddressForRegIndex(bool is_load, |
1412 bool is_external, | 1412 bool is_external, |
1413 intptr_t cid, | 1413 intptr_t cid, |
1414 intptr_t index_scale, | 1414 intptr_t index_scale, |
1415 Register array, | 1415 Register array, |
1416 Register index); | 1416 Register index); |
1417 | 1417 |
1418 private: | 1418 private: |
1419 AssemblerBuffer buffer_; // Contains position independent code. | 1419 AssemblerBuffer buffer_; // Contains position independent code. |
1420 | 1420 |
1421 // Objects and patchable jump targets. | 1421 ObjectPoolWrapper object_pool_wrapper_; |
1422 ObjectPool object_pool_; | |
1423 | 1422 |
1424 int32_t prologue_offset_; | 1423 int32_t prologue_offset_; |
1425 | 1424 |
1426 bool use_far_branches_; | 1425 bool use_far_branches_; |
1427 | 1426 |
1428 class CodeComment : public ZoneAllocated { | 1427 class CodeComment : public ZoneAllocated { |
1429 public: | 1428 public: |
1430 CodeComment(intptr_t pc_offset, const String& comment) | 1429 CodeComment(intptr_t pc_offset, const String& comment) |
1431 : pc_offset_(pc_offset), comment_(comment) { } | 1430 : pc_offset_(pc_offset), comment_(comment) { } |
1432 | 1431 |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1936 Register value, | 1935 Register value, |
1937 Label* no_update); | 1936 Label* no_update); |
1938 | 1937 |
1939 DISALLOW_ALLOCATION(); | 1938 DISALLOW_ALLOCATION(); |
1940 DISALLOW_COPY_AND_ASSIGN(Assembler); | 1939 DISALLOW_COPY_AND_ASSIGN(Assembler); |
1941 }; | 1940 }; |
1942 | 1941 |
1943 } // namespace dart | 1942 } // namespace dart |
1944 | 1943 |
1945 #endif // VM_ASSEMBLER_ARM64_H_ | 1944 #endif // VM_ASSEMBLER_ARM64_H_ |
OLD | NEW |