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

Side by Side Diff: src/parser.cc

Issue 7211013: Combined identical classes V8JavaScriptScanner and StandAloneJavaScriptScanner. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/parser.h ('k') | src/preparser-api.cc » ('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 4896 matching lines...) Expand 10 before | Expand all | Expand 10 after
4907 *source = data; 4907 *source = data;
4908 return result; 4908 return result;
4909 } 4909 }
4910 4910
4911 4911
4912 // Create a Scanner for the preparser to use as input, and preparse the source. 4912 // Create a Scanner for the preparser to use as input, and preparse the source.
4913 static ScriptDataImpl* DoPreParse(UC16CharacterStream* source, 4913 static ScriptDataImpl* DoPreParse(UC16CharacterStream* source,
4914 bool allow_lazy, 4914 bool allow_lazy,
4915 ParserRecorder* recorder) { 4915 ParserRecorder* recorder) {
4916 Isolate* isolate = Isolate::Current(); 4916 Isolate* isolate = Isolate::Current();
4917 V8JavaScriptScanner scanner(isolate->unicode_cache()); 4917 JavaScriptScanner scanner(isolate->unicode_cache());
4918 scanner.Initialize(source); 4918 scanner.Initialize(source);
4919 intptr_t stack_limit = isolate->stack_guard()->real_climit(); 4919 intptr_t stack_limit = isolate->stack_guard()->real_climit();
4920 if (!preparser::PreParser::PreParseProgram(&scanner, 4920 if (!preparser::PreParser::PreParseProgram(&scanner,
4921 recorder, 4921 recorder,
4922 allow_lazy, 4922 allow_lazy,
4923 stack_limit)) { 4923 stack_limit)) {
4924 isolate->StackOverflow(); 4924 isolate->StackOverflow();
4925 return NULL; 4925 return NULL;
4926 } 4926 }
4927 4927
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
5008 info->is_global(), 5008 info->is_global(),
5009 info->StrictMode()); 5009 info->StrictMode());
5010 } 5010 }
5011 } 5011 }
5012 5012
5013 info->SetFunction(result); 5013 info->SetFunction(result);
5014 return (result != NULL); 5014 return (result != NULL);
5015 } 5015 }
5016 5016
5017 } } // namespace v8::internal 5017 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/parser.h ('k') | src/preparser-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698