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

Side by Side Diff: src/parser.h

Issue 98933002: Experimental parser: crash fix. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 7 years 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 | « no previous file | src/preparser.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 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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 407
408 // Forward declaration. 408 // Forward declaration.
409 class SingletonLogger; 409 class SingletonLogger;
410 410
411 class Parser : public ParserBase { 411 class Parser : public ParserBase {
412 public: 412 public:
413 explicit Parser(CompilationInfo* info); 413 explicit Parser(CompilationInfo* info);
414 ~Parser() { 414 ~Parser() {
415 delete reusable_preparser_; 415 delete reusable_preparser_;
416 reusable_preparser_ = NULL; 416 reusable_preparser_ = NULL;
417 delete scanner_;
418 scanner_ = NULL;
417 } 419 }
418 420
419 // Parses the source code represented by the compilation info and sets its 421 // Parses the source code represented by the compilation info and sets its
420 // function literal. Returns false (and deallocates any allocated AST 422 // function literal. Returns false (and deallocates any allocated AST
421 // nodes) if parsing failed. 423 // nodes) if parsing failed.
422 static bool Parse(CompilationInfo* info) { return Parser(info).Parse(); } 424 static bool Parse(CompilationInfo* info) { return Parser(info).Parse(); }
423 bool Parse(); 425 bool Parse();
424 426
425 private: 427 private:
426 static const int kMaxNumFunctionLocals = 131071; // 2^17-1 428 static const int kMaxNumFunctionLocals = 131071; // 2^17-1
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 private: 814 private:
813 static const int kLiteralTypeSlot = 0; 815 static const int kLiteralTypeSlot = 0;
814 static const int kElementsSlot = 1; 816 static const int kElementsSlot = 1;
815 817
816 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); 818 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue);
817 }; 819 };
818 820
819 } } // namespace v8::internal 821 } } // namespace v8::internal
820 822
821 #endif // V8_PARSER_H_ 823 #endif // V8_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | src/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698