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

Unified Diff: runtime/vm/intermediate_language.h

Issue 10416031: Convert CurrentContext and StoreContext to locations code generation scheme (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
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: runtime/vm/intermediate_language.h
diff --git a/runtime/vm/intermediate_language.h b/runtime/vm/intermediate_language.h
index 9c7498603a74903e04f3a5c9eb474a07b74b5bd0..fec237b3a8998d2c9903bad64cd3f1371e08b084 100644
--- a/runtime/vm/intermediate_language.h
+++ b/runtime/vm/intermediate_language.h
@@ -362,27 +362,46 @@ class AssertBooleanComp : public TemplateComputation<1> {
// a computation, not a value, because it's mutable.
class CurrentContextComp : public TemplateComputation<0> {
public:
- CurrentContextComp() { }
+ CurrentContextComp() : location_summary_(MakeLocationSummary()) { }
DECLARE_COMPUTATION(CurrentContext)
+ virtual LocationSummary* locs() const {
+ return location_summary_;
+ }
+
+ static LocationSummary* MakeLocationSummary();
+
+ virtual void EmitNativeCode(FlowGraphCompiler* compiler);
+
private:
+ LocationSummary* location_summary_;
DISALLOW_COPY_AND_ASSIGN(CurrentContextComp);
};
class StoreContextComp : public TemplateComputation<1> {
public:
- explicit StoreContextComp(Value* value) {
+ explicit StoreContextComp(Value* value)
+ : location_summary_(MakeLocationSummary()) {
ASSERT(value != NULL);
inputs_[0] = value;
}
DECLARE_COMPUTATION(StoreContext);
+ virtual LocationSummary* locs() const {
+ return location_summary_;
+ }
+
+ static LocationSummary* MakeLocationSummary();
+
+ virtual void EmitNativeCode(FlowGraphCompiler* compiler);
+
Value* value() const { return inputs_[0]; }
private:
+ LocationSummary* location_summary_;
DISALLOW_COPY_AND_ASSIGN(StoreContextComp);
};

Powered by Google App Engine
This is Rietveld 408576698