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

Unified Diff: src/hydrogen-instructions.h

Issue 6672066: Make HDeoptimize to explicitly use environment values.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 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
« src/hydrogen.cc ('K') | « src/hydrogen.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.h
===================================================================
--- src/hydrogen-instructions.h (revision 7210)
+++ src/hydrogen-instructions.h (working copy)
@@ -757,15 +757,33 @@
};
-class HDeoptimize: public HTemplateControlInstruction<0> {
+class HDeoptimize: public HControlInstruction {
public:
- HDeoptimize() : HTemplateControlInstruction<0>(NULL, NULL) { }
+ HDeoptimize(int environment_length)
+ : HControlInstruction(NULL, NULL),
+ values_(environment_length) { }
virtual Representation RequiredInputRepresentation(int index) const {
return Representation::None();
}
+ virtual int OperandCount() { return values_.length(); }
+ virtual HValue* OperandAt(int index) { return values_[index]; }
+
+ void AddEnvironmentValue(HValue* value) {
+ values_.Add(NULL);
+ SetOperandAt(values_.length() - 1, value);
+ }
+
DECLARE_CONCRETE_INSTRUCTION(Deoptimize, "deoptimize")
+
+ protected:
+ virtual void InternalSetOperandAt(int index, HValue* value) {
+ values_[index] = value;
+ }
+
+ private:
+ ZoneList<HValue*> values_;
};
« src/hydrogen.cc ('K') | « src/hydrogen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698