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

Unified Diff: runtime/vm/intermediate_language.h

Issue 9464009: Add enough compiler support to compile empty functions on x64. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Include file inadvertently left out. Created 8 years, 10 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
Index: runtime/vm/intermediate_language.h
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index edd92bbaf56d7c49a322af6d263ebc57f23178df..f50e868b684ee84f0c4205ed518fe92404ded09c 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -13,6 +13,8 @@
namespace dart {
class LocalVariable;
+class ConstantValue;
+class TempValue;
// Computations and values.
//
@@ -42,6 +44,12 @@ class Value : public Computation {
public:
Value() { }
+ virtual TempValue* AsTemp() { return NULL; }
+ virtual ConstantValue* AsConstant() { return NULL; }
+
+ bool IsTemp() { return AsTemp() != NULL; }
+ bool IsConstant() { return AsConstant() != NULL; }
+
private:
DISALLOW_COPY_AND_ASSIGN(Value);
};
@@ -126,6 +134,7 @@ class TempValue : public Value {
public:
explicit TempValue(intptr_t index) : index_(index) { }
+ virtual TempValue* AsTemp() { return this; }
virtual void Print() const;
private:
@@ -139,8 +148,11 @@ class ConstantValue: public Value {
public:
explicit ConstantValue(const Instance& instance) : instance_(instance) { }
+ virtual ConstantValue* AsConstant() { return this; }
virtual void Print() const;
+ const Instance& instance() const { return instance_; }
+
private:
const Instance& instance_;
@@ -380,7 +392,7 @@ class InstructionVisitor {
// Visit each block in the array list in reverse, and for each block its
// instructions in order from the block entry to exit.
- void VisitBlocks(const GrowableArray<BlockEntryInstr*>& block_order);
+ virtual void VisitBlocks(const GrowableArray<BlockEntryInstr*>& block_order);
#define DECLARE_VISIT(type) \
virtual void Visit##type(type##Instr* instr) { }

Powered by Google App Engine
This is Rietveld 408576698