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

Unified Diff: src/typing.cc

Issue 23618002: Hydrogenisation of binops (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase Created 7 years, 3 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/types.h ('k') | src/v8-counters.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/typing.cc
diff --git a/src/typing.cc b/src/typing.cc
index 34bb64bd7de022f8835c4320db07a64e5aeb9c64..545ac6c3bb3f8c34b84cc58d991162aa5873745d 100644
--- a/src/typing.cc
+++ b/src/typing.cc
@@ -543,7 +543,7 @@ void AstTyper::VisitBinaryOperation(BinaryOperation* expr) {
Handle<Type> type, left_type, right_type;
Maybe<int> fixed_right_arg;
oracle()->BinaryType(expr->BinaryOperationFeedbackId(),
- &left_type, &right_type, &type, &fixed_right_arg);
+ &left_type, &right_type, &type, &fixed_right_arg, expr->op());
NarrowLowerType(expr, type);
NarrowLowerType(expr->left(), left_type);
NarrowLowerType(expr->right(), right_type);
@@ -624,6 +624,18 @@ void AstTyper::VisitBinaryOperation(BinaryOperation* expr) {
default:
UNREACHABLE();
}
+ return;
+ PrintF("%s: ", Token::Name(expr->op()));
+ if (expr->left()->bounds().lower->Is(Type::None())) PrintF(".");
+ else if (expr->left()->bounds().lower->Is(Type::Smi())) PrintF("s");
+ else if (expr->left()->bounds().lower->Is(Type::Signed32())) PrintF("i");
+ else if (expr->left()->bounds().lower->Is(Type::Any())) PrintF("t");
+ PrintF("*");
+ if (expr->right()->bounds().lower->Is(Type::None())) PrintF(".");
+ else if (expr->right()->bounds().lower->Is(Type::Smi())) PrintF("s");
+ else if (expr->right()->bounds().lower->Is(Type::Signed32())) PrintF("i");
+ else if (expr->right()->bounds().lower->Is(Type::Any())) PrintF("t");
+ PrintF("\n");
}
« no previous file with comments | « src/types.h ('k') | src/v8-counters.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698