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

Unified Diff: vm/intermediate_language.h

Issue 10416025: Add a location summary to LoadLocal, StoreLocal and ConstantVal. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 7 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: vm/intermediate_language.h
===================================================================
--- vm/intermediate_language.h (revision 7835)
+++ vm/intermediate_language.h (working copy)
@@ -261,7 +261,9 @@
class ConstantVal: public Value {
public:
- explicit ConstantVal(const Object& value) : value_(value) {
+ explicit ConstantVal(const Object& value)
+ : value_(value),
+ location_summary_(MakeLocationSummary()) {
ASSERT(value.IsZoneHandle());
}
@@ -269,8 +271,18 @@
const Object& value() const { return value_; }
+ virtual LocationSummary* locs() const {
Vyacheslav Egorov (Google) 2012/05/22 02:47:59 we starting to duplicate boilerplate. maybe macros
Florian Schneider 2012/05/22 06:33:08 Yes, I think location_summary_ should move to a su
srdjan 2012/05/22 16:50:32 Maybe move it to class Computation right now and i
+ return location_summary_;
+ }
+
+ // Platform specific summary factory for this instruction.
+ LocationSummary* MakeLocationSummary();
+
+ virtual void EmitNativeCode(FlowGraphCompiler* compiler);
+
private:
const Object& value_;
+ LocationSummary* location_summary_;
DISALLOW_COPY_AND_ASSIGN(ConstantVal);
};
@@ -611,7 +623,9 @@
class LoadLocalComp : public TemplateComputation<0> {
public:
LoadLocalComp(const LocalVariable& local, intptr_t context_level)
- : local_(local), context_level_(context_level) { }
+ : local_(local),
+ context_level_(context_level),
+ location_summary_(MakeLocationSummary()) { }
DECLARE_COMPUTATION(LoadLocal)
@@ -620,9 +634,19 @@
virtual void PrintOperandsTo(BufferFormatter* f) const;
+ virtual LocationSummary* locs() const {
+ return location_summary_;
+ }
+
+ // Platform specific summary factory for this instruction.
+ LocationSummary* MakeLocationSummary();
+
+ virtual void EmitNativeCode(FlowGraphCompiler* compiler);
+
private:
const LocalVariable& local_;
const intptr_t context_level_;
+ LocationSummary* location_summary_;
DISALLOW_COPY_AND_ASSIGN(LoadLocalComp);
};
@@ -633,7 +657,9 @@
StoreLocalComp(const LocalVariable& local,
Value* value,
intptr_t context_level)
- : local_(local), context_level_(context_level) {
+ : local_(local),
+ context_level_(context_level),
+ location_summary_(MakeLocationSummary()) {
inputs_[0] = value;
}
@@ -647,9 +673,19 @@
virtual void PrintOperandsTo(BufferFormatter* f) const;
+ virtual LocationSummary* locs() const {
+ return location_summary_;
+ }
+
+ // Platform specific summary factory for this instruction.
+ LocationSummary* MakeLocationSummary();
+
+ virtual void EmitNativeCode(FlowGraphCompiler* compiler);
+
private:
const LocalVariable& local_;
const intptr_t context_level_;
+ LocationSummary* location_summary_;
DISALLOW_COPY_AND_ASSIGN(StoreLocalComp);
};

Powered by Google App Engine
This is Rietveld 408576698