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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after
1283 1283
1284 1284
1285 int FullCodeGenerator::TryCatch::Exit(int stack_depth) { 1285 int FullCodeGenerator::TryCatch::Exit(int stack_depth) {
1286 // The macros used here must preserve the result register. 1286 // The macros used here must preserve the result register.
1287 __ Drop(stack_depth); 1287 __ Drop(stack_depth);
1288 __ PopTryHandler(); 1288 __ PopTryHandler();
1289 return 0; 1289 return 0;
1290 } 1290 }
1291 1291
1292 1292
1293 bool FullCodeGenerator::TryLiteralCompare(CompareOperation* compare,
1294 Label* if_true,
1295 Label* if_false,
1296 Label* fall_through) {
1297 Expression *expr;
1298 Handle<String> check;
1299 if (compare->IsLiteralCompareTypeof(&expr, &check)) {
1300 EmitLiteralCompareTypeof(expr, check, if_true, if_false, fall_through);
1301 return true;
1302 }
1303
1304 if (compare->IsLiteralCompareUndefined(&expr)) {
1305 EmitLiteralCompareUndefined(expr, if_true, if_false, fall_through);
1306 return true;
1307 }
1308
1309 return false;
1310 }
1311
1312
1293 #undef __ 1313 #undef __
1294 1314
1295 1315
1296 } } // namespace v8::internal 1316 } } // namespace v8::internal
OLDNEW
« 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