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

Unified Diff: test/mjsunit/compiler/inlined-array-pop-getter1.js

Issue 2239703002: [turbofan] Add inlined Array.prototype.pop support. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Only convert hole to undefined for holey elements Created 4 years, 4 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/type-cache.h ('k') | test/mjsunit/compiler/inlined-array-pop-getter2.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/compiler/inlined-array-pop-getter1.js
diff --git a/test/mjsunit/regress/regress-3650-3.js b/test/mjsunit/compiler/inlined-array-pop-getter1.js
similarity index 52%
copy from test/mjsunit/regress/regress-3650-3.js
copy to test/mjsunit/compiler/inlined-array-pop-getter1.js
index 013e4df2834e20435982300303eb6260eb41b2be..8eb1c308a30824a4fc09d6e8211cd2a6ea040024 100644
--- a/test/mjsunit/regress/regress-3650-3.js
+++ b/test/mjsunit/compiler/inlined-array-pop-getter1.js
@@ -5,13 +5,14 @@
// Flags: --allow-natives-syntax
function foo(a) {
- for (var d in a) {
- delete a[1];
- }
+ return a.pop();
}
-foo([1,2,3]);
-foo([2,3,4]);
+var a = new Array(4);
+
+assertEquals(undefined, foo(a));
+assertEquals(undefined, foo(a));
%OptimizeFunctionOnNextCall(foo);
-foo([1,2,3]);
-assertOptimized(foo);
+assertEquals(undefined, foo(a));
+Object.prototype.__defineGetter__(0, function() { return 1; });
+assertEquals(1, foo(a));
« no previous file with comments | « src/type-cache.h ('k') | test/mjsunit/compiler/inlined-array-pop-getter2.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698