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

Side by Side Diff: test/mjsunit/regress/typed-array-lifetime.js

Issue 1493983004: [crankshaft] Loads and stores to typed arrays have to reference the backing store holder (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 5 years 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 2015 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 --typed-array-max-size-in-heap=1
6
7 var foo = (function () {
8 var y = 0;
9 return function foo(x) {
10 // Needs to be an external array.
11 var a = new Float64Array(32);
12 a[0] = 42;
13 y = x + 0.1; // This has to allocate.
14 return a[0];
15 }
16 })();
17
18 foo(1);
19 foo(1);
20 %OptimizeFunctionOnNextCall(foo);
21 foo(1);
22 // Try to force a GC during allocation in above marked line.
23 for (var i = 0; i < 20; ++i) {
24 %SetAllocationTimeout(i, i, false);
25 assertEquals(42, foo(2));
26 }
OLDNEW
« src/crankshaft/x64/lithium-x64.cc ('K') | « test/mjsunit/mjsunit.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698