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

Function read_var_uint

tools/wasm-sourcemap.py:119–129  ·  view source on GitHub ↗
(wasm, pos)

Source from the content-addressed store, hash-verified

117
118
119def read_var_uint(wasm, pos):
120 n = 0
121 shift = 0
122 b = ord(wasm[pos:pos + 1])
123 pos += 1
124 while b >= 128:
125 n |= ((b - 128) << shift)
126 b = ord(wasm[pos:pos + 1])
127 pos += 1
128 shift += 7
129 return n + (b << shift), pos
130
131
132def strip_debug_sections(wasm):

Callers 2

strip_debug_sectionsFunction · 0.85
get_code_section_offsetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected