Index: src/regexp/regexp-macro-assembler.h |
diff --git a/src/regexp/regexp-macro-assembler.h b/src/regexp/regexp-macro-assembler.h |
index a80d961b1bd374e20e3527d4bc2294803ec36eb6..b236431bf234b624c4d26f85b6b2b4ceb1b545ee 100644 |
--- a/src/regexp/regexp-macro-assembler.h |
+++ b/src/regexp/regexp-macro-assembler.h |
@@ -160,21 +160,25 @@ class RegExpMacroAssembler { |
void set_slow_safe(bool ssc) { slow_safe_compiler_ = ssc; } |
bool slow_safe() { return slow_safe_compiler_; } |
- enum GlobalMode { NOT_GLOBAL, GLOBAL, GLOBAL_NO_ZERO_LENGTH_CHECK }; |
+ enum GlobalMode { |
+ NOT_GLOBAL, |
+ GLOBAL_NO_ZERO_LENGTH_CHECK, |
+ GLOBAL, |
+ GLOBAL_UNICODE |
erikcorry
2016/01/27 10:31:31
You need a warning here that the ordering of the m
Yang
2016/01/27 12:19:20
I was thinking about adding a static check below,
|
+ }; |
// Set whether the regular expression has the global flag. Exiting due to |
// a failure in a global regexp may still mean success overall. |
inline void set_global_mode(GlobalMode mode) { global_mode_ = mode; } |
inline bool global() { return global_mode_ != NOT_GLOBAL; } |
- inline bool global_with_zero_length_check() { |
- return global_mode_ == GLOBAL; |
- } |
+ inline bool global_with_zero_length_check() { return global_mode_ >= GLOBAL; } |
+ inline bool global_unicode() { return global_mode_ == GLOBAL_UNICODE; } |
Isolate* isolate() const { return isolate_; } |
Zone* zone() const { return zone_; } |
private: |
bool slow_safe_compiler_; |
- bool global_mode_; |
+ GlobalMode global_mode_; |
Isolate* isolate_; |
Zone* zone_; |
}; |