Commit 3b86e176 authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[wasm] Remove {WasmModule::LookupName} for on-heap string.

R=herhut@chromium.org

Change-Id: I648c0247985c434df36586cbe702287516c54580
Reviewed-on: https://chromium-review.googlesource.com/1113337Reviewed-by: 's avatarStephan Herhut <herhut@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54000}
parent ed53aef0
......@@ -10,6 +10,7 @@
// Clients of this interface shouldn't depend on lots of compiler internals.
// Do not include anything from src/compiler here!
#include "src/optimized-compilation-info.h"
#include "src/runtime/runtime.h"
#include "src/trap-handler/trap-handler.h"
#include "src/wasm/function-body-decoder.h"
#include "src/wasm/function-compiler.h"
......
......@@ -21,10 +21,13 @@
namespace v8 {
namespace internal {
namespace wasm {
// Forward declarations.
struct ModuleEnv;
namespace compiler {
class CallDescriptor;
}
namespace wasm {
class LiftoffAssembler : public TurboAssembler {
public:
......
......@@ -31,6 +31,7 @@ class CompilationResultResolver;
class CompilationState;
class ErrorThrower;
class ModuleCompiler;
class NativeModule;
class WasmCode;
struct ModuleEnv;
struct WasmModule;
......
......@@ -48,14 +48,6 @@ WireBytesRef WasmModule::LookupName(const ModuleWireBytes& wire_bytes,
return it->second;
}
WireBytesRef WasmModule::LookupName(SeqOneByteString* wire_bytes,
uint32_t function_index) const {
DisallowHeapAllocation no_gc;
uint8_t* chars = wire_bytes->GetChars();
ModuleWireBytes module_wire_bytes(chars, chars + wire_bytes->length());
return LookupName(module_wire_bytes, function_index);
}
void WasmModule::AddNameForTesting(int function_index, WireBytesRef name) {
if (!names_) {
names_.reset(new std::unordered_map<uint32_t, WireBytesRef>());
......
......@@ -7,11 +7,8 @@
#include <memory>
#include "src/debug/debug-interface.h"
#include "src/globals.h"
#include "src/handles.h"
#include "src/objects/managed.h"
#include "src/parsing/preparse-data.h"
#include "src/wasm/decoder.h"
#include "src/wasm/signature-map.h"
#include "src/wasm/wasm-constants.h"
......@@ -20,22 +17,12 @@
namespace v8 {
namespace internal {
class WasmCompiledModule;
class WasmDebugInfo;
class WasmGlobalObject;
class WasmInstanceObject;
class WasmMemoryObject;
class WasmModuleObject;
class WasmTableObject;
namespace compiler {
class CallDescriptor;
}
namespace wasm {
class ErrorThrower;
class NativeModule;
class TestingModuleBuilder;
// Static representation of a wasm function.
struct WasmFunction {
......@@ -174,8 +161,6 @@ struct V8_EXPORT_PRIVATE WasmModule {
WireBytesRef LookupName(const ModuleWireBytes& wire_bytes,
uint32_t function_index) const;
WireBytesRef LookupName(SeqOneByteString* wire_bytes,
uint32_t function_index) const;
void AddNameForTesting(int function_index, WireBytesRef name);
};
......
......@@ -10,6 +10,7 @@
#include "src/contexts-inl.h"
#include "src/heap/heap-inl.h"
#include "src/objects/js-array-inl.h"
#include "src/objects/managed.h"
#include "src/v8memory.h"
#include "src/wasm/wasm-module.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment