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

Side by Side Diff: test/mjsunit/array-push9.js

Issue 247383002: Insert HSimulate immediately after Crankshaft-inlined push. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/hydrogen.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --allow-natives-syntax 5 // Flags: --allow-natives-syntax --deopt-every-n-times=5 --nodead-code-eliminati on
6 6
7 var array = []; 7 var array = [];
8 8
9 function push(array, value) { 9 function push(array, value) {
10 array.push(value); 10 array.push(value);
11 } 11 }
12 12
13 push(array, 0); 13 push(array, 0);
14 push(array, 1); 14 push(array, 1);
15 push(array, 2); 15 push(array, 2);
16 %OptimizeFunctionOnNextCall(push); 16 %OptimizeFunctionOnNextCall(push);
17 push(array, 3); 17 push(array, 3);
18 18
19 var v = 0; 19 var v = 0;
20 Object.defineProperty(Array.prototype, "4", { 20 Object.defineProperty(Array.prototype, "4", {
21 get: function() { return 100; }, 21 get: function() { return 100; },
22 set: function(value) { v = value; } 22 set: function(value) { v = value; }
23 }); 23 });
24 24
25 push(array, 4); 25 push(array, 4);
26 26
27 assertEquals(5, array.length); 27 assertEquals(5, array.length);
28 assertEquals(100, array[4]); 28 assertEquals(100, array[4]);
29 assertEquals(4, v); 29 assertEquals(4, v);
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698