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

Unified Diff: src/js/regexp.js

Issue 2415103002: [regexp] Turn last match info into a simple FixedArray (Closed)
Patch Set: Don't check instance type before map check Created 4 years, 2 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/js/macros.py ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/regexp.js
diff --git a/src/js/regexp.js b/src/js/regexp.js
index 2b4da5898999c5fffab60754342950a4315fc9e0..a82020961e8f6a1967220f661089cc33ca408087 100644
--- a/src/js/regexp.js
+++ b/src/js/regexp.js
@@ -10,22 +10,6 @@
// -------------------------------------------------------------------
-// Property of the builtins object for recording the result of the last
-// regexp match. The property RegExpLastMatchInfo includes the matchIndices
-// array of the last successful regexp match (an array of start/end index
-// pairs for the match and all the captured substrings), the invariant is
-// that there are at least two capture indices. The array also contains
-// the subject string for the last successful match.
-// We use a JSObject rather than a JSArray so we don't have to manually update
-// its length.
-var RegExpLastMatchInfo = {
- REGEXP_NUMBER_OF_CAPTURES: 2,
- REGEXP_LAST_SUBJECT: "",
- REGEXP_LAST_INPUT: UNDEFINED, // Settable with RegExpSetInput.
- CAPTURE0: 0,
- CAPTURE1: 0
-};
-
// ES#sec-getsubstitution
// GetSubstitution(matched, str, position, captures, replacement)
// Expand the $-expressions in the string and return a new string with
@@ -112,10 +96,6 @@ function GetSubstitution(matched, string, position, captures, replacement) {
}
// -------------------------------------------------------------------
-
-%InstallToContext(["regexp_last_match_info", RegExpLastMatchInfo]);
-
-// -------------------------------------------------------------------
// Exports
utils.Export(function(to) {
« no previous file with comments | « src/js/macros.py ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698