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

Side by Side Diff: src/parser.cc

Issue 6759025: Version 3.2.6 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 9 years, 8 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/platform.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 // ---------------------------------------------------------------------------- 572 // ----------------------------------------------------------------------------
573 // Implementation of Parser 573 // Implementation of Parser
574 574
575 Parser::Parser(Handle<Script> script, 575 Parser::Parser(Handle<Script> script,
576 bool allow_natives_syntax, 576 bool allow_natives_syntax,
577 v8::Extension* extension, 577 v8::Extension* extension,
578 ScriptDataImpl* pre_data) 578 ScriptDataImpl* pre_data)
579 : isolate_(script->GetIsolate()), 579 : isolate_(script->GetIsolate()),
580 symbol_cache_(pre_data ? pre_data->symbol_count() : 0), 580 symbol_cache_(pre_data ? pre_data->symbol_count() : 0),
581 script_(script), 581 script_(script),
582 scanner_(isolate_), 582 scanner_(isolate_->scanner_constants()),
583 top_scope_(NULL), 583 top_scope_(NULL),
584 with_nesting_level_(0), 584 with_nesting_level_(0),
585 lexical_scope_(NULL), 585 lexical_scope_(NULL),
586 target_stack_(NULL), 586 target_stack_(NULL),
587 allow_natives_syntax_(allow_natives_syntax), 587 allow_natives_syntax_(allow_natives_syntax),
588 extension_(extension), 588 extension_(extension),
589 pre_data_(pre_data), 589 pre_data_(pre_data),
590 fni_(NULL), 590 fni_(NULL),
591 stack_overflow_(false), 591 stack_overflow_(false),
592 parenthesized_function_(false) { 592 parenthesized_function_(false) {
(...skipping 4453 matching lines...) Expand 10 before | Expand all | Expand 10 after
5046 *source = data; 5046 *source = data;
5047 return result; 5047 return result;
5048 } 5048 }
5049 5049
5050 5050
5051 // Create a Scanner for the preparser to use as input, and preparse the source. 5051 // Create a Scanner for the preparser to use as input, and preparse the source.
5052 static ScriptDataImpl* DoPreParse(UC16CharacterStream* source, 5052 static ScriptDataImpl* DoPreParse(UC16CharacterStream* source,
5053 bool allow_lazy, 5053 bool allow_lazy,
5054 ParserRecorder* recorder) { 5054 ParserRecorder* recorder) {
5055 Isolate* isolate = Isolate::Current(); 5055 Isolate* isolate = Isolate::Current();
5056 V8JavaScriptScanner scanner(isolate); 5056 V8JavaScriptScanner scanner(isolate->scanner_constants());
5057 scanner.Initialize(source); 5057 scanner.Initialize(source);
5058 intptr_t stack_limit = isolate->stack_guard()->real_climit(); 5058 intptr_t stack_limit = isolate->stack_guard()->real_climit();
5059 if (!preparser::PreParser::PreParseProgram(&scanner, 5059 if (!preparser::PreParser::PreParseProgram(&scanner,
5060 recorder, 5060 recorder,
5061 allow_lazy, 5061 allow_lazy,
5062 stack_limit)) { 5062 stack_limit)) {
5063 isolate->StackOverflow(); 5063 isolate->StackOverflow();
5064 return NULL; 5064 return NULL;
5065 } 5065 }
5066 5066
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
5146 info->is_global(), 5146 info->is_global(),
5147 info->StrictMode()); 5147 info->StrictMode());
5148 } 5148 }
5149 } 5149 }
5150 5150
5151 info->SetFunction(result); 5151 info->SetFunction(result);
5152 return (result != NULL); 5152 return (result != NULL);
5153 } 5153 }
5154 5154
5155 } } // namespace v8::internal 5155 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/parser.h ('k') | src/platform.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698