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

Unified Diff: src/objects.cc

Issue 2493823003: [wasm] Allocate a single script per wasm module (Closed)
Patch Set: Fix signed/unsigned issues Created 4 years, 1 month 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/objects.h ('k') | src/objects-inl.h » ('j') | src/wasm/wasm-module.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index 89c40c1022b9046b3e31692270cdb01d414cd7fd..c11facb603f6014a2aaa2c2284ea71fe51e160d7 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -13421,6 +13421,16 @@ void Script::InitLineEnds(Handle<Script> script) {
#define SMI_VALUE(x) (Smi::cast(x)->value())
bool Script::GetPositionInfo(int position, PositionInfo* info,
OffsetFlag offset_flag) {
+ // For wasm, we do not create an artificial line_ends array, but do the
+ // translation directly.
+ if (type() == Script::TYPE_WASM) {
Yang 2016/11/15 07:42:25 InitLineEnds is called from a number of places, wh
Clemens Hammacher 2016/11/15 15:04:06 I would like to keep wasm's function offset table
+ Handle<wasm::WasmCompiledModule> compiled_module(
+ wasm::WasmCompiledModule::cast(wasm_compiled_module()));
+ DCHECK_LE(0, position);
+ return wasm::GetPositionInfo(compiled_module,
+ static_cast<uint32_t>(position), info);
+ }
+
Handle<Script> script(this);
InitLineEnds(script);
« no previous file with comments | « src/objects.h ('k') | src/objects-inl.h » ('j') | src/wasm/wasm-module.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698