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

Unified Diff: src/compiler/simplified-operator.h

Issue 2066223002: [turbofan] Introduce CheckHole and CheckHoleNaN operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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
Index: src/compiler/simplified-operator.h
diff --git a/src/compiler/simplified-operator.h b/src/compiler/simplified-operator.h
index f4a3cb9bfe0a6f7f53dad58337ed39e18520ff0d..3dd6ccebbb982bb01117d0190bd004f73e203944 100644
--- a/src/compiler/simplified-operator.h
+++ b/src/compiler/simplified-operator.h
@@ -103,6 +103,18 @@ std::ostream& operator<<(std::ostream&, ElementAccess const&);
ElementAccess const& ElementAccessOf(const Operator* op) WARN_UNUSED_RESULT;
+// Mode of operation for the check-hole operators.
+enum class CheckHoleMode : uint8_t {
+ kAllowReturnHole, // Allow to return the hole either as NaN or undefined.
+ kNeverReturnHole, // Never return the hole (deoptimize instead).
+};
+
+size_t hash_value(CheckHoleMode);
+
+std::ostream& operator<<(std::ostream&, CheckHoleMode);
+
+CheckHoleMode CheckHoleModeOf(const Operator*) WARN_UNUSED_RESULT;
+
Type* TypeOf(const Operator* op) WARN_UNUSED_RESULT;
BinaryOperationHints::Hint BinaryOperationHintOf(const Operator* op);
@@ -164,8 +176,6 @@ class SimplifiedOperatorBuilder final : public ZoneObject {
const Operator* NumberTrunc();
const Operator* NumberToInt32();
const Operator* NumberToUint32();
- const Operator* NumberIsHoleNaN();
- const Operator* NumberConvertHoleNaN();
const Operator* NumberSilenceNaN();
@@ -202,6 +212,8 @@ class SimplifiedOperatorBuilder final : public ZoneObject {
const Operator* CheckedTaggedToInt32();
const Operator* CheckedTaggedToFloat64();
+ const Operator* CheckHole(CheckHoleMode);
+ const Operator* CheckHoleNaN(CheckHoleMode);
const Operator* CheckIf();
const Operator* ObjectIsCallable();

Powered by Google App Engine
This is Rietveld 408576698