Index: src/regexp-macro-assembler.h |
diff --git a/src/regexp-macro-assembler.h b/src/regexp-macro-assembler.h |
index 5b2cf4aa8f5ce119cd5bcd246442a71166cf51fb..98d38ddc7acf38748e8ae977b5d60ac2b4a30113 100644 |
--- a/src/regexp-macro-assembler.h |
+++ b/src/regexp-macro-assembler.h |
@@ -184,14 +184,18 @@ class RegExpMacroAssembler { |
void set_slow_safe(bool ssc) { slow_safe_compiler_ = ssc; } |
bool slow_safe() { return slow_safe_compiler_; } |
+ enum GlobalFlag { NOT_GLOBAL, GLOBAL, GLOBAL_NO_ZERO_LENGTH_MATCH }; |
Erik Corry
2012/06/04 08:00:11
I think GlobalMode would be better than GlobalFlag
|
// Set whether the regular expression has the global flag. Exiting due to |
// a failure in a global regexp may still mean success overall. |
- void set_global(bool global) { global_ = global; } |
- bool global() { return global_; } |
+ inline void set_global_flag(GlobalFlag flag) { global_flag_ = flag; } |
+ inline bool global() { return global_flag_ != NOT_GLOBAL; } |
+ inline bool global_with_zero_length_match() { |
Erik Corry
2012/06/04 08:00:11
global_with_zero_length_check()
|
+ return global_flag_ == GLOBAL; |
+ } |
private: |
bool slow_safe_compiler_; |
- bool global_; |
+ bool global_flag_; |
}; |