Commit 12e3c96f authored by Ben L. Titzer's avatar Ben L. Titzer Committed by Commit Bot

[wasm] Remove WasmToWasm wrapper vestiges

R=mstarzinger@chromium.org

Bug: v8:7424
Change-Id: I5a854d334957c285eebe850024c25d1cdcf71f7f
Reviewed-on: https://chromium-review.googlesource.com/995772
Commit-Queue: Ben Titzer <titzer@chromium.org>
Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52450}
parent 62896e48
......@@ -1014,8 +1014,7 @@ void PipelineWasmCompilationJob::ValidateImmovableEmbeddedObjects() const {
target->IsSmi() || Heap::IsImmovable(HeapObject::cast(target));
bool is_wasm = target->IsCode() &&
(Code::cast(target)->kind() == Code::WASM_FUNCTION ||
Code::cast(target)->kind() == Code::WASM_TO_JS_FUNCTION ||
Code::cast(target)->kind() == Code::WASM_TO_WASM_FUNCTION);
Code::cast(target)->kind() == Code::WASM_TO_JS_FUNCTION);
bool is_allowed_stub = false;
if (target->IsCode()) {
Code* code = Code::cast(target);
......@@ -1784,7 +1783,6 @@ struct VerifyGraphPhase {
switch (data->info()->code_kind()) {
case Code::WASM_FUNCTION:
case Code::WASM_TO_JS_FUNCTION:
case Code::WASM_TO_WASM_FUNCTION:
case Code::JS_TO_WASM_FUNCTION:
case Code::WASM_INTERPRETER_ENTRY:
case Code::C_WASM_ENTRY:
......
......@@ -206,9 +206,6 @@ inline WasmToJsFrame::WasmToJsFrame(StackFrameIteratorBase* iterator)
inline JsToWasmFrame::JsToWasmFrame(StackFrameIteratorBase* iterator)
: StubFrame(iterator) {}
inline WasmToWasmFrame::WasmToWasmFrame(StackFrameIteratorBase* iterator)
: StubFrame(iterator) {}
inline CWasmEntryFrame::CWasmEntryFrame(StackFrameIteratorBase* iterator)
: StubFrame(iterator) {}
......
......@@ -460,7 +460,6 @@ StackFrame::Type StackFrame::ComputeType(const StackFrameIteratorBase* iterator,
if (StackFrame::IsTypeMarker(marker)) break;
return BUILTIN;
case wasm::WasmCode::kWasmToJsWrapper:
case wasm::WasmCode::kWasmToWasmWrapper:
return WASM_TO_JS;
default:
UNREACHABLE();
......@@ -864,7 +863,6 @@ void StandardFrame::IterateCompiledFrame(RootVisitor* v) const {
case CONSTRUCT:
case JS_TO_WASM:
case WASM_TO_JS:
case WASM_TO_WASM:
case WASM_COMPILED:
case WASM_INTERPRETER_ENTRY:
case C_WASM_ENTRY:
......
......@@ -93,7 +93,6 @@ class StackHandler BASE_EMBEDDED {
V(OPTIMIZED, OptimizedFrame) \
V(WASM_COMPILED, WasmCompiledFrame) \
V(WASM_TO_JS, WasmToJsFrame) \
V(WASM_TO_WASM, WasmToWasmFrame) \
V(JS_TO_WASM, JsToWasmFrame) \
V(WASM_INTERPRETER_ENTRY, WasmInterpreterEntryFrame) \
V(C_WASM_ENTRY, CWasmEntryFrame) \
......@@ -1067,17 +1066,6 @@ class JsToWasmFrame : public StubFrame {
friend class StackFrameIteratorBase;
};
class WasmToWasmFrame : public StubFrame {
public:
Type type() const override { return WASM_TO_WASM; }
protected:
inline explicit WasmToWasmFrame(StackFrameIteratorBase* iterator);
private:
friend class StackFrameIteratorBase;
};
class CWasmEntryFrame : public StubFrame {
public:
Type type() const override { return C_WASM_ENTRY; }
......
......@@ -1656,10 +1656,6 @@ void Logger::LogCodeObject(Object* object) {
description = "A JavaScript to Wasm adapter";
tag = CodeEventListener::STUB_TAG;
break;
case AbstractCode::WASM_TO_WASM_FUNCTION:
description = "A cross-instance Wasm adapter";
tag = CodeEventListener::STUB_TAG;
break;
case AbstractCode::WASM_TO_JS_FUNCTION:
description = "A Wasm to JavaScript adapter";
tag = CodeEventListener::STUB_TAG;
......
......@@ -34,7 +34,6 @@ class Code : public HeapObject {
V(REGEXP) \
V(WASM_FUNCTION) \
V(WASM_TO_JS_FUNCTION) \
V(WASM_TO_WASM_FUNCTION) \
V(JS_TO_WASM_FUNCTION) \
V(WASM_INTERPRETER_ENTRY) \
V(C_WASM_ENTRY)
......
......@@ -126,8 +126,6 @@ StackFrame::Type OptimizedCompilationInfo::GetOutputStackFrameType() const {
return StackFrame::WASM_COMPILED;
case Code::JS_TO_WASM_FUNCTION:
return StackFrame::JS_TO_WASM;
case Code::WASM_TO_WASM_FUNCTION:
return StackFrame::WASM_TO_WASM;
case Code::WASM_TO_JS_FUNCTION:
return StackFrame::WASM_TO_JS;
case Code::WASM_INTERPRETER_ENTRY:
......
......@@ -338,29 +338,6 @@ class InstanceBuilder {
void LoadTableSegments(Handle<WasmInstanceObject> instance);
};
// This is used in ProcessImports.
// When importing other modules' exports, we need to ask
// the exporter for a WasmToWasm wrapper. To do that, we need to
// switch that module to RW. To avoid flip-floping the same module
// RW <->RX, we create a scope for a set of NativeModules.
class SetOfNativeModuleModificationScopes final {
public:
void Add(NativeModule* module) {
if (native_modules_.insert(module).second) {
module->SetExecutable(false);
}
}
~SetOfNativeModuleModificationScopes() {
for (NativeModule* module : native_modules_) {
module->SetExecutable(true);
}
}
private:
std::unordered_set<NativeModule*> native_modules_;
};
} // namespace
MaybeHandle<WasmInstanceObject> InstantiateToInstanceObject(
......@@ -1852,7 +1829,6 @@ void InstanceBuilder::SanitizeImports() {
int InstanceBuilder::ProcessImports(Handle<WasmInstanceObject> instance) {
int num_imported_functions = 0;
int num_imported_tables = 0;
SetOfNativeModuleModificationScopes set_of_native_module_scopes;
DCHECK_EQ(module_->import_table.size(), sanitized_imports_.size());
for (int index = 0; index < static_cast<int>(module_->import_table.size());
......
......@@ -283,8 +283,6 @@ const char* GetWasmCodeKindAsString(WasmCode::Kind kind) {
switch (kind) {
case WasmCode::kFunction:
return "wasm function";
case WasmCode::kWasmToWasmWrapper:
return "wasm-to-wasm";
case WasmCode::kWasmToJsWrapper:
return "wasm-to-js";
case WasmCode::kLazyStub:
......
......@@ -83,7 +83,6 @@ class V8_EXPORT_PRIVATE WasmCode final {
public:
enum Kind {
kFunction,
kWasmToWasmWrapper,
kWasmToJsWrapper,
kLazyStub,
kInterpreterStub,
......
......@@ -346,7 +346,6 @@ FRAME_MARKERS = (
"OPTIMIZED",
"WASM_COMPILED",
"WASM_TO_JS",
"WASM_TO_WASM",
"JS_TO_WASM",
"WASM_INTERPRETER_ENTRY",
"C_WASM_ENTRY",
......
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