OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 ~ParsingModeScope() { | 555 ~ParsingModeScope() { |
556 parser_->mode_ = old_mode_; | 556 parser_->mode_ = old_mode_; |
557 } | 557 } |
558 | 558 |
559 private: | 559 private: |
560 Parser* parser_; | 560 Parser* parser_; |
561 Mode old_mode_; | 561 Mode old_mode_; |
562 }; | 562 }; |
563 | 563 |
564 FunctionLiteral* ParseLazy(); | 564 FunctionLiteral* ParseLazy(); |
565 FunctionLiteral* ParseLazy(Utf16CharacterStream* source, | 565 FunctionLiteral* ParseLazy(Utf16CharacterStream* source); |
566 ZoneScope* zone_scope); | |
567 | 566 |
568 Isolate* isolate() { return isolate_; } | 567 Isolate* isolate() { return isolate_; } |
569 Zone* zone() const { return zone_; } | 568 Zone* zone() const { return zone_; } |
570 CompilationInfo* info() const { return info_; } | 569 CompilationInfo* info() const { return info_; } |
571 | 570 |
572 // Called by ParseProgram after setting up the scanner. | 571 // Called by ParseProgram after setting up the scanner. |
573 FunctionLiteral* DoParseProgram(CompilationInfo* info, | 572 FunctionLiteral* DoParseProgram(CompilationInfo* info, |
574 Handle<String> source, | 573 Handle<String> source); |
575 ZoneScope* zone_scope); | |
576 | 574 |
577 // Report syntax error | 575 // Report syntax error |
578 void ReportUnexpectedToken(Token::Value token); | 576 void ReportUnexpectedToken(Token::Value token); |
579 void ReportInvalidPreparseData(Handle<String> name, bool* ok); | 577 void ReportInvalidPreparseData(Handle<String> name, bool* ok); |
580 void ReportMessage(const char* message, Vector<const char*> args); | 578 void ReportMessage(const char* message, Vector<const char*> args); |
581 void ReportMessage(const char* message, Vector<Handle<String> > args); | 579 void ReportMessage(const char* message, Vector<Handle<String> > args); |
582 | 580 |
583 void set_pre_parse_data(ScriptDataImpl *data) { | 581 void set_pre_parse_data(ScriptDataImpl *data) { |
584 pre_parse_data_ = data; | 582 pre_parse_data_ = data; |
585 symbol_cache_.Initialize(data ? data->symbol_count() : 0, zone()); | 583 symbol_cache_.Initialize(data ? data->symbol_count() : 0, zone()); |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
900 private: | 898 private: |
901 static const int kLiteralTypeSlot = 0; | 899 static const int kLiteralTypeSlot = 0; |
902 static const int kElementsSlot = 1; | 900 static const int kElementsSlot = 1; |
903 | 901 |
904 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); | 902 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); |
905 }; | 903 }; |
906 | 904 |
907 } } // namespace v8::internal | 905 } } // namespace v8::internal |
908 | 906 |
909 #endif // V8_PARSER_H_ | 907 #endif // V8_PARSER_H_ |
OLD | NEW |