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

Unified Diff: src/harmony-array.js

Issue 1172683003: Use the LookupIterator for SetElement and friends (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 5 years, 6 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/elements.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/harmony-array.js
diff --git a/src/harmony-array.js b/src/harmony-array.js
index 51e2d01b50147ded30436174685b23aca3484ac9..f9ce2f194f9ac0976cc7fe1ec289abbfc7154899 100644
--- a/src/harmony-array.js
+++ b/src/harmony-array.js
@@ -238,7 +238,8 @@ function ArrayFrom(arrayLike, mapfn, receiver) {
} else {
mappedValue = nextValue;
}
- %AddElement(result, k++, mappedValue, NONE);
+ // TODO(verwaest): This should redefine rather than adding.
+ %AddElement(result, k++, mappedValue);
}
} else {
var len = $toLength(items.length);
@@ -251,7 +252,8 @@ function ArrayFrom(arrayLike, mapfn, receiver) {
} else {
mappedValue = nextValue;
}
- %AddElement(result, k, mappedValue, NONE);
+ // TODO(verwaest): This should redefine rather than adding.
+ %AddElement(result, k, mappedValue);
}
result.length = k;
@@ -266,7 +268,8 @@ function ArrayOf() {
// TODO: Implement IsConstructor (ES6 section 7.2.5)
var array = %IsConstructor(constructor) ? new constructor(length) : [];
for (var i = 0; i < length; i++) {
- %AddElement(array, i, %_Arguments(i), NONE);
+ // TODO(verwaest): This should redefine rather than adding.
+ %AddElement(array, i, %_Arguments(i));
}
array.length = length;
return array;
« no previous file with comments | « src/elements.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698