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

Side by Side Diff: test/mjsunit/regress/regress-crbug-485410.js

Issue 1132113004: Let Runtime_GrowArrayElements accept non-Smi numbers as |key|. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/runtime/runtime-array.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
7 var doubles = new Float64Array(1);
8 function ToHeapNumber(i) {
9 doubles[0] = i;
10 return doubles[0];
11 }
12 for (var i = 0; i < 3; i++) ToHeapNumber(i);
13 %OptimizeFunctionOnNextCall(ToHeapNumber);
14 assertFalse(%IsSmi(ToHeapNumber(1)));
15
16 function Fail(a, i, v) {
17 a[i] = v;
18 }
19
20 for (var i = 0; i < 3; i++) Fail(new Array(1), 1, i);
21 %OptimizeFunctionOnNextCall(Fail);
22 // 1050 > JSObject::kMaxGap, causing stub failure and runtime call.
23 Fail(new Array(1), ToHeapNumber(1050), 3);
OLDNEW
« no previous file with comments | « src/runtime/runtime-array.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698