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

Unified Diff: src/array.js

Issue 233293005: Remove hand-written assembly ArrayPush stubs (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ni Created 6 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
Index: src/array.js
diff --git a/src/array.js b/src/array.js
index b3b25ed260c505f35c058c0cdabd8e8b9b8c057c..b7228459b079bdba7220c1de383be4fb32eb06af 100644
--- a/src/array.js
+++ b/src/array.js
@@ -470,7 +470,9 @@ function ArrayPush() {
return ObservedArrayPush.apply(this, arguments);
for (var i = 0; i < m; i++) {
- this[i+n] = %_Arguments(i);
+ // Use SetProperty rather than a direct keyed store to ensure that the store
+ // site doesn't become poisened with an elements transition KeyedStoreIC.
+ %SetProperty(this, i+n, %_Arguments(i), 0, 0);
Michael Starzinger 2014/04/11 13:12:08 This will break for primitive values as "this" bec
danno 2014/04/16 14:34:38 Done.
}
var new_length = n + m;
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/code-stubs.h » ('j') | src/hydrogen.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698