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

Method get_functions

tools/webassembly.py:463–475  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

461
462 @memoize
463 def get_functions(self):
464 code_section = self.get_section(SecType.CODE)
465 if not code_section:
466 return []
467 functions = []
468 self.seek(code_section.offset)
469 num_functions = self.read_uleb()
470 for _ in range(num_functions):
471 body_size = self.read_uleb()
472 start = self.tell()
473 functions.append(FunctionBody(start, body_size))
474 self.seek(start + body_size)
475 return functions
476
477 @memoize
478 def get_memories(self):

Callers 4

get_function_namesMethod · 0.95
get_functionMethod · 0.95

Calls 6

get_sectionMethod · 0.95
seekMethod · 0.95
read_ulebMethod · 0.95
tellMethod · 0.95
appendMethod · 0.80
rangeFunction · 0.50

Tested by

no test coverage detected