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

Unified Diff: src/js/macros.py

Issue 1428203003: Use in-object fields instead of private symbols for regexp slots. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 1 month 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/crankshaft/hydrogen-instructions.h ('k') | src/js/regexp.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/macros.py
diff --git a/src/js/macros.py b/src/js/macros.py
index 888d647f16c30bd2b8f0e67326187cce00cab289..a4370d2181ceeeedaa1c3f87890c55847886e211 100644
--- a/src/js/macros.py
+++ b/src/js/macros.py
@@ -182,12 +182,12 @@ define REGEXP_NUMBER_OF_CAPTURES = 0;
define REGEXP_FIRST_CAPTURE = 3;
# Macros for internal slot access.
-macro REGEXP_GLOBAL(regexp) = (regexp[regExpFlagsSymbol] & 1);
-macro REGEXP_IGNORE_CASE(regexp) = (regexp[regExpFlagsSymbol] & 2);
-macro REGEXP_MULTILINE(regexp) = (regexp[regExpFlagsSymbol] & 4);
-macro REGEXP_STICKY(regexp) = (regexp[regExpFlagsSymbol] & 8);
-macro REGEXP_UNICODE(regexp) = (regexp[regExpFlagsSymbol] & 16);
-macro REGEXP_SOURCE(regexp) = (regexp[regExpSourceSymbol]);
+macro REGEXP_GLOBAL(regexp) = (%_RegExpFlags(regexp) & 1);
+macro REGEXP_IGNORE_CASE(regexp) = (%_RegExpFlags(regexp) & 2);
+macro REGEXP_MULTILINE(regexp) = (%_RegExpFlags(regexp) & 4);
+macro REGEXP_STICKY(regexp) = (%_RegExpFlags(regexp) & 8);
+macro REGEXP_UNICODE(regexp) = (%_RegExpFlags(regexp) & 16);
+macro REGEXP_SOURCE(regexp) = (%_RegExpSource(regexp));
# We can't put macros in macros so we use constants here.
# REGEXP_NUMBER_OF_CAPTURES
« no previous file with comments | « src/crankshaft/hydrogen-instructions.h ('k') | src/js/regexp.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698