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

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

Issue 1249933003: Rename assembler field/getter/setter allow_constant_pool to constant_pool_allowed (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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_arm64.cc ('k') | runtime/vm/assembler_mips.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_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
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 234
235 class Assembler : public ValueObject { 235 class Assembler : public ValueObject {
236 public: 236 public:
237 explicit Assembler(bool use_far_branches = false) 237 explicit Assembler(bool use_far_branches = false)
238 : buffer_(), 238 : buffer_(),
239 prologue_offset_(-1), 239 prologue_offset_(-1),
240 use_far_branches_(use_far_branches), 240 use_far_branches_(use_far_branches),
241 delay_slot_available_(false), 241 delay_slot_available_(false),
242 in_delay_slot_(false), 242 in_delay_slot_(false),
243 comments_(), 243 comments_(),
244 allow_constant_pool_(true) { } 244 constant_pool_allowed_(true) { }
245 ~Assembler() { } 245 ~Assembler() { }
246 246
247 void PopRegister(Register r) { Pop(r); } 247 void PopRegister(Register r) { Pop(r); }
248 248
249 void Bind(Label* label); 249 void Bind(Label* label);
250 void Jump(Label* label) { b(label); } 250 void Jump(Label* label) { b(label); }
251 251
252 // Misc. functionality 252 // Misc. functionality
253 intptr_t CodeSize() const { return buffer_.Size(); } 253 intptr_t CodeSize() const { return buffer_.Size(); }
254 intptr_t prologue_offset() const { return prologue_offset_; } 254 intptr_t prologue_offset() const { return prologue_offset_; }
(...skipping 1360 matching lines...) Expand 10 before | Expand all | Expand 10 after
1615 intptr_t cid, 1615 intptr_t cid,
1616 intptr_t index_scale, 1616 intptr_t index_scale,
1617 Register array, 1617 Register array,
1618 Register index); 1618 Register index);
1619 1619
1620 // On some other platforms, we draw a distinction between safe and unsafe 1620 // On some other platforms, we draw a distinction between safe and unsafe
1621 // smis. 1621 // smis.
1622 static bool IsSafe(const Object& object) { return true; } 1622 static bool IsSafe(const Object& object) { return true; }
1623 static bool IsSafeSmi(const Object& object) { return object.IsSmi(); } 1623 static bool IsSafeSmi(const Object& object) { return object.IsSmi(); }
1624 1624
1625 bool allow_constant_pool() const { 1625 bool constant_pool_allowed() const {
1626 return allow_constant_pool_; 1626 return constant_pool_allowed_;
1627 } 1627 }
1628 void set_allow_constant_pool(bool b) { 1628 void set_constant_pool_allowed(bool b) {
1629 allow_constant_pool_ = b; 1629 constant_pool_allowed_ = b;
1630 } 1630 }
1631 1631
1632 private: 1632 private:
1633 AssemblerBuffer buffer_; 1633 AssemblerBuffer buffer_;
1634 ObjectPoolWrapper object_pool_wrapper_; 1634 ObjectPoolWrapper object_pool_wrapper_;
1635 1635
1636 intptr_t prologue_offset_; 1636 intptr_t prologue_offset_;
1637 1637
1638 bool use_far_branches_; 1638 bool use_far_branches_;
1639 bool delay_slot_available_; 1639 bool delay_slot_available_;
1640 bool in_delay_slot_; 1640 bool in_delay_slot_;
1641 1641
1642 class CodeComment : public ZoneAllocated { 1642 class CodeComment : public ZoneAllocated {
1643 public: 1643 public:
1644 CodeComment(intptr_t pc_offset, const String& comment) 1644 CodeComment(intptr_t pc_offset, const String& comment)
1645 : pc_offset_(pc_offset), comment_(comment) { } 1645 : pc_offset_(pc_offset), comment_(comment) { }
1646 1646
1647 intptr_t pc_offset() const { return pc_offset_; } 1647 intptr_t pc_offset() const { return pc_offset_; }
1648 const String& comment() const { return comment_; } 1648 const String& comment() const { return comment_; }
1649 1649
1650 private: 1650 private:
1651 intptr_t pc_offset_; 1651 intptr_t pc_offset_;
1652 const String& comment_; 1652 const String& comment_;
1653 1653
1654 DISALLOW_COPY_AND_ASSIGN(CodeComment); 1654 DISALLOW_COPY_AND_ASSIGN(CodeComment);
1655 }; 1655 };
1656 1656
1657 GrowableArray<CodeComment*> comments_; 1657 GrowableArray<CodeComment*> comments_;
1658 1658
1659 bool allow_constant_pool_; 1659 bool constant_pool_allowed_;
1660 1660
1661 void LoadObjectHelper(Register rd, const Object& object, bool is_unique); 1661 void LoadObjectHelper(Register rd, const Object& object, bool is_unique);
1662 1662
1663 void Emit(int32_t value) { 1663 void Emit(int32_t value) {
1664 // Emitting an instruction clears the delay slot state. 1664 // Emitting an instruction clears the delay slot state.
1665 in_delay_slot_ = false; 1665 in_delay_slot_ = false;
1666 delay_slot_available_ = false; 1666 delay_slot_available_ = false;
1667 AssemblerBuffer::EnsureCapacity ensured(&buffer_); 1667 AssemblerBuffer::EnsureCapacity ensured(&buffer_);
1668 buffer_.Emit<int32_t>(value); 1668 buffer_.Emit<int32_t>(value);
1669 } 1669 }
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
1759 Register value, 1759 Register value,
1760 Label* no_update); 1760 Label* no_update);
1761 1761
1762 DISALLOW_ALLOCATION(); 1762 DISALLOW_ALLOCATION();
1763 DISALLOW_COPY_AND_ASSIGN(Assembler); 1763 DISALLOW_COPY_AND_ASSIGN(Assembler);
1764 }; 1764 };
1765 1765
1766 } // namespace dart 1766 } // namespace dart
1767 1767
1768 #endif // VM_ASSEMBLER_MIPS_H_ 1768 #endif // VM_ASSEMBLER_MIPS_H_
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm64.cc ('k') | runtime/vm/assembler_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698