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

Side by Side Diff: test/mjsunit/keyed-load-hole-to-undefined.js

Issue 1100083002: Don't MISS if you read the hole from certain FastHoley arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE and fix arm64 compilation. Created 5 years, 7 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
« no previous file with comments | « src/x64/lithium-x64.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
(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
6 // Flags: --nostress-opt
7
8 // --nostress-opt is specified because the test corrupts the "pristine"
9 // array prototype chain by storing an element, and this is tracked
10 // per-isolate. A subsequent stress run would send the load generic,
11 // and no more deoptimizations of foo would occur.
12
13 function foo(a, i) { return a[i]; }
14
15 var a = ['one', , 'three'];
16 foo(a, 0);
17 foo(a, 0);
18 foo(a, 0);
19 %OptimizeFunctionOnNextCall(foo);
20 assertEquals(undefined, foo(a, 1));
21 assertOptimized(foo);
22
23 // Whereas if we disrupt the prototype chain...
24 Array.prototype[1] = 'cow';
25 assertEquals('cow', foo(a, 1));
26 assertUnoptimized(foo);
OLDNEW
« no previous file with comments | « src/x64/lithium-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698