| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 | 205 |
| 206 // The parser: Takes a script and and context information, and builds a | 206 // The parser: Takes a script and and context information, and builds a |
| 207 // FunctionLiteral AST node. Returns NULL and deallocates any allocated | 207 // FunctionLiteral AST node. Returns NULL and deallocates any allocated |
| 208 // AST nodes if parsing failed. | 208 // AST nodes if parsing failed. |
| 209 FunctionLiteral* MakeAST(bool compile_in_global_context, | 209 FunctionLiteral* MakeAST(bool compile_in_global_context, |
| 210 Handle<Script> script, | 210 Handle<Script> script, |
| 211 v8::Extension* extension, | 211 v8::Extension* extension, |
| 212 ScriptDataImpl* pre_data, | 212 ScriptDataImpl* pre_data, |
| 213 bool is_json = false); | 213 bool is_json = false); |
| 214 | 214 |
| 215 | 215 // Generic preparser generating full preparse data. |
| 216 ScriptDataImpl* PreParse(Handle<String> source, | 216 ScriptDataImpl* PreParse(Handle<String> source, |
| 217 unibrow::CharacterStream* stream, | 217 unibrow::CharacterStream* stream, |
| 218 v8::Extension* extension); | 218 v8::Extension* extension); |
| 219 | 219 |
| 220 // Preparser that only does preprocessing that makes sense if only used |
| 221 // immediately after. |
| 222 ScriptDataImpl* PartialPreParse(Handle<String> source, |
| 223 unibrow::CharacterStream* stream, |
| 224 v8::Extension* extension); |
| 225 |
| 220 | 226 |
| 221 bool ParseRegExp(FlatStringReader* input, | 227 bool ParseRegExp(FlatStringReader* input, |
| 222 bool multiline, | 228 bool multiline, |
| 223 RegExpCompileData* result); | 229 RegExpCompileData* result); |
| 224 | 230 |
| 225 | 231 |
| 226 // Support for doing lazy compilation. The script is the script containing full | 232 // Support for doing lazy compilation. The script is the script containing full |
| 227 // source of the script where the function is declared. The start_position and | 233 // source of the script where the function is declared. The start_position and |
| 228 // end_position specifies the part of the script source which has the source | 234 // end_position specifies the part of the script source which has the source |
| 229 // for the function declaration in the form: | 235 // for the function declaration in the form: |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 static const int kTypeSlot = 0; | 272 static const int kTypeSlot = 0; |
| 267 static const int kElementsSlot = 1; | 273 static const int kElementsSlot = 1; |
| 268 | 274 |
| 269 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); | 275 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); |
| 270 }; | 276 }; |
| 271 | 277 |
| 272 | 278 |
| 273 } } // namespace v8::internal | 279 } } // namespace v8::internal |
| 274 | 280 |
| 275 #endif // V8_PARSER_H_ | 281 #endif // V8_PARSER_H_ |
| OLD | NEW |