| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_JSREGEXP_H_ | 5 #ifndef V8_JSREGEXP_H_ |
| 6 #define V8_JSREGEXP_H_ | 6 #define V8_JSREGEXP_H_ |
| 7 | 7 |
| 8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
| 9 #include "src/assembler.h" | 9 #include "src/assembler.h" |
| 10 | 10 |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 kInsideBoth = 3 | 232 kInsideBoth = 3 |
| 233 }; | 233 }; |
| 234 | 234 |
| 235 | 235 |
| 236 // Represents code units in the range from from_ to to_, both ends are | 236 // Represents code units in the range from from_ to to_, both ends are |
| 237 // inclusive. | 237 // inclusive. |
| 238 class CharacterRange { | 238 class CharacterRange { |
| 239 public: | 239 public: |
| 240 CharacterRange() : from_(0), to_(0) { } | 240 CharacterRange() : from_(0), to_(0) { } |
| 241 // For compatibility with the CHECK_OK macro | 241 // For compatibility with the CHECK_OK macro |
| 242 CharacterRange(void* null) { DCHECK_EQ(NULL, null); } //NOLINT | 242 CharacterRange(void* null) { DCHECK_NULL(null); } // NOLINT |
| 243 CharacterRange(uc16 from, uc16 to) : from_(from), to_(to) { } | 243 CharacterRange(uc16 from, uc16 to) : from_(from), to_(to) { } |
| 244 static void AddClassEscape(uc16 type, ZoneList<CharacterRange>* ranges, | 244 static void AddClassEscape(uc16 type, ZoneList<CharacterRange>* ranges, |
| 245 Zone* zone); | 245 Zone* zone); |
| 246 static Vector<const int> GetWordBounds(); | 246 static Vector<const int> GetWordBounds(); |
| 247 static inline CharacterRange Singleton(uc16 value) { | 247 static inline CharacterRange Singleton(uc16 value) { |
| 248 return CharacterRange(value, value); | 248 return CharacterRange(value, value); |
| 249 } | 249 } |
| 250 static inline CharacterRange Range(uc16 from, uc16 to) { | 250 static inline CharacterRange Range(uc16 from, uc16 to) { |
| 251 DCHECK(from <= to); | 251 DCHECK(from <= to); |
| 252 return CharacterRange(from, to); | 252 return CharacterRange(from, to); |
| (...skipping 1417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1670 | 1670 |
| 1671 static bool TooMuchRegExpCode(Handle<String> pattern); | 1671 static bool TooMuchRegExpCode(Handle<String> pattern); |
| 1672 | 1672 |
| 1673 static void DotPrint(const char* label, RegExpNode* node, bool ignore_case); | 1673 static void DotPrint(const char* label, RegExpNode* node, bool ignore_case); |
| 1674 }; | 1674 }; |
| 1675 | 1675 |
| 1676 | 1676 |
| 1677 } } // namespace v8::internal | 1677 } } // namespace v8::internal |
| 1678 | 1678 |
| 1679 #endif // V8_JSREGEXP_H_ | 1679 #endif // V8_JSREGEXP_H_ |
| OLD | NEW |