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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 | 164 |
165 | 165 |
166 class ParserApi { | 166 class ParserApi { |
167 public: | 167 public: |
168 // Parses the source code represented by the compilation info and sets its | 168 // Parses the source code represented by the compilation info and sets its |
169 // function literal. Returns false (and deallocates any allocated AST | 169 // function literal. Returns false (and deallocates any allocated AST |
170 // nodes) if parsing failed. | 170 // nodes) if parsing failed. |
171 static bool Parse(CompilationInfo* info, int flags); | 171 static bool Parse(CompilationInfo* info, int flags); |
172 | 172 |
173 // Generic preparser generating full preparse data. | 173 // Generic preparser generating full preparse data. |
174 static ScriptDataImpl* PreParse(Utf16CharacterStream* source, | 174 static ScriptDataImpl* PreParse(Utf16CharacterStream* source); |
175 v8::Extension* extension, | |
176 int flags); | |
177 }; | 175 }; |
178 | 176 |
179 // ---------------------------------------------------------------------------- | 177 // ---------------------------------------------------------------------------- |
180 // REGEXP PARSING | 178 // REGEXP PARSING |
181 | 179 |
182 // A BufferedZoneList is an automatically growing list, just like (and backed | 180 // A BufferedZoneList is an automatically growing list, just like (and backed |
183 // by) a ZoneList, that is optimized for the case of adding and removing | 181 // by) a ZoneList, that is optimized for the case of adding and removing |
184 // a single element. The last element added is stored outside the backing list, | 182 // a single element. The last element added is stored outside the backing list, |
185 // and if no more than one element is ever added, the ZoneList isn't even | 183 // and if no more than one element is ever added, the ZoneList isn't even |
186 // allocated. | 184 // allocated. |
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
882 private: | 880 private: |
883 static const int kTypeSlot = 0; | 881 static const int kTypeSlot = 0; |
884 static const int kElementsSlot = 1; | 882 static const int kElementsSlot = 1; |
885 | 883 |
886 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); | 884 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); |
887 }; | 885 }; |
888 | 886 |
889 } } // namespace v8::internal | 887 } } // namespace v8::internal |
890 | 888 |
891 #endif // V8_PARSER_H_ | 889 #endif // V8_PARSER_H_ |
OLD | NEW |