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, ...@@ -460,7 +460,7 @@ StackFrame::Type StackFrame::ComputeType(const StackFrameIteratorBase* iterator,
iterator->isolate()->wasm_engine()->code_manager()->LookupCode(pc); iterator->isolate()->wasm_engine()->code_manager()->LookupCode(pc);
if (wasm_code != nullptr) { if (wasm_code != nullptr) {
switch (wasm_code->kind()) { switch (wasm_code->kind()) {
case wasm::WasmCode::kInterpreterStub: case wasm::WasmCode::kInterpreterEntry:
return WASM_INTERPRETER_ENTRY; return WASM_INTERPRETER_ENTRY;
case wasm::WasmCode::kFunction: case wasm::WasmCode::kFunction:
return WASM_COMPILED; return WASM_COMPILED;
......
...@@ -61,7 +61,7 @@ static const char* ComputeMarker(const wasm::WasmCode* code) { ...@@ -61,7 +61,7 @@ static const char* ComputeMarker(const wasm::WasmCode* code) {
switch (code->kind()) { switch (code->kind()) {
case wasm::WasmCode::kFunction: case wasm::WasmCode::kFunction:
return code->is_liftoff() ? "" : "*"; return code->is_liftoff() ? "" : "*";
case wasm::WasmCode::kInterpreterStub: case wasm::WasmCode::kInterpreterEntry:
return "~"; return "~";
default: default:
return ""; return "";
......
...@@ -304,8 +304,8 @@ const char* GetWasmCodeKindAsString(WasmCode::Kind kind) { ...@@ -304,8 +304,8 @@ const char* GetWasmCodeKindAsString(WasmCode::Kind kind) {
return "wasm-to-js"; return "wasm-to-js";
case WasmCode::kLazyStub: case WasmCode::kLazyStub:
return "lazy-compile"; return "lazy-compile";
case WasmCode::kInterpreterStub: case WasmCode::kInterpreterEntry:
return "interpreter-entry"; return "interpreter entry";
case WasmCode::kTrampoline: case WasmCode::kTrampoline:
return "trampoline"; return "trampoline";
} }
...@@ -415,9 +415,8 @@ WasmCode* NativeModule::AddCodeCopy(Handle<Code> code, WasmCode::Kind kind, ...@@ -415,9 +415,8 @@ WasmCode* NativeModule::AddCodeCopy(Handle<Code> code, WasmCode::Kind kind,
return ret; return ret;
} }
WasmCode* NativeModule::AddInterpreterWrapper(Handle<Code> code, WasmCode* NativeModule::AddInterpreterEntry(Handle<Code> code, uint32_t index) {
uint32_t index) { WasmCode* ret = AddAnonymousCode(code, WasmCode::kInterpreterEntry);
WasmCode* ret = AddAnonymousCode(code, WasmCode::kInterpreterStub);
ret->index_ = Just(index); ret->index_ = Just(index);
return ret; return ret;
} }
......
...@@ -85,7 +85,7 @@ class V8_EXPORT_PRIVATE WasmCode final { ...@@ -85,7 +85,7 @@ class V8_EXPORT_PRIVATE WasmCode final {
kFunction, kFunction,
kWasmToJsWrapper, kWasmToJsWrapper,
kLazyStub, kLazyStub,
kInterpreterStub, kInterpreterEntry,
kTrampoline kTrampoline
}; };
...@@ -230,11 +230,11 @@ class V8_EXPORT_PRIVATE NativeModule final { ...@@ -230,11 +230,11 @@ class V8_EXPORT_PRIVATE NativeModule final {
// certain wrappers using a different pipeline. // certain wrappers using a different pipeline.
WasmCode* AddCodeCopy(Handle<Code> code, WasmCode::Kind kind, uint32_t index); 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 // 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 // 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 // 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 // When starting lazy compilation, provide the WasmLazyCompile builtin by
// calling SetLazyBuiltin. It will initialize the code table with it. Copies // calling SetLazyBuiltin. It will initialize the code table with it. Copies
......
...@@ -678,7 +678,7 @@ void WasmDebugInfo::RedirectToInterpreter(Handle<WasmDebugInfo> debug_info, ...@@ -678,7 +678,7 @@ void WasmDebugInfo::RedirectToInterpreter(Handle<WasmDebugInfo> debug_info,
Handle<Code> new_code = compiler::CompileWasmInterpreterEntry( Handle<Code> new_code = compiler::CompileWasmInterpreterEntry(
isolate, func_index, module->functions[func_index].sig); isolate, func_index, module->functions[func_index].sig);
const wasm::WasmCode* wasm_new_code = 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 = const wasm::WasmCode* old_code =
native_module->code(static_cast<uint32_t>(func_index)); native_module->code(static_cast<uint32_t>(func_index));
Handle<Foreign> foreign_holder = isolate->factory()->NewForeign( Handle<Foreign> foreign_holder = isolate->factory()->NewForeign(
......
...@@ -2455,7 +2455,7 @@ class ThreadImpl { ...@@ -2455,7 +2455,7 @@ class ThreadImpl {
} }
// Call to external function. // Call to external function.
if (code->kind() == wasm::WasmCode::kInterpreterStub || if (code->kind() == wasm::WasmCode::kInterpreterEntry ||
code->kind() == wasm::WasmCode::kWasmToJsWrapper) { code->kind() == wasm::WasmCode::kWasmToJsWrapper) {
return CallExternalWasmFunction(isolate, instance, code, signature); 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