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

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

Issue 10913010: Inlining monomorphic calls. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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
« no previous file with comments | « runtime/vm/flow_graph_inliner.cc ('k') | no next file » | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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_INTERMEDIATE_LANGUAGE_H_ 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_
6 #define VM_INTERMEDIATE_LANGUAGE_H_ 6 #define VM_INTERMEDIATE_LANGUAGE_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 bool IsControl() { return (AsControl() != NULL); } 289 bool IsControl() { return (AsControl() != NULL); }
290 virtual ControlInstruction* AsControl() { return NULL; } 290 virtual ControlInstruction* AsControl() { return NULL; }
291 291
292 virtual intptr_t InputCount() const = 0; 292 virtual intptr_t InputCount() const = 0;
293 virtual Value* InputAt(intptr_t i) const = 0; 293 virtual Value* InputAt(intptr_t i) const = 0;
294 virtual void SetInputAt(intptr_t i, Value* value) = 0; 294 virtual void SetInputAt(intptr_t i, Value* value) = 0;
295 295
296 // Call instructions override this function and return the number of 296 // Call instructions override this function and return the number of
297 // pushed arguments. 297 // pushed arguments.
298 virtual intptr_t ArgumentCount() const = 0; 298 virtual intptr_t ArgumentCount() const = 0;
299 virtual PushArgumentInstr* ArgumentAt(intptr_t index) const {
300 UNREACHABLE();
301 return NULL;
302 };
299 303
300 // Returns true, if this instruction can deoptimize. 304 // Returns true, if this instruction can deoptimize.
301 virtual bool CanDeoptimize() const = 0; 305 virtual bool CanDeoptimize() const = 0;
302 306
303 // Visiting support. 307 // Visiting support.
304 virtual void Accept(FlowGraphVisitor* visitor) = 0; 308 virtual void Accept(FlowGraphVisitor* visitor) = 0;
305 309
306 Instruction* previous() const { return previous_; } 310 Instruction* previous() const { return previous_; }
307 void set_previous(Instruction* instr) { 311 void set_previous(Instruction* instr) {
308 ASSERT(!IsBlockEntry()); 312 ASSERT(!IsBlockEntry());
(...skipping 1421 matching lines...) Expand 10 before | Expand all | Expand 10 after
1730 with_checks_(with_checks) { 1734 with_checks_(with_checks) {
1731 ASSERT(instance_call_ != NULL); 1735 ASSERT(instance_call_ != NULL);
1732 } 1736 }
1733 1737
1734 InstanceCallInstr* instance_call() const { return instance_call_; } 1738 InstanceCallInstr* instance_call() const { return instance_call_; }
1735 bool with_checks() const { return with_checks_; } 1739 bool with_checks() const { return with_checks_; }
1736 1740
1737 virtual intptr_t ArgumentCount() const { 1741 virtual intptr_t ArgumentCount() const {
1738 return instance_call()->ArgumentCount(); 1742 return instance_call()->ArgumentCount();
1739 } 1743 }
1744 PushArgumentInstr* ArgumentAt(intptr_t index) const {
1745 return instance_call()->ArgumentAt(index);
1746 }
1740 1747
1741 DECLARE_INSTRUCTION(PolymorphicInstanceCall) 1748 DECLARE_INSTRUCTION(PolymorphicInstanceCall)
1742 virtual RawAbstractType* CompileType() const; 1749 virtual RawAbstractType* CompileType() const;
1743 1750
1744 const ICData& ic_data() const { return ic_data_; } 1751 const ICData& ic_data() const { return ic_data_; }
1745 1752
1746 virtual bool CanDeoptimize() const { return true; } 1753 virtual bool CanDeoptimize() const { return true; }
1747 virtual intptr_t ResultCid() const { return kDynamicCid; } 1754 virtual intptr_t ResultCid() const { return kDynamicCid; }
1748 1755
1749 virtual void PrintOperandsTo(BufferFormatter* f) const; 1756 virtual void PrintOperandsTo(BufferFormatter* f) const;
(...skipping 1550 matching lines...) Expand 10 before | Expand all | Expand 10 after
3300 ForwardInstructionIterator* current_iterator_; 3307 ForwardInstructionIterator* current_iterator_;
3301 3308
3302 private: 3309 private:
3303 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor); 3310 DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
3304 }; 3311 };
3305 3312
3306 3313
3307 } // namespace dart 3314 } // namespace dart
3308 3315
3309 #endif // VM_INTERMEDIATE_LANGUAGE_H_ 3316 #endif // VM_INTERMEDIATE_LANGUAGE_H_
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_inliner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698