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

Side by Side Diff: test/mjsunit/compiler/regress-v8-5756.js

Issue 2596843002: [turbofan] Optimize store to typed arrays only if the value is plain primitive. (Closed)
Patch Set: Remove dead variable Created 3 years, 12 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 z = {};
8 t = new Uint8Array(3);
9 var m = 0;
10 var x = 10;
11
12 function k() {
13 ++m;
14 if (m % 10 != 9) {
15 if (m > 20) // This if is to just force it to deoptimize.
16 x = '1'; // this deoptimizes during the second invocation of k.
17 // This causes two deopts, one eager at x = 1 and the
18 // other lazy at t[2] = z.
19 t[2] = z; // since we are assigning to Uint8Array, ToNumber
20 // is called which calls this funciton again.
21 }
22 }
23
24 function f1() {
25 z.toString = k;
26 z.toString();
27 z.toString();
28 %OptimizeFunctionOnNextCall(k);
29 z.toString();
30 }
31 f1();
OLDNEW
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | test/unittests/compiler/js-typed-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698