| 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 int32_t* match); | 146 int32_t* match); |
| 147 | 147 |
| 148 | 148 |
| 149 class GlobalCache { | 149 class GlobalCache { |
| 150 public: | 150 public: |
| 151 GlobalCache(Handle<JSRegExp> regexp, | 151 GlobalCache(Handle<JSRegExp> regexp, |
| 152 Handle<String> subject, | 152 Handle<String> subject, |
| 153 bool is_global, | 153 bool is_global, |
| 154 Isolate* isolate); | 154 Isolate* isolate); |
| 155 | 155 |
| 156 ~GlobalCache(); | 156 INLINE(~GlobalCache()); |
| 157 | 157 |
| 158 // Fetch the next entry in the cache for global regexp match results. | 158 // Fetch the next entry in the cache for global regexp match results. |
| 159 // This does not set the last match info. Upon failure, NULL is returned. | 159 // This does not set the last match info. Upon failure, NULL is returned. |
| 160 // The cause can be checked with Result(). The previous | 160 // The cause can be checked with Result(). The previous |
| 161 // result is still in available in memory when a failure happens. | 161 // result is still in available in memory when a failure happens. |
| 162 int32_t* FetchNext(); | 162 INLINE(int32_t* FetchNext()); |
| 163 | 163 |
| 164 int32_t* LastSuccessfulMatch(); | 164 INLINE(int32_t* LastSuccessfulMatch()); |
| 165 | 165 |
| 166 inline bool HasException() { return num_matches_ < 0; } | 166 INLINE(bool HasException()) { return num_matches_ < 0; } |
| 167 | 167 |
| 168 private: | 168 private: |
| 169 int num_matches_; | 169 int num_matches_; |
| 170 int max_matches_; | 170 int max_matches_; |
| 171 int current_match_index_; | 171 int current_match_index_; |
| 172 int registers_per_match_; | 172 int registers_per_match_; |
| 173 // Pointer to the last set of captures. | 173 // Pointer to the last set of captures. |
| 174 int32_t* register_array_; | 174 int32_t* register_array_; |
| 175 int register_array_size_; | 175 int register_array_size_; |
| 176 Handle<JSRegExp> regexp_; | 176 Handle<JSRegExp> regexp_; |
| (...skipping 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1640 Handle<String> sample_subject, | 1640 Handle<String> sample_subject, |
| 1641 bool is_ascii, Zone* zone); | 1641 bool is_ascii, Zone* zone); |
| 1642 | 1642 |
| 1643 static void DotPrint(const char* label, RegExpNode* node, bool ignore_case); | 1643 static void DotPrint(const char* label, RegExpNode* node, bool ignore_case); |
| 1644 }; | 1644 }; |
| 1645 | 1645 |
| 1646 | 1646 |
| 1647 } } // namespace v8::internal | 1647 } } // namespace v8::internal |
| 1648 | 1648 |
| 1649 #endif // V8_JSREGEXP_H_ | 1649 #endif // V8_JSREGEXP_H_ |
| OLD | NEW |