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

Unified Diff: runtime/vm/intermediate_language.h

Issue 197283004: Generate smaller unoptimized code for certain expressions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 9 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/il_printer.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 33576)
+++ runtime/vm/intermediate_language.h (working copy)
@@ -3430,17 +3430,25 @@
};
-class DropTempsInstr : public TemplateDefinition<1> {
+class DropTempsInstr : public Definition {
public:
- explicit DropTempsInstr(intptr_t num_temps, Value* value)
- : num_temps_(num_temps) {
- SetInputAt(0, value);
+ explicit DropTempsInstr(intptr_t num_temps, Value* value = NULL)
+ : num_temps_(num_temps), value_(NULL) {
+ if (value != NULL) {
+ SetInputAt(0, value);
+ }
}
DECLARE_INSTRUCTION(DropTemps)
- Value* value() const { return inputs_[0]; }
+ virtual intptr_t InputCount() const { return value_ != NULL ? 1 : 0; }
+ virtual Value* InputAt(intptr_t i) const {
+ ASSERT((value_ != NULL) && (i == 0));
+ return value_;
+ }
+ Value* value() const { return value_; }
+
intptr_t num_temps() const { return num_temps_; }
virtual CompileType* ComputeInitialType() const;
@@ -3460,8 +3468,13 @@
}
private:
- intptr_t num_temps_;
+ virtual void RawSetInputAt(intptr_t i, Value* value) {
+ value_ = value;
+ }
+ const intptr_t num_temps_;
+ Value* value_;
+
DISALLOW_COPY_AND_ASSIGN(DropTempsInstr);
};
« no previous file with comments | « runtime/vm/il_printer.cc ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698