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

Side by Side Diff: test/mjsunit/compiler/inlined-array-pop-getter2.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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // Flags: --allow-natives-syntax
6
7 var pop = Array.prototype.pop;
8
9 function foo(a) {
10 a.length;
11 return pop.call(a);
12 }
13
14 var a = new Array(4);
15 var o = {}
16 o.__defineGetter__(0, function() { return 1; });
17
18 assertEquals(undefined, foo(a));
19 assertEquals(undefined, foo(a));
20 %OptimizeFunctionOnNextCall(foo);
21 assertEquals(undefined, foo(a));
22 Array.prototype.__proto__ = o;
23 assertEquals(1, foo(a));
OLDNEW
« no previous file with comments | « test/mjsunit/compiler/inlined-array-pop-getter1.js ('k') | test/mjsunit/compiler/inlined-array-pop-opt.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698