Commit 7696972e authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[wasm][cleanup] Name interpreter entry consistently

The interpreter entry was sometimes referred to as "interpreter stub"
or "interpreter wrapper". Use the term "interpreter entry" consistently.

R=titzer@chromium.org

Bug: v8:7754
Change-Id: Ia06449c91300fca454c6afd5c82a789749d6b7d0
Reviewed-on: https://chromium-review.googlesource.com/1058794Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53184}
parent 6a0ff91c
......@@ -460,7 +460,7 @@ StackFrame::Type StackFrame::ComputeType(const StackFrameIteratorBase* iterator,
iterator->isolate()->wasm_engine()->code_manager()->LookupCode(pc);
if (wasm_code != nullptr) {
switch (wasm_code->kind()) {
case wasm::WasmCode::kInterpreterStub:
case wasm::WasmCode::kInterpreterEntry:
return WASM_INTERPRETER_ENTRY;
case wasm::WasmCode::kFunction:
return WASM_COMPILED;
......
......@@ -61,7 +61,7 @@ static const char* ComputeMarker(const wasm::WasmCode* code) {
switch (code->kind()) {
case wasm::WasmCode::kFunction:
return code->is_liftoff() ? "" : "*";
case wasm::WasmCode::kInterpreterStub:
case wasm::WasmCode::kInterpreterEntry:
return "~";
default:
return "";
......
......@@ -304,8 +304,8 @@ const char* GetWasmCodeKindAsString(WasmCode::Kind kind) {
return "wasm-to-js";
case WasmCode::kLazyStub:
return "lazy-compile";
case WasmCode::kInterpreterStub:
return "interpreter-entry";
case WasmCode::kInterpreterEntry:
return "interpreter entry";
case WasmCode::kTrampoline:
return "trampoline";
}
......@@ -415,9 +415,8 @@ WasmCode* NativeModule::AddCodeCopy(Handle<Code> code, WasmCode::Kind kind,
return ret;
}
WasmCode* NativeModule::AddInterpreterWrapper(Handle<Code> code,
uint32_t index) {
WasmCode* ret = AddAnonymousCode(code, WasmCode::kInterpreterStub);
WasmCode* NativeModule::AddInterpreterEntry(Handle<Code> code, uint32_t index) {
WasmCode* ret = AddAnonymousCode(code, WasmCode::kInterpreterEntry);
ret->index_ = Just(index);
return ret;
}
......
......@@ -85,7 +85,7 @@ class V8_EXPORT_PRIVATE WasmCode final {
kFunction,
kWasmToJsWrapper,
kLazyStub,
kInterpreterStub,
kInterpreterEntry,
kTrampoline
};
......@@ -230,11 +230,11 @@ class V8_EXPORT_PRIVATE NativeModule final {
// certain wrappers using a different pipeline.
WasmCode* AddCodeCopy(Handle<Code> code, WasmCode::Kind kind, uint32_t index);
// Add an interpreter wrapper. For the same reason as AddCodeCopy, we
// Add an interpreter entry. For the same reason as AddCodeCopy, we
// currently compile these using a different pipeline and we can't get a
// CodeDesc here. When adding interpreter wrappers, we do not insert them in
// the code_table, however, we let them self-identify as the {index} function
WasmCode* AddInterpreterWrapper(Handle<Code> code, uint32_t index);
WasmCode* AddInterpreterEntry(Handle<Code> code, uint32_t index);
// When starting lazy compilation, provide the WasmLazyCompile builtin by
// calling SetLazyBuiltin. It will initialize the code table with it. Copies
......
......@@ -678,7 +678,7 @@ void WasmDebugInfo::RedirectToInterpreter(Handle<WasmDebugInfo> debug_info,
Handle<Code> new_code = compiler::CompileWasmInterpreterEntry(
isolate, func_index, module->functions[func_index].sig);
const wasm::WasmCode* wasm_new_code =
native_module->AddInterpreterWrapper(new_code, func_index);
native_module->AddInterpreterEntry(new_code, func_index);
const wasm::WasmCode* old_code =
native_module->code(static_cast<uint32_t>(func_index));
Handle<Foreign> foreign_holder = isolate->factory()->NewForeign(
......
......@@ -2455,7 +2455,7 @@ class ThreadImpl {
}
// Call to external function.
if (code->kind() == wasm::WasmCode::kInterpreterStub ||
if (code->kind() == wasm::WasmCode::kInterpreterEntry ||
code->kind() == wasm::WasmCode::kWasmToJsWrapper) {
return CallExternalWasmFunction(isolate, instance, code, signature);
}
......
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