Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(301)

Side by Side Diff: runtime/vm/assembler_arm.h

Issue 1175523002: Object pool with support for untagged entries. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/assembler.cc ('k') | runtime/vm/assembler_arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 334
335 // Count the fixups that produce a pointer offset, without processing 335 // Count the fixups that produce a pointer offset, without processing
336 // the fixups. On ARM there are no pointers in code. 336 // the fixups. On ARM there are no pointers in code.
337 intptr_t CountPointerOffsets() const { return 0; } 337 intptr_t CountPointerOffsets() const { return 0; }
338 338
339 const ZoneGrowableArray<intptr_t>& GetPointerOffsets() const { 339 const ZoneGrowableArray<intptr_t>& GetPointerOffsets() const {
340 ASSERT(buffer_.pointer_offsets().length() == 0); // No pointers in code. 340 ASSERT(buffer_.pointer_offsets().length() == 0); // No pointers in code.
341 return buffer_.pointer_offsets(); 341 return buffer_.pointer_offsets();
342 } 342 }
343 343
344 const GrowableObjectArray& object_pool_data() const { 344 ObjectPoolWrapper& object_pool_wrapper() { return object_pool_wrapper_; }
345 return object_pool_.data(); 345
346 RawObjectPool* MakeObjectPool() {
347 return object_pool_wrapper_.MakeObjectPool();
346 } 348 }
347 349
348 ObjectPool& object_pool() { return object_pool_; }
349
350 bool use_far_branches() const { 350 bool use_far_branches() const {
351 return FLAG_use_far_branches || use_far_branches_; 351 return FLAG_use_far_branches || use_far_branches_;
352 } 352 }
353 353
354 #if defined(TESTING) || defined(DEBUG) 354 #if defined(TESTING) || defined(DEBUG)
355 // Used in unit tests and to ensure predictable verification code size in 355 // Used in unit tests and to ensure predictable verification code size in
356 // FlowGraphCompiler::EmitEdgeCounter. 356 // FlowGraphCompiler::EmitEdgeCounter.
357 void set_use_far_branches(bool b) { 357 void set_use_far_branches(bool b) {
358 use_far_branches_ = b; 358 use_far_branches_ = b;
359 } 359 }
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 954
955 bool allow_constant_pool() const { 955 bool allow_constant_pool() const {
956 return allow_constant_pool_; 956 return allow_constant_pool_;
957 } 957 }
958 void set_allow_constant_pool(bool b) { 958 void set_allow_constant_pool(bool b) {
959 allow_constant_pool_ = b; 959 allow_constant_pool_ = b;
960 } 960 }
961 961
962 private: 962 private:
963 AssemblerBuffer buffer_; // Contains position independent code. 963 AssemblerBuffer buffer_; // Contains position independent code.
964 ObjectPool object_pool_; // Objects and patchable jump targets. 964 ObjectPoolWrapper object_pool_wrapper_;
965 965
966 int32_t prologue_offset_; 966 int32_t prologue_offset_;
967 967
968 bool use_far_branches_; 968 bool use_far_branches_;
969 969
970 // If you are thinking of using one or both of these instructions directly, 970 // If you are thinking of using one or both of these instructions directly,
971 // instead LoadImmediate should probably be used. 971 // instead LoadImmediate should probably be used.
972 void movw(Register rd, uint16_t imm16, Condition cond = AL); 972 void movw(Register rd, uint16_t imm16, Condition cond = AL);
973 void movt(Register rd, uint16_t imm16, Condition cond = AL); 973 void movt(Register rd, uint16_t imm16, Condition cond = AL);
974 974
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 Register new_value, 1122 Register new_value,
1123 FieldContent old_content); 1123 FieldContent old_content);
1124 1124
1125 DISALLOW_ALLOCATION(); 1125 DISALLOW_ALLOCATION();
1126 DISALLOW_COPY_AND_ASSIGN(Assembler); 1126 DISALLOW_COPY_AND_ASSIGN(Assembler);
1127 }; 1127 };
1128 1128
1129 } // namespace dart 1129 } // namespace dart
1130 1130
1131 #endif // VM_ASSEMBLER_ARM_H_ 1131 #endif // VM_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « runtime/vm/assembler.cc ('k') | runtime/vm/assembler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698