Revision: 18693
Author:   [email protected]
Date:     Mon Jan 20 14:51:54 2014 UTC
Log:      Experimental parser: tiny fix for silly code.

[email protected]
BUG=

Review URL: https://codereview.chromium.org/143363003
http://code.google.com/p/v8/source/detail?r=18693

Modified:
 /branches/experimental/parser/src/parser.cc

=======================================
--- /branches/experimental/parser/src/parser.cc Mon Jan 20 09:25:23 2014 UTC
+++ /branches/experimental/parser/src/parser.cc Mon Jan 20 14:51:54 2014 UTC
@@ -566,15 +566,12 @@
   // 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());
-  }
   SetScannerFlags();
   scanner_->Init();
   result = DoParseProgram(info(), source);

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to