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

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

Issue 2629823003: [wasm] Implement frame inspection for interpreted frames (Closed)
Patch Set: Document that the forward declaration is only needed for VS 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
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 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 os << ":"; 846 os << ":";
847 os.write(name.name_.start(), name.name_.length()); 847 os.write(name.name_.start(), name.name_.length());
848 } 848 }
849 } else { 849 } else {
850 os << "?"; 850 os << "?";
851 } 851 }
852 return os; 852 return os;
853 } 853 }
854 854
855 WasmInstanceObject* wasm::GetOwningWasmInstance(Code* code) { 855 WasmInstanceObject* wasm::GetOwningWasmInstance(Code* code) {
856 DCHECK(code->kind() == Code::WASM_FUNCTION);
857 DisallowHeapAllocation no_gc; 856 DisallowHeapAllocation no_gc;
857 DCHECK(code->kind() == Code::WASM_FUNCTION ||
858 code->kind() == Code::WASM_INTERPRETER_ENTRY);
858 FixedArray* deopt_data = code->deoptimization_data(); 859 FixedArray* deopt_data = code->deoptimization_data();
859 DCHECK_NOT_NULL(deopt_data); 860 DCHECK_NOT_NULL(deopt_data);
860 DCHECK_EQ(2, deopt_data->length()); 861 DCHECK_EQ(code->kind() == Code::WASM_INTERPRETER_ENTRY ? 1 : 2,
862 deopt_data->length());
861 Object* weak_link = deopt_data->get(0); 863 Object* weak_link = deopt_data->get(0);
862 DCHECK(weak_link->IsWeakCell()); 864 DCHECK(weak_link->IsWeakCell());
863 WeakCell* cell = WeakCell::cast(weak_link); 865 WeakCell* cell = WeakCell::cast(weak_link);
864 if (!cell->value()) return nullptr; 866 if (cell->cleared()) return nullptr;
865 return WasmInstanceObject::cast(cell->value()); 867 return WasmInstanceObject::cast(cell->value());
866 } 868 }
867 869
868 int wasm::GetFunctionCodeOffset(Handle<WasmCompiledModule> compiled_module, 870 int wasm::GetFunctionCodeOffset(Handle<WasmCompiledModule> compiled_module,
869 int func_index) { 871 int func_index) {
870 return GetFunctionOffsetAndLength(compiled_module, func_index).first; 872 return GetFunctionOffsetAndLength(compiled_module, func_index).first;
871 } 873 }
872 874
873 WasmModule::WasmModule(Zone* owned) 875 WasmModule::WasmModule(Zone* owned)
874 : owned_zone(owned), pending_tasks(new base::Semaphore(0)) {} 876 : owned_zone(owned), pending_tasks(new base::Semaphore(0)) {}
(...skipping 1634 matching lines...) Expand 10 before | Expand all | Expand 10 after
2509 2511
2510 JSObject::AddProperty(entry, name_string, export_name.ToHandleChecked(), 2512 JSObject::AddProperty(entry, name_string, export_name.ToHandleChecked(),
2511 NONE); 2513 NONE);
2512 JSObject::AddProperty(entry, kind_string, export_kind, NONE); 2514 JSObject::AddProperty(entry, kind_string, export_kind, NONE);
2513 2515
2514 storage->set(index, *entry); 2516 storage->set(index, *entry);
2515 } 2517 }
2516 2518
2517 return array_object; 2519 return array_object;
2518 } 2520 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698