Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(405)

Unified Diff: src/frames.cc

Issue 2428343005: [wasm] Improve naming consistency for WASM instances. (Closed)
Patch Set: Also rename FrameArray::WasmObject Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/frames.h ('k') | src/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames.cc
diff --git a/src/frames.cc b/src/frames.cc
index b92110bb7b1a8ed35b8bb721a9b91bf455dfeab9..e847a698a8e010db67143a4b352880be0e9a6b40 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -1492,7 +1492,7 @@ Address WasmFrame::GetCallerStackPointer() const {
return fp() + ExitFrameConstants::kCallerSPOffset;
}
-Object* WasmFrame::wasm_obj() const {
+Object* WasmFrame::wasm_instance() const {
Object* ret = wasm::GetOwningWasmInstance(LookupCode());
if (ret == nullptr) ret = *(isolate()->factory()->undefined_value());
return ret;
@@ -1505,19 +1505,20 @@ uint32_t WasmFrame::function_index() const {
}
Script* WasmFrame::script() const {
- Handle<JSObject> wasm(JSObject::cast(wasm_obj()), isolate());
- if (wasm::WasmIsAsmJs(*wasm, isolate())) {
- return *wasm::GetAsmWasmScript(wasm);
+ Handle<JSObject> instance(JSObject::cast(wasm_instance()), isolate());
+ if (wasm::WasmIsAsmJs(*instance, isolate())) {
+ return *wasm::GetAsmWasmScript(instance);
}
- Handle<wasm::WasmDebugInfo> debug_info = wasm::GetDebugInfo(wasm);
+ Handle<wasm::WasmDebugInfo> debug_info = wasm::GetDebugInfo(instance);
return wasm::WasmDebugInfo::GetFunctionScript(debug_info, function_index());
}
int WasmFrame::position() const {
int position = StandardFrame::position();
- if (wasm::WasmIsAsmJs(wasm_obj(), isolate())) {
- Handle<JSObject> wasm(JSObject::cast(wasm_obj()), isolate());
- position = wasm::GetAsmWasmSourcePosition(wasm, function_index(), position);
+ if (wasm::WasmIsAsmJs(wasm_instance(), isolate())) {
+ Handle<JSObject> instance(JSObject::cast(wasm_instance()), isolate());
+ position =
+ wasm::GetAsmWasmSourcePosition(instance, function_index(), position);
}
return position;
}
« no previous file with comments | « src/frames.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698