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

Unified Diff: runtime/vm/intermediate_language.h

Issue 10828319: Cleanup handling of NullType in type propagation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/il_printer.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.h
===================================================================
--- runtime/vm/intermediate_language.h (revision 10781)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -296,6 +296,14 @@
public:
Value() { }
+ // Returns true if the value represents a constant.
+ virtual bool BindsToConstant() const = 0;
+
+ // Returns true if the value represents constant null.
+ virtual bool BindsToConstantNull() const = 0;
+
+ // Reminder: The type of the constant null is the bottom type, which is more
+ // specific than any type.
bool CompileTypeIsMoreSpecificThan(const AbstractType& dst_type) const;
virtual void RemoveFromUseList() = 0;
@@ -347,6 +355,12 @@
inline Definition* definition() const;
void SetDefinition(Definition* definition);
+ // Returns true if the value represents a constant.
+ virtual bool BindsToConstant() const;
+
+ // Returns true if the value represents constant null.
+ virtual bool BindsToConstantNull() const;
+
virtual bool CanDeoptimize() const { return false; }
UseVal* next_use() const { return next_use_; }
@@ -378,6 +392,12 @@
const Object& value() const { return value_; }
+ // Returns true if the value represents a constant.
+ virtual bool BindsToConstant() const { return true; }
+
+ // Returns true if the value represents constant null.
+ virtual bool BindsToConstantNull() const { return value().IsNull(); }
+
virtual bool CanDeoptimize() const { return false; }
virtual void RemoveFromUseList() { }
@@ -2880,9 +2900,13 @@
class FlowGraphVisitor : public ValueObject {
public:
explicit FlowGraphVisitor(const GrowableArray<BlockEntryInstr*>& block_order)
- : block_order_(block_order) { }
+ : block_order_(block_order), current_iterator_(NULL) { }
virtual ~FlowGraphVisitor() { }
+ ForwardInstructionIterator* current_iterator() const {
+ return current_iterator_;
+ }
+
// Visit each block in the block order, and for each block its
// instructions in order from the block entry to exit.
virtual void VisitBlocks();
@@ -2903,6 +2927,7 @@
protected:
const GrowableArray<BlockEntryInstr*>& block_order_;
+ ForwardInstructionIterator* current_iterator_;
private:
DISALLOW_COPY_AND_ASSIGN(FlowGraphVisitor);
« no previous file with comments | « runtime/vm/il_printer.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698