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

Unified Diff: src/hydrogen-instructions.h

Issue 15952007: Replace DeoptimizeOnUndefined with whitelisting AllowUndefinedAsNan (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Propagate through all phis 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 | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-instructions.h
diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h
index 4018bcb7a6aedf2feb649ff2cc47943715f53ef2..543c1b4193d875bc783b29643eaea29de6c09a0a 100644
--- a/src/hydrogen-instructions.h
+++ b/src/hydrogen-instructions.h
@@ -790,7 +790,7 @@ class HValue: public ZoneObject {
kCanOverflow,
kBailoutOnMinusZero,
kCanBeDivByZero,
- kDeoptimizeOnUndefined,
+ kAllowUndefinedAsNaN,
kIsArguments,
kTruncatingToInt32,
// Set after an instruction is killed.
@@ -1712,14 +1712,14 @@ class HChange: public HUnaryOperation {
HChange(HValue* value,
Representation to,
bool is_truncating,
- bool deoptimize_on_undefined)
+ bool allow_undefined_as_nan)
: HUnaryOperation(value) {
ASSERT(!value->representation().IsNone());
ASSERT(!to.IsNone());
ASSERT(!value->representation().Equals(to));
set_representation(to);
SetFlag(kUseGVN);
- if (deoptimize_on_undefined) SetFlag(kDeoptimizeOnUndefined);
+ if (allow_undefined_as_nan) SetFlag(kAllowUndefinedAsNaN);
if (is_truncating) SetFlag(kTruncatingToInt32);
if (value->representation().IsSmi() || value->type().IsSmi()) {
set_type(HType::Smi());
@@ -1735,8 +1735,8 @@ class HChange: public HUnaryOperation {
Representation from() const { return value()->representation(); }
Representation to() const { return representation(); }
- bool deoptimize_on_undefined() const {
- return CheckFlag(kDeoptimizeOnUndefined);
+ bool allow_undefined_as_nan() const {
+ return CheckFlag(kAllowUndefinedAsNaN);
}
bool deoptimize_on_minus_zero() const {
return CheckFlag(kBailoutOnMinusZero);
@@ -1766,6 +1766,7 @@ class HClampToUint8: public HUnaryOperation {
explicit HClampToUint8(HValue* value)
: HUnaryOperation(value) {
set_representation(Representation::Integer32());
+ SetFlag(kAllowUndefinedAsNaN);
SetFlag(kUseGVN);
}
@@ -2492,6 +2493,7 @@ class HBitNot: public HUnaryOperation {
set_representation(Representation::Integer32());
SetFlag(kUseGVN);
SetFlag(kTruncatingToInt32);
+ SetFlag(kAllowUndefinedAsNaN);
}
virtual Representation RequiredInputRepresentation(int index) {
@@ -2601,6 +2603,7 @@ class HUnaryMathOperation: public HTemplateInstruction<2> {
UNREACHABLE();
}
SetFlag(kUseGVN);
+ SetFlag(kAllowUndefinedAsNaN);
}
virtual bool IsDeletable() const { return true; }
@@ -2942,6 +2945,7 @@ class HPhi: public HValue {
}
ASSERT(merged_index >= 0);
SetFlag(kFlexibleRepresentation);
+ SetFlag(kAllowUndefinedAsNaN);
}
virtual Representation RepresentationFromInputs();
@@ -3665,6 +3669,7 @@ class HBitwiseBinaryOperation: public HBinaryOperation {
: HBinaryOperation(context, left, right) {
SetFlag(kFlexibleRepresentation);
SetFlag(kTruncatingToInt32);
+ SetFlag(kAllowUndefinedAsNaN);
SetAllSideEffects();
}
@@ -3719,6 +3724,7 @@ class HMathFloorOfDiv: public HBinaryOperation {
if (!right->IsConstant()) {
SetFlag(kCanBeDivByZero);
}
+ SetFlag(kAllowUndefinedAsNaN);
}
virtual HValue* EnsureAndPropagateNotMinusZero(BitVector* visited);
@@ -3743,6 +3749,7 @@ class HArithmeticBinaryOperation: public HBinaryOperation {
: HBinaryOperation(context, left, right) {
SetAllSideEffects();
SetFlag(kFlexibleRepresentation);
+ SetFlag(kAllowUndefinedAsNaN);
}
virtual void RepresentationChanged(Representation to) {
@@ -5728,12 +5735,11 @@ class HStoreKeyed
}
if (is_external()) {
SetGVNFlag(kChangesSpecializedArrayElements);
+ SetFlag(kAllowUndefinedAsNaN);
} else if (IsFastDoubleElementsKind(elements_kind)) {
SetGVNFlag(kChangesDoubleArrayElements);
- SetFlag(kDeoptimizeOnUndefined);
} else if (IsFastSmiElementsKind(elements_kind)) {
SetGVNFlag(kChangesArrayElements);
- SetFlag(kDeoptimizeOnUndefined);
} else {
SetGVNFlag(kChangesArrayElements);
}
« no previous file with comments | « src/hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698