IR jmp and scopes
This commit is contained in:
1 parent
6080901842
commit
005309d1eb
5 files changed
+33
-7
No files matched your search
@@ -15,7 +15,7 @@ Value eval_arith(IRInstr instr, const Value *lhs, const Value *rhs) {
|
||||
case IRSub: res = lhs->Int - rhs->Int; break;
|
||||
case IRMul: res = lhs->Int * rhs->Int; break;
|
||||
case IRDiv: res = lhs->Int / rhs->Int; break;
|
||||
default: break;
|
||||
default: ASSERT_UNREACHED();
|
||||
}
|
||||
return (Value){
|
||||
.type.kind = TypeInt,
|
||||
@@ -28,7 +28,7 @@ Value eval_arith(IRInstr instr, const Value *lhs, const Value *rhs) {
|
||||
case IRSub: res = lhs->Float - rhs->Float; break;
|
||||
case IRMul: res = lhs->Float * rhs->Float; break;
|
||||
case IRDiv: res = lhs->Float / rhs->Float; break;
|
||||
default: break;
|
||||
default: ASSERT_UNREACHED();
|
||||
}
|
||||
return (Value){
|
||||
.type.kind = TypeFloat,
|
||||
|
||||
Reference in new issue
Block a user