Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1422)

Unified Diff: src/objects.h

Issue 567313003: RegExp: Add support for the ES6-proposed sticky flag (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add missing test of --harmony-regexps flag Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/jsregexp.cc ('k') | src/regexp.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 8203b36a97f1dee7ef9c14a2cf413ae2c370c7e4..04bc82ba492fd20cf29a48c63f6ff1dcf9aa5b7e 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -8031,7 +8031,13 @@ class JSRegExp: public JSObject {
// IRREGEXP: Compiled with Irregexp.
// IRREGEXP_NATIVE: Compiled to native code with Irregexp.
enum Type { NOT_COMPILED, ATOM, IRREGEXP };
- enum Flag { NONE = 0, GLOBAL = 1, IGNORE_CASE = 2, MULTILINE = 4 };
+ enum Flag {
+ NONE = 0,
+ GLOBAL = 1,
+ IGNORE_CASE = 2,
+ MULTILINE = 4,
+ STICKY = 8
+ };
class Flags {
public:
@@ -8039,6 +8045,7 @@ class JSRegExp: public JSObject {
bool is_global() { return (value_ & GLOBAL) != 0; }
bool is_ignore_case() { return (value_ & IGNORE_CASE) != 0; }
bool is_multiline() { return (value_ & MULTILINE) != 0; }
+ bool is_sticky() { return (value_ & STICKY) != 0; }
uint32_t value() { return value_; }
private:
uint32_t value_;
« no previous file with comments | « src/jsregexp.cc ('k') | src/regexp.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698