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

Unified Diff: src/regexp.js

Issue 788043005: ES6 unicode escapes, part 2: Regexps. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: mirror regexp test Created 5 years, 11 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
Index: src/regexp.js
diff --git a/src/regexp.js b/src/regexp.js
index e1eac76c124dbda3bc0635466617d1887fd17775..98d03946da9a5e1a33d759b9614cacc2eb243b7c 100644
--- a/src/regexp.js
+++ b/src/regexp.js
@@ -22,6 +22,8 @@ function DoConstructRegExp(object, pattern, flags) {
flags = (pattern.global ? 'g' : '')
+ (pattern.ignoreCase ? 'i' : '')
+ (pattern.multiline ? 'm' : '');
+ if (harmony_unicode)
+ flags += (pattern.unicode ? 'u' : '');
if (harmony_regexps)
flags += (pattern.sticky ? 'y' : '');
pattern = pattern.source;
@@ -235,6 +237,7 @@ function RegExpToString() {
if (this.global) result += 'g';
if (this.ignoreCase) result += 'i';
if (this.multiline) result += 'm';
+ if (harmony_unicode && this.unicode) result += 'u';
if (harmony_regexps && this.sticky) result += 'y';
return result;
}

Powered by Google App Engine
This is Rietveld 408576698