Chromium Code Reviews| 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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 416 bool is_scanned_for_captures_; | 416 bool is_scanned_for_captures_; |
| 417 bool failed_; | 417 bool failed_; |
| 418 }; | 418 }; |
| 419 | 419 |
| 420 // ---------------------------------------------------------------------------- | 420 // ---------------------------------------------------------------------------- |
| 421 // JAVASCRIPT PARSING | 421 // JAVASCRIPT PARSING |
| 422 | 422 |
| 423 // Forward declaration. | 423 // Forward declaration. |
| 424 class SingletonLogger; | 424 class SingletonLogger; |
| 425 | 425 |
| 426 class Parser { | 426 class Parser { |
|
Michael Starzinger
2013/04/08 11:07:04
Since we are at it, let's make the parser BASE_EMB
wingo
2013/04/08 11:36:53
Done. Also added BASE_EMBEDDED for RegExpParser w
| |
| 427 public: | 427 public: |
| 428 Parser(CompilationInfo* info, | 428 Parser(CompilationInfo* info, |
| 429 int parsing_flags, // Combination of ParsingFlags | 429 int parsing_flags, // Combination of ParsingFlags |
| 430 v8::Extension* extension, | 430 v8::Extension* extension, |
| 431 ScriptDataImpl* pre_data); | 431 ScriptDataImpl* pre_data); |
| 432 virtual ~Parser() { | 432 ~Parser() { |
| 433 delete reusable_preparser_; | 433 delete reusable_preparser_; |
| 434 reusable_preparser_ = NULL; | 434 reusable_preparser_ = NULL; |
| 435 } | 435 } |
| 436 | 436 |
| 437 // Returns NULL if parsing failed. | 437 // Returns NULL if parsing failed. |
| 438 FunctionLiteral* ParseProgram(); | 438 FunctionLiteral* ParseProgram(); |
| 439 FunctionLiteral* ParseLazy(); | 439 FunctionLiteral* ParseLazy(); |
| 440 | 440 |
| 441 void ReportMessageAt(Scanner::Location loc, | 441 void ReportMessageAt(Scanner::Location loc, |
| 442 const char* message, | 442 const char* message, |
| (...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 880 private: | 880 private: |
| 881 static const int kTypeSlot = 0; | 881 static const int kTypeSlot = 0; |
| 882 static const int kElementsSlot = 1; | 882 static const int kElementsSlot = 1; |
| 883 | 883 |
| 884 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); | 884 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); |
| 885 }; | 885 }; |
| 886 | 886 |
| 887 } } // namespace v8::internal | 887 } } // namespace v8::internal |
| 888 | 888 |
| 889 #endif // V8_PARSER_H_ | 889 #endif // V8_PARSER_H_ |
| OLD | NEW |