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

Unified Diff: src/js/regexp.js

Issue 1879053003: Replace DefineIndexedProperty with %CreateDataProperty (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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/array.js ('k') | src/js/runtime.js » ('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 cc8cb41de1809805f0468d47407ee28758582ab7..131e08ed4b399de9e4c7b55082ee2de89683ae81 100644
--- a/src/js/regexp.js
+++ b/src/js/regexp.js
@@ -11,7 +11,6 @@
// -------------------------------------------------------------------
// Imports
-var AddIndexedProperty;
var ExpandReplacement;
var GlobalArray = global.Array;
var GlobalObject = global.Object;
@@ -29,7 +28,6 @@ var splitSymbol = utils.ImportNow("split_symbol");
var SpeciesConstructor;
utils.Import(function(from) {
- AddIndexedProperty = from.AddIndexedProperty;
ExpandReplacement = from.ExpandReplacement;
MakeTypeError = from.MakeTypeError;
MaxSimple = from.MaxSimple;
@@ -502,7 +500,7 @@ function RegExpSubclassSplit(string, limit) {
var result;
if (size === 0) {
result = RegExpSubclassExec(splitter, string);
- if (IS_NULL(result)) AddIndexedProperty(array, 0, string);
+ if (IS_NULL(result)) %AddElement(array, 0, string);
return array;
}
var stringIndex = prevStringIndex;
@@ -518,7 +516,7 @@ function RegExpSubclassSplit(string, limit) {
if (end === stringIndex) {
stringIndex += AdvanceStringIndex(string, stringIndex, unicode);
} else {
- AddIndexedProperty(
+ %AddElement(
array, arrayIndex,
%_SubString(string, prevStringIndex, stringIndex));
arrayIndex++;
@@ -526,7 +524,7 @@ function RegExpSubclassSplit(string, limit) {
prevStringIndex = end;
var numberOfCaptures = MaxSimple(TO_LENGTH(result.length), 0);
for (var i = 1; i < numberOfCaptures; i++) {
- AddIndexedProperty(array, arrayIndex, result[i]);
+ %AddElement(array, arrayIndex, result[i]);
arrayIndex++;
if (arrayIndex === lim) return array;
}
@@ -534,7 +532,7 @@ function RegExpSubclassSplit(string, limit) {
}
}
}
- AddIndexedProperty(array, arrayIndex,
+ %AddElement(array, arrayIndex,
%_SubString(string, prevStringIndex, size));
return array;
}
« no previous file with comments | « src/js/array.js ('k') | src/js/runtime.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698