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

Unified Diff: src/parser.cc

Issue 98813002: Experimental scanner: fix check for two byte representation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 7 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 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 db70468e9a9b1accd85e212277103e21f5d4cdd7..08bc948f0b82067ef3a6c0e47199c579be103853 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -578,9 +578,9 @@ FunctionLiteral* Parser::ParseProgram() {
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 @@ FunctionLiteral* Parser::ParseLazy() {
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() {
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());
« 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