MCPcopy
hub / github.com/Nuitka/Nuitka / demoteSourceCodeToBytecode

Function demoteSourceCodeToBytecode

nuitka/optimizations/BytecodeDemotion.py:24–34  ·  view source on GitHub ↗
(module_name, source_code, filename)

Source from the content-addressed store, hash-verified

22
23
24def demoteSourceCodeToBytecode(module_name, source_code, filename):
25 if isStandaloneMode():
26 filename = module_name.asPath() + ".py"
27
28 bytecode = compileSourceToBytecode(source_code, filename)
29
30 bytecode = onFrozenModuleBytecode(
31 module_name=module_name, is_package=False, bytecode=bytecode
32 )
33
34 return marshal.dumps(bytecode)
35
36
37def demoteCompiledModuleToBytecode(module):

Callers 2

Calls 4

isStandaloneModeFunction · 0.90
compileSourceToBytecodeFunction · 0.90
onFrozenModuleBytecodeFunction · 0.90
asPathMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…