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

Side by Side Diff: src/preparser.h

Issue 8226017: Introduce collective --harmony flag. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 2 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.cc ('k') | src/preparser.cc » ('j') | src/v8.cc » ('J')
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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 bool allow_lazy) 440 bool allow_lazy)
441 : scanner_(scanner), 441 : scanner_(scanner),
442 log_(log), 442 log_(log),
443 scope_(NULL), 443 scope_(NULL),
444 stack_limit_(stack_limit), 444 stack_limit_(stack_limit),
445 strict_mode_violation_location_(i::Scanner::Location::invalid()), 445 strict_mode_violation_location_(i::Scanner::Location::invalid()),
446 strict_mode_violation_type_(NULL), 446 strict_mode_violation_type_(NULL),
447 stack_overflow_(false), 447 stack_overflow_(false),
448 allow_lazy_(true), 448 allow_lazy_(true),
449 parenthesized_function_(false), 449 parenthesized_function_(false),
450 harmony_block_scoping_(scanner->HarmonyBlockScoping()) { } 450 harmony_scoping_(scanner->HarmonyScoping()) { }
451 451
452 // Preparse the program. Only called in PreParseProgram after creating 452 // Preparse the program. Only called in PreParseProgram after creating
453 // the instance. 453 // the instance.
454 PreParseResult PreParse() { 454 PreParseResult PreParse() {
455 Scope top_scope(&scope_, kTopLevelScope); 455 Scope top_scope(&scope_, kTopLevelScope);
456 bool ok = true; 456 bool ok = true;
457 int start_position = scanner_->peek_location().beg_pos; 457 int start_position = scanner_->peek_location().beg_pos;
458 ParseSourceElements(i::Token::EOS, &ok); 458 ParseSourceElements(i::Token::EOS, &ok);
459 if (stack_overflow_) return kPreParseStackOverflow; 459 if (stack_overflow_) return kPreParseStackOverflow;
460 if (!ok) { 460 if (!ok) {
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 601
602 i::JavaScriptScanner* scanner_; 602 i::JavaScriptScanner* scanner_;
603 i::ParserRecorder* log_; 603 i::ParserRecorder* log_;
604 Scope* scope_; 604 Scope* scope_;
605 uintptr_t stack_limit_; 605 uintptr_t stack_limit_;
606 i::Scanner::Location strict_mode_violation_location_; 606 i::Scanner::Location strict_mode_violation_location_;
607 const char* strict_mode_violation_type_; 607 const char* strict_mode_violation_type_;
608 bool stack_overflow_; 608 bool stack_overflow_;
609 bool allow_lazy_; 609 bool allow_lazy_;
610 bool parenthesized_function_; 610 bool parenthesized_function_;
611 bool harmony_block_scoping_; 611 bool harmony_scoping_;
612 }; 612 };
613 } } // v8::preparser 613 } } // v8::preparser
614 614
615 #endif // V8_PREPARSER_H 615 #endif // V8_PREPARSER_H
OLDNEW
« no previous file with comments | « src/parser.cc ('k') | src/preparser.cc » ('j') | src/v8.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698