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

Unified Diff: runtime/vm/intermediate_language.h

Issue 10700123: Remove the instruction pointer from computations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/flow_graph_optimizer.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
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index 34023bd686f91ddf470d3831e3468be476ce7e77..80ceb11cff3a986923f29079b4b03f8c9fc5e2be 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -118,7 +118,7 @@ class Computation : public ZoneAllocated {
public:
static const int kNoCid = -1;
- Computation() : cid_(-1), ic_data_(NULL), instr_(NULL), locs_(NULL) {
+ Computation() : cid_(-1), ic_data_(NULL), locs_(NULL) {
Isolate* isolate = Isolate::Current();
cid_ = GetNextCid(isolate);
ic_data_ = GetICDataForCid(cid_, isolate);
@@ -134,7 +134,7 @@ class Computation : public ZoneAllocated {
}
// Visiting support.
- virtual void Accept(FlowGraphVisitor* visitor) = 0;
+ virtual void Accept(FlowGraphVisitor* visitor, BindInstr* instr) = 0;
virtual intptr_t InputCount() const = 0;
virtual Value* InputAt(intptr_t i) const = 0;
@@ -163,9 +163,6 @@ class Computation : public ZoneAllocated {
return locs_;
}
- void set_instr(BindInstr* instr) { instr_ = instr; }
- BindInstr* instr() const { return instr_; }
-
// Create a location summary for this computation.
// TODO(fschneider): Temporarily returns NULL for instructions
// that are not yet converted to the location based code generation.
@@ -176,8 +173,6 @@ class Computation : public ZoneAllocated {
static LocationSummary* MakeCallSummary();
- void ReplaceWith(Computation* other);
-
// Declare an enum value used to define type-test predicates.
enum ComputationType {
#define DECLARE_COMPUTATION_TYPE(ShortName, ClassName) k##ShortName,
@@ -220,7 +215,6 @@ class Computation : public ZoneAllocated {
intptr_t cid_;
ICData* ic_data_;
- BindInstr* instr_;
LocationSummary* locs_;
DISALLOW_COPY_AND_ASSIGN(Computation);
@@ -301,7 +295,7 @@ class Value : public TemplateComputation<0> {
// Functions defined in all concrete computation classes.
#define DECLARE_COMPUTATION(ShortName) \
- virtual void Accept(FlowGraphVisitor* visitor); \
+ virtual void Accept(FlowGraphVisitor* visitor, BindInstr* instr); \
virtual ComputationType computation_type() const { \
return Computation::k##ShortName; \
} \
@@ -2103,13 +2097,12 @@ class BindInstr : public Definition {
BindInstr(UseKind used, Computation* computation)
: computation_(computation), is_used_(used != kUnused) {
ASSERT(computation != NULL);
- computation->set_instr(this);
}
DECLARE_INSTRUCTION(Bind)
Computation* computation() const { return computation_; }
- void replace_computation(Computation* value) { computation_ = value; }
+ void set_computation(Computation* value) { computation_ = value; }
bool is_used() const { return is_used_; }
// Static type of the underlying computation.
@@ -2381,7 +2374,7 @@ class FlowGraphVisitor : public ValueObject {
// Visit functions for instruction and computation classes, with empty
// default implementations.
#define DECLARE_VISIT_COMPUTATION(ShortName, ClassName) \
- virtual void Visit##ShortName(ClassName* comp) { }
+ virtual void Visit##ShortName(ClassName* comp, BindInstr* instr) { }
#define DECLARE_VISIT_INSTRUCTION(ShortName) \
virtual void Visit##ShortName(ShortName##Instr* instr) { }
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698