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

Side by Side Diff: src/full-codegen.cc

Issue 6810015: Remove unnecessary AST node for ++ and -- operations. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 8 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
« no previous file with comments | « src/data-flow.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 Visit(expr->value()); 206 Visit(expr->value());
207 } 207 }
208 208
209 209
210 void BreakableStatementChecker::VisitThrow(Throw* expr) { 210 void BreakableStatementChecker::VisitThrow(Throw* expr) {
211 // Throw is breakable if the expression is. 211 // Throw is breakable if the expression is.
212 Visit(expr->exception()); 212 Visit(expr->exception());
213 } 213 }
214 214
215 215
216 void BreakableStatementChecker::VisitIncrementOperation(
217 IncrementOperation* expr) {
218 UNREACHABLE();
219 }
220
221
222 void BreakableStatementChecker::VisitProperty(Property* expr) { 216 void BreakableStatementChecker::VisitProperty(Property* expr) {
223 // Property load is breakable. 217 // Property load is breakable.
224 is_breakable_ = true; 218 is_breakable_ = true;
225 } 219 }
226 220
227 221
228 void BreakableStatementChecker::VisitCall(Call* expr) { 222 void BreakableStatementChecker::VisitCall(Call* expr) {
229 // Function calls both through IC and call stub are breakable. 223 // Function calls both through IC and call stub are breakable.
230 is_breakable_ = true; 224 is_breakable_ = true;
231 } 225 }
(...skipping 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after
1350 1344
1351 1345
1352 void FullCodeGenerator::VisitThrow(Throw* expr) { 1346 void FullCodeGenerator::VisitThrow(Throw* expr) {
1353 Comment cmnt(masm_, "[ Throw"); 1347 Comment cmnt(masm_, "[ Throw");
1354 VisitForStackValue(expr->exception()); 1348 VisitForStackValue(expr->exception());
1355 __ CallRuntime(Runtime::kThrow, 1); 1349 __ CallRuntime(Runtime::kThrow, 1);
1356 // Never returns here. 1350 // Never returns here.
1357 } 1351 }
1358 1352
1359 1353
1360 void FullCodeGenerator::VisitIncrementOperation(IncrementOperation* expr) {
1361 UNREACHABLE();
1362 }
1363
1364
1365 int FullCodeGenerator::TryFinally::Exit(int stack_depth) { 1354 int FullCodeGenerator::TryFinally::Exit(int stack_depth) {
1366 // The macros used here must preserve the result register. 1355 // The macros used here must preserve the result register.
1367 __ Drop(stack_depth); 1356 __ Drop(stack_depth);
1368 __ PopTryHandler(); 1357 __ PopTryHandler();
1369 __ Call(finally_entry_); 1358 __ Call(finally_entry_);
1370 return 0; 1359 return 0;
1371 } 1360 }
1372 1361
1373 1362
1374 int FullCodeGenerator::TryCatch::Exit(int stack_depth) { 1363 int FullCodeGenerator::TryCatch::Exit(int stack_depth) {
1375 // The macros used here must preserve the result register. 1364 // The macros used here must preserve the result register.
1376 __ Drop(stack_depth); 1365 __ Drop(stack_depth);
1377 __ PopTryHandler(); 1366 __ PopTryHandler();
1378 return 0; 1367 return 0;
1379 } 1368 }
1380 1369
1381 1370
1382 #undef __ 1371 #undef __
1383 1372
1384 1373
1385 } } // namespace v8::internal 1374 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/data-flow.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698