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

Side by Side Diff: include/v8-preparser.h

Issue 5862002: Version 3.0.2. (Closed)
Patch Set: Created 10 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
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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 93
94 // Interface for a stream of Unicode characters. 94 // Interface for a stream of Unicode characters.
95 class UnicodeInputStream { 95 class UnicodeInputStream {
96 public: 96 public:
97 virtual ~UnicodeInputStream(); 97 virtual ~UnicodeInputStream();
98 98
99 // Returns the next Unicode code-point in the input, or a negative value when 99 // Returns the next Unicode code-point in the input, or a negative value when
100 // there is no more input in the stream. 100 // there is no more input in the stream.
101 virtual int32_t Next() = 0; 101 virtual int32_t Next() = 0;
102
103 // Pushes a read character back into the stream, so that it will be the next
104 // to be read by Advance(). The character pushed back must be the most
105 // recently read character that hasn't already been pushed back (i.e., if
106 // pushing back more than one character, they must occur in the opposite order
107 // of the one they were read in).
108 virtual void PushBack(int32_t ch) = 0;
102 }; 109 };
103 110
104 111
105 // Preparse a JavaScript program. The source code is provided as a 112 // Preparse a JavaScript program. The source code is provided as a
106 // UnicodeInputStream. The max_stack_size limits the amount of stack 113 // UnicodeInputStream. The max_stack_size limits the amount of stack
107 // space that the preparser is allowed to use. If the preparser uses 114 // space that the preparser is allowed to use. If the preparser uses
108 // more stack space than the limit provided, the result's stack_overflow() 115 // more stack space than the limit provided, the result's stack_overflow()
109 // method will return true. Otherwise the result contains preparser 116 // method will return true. Otherwise the result contains preparser
110 // data that can be used by the V8 parser to speed up parsing. 117 // data that can be used by the V8 parser to speed up parsing.
111 PreParserData V8EXPORT Preparse(UnicodeInputStream* input, 118 PreParserData V8EXPORT Preparse(UnicodeInputStream* input,
112 size_t max_stack_size); 119 size_t max_stack_size);
113 120
114 } // namespace v8. 121 } // namespace v8.
115 122
116 #endif // PREPARSER_H 123 #endif // PREPARSER_H
OLDNEW
« ChangeLog ('K') | « include/v8.h ('k') | include/v8-profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698