Chromium Code Reviews| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 118 // A one element cache of the last utf8_subject string and its length. The | 118 // A one element cache of the last utf8_subject string and its length. The |
| 119 // subject JS String object is cached in the heap. We also cache a | 119 // subject JS String object is cached in the heap. We also cache a |
| 120 // translation between position and utf8 position. | 120 // translation between position and utf8 position. |
| 121 static char* utf8_subject_cache_; | 121 static char* utf8_subject_cache_; |
| 122 static int utf8_length_cache_; | 122 static int utf8_length_cache_; |
| 123 static int utf8_position_; | 123 static int utf8_position_; |
| 124 static int character_position_; | 124 static int character_position_; |
| 125 }; | 125 }; |
| 126 | 126 |
| 127 | 127 |
| 128 template <typename Char> class RegExpNode; | |
| 129 | |
| 130 | |
| 131 class RegExpEngine { | |
|
Lasse Reichstein
2008/10/27 13:12:58
Should inherit AllStatic?
Christian Plesner Hansen
2008/10/27 18:57:02
Yes.
| |
| 132 public: | |
| 133 template <typename Char> | |
| 134 static RegExpNode<Char>* Compile(RegExpTree* regexp); | |
| 135 | |
| 136 template <typename Char> | |
| 137 static bool Execute(RegExpNode<Char>* start, Vector<Char> input); | |
| 138 }; | |
| 139 | |
| 140 | |
| 128 } } // namespace v8::internal | 141 } } // namespace v8::internal |
| 129 | 142 |
| 130 #endif // V8_JSREGEXP_H_ | 143 #endif // V8_JSREGEXP_H_ |
| OLD | NEW |