| 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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 return 0; | 317 return 0; |
| 318 else if (a < b) | 318 else if (a < b) |
| 319 return -1; | 319 return -1; |
| 320 else | 320 else |
| 321 return 1; | 321 return 1; |
| 322 } | 322 } |
| 323 }; | 323 }; |
| 324 void AddRange(CharacterRange range, int value); | 324 void AddRange(CharacterRange range, int value); |
| 325 OutSet Get(uc16 value); | 325 OutSet Get(uc16 value); |
| 326 void Dump(); | 326 void Dump(); |
| 327 |
| 328 template <typename Callback> |
| 329 void ForEach(Callback callback) { return tree()->ForEach(callback); } |
| 327 private: | 330 private: |
| 328 ZoneSplayTree<Config>* tree() { return &tree_; } | 331 ZoneSplayTree<Config>* tree() { return &tree_; } |
| 329 ZoneSplayTree<Config> tree_; | 332 ZoneSplayTree<Config> tree_; |
| 330 }; | 333 }; |
| 331 | 334 |
| 332 | 335 |
| 333 struct RegExpParseResult { | 336 struct RegExpParseResult { |
| 334 RegExpTree* tree; | 337 RegExpTree* tree; |
| 335 bool has_character_escapes; | 338 bool has_character_escapes; |
| 336 Handle<String> error; | 339 Handle<String> error; |
| 337 int capture_count; | 340 int capture_count; |
| 338 }; | 341 }; |
| 339 | 342 |
| 340 | 343 |
| 341 class RegExpEngine: public AllStatic { | 344 class RegExpEngine: public AllStatic { |
| 342 public: | 345 public: |
| 343 static RegExpNode* Compile(RegExpParseResult* input); | 346 static RegExpNode* Compile(RegExpParseResult* input); |
| 344 static void DotPrint(const char* label, RegExpNode* node); | 347 static void DotPrint(const char* label, RegExpNode* node); |
| 345 }; | 348 }; |
| 346 | 349 |
| 347 | 350 |
| 348 } } // namespace v8::internal | 351 } } // namespace v8::internal |
| 349 | 352 |
| 350 #endif // V8_JSREGEXP_H_ | 353 #endif // V8_JSREGEXP_H_ |
| OLD | NEW |