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

Side by Side Diff: src/parser.cc

Issue 14170: Refactored the recording of source position in the generated code. The code g... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 12 years 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/codegen-ia32.cc ('k') | test/mjsunit/mjsunit.status » ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after
1311 1311
1312 case Token::TRY: { 1312 case Token::TRY: {
1313 // NOTE: It is somewhat complicated to have labels on 1313 // NOTE: It is somewhat complicated to have labels on
1314 // try-statements. When breaking out of a try-finally statement, 1314 // try-statements. When breaking out of a try-finally statement,
1315 // one must take great care not to treat it as a 1315 // one must take great care not to treat it as a
1316 // fall-through. It is much easier just to wrap the entire 1316 // fall-through. It is much easier just to wrap the entire
1317 // try-statement in a statement block and put the labels there 1317 // try-statement in a statement block and put the labels there
1318 Block* result = NEW(Block(labels, 1, false)); 1318 Block* result = NEW(Block(labels, 1, false));
1319 Target target(this, result); 1319 Target target(this, result);
1320 TryStatement* statement = ParseTryStatement(CHECK_OK); 1320 TryStatement* statement = ParseTryStatement(CHECK_OK);
1321 if (statement) {
1322 statement->set_statement_pos(statement_pos);
1323 }
1321 if (result) result->AddStatement(statement); 1324 if (result) result->AddStatement(statement);
1322 return result; 1325 return result;
1323 } 1326 }
1324 1327
1325 case Token::FUNCTION: 1328 case Token::FUNCTION:
1326 return ParseFunctionDeclaration(ok); 1329 return ParseFunctionDeclaration(ok);
1327 1330
1328 case Token::NATIVE: 1331 case Token::NATIVE:
1329 return ParseNativeDeclaration(ok); 1332 return ParseNativeDeclaration(ok);
1330 1333
(...skipping 3035 matching lines...) Expand 10 before | Expand all | Expand 10 after
4366 start_position, 4369 start_position,
4367 is_expression); 4370 is_expression);
4368 return result; 4371 return result;
4369 } 4372 }
4370 4373
4371 4374
4372 #undef NEW 4375 #undef NEW
4373 4376
4374 4377
4375 } } // namespace v8::internal 4378 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/codegen-ia32.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698