Pop types off for Binary Operator typechecking
This commit is contained in:
parent
de31585bcc
commit
6222aabc8b
|
@ -93,7 +93,7 @@ public final class TypeChecker
|
||||||
doTypeCheck(actionList);
|
doTypeCheck(actionList);
|
||||||
|
|
||||||
|
|
||||||
|
printTypeQueue();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -308,6 +308,9 @@ public final class TypeChecker
|
||||||
/**
|
/**
|
||||||
* Typechecking (TODO)
|
* Typechecking (TODO)
|
||||||
*/
|
*/
|
||||||
|
Type vRhsType = popType();
|
||||||
|
Type vLhsType = popType();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Codegen
|
* Codegen
|
||||||
|
@ -326,8 +329,7 @@ public final class TypeChecker
|
||||||
/* Function calls */
|
/* Function calls */
|
||||||
else if(cast(FunctionCall)statement)
|
else if(cast(FunctionCall)statement)
|
||||||
{
|
{
|
||||||
/* TODO: Implement me */
|
// gprintln("FuncCall hehe (REMOVE AFTER DONE)");
|
||||||
gprintln("FuncCall hehe (REMOVE AFTER DONE)");
|
|
||||||
// printTypeQueue();
|
// printTypeQueue();
|
||||||
|
|
||||||
FunctionCall funcCall = cast(FunctionCall)statement;
|
FunctionCall funcCall = cast(FunctionCall)statement;
|
||||||
|
@ -422,8 +424,6 @@ public final class TypeChecker
|
||||||
*/
|
*/
|
||||||
addInstr(funcCallInstr);
|
addInstr(funcCallInstr);
|
||||||
addType(getType(func.parentOf(), func.getType()));
|
addType(getType(func.parentOf(), func.getType()));
|
||||||
gprintln("Genaai");
|
|
||||||
gprintln(getType(func.parentOf(), func.getType()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* VariableAssigbmentDNode */
|
/* VariableAssigbmentDNode */
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
module simple;
|
module simple;
|
||||||
|
|
||||||
discard "return 1;";
|
|
||||||
|
|
||||||
|
|
||||||
int j = 1+func(2,test());
|
int j = 1+func(2,test());
|
||||||
|
|
||||||
int func(int x1, byte x2)
|
int func(int x1, byte x2)
|
||||||
|
|
Loading…
Reference in New Issue