blob: 914bed01abcb79be93c1ebb216f45c580cff57ac [file] [log] [blame]
Ben Murdoch4a90d5f2016-03-22 12:00:34 +00001// 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: --stack-size=100 --allow-natives-syntax
6
7function module() {
8 "use asm";
9 var abs = Math.abs;
10 function f() {
11 return +abs();
12 }
13 return { f:f };
14}
15
16function run_close_to_stack_limit(f) {
17 try {
18 run_close_to_stack_limit(f);
19 f();
20 } catch(e) {
21 }
22}
23
24var boom = module().f;
25%OptimizeFunctionOnNextCall(boom)
26run_close_to_stack_limit(boom);