v8/test/mjsunit/regress/wasm/regression-727219.js
Clemens Hammacher 14fae58987 [asm] Fix reusing code with annotated export info
For lazy compilation, we encode information about table exports in the
deoptimization data. This information is rebuilt on each instantiation,
so we need to reset it when reusing code objects from another instance.

R=ahaas@chromium.org
BUG=chromium:727219

Change-Id: I90557ef06e692d0a8323223cac26679efcfa408b
Reviewed-on: https://chromium-review.googlesource.com/517945
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45559}
2017-05-29 12:33:57 +00:00

23 lines
394 B
JavaScript

// Copyright 2017 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.
// Flags: --expose-gc --validate-asm
function asm() {
"use asm";
function f(a) {
a = a | 0;
tab[a & 0]() | 0;
}
function unused() {
return 0;
}
var tab = [ unused ];
return f;
}
asm();
gc();
asm();