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

Unified Diff: runtime/vm/intermediate_language.h

Issue 14942010: Eliminate temporary locals for some expressions (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
« no previous file with comments | « runtime/vm/flow_graph_type_propagator.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 23243)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -529,6 +529,8 @@
M(PolymorphicInstanceCall) \
M(StaticCall) \
M(LoadLocal) \
+ M(PushTemp) \
+ M(DropTemps) \
M(StoreLocal) \
M(StrictCompare) \
M(EqualityCompare) \
@@ -3145,6 +3147,69 @@
};
+class PushTempInstr : public TemplateDefinition<1> {
+ public:
+ explicit PushTempInstr(Value* value) {
+ SetInputAt(0, value);
+ }
+
+ DECLARE_INSTRUCTION(PushTemp)
+
+ Value* value() const { return inputs_[0]; }
+
+ virtual CompileType ComputeType() const;
+
+ virtual bool CanDeoptimize() const { return false; }
+
+ virtual EffectSet Effects() const {
+ UNREACHABLE(); // Eliminated by SSA construction.
+ return EffectSet::None();
+ }
+
+ virtual bool MayThrow() const {
+ UNREACHABLE();
+ return false;
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(PushTempInstr);
+};
+
+
+class DropTempsInstr : public TemplateDefinition<1> {
+ public:
+ explicit DropTempsInstr(intptr_t num_temps, Value* value)
+ : num_temps_(num_temps) {
+ SetInputAt(0, value);
+ }
+
+ DECLARE_INSTRUCTION(DropTemps)
+
+ Value* value() const { return inputs_[0]; }
+
+ intptr_t num_temps() const { return num_temps_; }
+
+ virtual CompileType ComputeType() const;
+
+ virtual bool CanDeoptimize() const { return false; }
+
+ virtual EffectSet Effects() const {
+ UNREACHABLE(); // Eliminated by SSA construction.
+ return EffectSet::None();
+ }
+
+ virtual bool MayThrow() const {
+ UNREACHABLE();
+ return false;
+ }
+
+ private:
+ intptr_t num_temps_;
+
+ DISALLOW_COPY_AND_ASSIGN(DropTempsInstr);
+};
+
+
class StoreLocalInstr : public TemplateDefinition<1> {
public:
StoreLocalInstr(const LocalVariable& local, Value* value)
« no previous file with comments | « runtime/vm/flow_graph_type_propagator.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698