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

Unified Diff: src/full-codegen.cc

Issue 7216008: Better codegen for '<expression> === void <literal>'. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Applied your comments. Created 9 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
« src/ast.cc ('K') | « src/full-codegen.h ('k') | src/hydrogen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen.cc
diff --git a/src/full-codegen.cc b/src/full-codegen.cc
index 9353ab515617006609013744cb2035b04d38eae1..a243ca5cc76b8cbe247b0737d400d723316fe5e0 100644
--- a/src/full-codegen.cc
+++ b/src/full-codegen.cc
@@ -1290,6 +1290,26 @@ int FullCodeGenerator::TryCatch::Exit(int stack_depth) {
}
+bool FullCodeGenerator::TryLiteralCompare(CompareOperation* compare,
+ Label* if_true,
+ Label* if_false,
+ Label* fall_through) {
+ Expression *expr;
+ Handle<String> check;
+ if (compare->IsLiteralCompareTypeof(&expr, &check)) {
+ EmitLiteralCompareTypeof(expr, check, if_true, if_false, fall_through);
+ return true;
+ }
+
+ if (compare->IsLiteralCompareUndefined(&expr)) {
+ EmitLiteralCompareUndefined(expr, if_true, if_false, fall_through);
+ return true;
+ }
+
+ return false;
+}
+
+
#undef __
« src/ast.cc ('K') | « src/full-codegen.h ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698