[wasm] Remove some dead module decoder entry points.
R=clemensh@chromium.org BUG=v8:7754 Change-Id: Ia4c2fb2d87c8a5de96fa9f1f0621d21ae3eda611 Reviewed-on: https://chromium-review.googlesource.com/1145181 Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Commit-Queue: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#54591}
This commit is contained in:
parent
4b4125778a
commit
bced36d203
@ -1498,18 +1498,14 @@ WasmInitExpr DecodeWasmInitExprForTesting(const byte* start, const byte* end) {
|
||||
return decoder.DecodeInitExpr(start);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
FunctionResult DecodeWasmFunction(Zone* zone, const ModuleWireBytes& wire_bytes,
|
||||
const WasmModule* module,
|
||||
const byte* function_start,
|
||||
const byte* function_end,
|
||||
Counters* counters) {
|
||||
FunctionResult DecodeWasmFunctionForTesting(
|
||||
Zone* zone, const ModuleWireBytes& wire_bytes, const WasmModule* module,
|
||||
const byte* function_start, const byte* function_end, Counters* counters) {
|
||||
size_t size = function_end - function_start;
|
||||
if (function_start > function_end)
|
||||
return FunctionResult::Error("start > end");
|
||||
auto size_histogram =
|
||||
SELECT_WASM_COUNTER(counters, module->origin, wasm, function_size_bytes);
|
||||
auto size_histogram = SELECT_WASM_COUNTER(counters, module->origin, wasm,
|
||||
function_size_bytes);
|
||||
// TODO(bradnelson): Improve histogram handling of ptrdiff_t.
|
||||
size_histogram->AddSample(static_cast<int>(size));
|
||||
if (size > kV8MaxWasmFunctionSize)
|
||||
@ -1520,25 +1516,6 @@ FunctionResult DecodeWasmFunction(Zone* zone, const ModuleWireBytes& wire_bytes,
|
||||
base::make_unique<WasmFunction>());
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
FunctionResult SyncDecodeWasmFunction(Isolate* isolate, Zone* zone,
|
||||
const ModuleWireBytes& wire_bytes,
|
||||
const WasmModule* module,
|
||||
const byte* function_start,
|
||||
const byte* function_end) {
|
||||
return DecodeWasmFunction(zone, wire_bytes, module, function_start,
|
||||
function_end, isolate->counters());
|
||||
}
|
||||
|
||||
FunctionResult AsyncDecodeWasmFunction(
|
||||
Zone* zone, const ModuleWireBytes& wire_bytes, const WasmModule* module,
|
||||
const byte* function_start, const byte* function_end,
|
||||
std::shared_ptr<Counters> async_counters) {
|
||||
return DecodeWasmFunction(zone, wire_bytes, module, function_start,
|
||||
function_end, async_counters.get());
|
||||
}
|
||||
|
||||
AsmJsOffsetsResult DecodeAsmJsOffsets(const byte* tables_start,
|
||||
const byte* tables_end) {
|
||||
AsmJsOffsets table;
|
||||
|
@ -74,14 +74,9 @@ V8_EXPORT_PRIVATE FunctionSig* DecodeWasmSignatureForTesting(Zone* zone,
|
||||
|
||||
// Decodes the bytes of a wasm function between
|
||||
// {function_start} and {function_end}.
|
||||
V8_EXPORT_PRIVATE FunctionResult SyncDecodeWasmFunction(
|
||||
Isolate* isolate, Zone* zone, const ModuleWireBytes& wire_bytes,
|
||||
const WasmModule* module, const byte* function_start,
|
||||
const byte* function_end);
|
||||
|
||||
V8_EXPORT_PRIVATE FunctionResult AsyncDecodeWasmFunction(
|
||||
Zone* zone, ModuleEnv* env, const byte* function_start,
|
||||
const byte* function_end, const std::shared_ptr<Counters> async_counters);
|
||||
V8_EXPORT_PRIVATE FunctionResult DecodeWasmFunctionForTesting(
|
||||
Zone* zone, const ModuleWireBytes& wire_bytes, const WasmModule* module,
|
||||
const byte* function_start, const byte* function_end, Counters* counters);
|
||||
|
||||
V8_EXPORT_PRIVATE WasmInitExpr DecodeWasmInitExprForTesting(const byte* start,
|
||||
const byte* end);
|
||||
|
@ -1453,8 +1453,8 @@ TEST_F(WasmFunctionVerifyTest, Ok_v_v_empty) {
|
||||
kExprEnd // body
|
||||
};
|
||||
|
||||
FunctionResult result = SyncDecodeWasmFunction(
|
||||
isolate(), zone(), bytes, &module, data, data + sizeof(data));
|
||||
FunctionResult result = DecodeWasmFunctionForTesting(
|
||||
zone(), bytes, &module, data, data + sizeof(data), isolate()->counters());
|
||||
EXPECT_OK(result);
|
||||
|
||||
if (result.val && result.ok()) {
|
||||
|
Loading…
Reference in New Issue
Block a user