Index: src/js/macros.py |
diff --git a/src/js/macros.py b/src/js/macros.py |
index f9bb12b705023c348d43a165c46b416aa2ec99d6..95b23a1443f036ad4b328a2889bf1c1ab1242e45 100644 |
--- a/src/js/macros.py |
+++ b/src/js/macros.py |
@@ -181,6 +181,14 @@ python macro CHAR_CODE(str) = ord(str[1]); |
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]); |
+ |
# We can't put macros in macros so we use constants here. |
# REGEXP_NUMBER_OF_CAPTURES |
macro NUMBER_OF_CAPTURES(array) = ((array)[0]); |