| 88 | self.name = words[19] |
| 89 | |
| 90 | def AddLiftoffLine(self, words): |
| 91 | assert self.index == words[2], "wrong function" |
| 92 | assert not self.has_lo, "duplicate Liftoff line for %s" % self.index |
| 93 | self.has_lo = True |
| 94 | # 0 1 2 3 4 5 6 7 8 9 10 11 12 |
| 95 | # Compiled function #6 using Liftoff, took 0 ms and 968 bytes; bodysize 4 |
| 96 | # 13 14 |
| 97 | # codesize 68 |
| 98 | time_factor = 1 |
| 99 | if words[7] == "ms": |
| 100 | time_factor = 1000 |
| 101 | elif words[7] == "μs": |
| 102 | pass # Default. |
| 103 | else: |
| 104 | assert False, "Time must be in 'ms' or 'μs'." |
| 105 | self.time_lo = int(words[6]) * time_factor |
| 106 | self.mem_lo = int(words[9]) |
| 107 | self.size_lo = int(words[14]) |
| 108 | self.size_wasm = int(words[12]) |
| 109 | |
| 110 | def __str__(self): |
| 111 | return "%s: time %d %d mem %s %s %s size %s %s %s name %s" % ( |