MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / append_source_mapping

Function append_source_mapping

tools/wasm-sourcemap.py:162–166  ·  view source on GitHub ↗
(wasm, url)

Source from the content-addressed store, hash-verified

160
161
162def append_source_mapping(wasm, url):
163 logger.debug('Append sourceMappingURL section')
164 section_name = "sourceMappingURL"
165 section_content = encode_uint_var(len(section_name)) + section_name.encode() + encode_uint_var(len(url)) + url.encode()
166 return wasm + encode_uint_var(0) + encode_uint_var(len(section_content)) + section_content
167
168
169def get_code_section_offset(wasm):

Callers 1

mainFunction · 0.85

Calls 2

encode_uint_varFunction · 0.85
encodeMethod · 0.80

Tested by

no test coverage detected