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

Unified Diff: src/compiler/type-hints.cc

Issue 1487973002: [turbofan] Add binary operation hints for javascript operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/type-hints.cc
diff --git a/src/compiler/type-hints.cc b/src/compiler/type-hints.cc
new file mode 100644
index 0000000000000000000000000000000000000000..2cf8f4d6c0ac2174c2aa872bbb6cc325306dd20e
--- /dev/null
+++ b/src/compiler/type-hints.cc
@@ -0,0 +1,37 @@
+// Copyright 2015 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "src/compiler/type-hints.h"
+
+namespace v8 {
+namespace internal {
+namespace compiler {
+
+std::ostream& operator<<(std::ostream& os, BinaryOperationHints::Hint hint) {
+ switch (hint) {
+ case BinaryOperationHints::kNone:
+ return os << "None";
+ case BinaryOperationHints::kSignedSmall:
+ return os << "SignedSmall";
+ case BinaryOperationHints::kSigned32:
+ return os << "Signed32";
+ case BinaryOperationHints::kNumber:
+ return os << "Number";
+ case BinaryOperationHints::kString:
+ return os << "String";
+ case BinaryOperationHints::kAny:
+ return os << "Any";
+ }
+ UNREACHABLE();
+ return os;
+}
+
+
+std::ostream& operator<<(std::ostream& os, BinaryOperationHints hints) {
+ return os << hints.left() << "*" << hints.right() << "->" << hints.result();
+}
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8

Powered by Google App Engine
This is Rietveld 408576698