Index: src/wasm/wasm-module.cc |
diff --git a/src/wasm/wasm-module.cc b/src/wasm/wasm-module.cc |
index 81ae133b687a987c12554664494f82f98f07e22a..9c1b6928e1e5ed4946bf285a6ff4fbeb4a653793 100644 |
--- a/src/wasm/wasm-module.cc |
+++ b/src/wasm/wasm-module.cc |
@@ -1056,6 +1056,12 @@ WasmDebugInfo* GetDebugInfo(JSObject* wasm) { |
return *new_info; |
} |
+int GetNumberOfFunctions(JSObject* wasm) { |
+ Object* func_names_obj = wasm->GetInternalField(kWasmFunctionNamesArray); |
+ // TODO(clemensh): this looks inside an array constructed elsewhere. Refactor. |
+ return ByteArray::cast(func_names_obj)->get_int(0); |
+} |
+ |
} // namespace wasm |
} // namespace internal |
} // namespace v8 |