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

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

Issue 848703002: Improve constant pool implementation in the assembler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 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 | Annotate | Revision Log
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
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/cpu.h" 15 #include "vm/cpu.h"
16 #include "vm/hash_map.h"
16 #include "vm/object.h" 17 #include "vm/object.h"
17 #include "vm/simulator.h" 18 #include "vm/simulator.h"
18 19
19 namespace dart { 20 namespace dart {
20 21
21 // Forward declarations. 22 // Forward declarations.
22 class RuntimeEntry; 23 class RuntimeEntry;
23 24
24 class Label : public ValueObject { 25 class Label : public ValueObject {
25 public: 26 public:
(...skipping 905 matching lines...) Expand 10 before | Expand all | Expand 10 after
931 bool allow_constant_pool() const { 932 bool allow_constant_pool() const {
932 return allow_constant_pool_; 933 return allow_constant_pool_;
933 } 934 }
934 void set_allow_constant_pool(bool b) { 935 void set_allow_constant_pool(bool b) {
935 allow_constant_pool_ = b; 936 allow_constant_pool_ = b;
936 } 937 }
937 938
938 private: 939 private:
939 AssemblerBuffer buffer_; // Contains position independent code. 940 AssemblerBuffer buffer_; // Contains position independent code.
940 GrowableObjectArray& object_pool_; // Objects and patchable jump targets. 941 GrowableObjectArray& object_pool_; // Objects and patchable jump targets.
942
943 // Hashmap for fast lookup in object pool.
944 DirectChainedHashMap<ObjIndexPair> object_pool_index_table_;
945
941 int32_t prologue_offset_; 946 int32_t prologue_offset_;
942 947
943 bool use_far_branches_; 948 bool use_far_branches_;
944 949
945 // If you are thinking of using one or both of these instructions directly, 950 // If you are thinking of using one or both of these instructions directly,
946 // instead LoadImmediate should probably be used. 951 // instead LoadImmediate should probably be used.
947 void movw(Register rd, uint16_t imm16, Condition cond = AL); 952 void movw(Register rd, uint16_t imm16, Condition cond = AL);
948 void movt(Register rd, uint16_t imm16, Condition cond = AL); 953 void movt(Register rd, uint16_t imm16, Condition cond = AL);
949 954
950 int32_t AddObject(const Object& obj); 955 int32_t AddObject(const Object& obj);
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 // verifying that its old value matches its shadow. 1103 // verifying that its old value matches its shadow.
1099 void VerifiedWrite(const Address& address, Register new_value); 1104 void VerifiedWrite(const Address& address, Register new_value);
1100 1105
1101 DISALLOW_ALLOCATION(); 1106 DISALLOW_ALLOCATION();
1102 DISALLOW_COPY_AND_ASSIGN(Assembler); 1107 DISALLOW_COPY_AND_ASSIGN(Assembler);
1103 }; 1108 };
1104 1109
1105 } // namespace dart 1110 } // namespace dart
1106 1111
1107 #endif // VM_ASSEMBLER_ARM_H_ 1112 #endif // VM_ASSEMBLER_ARM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698