| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 public: | 168 public: |
| 169 // Parses the source code represented by the compilation info and sets its | 169 // Parses the source code represented by the compilation info and sets its |
| 170 // function literal. Returns false (and deallocates any allocated AST | 170 // function literal. Returns false (and deallocates any allocated AST |
| 171 // nodes) if parsing failed. | 171 // nodes) if parsing failed. |
| 172 static bool Parse(CompilationInfo* info, int flags); | 172 static bool Parse(CompilationInfo* info, int flags); |
| 173 | 173 |
| 174 // Generic preparser generating full preparse data. | 174 // Generic preparser generating full preparse data. |
| 175 static ScriptDataImpl* PreParse(Utf16CharacterStream* source, | 175 static ScriptDataImpl* PreParse(Utf16CharacterStream* source, |
| 176 v8::Extension* extension, | 176 v8::Extension* extension, |
| 177 int flags); | 177 int flags); |
| 178 | |
| 179 // Preparser that only does preprocessing that makes sense if only used | |
| 180 // immediately after. | |
| 181 static ScriptDataImpl* PartialPreParse(Handle<String> source, | |
| 182 v8::Extension* extension, | |
| 183 int flags); | |
| 184 }; | 178 }; |
| 185 | 179 |
| 186 // ---------------------------------------------------------------------------- | 180 // ---------------------------------------------------------------------------- |
| 187 // REGEXP PARSING | 181 // REGEXP PARSING |
| 188 | 182 |
| 189 // A BufferedZoneList is an automatically growing list, just like (and backed | 183 // A BufferedZoneList is an automatically growing list, just like (and backed |
| 190 // by) a ZoneList, that is optimized for the case of adding and removing | 184 // by) a ZoneList, that is optimized for the case of adding and removing |
| 191 // a single element. The last element added is stored outside the backing list, | 185 // a single element. The last element added is stored outside the backing list, |
| 192 // and if no more than one element is ever added, the ZoneList isn't even | 186 // and if no more than one element is ever added, the ZoneList isn't even |
| 193 // allocated. | 187 // allocated. |
| (...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 private: | 865 private: |
| 872 static const int kTypeSlot = 0; | 866 static const int kTypeSlot = 0; |
| 873 static const int kElementsSlot = 1; | 867 static const int kElementsSlot = 1; |
| 874 | 868 |
| 875 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); | 869 DISALLOW_IMPLICIT_CONSTRUCTORS(CompileTimeValue); |
| 876 }; | 870 }; |
| 877 | 871 |
| 878 } } // namespace v8::internal | 872 } } // namespace v8::internal |
| 879 | 873 |
| 880 #endif // V8_PARSER_H_ | 874 #endif // V8_PARSER_H_ |
| OLD | NEW |