Index: src/wasm/wasm-module.cc |
diff --git a/src/wasm/wasm-module.cc b/src/wasm/wasm-module.cc |
index 7a276dfc94e0597c0b6922d2291d7ac00520c0a2..178e832a6a0f204990fabd93bebc0eb3ff91cb6b 100644 |
--- a/src/wasm/wasm-module.cc |
+++ b/src/wasm/wasm-module.cc |
@@ -2,6 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+#include <iostream> |
#include <memory> |
#include "src/base/atomic-utils.h" |
@@ -435,6 +436,21 @@ void LinkModuleFunctions(Isolate* isolate, |
for (size_t i = 0; i < functions.size(); ++i) { |
Handle<Code> code = functions[i]; |
LinkFunction(code, functions, Code::WASM_FUNCTION); |
+ |
+ // Add this object to the signal handler table. |
+ { |
+ auto* handler_data = new wasm::TrapHandlerData; |
+ |
+ handler_data->code = *code; |
+ |
+ std::cerr << "*** STORING HANDLER DATA " |
+ << reinterpret_cast<void*>(code->instruction_start()) << " ***" |
+ << std::endl; |
+ |
+ handler_data->next = wasm::gTrapHandlers; |
+ wasm::gTrapHandlers = handler_data; |
+ // TODO(eholk): make sure to clean all this up someday. |
+ } |
} |
} |
@@ -1153,6 +1169,7 @@ MaybeHandle<FixedArray> WasmModule::CompileFunctions( |
for (size_t i = FLAG_skip_compiling_wasm_funcs; |
i < temp_instance_for_compilation.function_code.size(); ++i) { |
Code* code = *temp_instance_for_compilation.function_code[i]; |
+ |
compiled_functions->set(static_cast<int>(i), code); |
} |