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

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

Issue 2463083002: Remove default monomorphic check code from functions and stubs that do not need it. (Closed)
Patch Set: Created 4 years, 1 month 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
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 RUNTIME_VM_ASSEMBLER_MIPS_H_ 5 #ifndef RUNTIME_VM_ASSEMBLER_MIPS_H_
6 #define RUNTIME_VM_ASSEMBLER_MIPS_H_ 6 #define RUNTIME_VM_ASSEMBLER_MIPS_H_
7 7
8 #ifndef RUNTIME_VM_ASSEMBLER_H_ 8 #ifndef RUNTIME_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 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 232
233 uword bits_; 233 uword bits_;
234 }; 234 };
235 235
236 236
237 class Assembler : public ValueObject { 237 class Assembler : public ValueObject {
238 public: 238 public:
239 explicit Assembler(bool use_far_branches = false) 239 explicit Assembler(bool use_far_branches = false)
240 : buffer_(), 240 : buffer_(),
241 prologue_offset_(-1), 241 prologue_offset_(-1),
242 has_single_entry_point_(true),
242 use_far_branches_(use_far_branches), 243 use_far_branches_(use_far_branches),
243 delay_slot_available_(false), 244 delay_slot_available_(false),
244 in_delay_slot_(false), 245 in_delay_slot_(false),
245 comments_(), 246 comments_(),
246 constant_pool_allowed_(true) { 247 constant_pool_allowed_(true) {
247 MonomorphicCheckedEntry();
248 } 248 }
249 ~Assembler() { } 249 ~Assembler() { }
250 250
251 void PopRegister(Register r) { Pop(r); } 251 void PopRegister(Register r) { Pop(r); }
252 252
253 void Bind(Label* label); 253 void Bind(Label* label);
254 void Jump(Label* label) { b(label); } 254 void Jump(Label* label) { b(label); }
255 255
256 // Misc. functionality 256 // Misc. functionality
257 intptr_t CodeSize() const { return buffer_.Size(); } 257 intptr_t CodeSize() const { return buffer_.Size(); }
258 intptr_t prologue_offset() const { return prologue_offset_; } 258 intptr_t prologue_offset() const { return prologue_offset_; }
259 bool has_single_entry_point() const { return has_single_entry_point_; }
259 260
260 // Count the fixups that produce a pointer offset, without processing 261 // Count the fixups that produce a pointer offset, without processing
261 // the fixups. 262 // the fixups.
262 intptr_t CountPointerOffsets() const { 263 intptr_t CountPointerOffsets() const {
263 return buffer_.CountPointerOffsets(); 264 return buffer_.CountPointerOffsets();
264 } 265 }
265 266
266 const ZoneGrowableArray<intptr_t>& GetPointerOffsets() const { 267 const ZoneGrowableArray<intptr_t>& GetPointerOffsets() const {
267 return buffer_.pointer_offsets(); 268 return buffer_.pointer_offsets();
268 } 269 }
(...skipping 20 matching lines...) Expand all
289 void LeaveFrameAndReturn(); 290 void LeaveFrameAndReturn();
290 291
291 // Set up a stub frame so that the stack traversal code can easily identify 292 // Set up a stub frame so that the stack traversal code can easily identify
292 // a stub frame. 293 // a stub frame.
293 void EnterStubFrame(intptr_t frame_size = 0); 294 void EnterStubFrame(intptr_t frame_size = 0);
294 void LeaveStubFrame(); 295 void LeaveStubFrame();
295 // A separate macro for when a Ret immediately follows, so that we can use 296 // A separate macro for when a Ret immediately follows, so that we can use
296 // the branch delay slot. 297 // the branch delay slot.
297 void LeaveStubFrameAndReturn(Register ra = RA); 298 void LeaveStubFrameAndReturn(Register ra = RA);
298 299
299 void NoMonomorphicCheckedEntry();
300 void MonomorphicCheckedEntry(); 300 void MonomorphicCheckedEntry();
301 301
302 void UpdateAllocationStats(intptr_t cid, 302 void UpdateAllocationStats(intptr_t cid,
303 Register temp_reg, 303 Register temp_reg,
304 Heap::Space space); 304 Heap::Space space);
305 305
306 void UpdateAllocationStatsWithSize(intptr_t cid, 306 void UpdateAllocationStatsWithSize(intptr_t cid,
307 Register size_reg, 307 Register size_reg,
308 Register temp_reg, 308 Register temp_reg,
309 Heap::Space space); 309 Heap::Space space);
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after
1620 } 1620 }
1621 void set_constant_pool_allowed(bool b) { 1621 void set_constant_pool_allowed(bool b) {
1622 constant_pool_allowed_ = b; 1622 constant_pool_allowed_ = b;
1623 } 1623 }
1624 1624
1625 private: 1625 private:
1626 AssemblerBuffer buffer_; 1626 AssemblerBuffer buffer_;
1627 ObjectPoolWrapper object_pool_wrapper_; 1627 ObjectPoolWrapper object_pool_wrapper_;
1628 1628
1629 intptr_t prologue_offset_; 1629 intptr_t prologue_offset_;
1630 1630 bool has_single_entry_point_;
1631 bool use_far_branches_; 1631 bool use_far_branches_;
1632 bool delay_slot_available_; 1632 bool delay_slot_available_;
1633 bool in_delay_slot_; 1633 bool in_delay_slot_;
1634 1634
1635 class CodeComment : public ZoneAllocated { 1635 class CodeComment : public ZoneAllocated {
1636 public: 1636 public:
1637 CodeComment(intptr_t pc_offset, const String& comment) 1637 CodeComment(intptr_t pc_offset, const String& comment)
1638 : pc_offset_(pc_offset), comment_(comment) { } 1638 : pc_offset_(pc_offset), comment_(comment) { }
1639 1639
1640 intptr_t pc_offset() const { return pc_offset_; } 1640 intptr_t pc_offset() const { return pc_offset_; }
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
1758 Register value, 1758 Register value,
1759 Label* no_update); 1759 Label* no_update);
1760 1760
1761 DISALLOW_ALLOCATION(); 1761 DISALLOW_ALLOCATION();
1762 DISALLOW_COPY_AND_ASSIGN(Assembler); 1762 DISALLOW_COPY_AND_ASSIGN(Assembler);
1763 }; 1763 };
1764 1764
1765 } // namespace dart 1765 } // namespace dart
1766 1766
1767 #endif // RUNTIME_VM_ASSEMBLER_MIPS_H_ 1767 #endif // RUNTIME_VM_ASSEMBLER_MIPS_H_
OLDNEW
« no previous file with comments | « runtime/vm/assembler_ia32.h ('k') | runtime/vm/assembler_mips.cc » ('j') | runtime/vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698