Skip to content
Snippets Groups Projects
Commit 0d1b5744 authored by pycsham's avatar pycsham
Browse files

fixing an issue with iffalse (jz not working properly, changed to je)

parent 2be30942
No related branches found
No related tags found
2 merge requests!30New new string,!20Master
...@@ -102,7 +102,8 @@ def iffalse(cond, label): ...@@ -102,7 +102,8 @@ def iffalse(cond, label):
if cond.__class__.__name__ == "NameNode": if cond.__class__.__name__ == "NameNode":
cond.codeGen() cond.codeGen()
result += cond.code result += cond.code
result += p("jz", label) result += p(instruction="cmp", arg1="eax", arg2=0, comment="comparing eax with 0")
result += p(instruction="je", arg1=label)
return result return result
val = cond.getConstant() val = cond.getConstant()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment