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

Unified Diff: src/parser.cc

Issue 143363003: Experimental parser: tiny fix for silly code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 6 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index d8813180d3ef2bebcba69aeb48663cb001641fa5..557fabb679d3c0551e6716ed8721cd9bad54971b 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -566,15 +566,12 @@ FunctionLiteral* Parser::ParseProgram() {
// Initialize parser state.
source = FlattenGetString(source);
FunctionLiteral* result;
- if (source->IsTwoByteRepresentation()) {
- delete reusable_preparser_;
- delete scanner_;
+ delete reusable_preparser_;
+ delete scanner_;
+ if (source->IsTwoByteRepresentation())
scanner_ = new ExperimentalScanner<uint16_t>(source, isolate());
- } else {
- delete reusable_preparser_;
- delete scanner_;
+ else
scanner_ = new ExperimentalScanner<uint8_t>(source, isolate());
ulan 2014/01/20 14:54:28 Please wrap the branches in { } since they are in
- }
SetScannerFlags();
scanner_->Init();
result = DoParseProgram(info(), source);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698