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

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

Issue 848703002: Improve constant pool implementation in the assembler. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: updated test status file 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_MIPS_H_ 5 #ifndef VM_ASSEMBLER_MIPS_H_
6 #define VM_ASSEMBLER_MIPS_H_ 6 #define VM_ASSEMBLER_MIPS_H_
7 7
8 #ifndef VM_ASSEMBLER_H_ 8 #ifndef VM_ASSEMBLER_H_
9 #error Do not include assembler_mips.h directly; use assembler.h instead. 9 #error Do not include assembler_mips.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_mips.h" 14 #include "vm/constants_mips.h"
15 #include "vm/hash_map.h"
15 #include "vm/object.h" 16 #include "vm/object.h"
16 #include "vm/simulator.h" 17 #include "vm/simulator.h"
17 18
18 // References to documentation in this file refer to: 19 // References to documentation in this file refer to:
19 // "MIPS® Architecture For Programmers Volume I-A: 20 // "MIPS® Architecture For Programmers Volume I-A:
20 // Introduction to the MIPS32® Architecture" in short "VolI-A" 21 // Introduction to the MIPS32® Architecture" in short "VolI-A"
21 // and 22 // and
22 // "MIPS® Architecture For Programmers Volume II-A: 23 // "MIPS® Architecture For Programmers Volume II-A:
23 // The MIPS32® Instruction Set" in short "VolII-A" 24 // The MIPS32® Instruction Set" in short "VolII-A"
24 namespace dart { 25 namespace dart {
(...skipping 1581 matching lines...) Expand 10 before | Expand all | Expand 10 after
1606 bool allow_constant_pool() const { 1607 bool allow_constant_pool() const {
1607 return allow_constant_pool_; 1608 return allow_constant_pool_;
1608 } 1609 }
1609 void set_allow_constant_pool(bool b) { 1610 void set_allow_constant_pool(bool b) {
1610 allow_constant_pool_ = b; 1611 allow_constant_pool_ = b;
1611 } 1612 }
1612 1613
1613 private: 1614 private:
1614 AssemblerBuffer buffer_; 1615 AssemblerBuffer buffer_;
1615 GrowableObjectArray& object_pool_; // Objects and patchable jump targets. 1616 GrowableObjectArray& object_pool_; // Objects and patchable jump targets.
1617
1618 // Hashmap for fast lookup in object pool.
1619 DirectChainedHashMap<ObjIndexPair> object_pool_index_table_;
1620
1616 intptr_t prologue_offset_; 1621 intptr_t prologue_offset_;
1617 1622
1618 bool use_far_branches_; 1623 bool use_far_branches_;
1619 bool delay_slot_available_; 1624 bool delay_slot_available_;
1620 bool in_delay_slot_; 1625 bool in_delay_slot_;
1621 1626
1622 int32_t AddObject(const Object& obj); 1627 int32_t AddObject(const Object& obj);
1623 int32_t AddExternalLabel(const ExternalLabel* label); 1628 int32_t AddExternalLabel(const ExternalLabel* label);
1624 1629
1625 class CodeComment : public ZoneAllocated { 1630 class CodeComment : public ZoneAllocated {
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1740 Register value, 1745 Register value,
1741 Label* no_update); 1746 Label* no_update);
1742 1747
1743 DISALLOW_ALLOCATION(); 1748 DISALLOW_ALLOCATION();
1744 DISALLOW_COPY_AND_ASSIGN(Assembler); 1749 DISALLOW_COPY_AND_ASSIGN(Assembler);
1745 }; 1750 };
1746 1751
1747 } // namespace dart 1752 } // namespace dart
1748 1753
1749 #endif // VM_ASSEMBLER_MIPS_H_ 1754 #endif // VM_ASSEMBLER_MIPS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698