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

Unified Diff: src/compiler/typer.cc

Issue 579723004: Introduce simplified BooleanToNumber operator. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments. Created 6 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/compiler/simplified-operator.cc ('k') | test/cctest/compiler/test-js-typed-lowering.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/typer.cc
diff --git a/src/compiler/typer.cc b/src/compiler/typer.cc
index 1c83fc2cb0e6d41ae6bd5a1daa55f7b663fbd336..c4af35e16dd1b04db09fcf76e59199266dd8eb2e 100644
--- a/src/compiler/typer.cc
+++ b/src/compiler/typer.cc
@@ -644,6 +644,11 @@ Bounds Typer::Visitor::TypeBooleanNot(Node* node) {
}
+Bounds Typer::Visitor::TypeBooleanToNumber(Node* node) {
+ return Bounds(Type::Number(zone()));
+}
+
+
Bounds Typer::Visitor::TypeNumberEqual(Node* node) {
return Bounds(Type::Boolean(zone()));
}
« no previous file with comments | « src/compiler/simplified-operator.cc ('k') | test/cctest/compiler/test-js-typed-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698