MCPcopy Create free account
hub / github.com/data61/MP-SPDZ / write_str

Method write_str

Compiler/program.py:1486–1497  ·  view source on GitHub ↗

Write the sequence of instructions to a file.

(self, filename)

Source from the content-addressed store, hash-verified

1484
1485 @unpurged
1486 def write_str(self, filename):
1487 """Write the sequence of instructions to a file."""
1488 print("Writing to", filename)
1489 f = open(filename, "w")
1490 n = 0
1491 for block in self.basicblocks:
1492 if block.instructions:
1493 f.write("# %s\n" % block.name)
1494 for line in block.instructions:
1495 f.write("%s # %d\n" % (line, n))
1496 n += 1
1497 f.close()
1498
1499 @unpurged
1500 def write_bytes(self, filename=None):

Callers 2

finalize_tapeMethod · 0.80
finalizeMethod · 0.80

Calls 3

printFunction · 0.85
closeMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected