44b68bc2ca
R=manoskouk@chromium.org Bug: chromium:1252747 Change-Id: I337d5e26015f5af8c76caebb962093d1dad42952 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3190095 Reviewed-by: Manos Koukoutos <manoskouk@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#77115}
28 lines
525 B
JavaScript
28 lines
525 B
JavaScript
// Copyright 2021 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
function print_stack(unsigned) {
|
|
print('stack:');
|
|
print((new Error()).stack);
|
|
}
|
|
|
|
function asm(global, env) {
|
|
'use asm';
|
|
|
|
var print_stack = env.print_stack;
|
|
|
|
function main() {
|
|
var count = 0;
|
|
|
|
while ((count | 0) < 10) {
|
|
print_stack(1);
|
|
count = count + 1 | 0;
|
|
}
|
|
}
|
|
|
|
return main;
|
|
}
|
|
|
|
asm({}, {'print_stack': print_stack})();
|