Revision: 18175
Author:   [email protected]
Date:     Mon Dec  2 10:38:54 2013 UTC
Log:      Experimental scanner: fix check for two byte representation.

[email protected]

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

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

=======================================
--- /branches/experimental/parser/src/parser.cc Wed Nov 27 13:01:38 2013 UTC
+++ /branches/experimental/parser/src/parser.cc Mon Dec  2 10:38:54 2013 UTC
@@ -578,9 +578,9 @@
   fni_ = new(zone()) FuncNameInferrer(isolate(), zone());

   // Initialize parser state.
-  source->TryFlatten();
+  FlattenString(source);
   FunctionLiteral* result;
-  if (source->IsExternalTwoByteString()) {
+  if (source->IsTwoByteRepresentation()) {
     // Notice that the stream is destroyed at the end of the branch block.
// The last line of the blocks can't be moved outside, even though they're
     // identical calls. // FIXME
@@ -711,7 +711,7 @@
     timer.Start();
   }
   // Initialize parser state.
-  source->TryFlatten();
+  FlattenString(source);
   Handle<SharedFunctionInfo> shared_info = info()->shared_info();
   FunctionLiteral* result = ParseLazy(
       source, shared_info->start_position(), shared_info->end_position());
@@ -726,7 +726,7 @@

FunctionLiteral* Parser::ParseLazy(Handle<String> source, int start, int end) {
   delete scanner_;
-  if (source->IsExternalTwoByteString()) {
+  if (source->IsTwoByteRepresentation()) {
     scanner_ = new ExperimentalScanner<uint16_t>(source, isolate());
   } else {
     scanner_ = new ExperimentalScanner<uint8_t>(source, isolate());

--
--
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