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

Side by Side Diff: src/parser.cc

Issue 8384003: Merged Scanner and JavaScriptScanner. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 1 month 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 | « src/parser.h ('k') | src/preparser.h » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 5293 matching lines...) Expand 10 before | Expand all | Expand 10 after
5304 *source = data; 5304 *source = data;
5305 return result; 5305 return result;
5306 } 5306 }
5307 5307
5308 5308
5309 // Create a Scanner for the preparser to use as input, and preparse the source. 5309 // Create a Scanner for the preparser to use as input, and preparse the source.
5310 static ScriptDataImpl* DoPreParse(UC16CharacterStream* source, 5310 static ScriptDataImpl* DoPreParse(UC16CharacterStream* source,
5311 int flags, 5311 int flags,
5312 ParserRecorder* recorder) { 5312 ParserRecorder* recorder) {
5313 Isolate* isolate = Isolate::Current(); 5313 Isolate* isolate = Isolate::Current();
5314 JavaScriptScanner scanner(isolate->unicode_cache()); 5314 Scanner scanner(isolate->unicode_cache());
5315 scanner.SetHarmonyScoping((flags & kHarmonyScoping) != 0); 5315 scanner.SetHarmonyScoping((flags & kHarmonyScoping) != 0);
5316 scanner.Initialize(source); 5316 scanner.Initialize(source);
5317 intptr_t stack_limit = isolate->stack_guard()->real_climit(); 5317 intptr_t stack_limit = isolate->stack_guard()->real_climit();
5318 if (!preparser::PreParser::PreParseProgram(&scanner, 5318 if (!preparser::PreParser::PreParseProgram(&scanner,
5319 recorder, 5319 recorder,
5320 flags, 5320 flags,
5321 stack_limit)) { 5321 stack_limit)) {
5322 isolate->StackOverflow(); 5322 isolate->StackOverflow();
5323 return NULL; 5323 return NULL;
5324 } 5324 }
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
5419 result = parser.ParseProgram(source, 5419 result = parser.ParseProgram(source,
5420 info->is_global(), 5420 info->is_global(),
5421 info->strict_mode_flag()); 5421 info->strict_mode_flag());
5422 } 5422 }
5423 } 5423 }
5424 info->SetFunction(result); 5424 info->SetFunction(result);
5425 return (result != NULL); 5425 return (result != NULL);
5426 } 5426 }
5427 5427
5428 } } // namespace v8::internal 5428 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/parser.h ('k') | src/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698