Index: src/hydrogen-instructions.h |
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h |
index a006c44dd54705d90ddf4a041be3e2126b652257..8fa6f495a1f857a040bdecc856e96153cb231a1c 100644 |
--- a/src/hydrogen-instructions.h |
+++ b/src/hydrogen-instructions.h |
@@ -33,6 +33,7 @@ |
#include "allocation.h" |
#include "code-stubs.h" |
#include "data-flow.h" |
+#include "deoptimizer.h" |
#include "small-pointer-list.h" |
#include "string-stream.h" |
#include "v8conversions.h" |
@@ -104,7 +105,6 @@ class LChunkBuilder; |
V(Context) \ |
V(DebugBreak) \ |
V(DeclareGlobals) \ |
- V(Deoptimize) \ |
V(Div) \ |
V(DummyUse) \ |
V(ElementsKind) \ |
@@ -162,7 +162,7 @@ class LChunkBuilder; |
V(Shl) \ |
V(Shr) \ |
V(Simulate) \ |
- V(SoftDeoptimize) \ |
+ V(Deoptimize) \ |
Jakob Kummerow
2013/07/22 16:53:12
alphabetic order please
danno
2013/07/23 12:18:14
Done.
|
V(StackCheck) \ |
V(StoreContextSlot) \ |
V(StoreGlobalCell) \ |
@@ -1495,14 +1495,21 @@ class HNumericConstraint : public HTemplateInstruction<2> { |
// We insert soft-deoptimize when we hit code with unknown typefeedback, |
Jakob Kummerow
2013/07/22 16:53:12
comment is outdated
danno
2013/07/23 12:18:14
Done.
|
// so that we get a chance of re-optimizing with useful typefeedback. |
-// HSoftDeoptimize does not end a basic block as opposed to HDeoptimize. |
-class HSoftDeoptimize: public HTemplateInstruction<0> { |
+// HDeoptimize does not end a basic block as opposed to HDeoptimize. |
+class HDeoptimize: public HTemplateInstruction<0> { |
public: |
+ explicit HDeoptimize(Deoptimizer::BailoutType type) : type_(type) {} |
+ |
virtual Representation RequiredInputRepresentation(int index) { |
return Representation::None(); |
} |
- DECLARE_CONCRETE_INSTRUCTION(SoftDeoptimize) |
+ Deoptimizer::BailoutType type() { return type_; } |
+ |
+ DECLARE_CONCRETE_INSTRUCTION(Deoptimize) |
+ |
+ private: |
+ Deoptimizer::BailoutType type_; |
}; |
@@ -1517,59 +1524,6 @@ class HDebugBreak: public HTemplateInstruction<0> { |
}; |
-class HDeoptimize: public HControlInstruction { |
- public: |
- HDeoptimize(int environment_length, |
- int first_local_index, |
- int first_expression_index, |
- Zone* zone) |
- : values_(environment_length, zone), |
- first_local_index_(first_local_index), |
- first_expression_index_(first_expression_index) { } |
- |
- virtual Representation RequiredInputRepresentation(int index) { |
- return Representation::None(); |
- } |
- |
- virtual int OperandCount() { return values_.length(); } |
- virtual HValue* OperandAt(int index) const { return values_[index]; } |
- virtual void PrintDataTo(StringStream* stream); |
- |
- virtual int SuccessorCount() { return 0; } |
- virtual HBasicBlock* SuccessorAt(int i) { |
- UNREACHABLE(); |
- return NULL; |
- } |
- virtual void SetSuccessorAt(int i, HBasicBlock* block) { |
- UNREACHABLE(); |
- } |
- |
- void AddEnvironmentValue(HValue* value, Zone* zone) { |
- values_.Add(NULL, zone); |
- SetOperandAt(values_.length() - 1, value); |
- } |
- int first_local_index() { return first_local_index_; } |
- int first_expression_index() { return first_expression_index_; } |
- |
- DECLARE_CONCRETE_INSTRUCTION(Deoptimize) |
- |
- enum UseEnvironment { |
- kNoUses, |
- kUseAll |
- }; |
- |
- protected: |
- virtual void InternalSetOperandAt(int index, HValue* value) { |
- values_[index] = value; |
- } |
- |
- private: |
- ZoneList<HValue*> values_; |
- int first_local_index_; |
- int first_expression_index_; |
-}; |
- |
- |
class HGoto: public HTemplateControlInstruction<1, 0> { |
public: |
explicit HGoto(HBasicBlock* target) { |