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

Side by Side Diff: src/parser.cc

Issue 149670: Fix issue 345 by avoiding duplicates in the list of escaping labels... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 5 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 | « no previous file | test/mjsunit/regress/regress-345.js » ('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 2349 matching lines...) Expand 10 before | Expand all | Expand 10 after
2360 if (!is_pre_parsing_) { 2360 if (!is_pre_parsing_) {
2361 if (catch_block != NULL) { 2361 if (catch_block != NULL) {
2362 ASSERT(finally_block == NULL); 2362 ASSERT(finally_block == NULL);
2363 result = NEW(TryCatch(try_block, catch_var, catch_block)); 2363 result = NEW(TryCatch(try_block, catch_var, catch_block));
2364 result->set_escaping_targets(collector.targets()); 2364 result->set_escaping_targets(collector.targets());
2365 } else { 2365 } else {
2366 ASSERT(finally_block != NULL); 2366 ASSERT(finally_block != NULL);
2367 result = NEW(TryFinally(try_block, finally_block)); 2367 result = NEW(TryFinally(try_block, finally_block));
2368 // Add the jump targets of the try block and the catch block. 2368 // Add the jump targets of the try block and the catch block.
2369 for (int i = 0; i < collector.targets()->length(); i++) { 2369 for (int i = 0; i < collector.targets()->length(); i++) {
2370 catch_collector.targets()->Add(collector.targets()->at(i)); 2370 catch_collector.AddTarget(collector.targets()->at(i));
2371 } 2371 }
2372 result->set_escaping_targets(catch_collector.targets()); 2372 result->set_escaping_targets(catch_collector.targets());
2373 } 2373 }
2374 } 2374 }
2375 2375
2376 return result; 2376 return result;
2377 } 2377 }
2378 2378
2379 2379
2380 LoopStatement* Parser::ParseDoStatement(ZoneStringList* labels, bool* ok) { 2380 LoopStatement* Parser::ParseDoStatement(ZoneStringList* labels, bool* ok) {
(...skipping 2295 matching lines...) Expand 10 before | Expand all | Expand 10 after
4676 start_position, 4676 start_position,
4677 is_expression); 4677 is_expression);
4678 return result; 4678 return result;
4679 } 4679 }
4680 4680
4681 4681
4682 #undef NEW 4682 #undef NEW
4683 4683
4684 4684
4685 } } // namespace v8::internal 4685 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-345.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698