Use more explicite garbage placholder value.
This commit is contained in:
parent
13017ef95b
commit
6b6dd9cf68
|
@ -1,6 +1,8 @@
|
|||
import ll
|
||||
import parser
|
||||
|
||||
from enum import Enum
|
||||
|
||||
|
||||
def TODO(msg):
|
||||
print('TODO: not implemented yet at {}'
|
||||
|
@ -17,6 +19,7 @@ def warn(msg):
|
|||
.format(msg))
|
||||
|
||||
|
||||
class Garbage(Enum):
|
||||
GARBAGE = '<<Unitialized memory>>'
|
||||
|
||||
|
||||
|
@ -55,7 +58,8 @@ def step(insns, terminator, blocks, stack_frames, ssa_env, global_env, memory,
|
|||
|
||||
ptr = len(memory)
|
||||
for i in range(max(size, 1)):
|
||||
memory.append(GARBAGE)
|
||||
memory.append(Garbage.GARBAGE)
|
||||
|
||||
res = ptr
|
||||
elif isinstance(next_insn, ll.Load):
|
||||
TODO('Load')
|
||||
|
|
Loading…
Reference in New Issue
Block a user