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

Side by Side Diff: src/wasm/wasm-module.cc

Issue 2629823003: [wasm] Implement frame inspection for interpreted frames (Closed)
Patch Set: Rebase after Yangs revert ಠ益ಠ Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « src/wasm/wasm-interpreter.cc ('k') | src/wasm/wasm-objects.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <memory> 5 #include <memory>
6 6
7 #include "src/assembler-inl.h" 7 #include "src/assembler-inl.h"
8 #include "src/base/adapters.h" 8 #include "src/base/adapters.h"
9 #include "src/base/atomic-utils.h" 9 #include "src/base/atomic-utils.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after
856 os << ":"; 856 os << ":";
857 os.write(name.name_.start(), name.name_.length()); 857 os.write(name.name_.start(), name.name_.length());
858 } 858 }
859 } else { 859 } else {
860 os << "?"; 860 os << "?";
861 } 861 }
862 return os; 862 return os;
863 } 863 }
864 864
865 WasmInstanceObject* wasm::GetOwningWasmInstance(Code* code) { 865 WasmInstanceObject* wasm::GetOwningWasmInstance(Code* code) {
866 DCHECK(code->kind() == Code::WASM_FUNCTION);
867 DisallowHeapAllocation no_gc; 866 DisallowHeapAllocation no_gc;
867 DCHECK(code->kind() == Code::WASM_FUNCTION ||
868 code->kind() == Code::WASM_INTERPRETER_ENTRY);
868 FixedArray* deopt_data = code->deoptimization_data(); 869 FixedArray* deopt_data = code->deoptimization_data();
869 DCHECK_NOT_NULL(deopt_data); 870 DCHECK_NOT_NULL(deopt_data);
870 DCHECK_EQ(2, deopt_data->length()); 871 DCHECK_EQ(code->kind() == Code::WASM_INTERPRETER_ENTRY ? 1 : 2,
872 deopt_data->length());
871 Object* weak_link = deopt_data->get(0); 873 Object* weak_link = deopt_data->get(0);
872 DCHECK(weak_link->IsWeakCell()); 874 DCHECK(weak_link->IsWeakCell());
873 WeakCell* cell = WeakCell::cast(weak_link); 875 WeakCell* cell = WeakCell::cast(weak_link);
874 if (!cell->value()) return nullptr; 876 if (cell->cleared()) return nullptr;
875 return WasmInstanceObject::cast(cell->value()); 877 return WasmInstanceObject::cast(cell->value());
876 } 878 }
877 879
878 int wasm::GetFunctionCodeOffset(Handle<WasmCompiledModule> compiled_module, 880 int wasm::GetFunctionCodeOffset(Handle<WasmCompiledModule> compiled_module,
879 int func_index) { 881 int func_index) {
880 return GetFunctionOffsetAndLength(compiled_module, func_index).first; 882 return GetFunctionOffsetAndLength(compiled_module, func_index).first;
881 } 883 }
882 884
883 WasmModule::WasmModule(Zone* owned) 885 WasmModule::WasmModule(Zone* owned)
884 : owned_zone(owned), pending_tasks(new base::Semaphore(0)) {} 886 : owned_zone(owned), pending_tasks(new base::Semaphore(0)) {}
(...skipping 1754 matching lines...) Expand 10 before | Expand all | Expand 10 after
2639 2641
2640 JSObject::AddProperty(entry, name_string, export_name.ToHandleChecked(), 2642 JSObject::AddProperty(entry, name_string, export_name.ToHandleChecked(),
2641 NONE); 2643 NONE);
2642 JSObject::AddProperty(entry, kind_string, export_kind, NONE); 2644 JSObject::AddProperty(entry, kind_string, export_kind, NONE);
2643 2645
2644 storage->set(index, *entry); 2646 storage->set(index, *entry);
2645 } 2647 }
2646 2648
2647 return array_object; 2649 return array_object;
2648 } 2650 }
OLDNEW
« no previous file with comments | « src/wasm/wasm-interpreter.cc ('k') | src/wasm/wasm-objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698