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

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

Issue 2484283002: [arm] Fix custom addition in MacroAssembler::[Fast]Allocate (Closed)
Patch Set: Created 4 years, 1 month 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/arm/macro-assembler-arm.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 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 var g_eval = eval;
8 function emit_f(size) {
9 var body = "function f(x) {" +
10 " if (x < 0) return x;" +
11 " var a = [1];" +
12 " if (x > 0) return [";
13 for (var i = 0; i < size; i++) {
14 body += "0.1, ";
15 }
16 body += " ];" +
17 " return a;" +
18 "}";
19 g_eval(body);
20 }
21
22 // Length must be big enough to make the backing store's size not fit into
23 // a single instruction's immediate field (2^12).
24 var kLength = 701;
25 emit_f(kLength);
26 f(1);
27 f(1);
28 %OptimizeFunctionOnNextCall(f);
29 var a = f(1);
30
31 // Allocating something else should not disturb |a|.
32 var b = new Object();
33 for (var i = 0; i < kLength; i++) {
34 assertEquals(0.1, a[i]);
35 }
36
37 // Allocating more should not crash.
38 for (var i = 0; i < 300; i++) {
39 f(1);
40 }
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698