diff options
Diffstat (limited to 'tnslc/compile')
| -rw-r--r-- | tnslc/compile/function.tnsl | 9 | ||||
| -rw-r--r-- | tnslc/compile/var.tnsl | 4 |
2 files changed, 4 insertions, 9 deletions
diff --git a/tnslc/compile/function.tnsl b/tnslc/compile/function.tnsl index 19f3566..0de6451 100644 --- a/tnslc/compile/function.tnsl +++ b/tnslc/compile/function.tnsl @@ -706,12 +706,13 @@ struct Function { _print_num("%d)\n\0", expected) _printf("ERROR: To return multiple values enclose them in {}\n\0") _printf("ERROR: To add more return values, add them (comma separated) between [] at the end of the function definition\n\0") + _printf("ERROR: OFFENDING FUNCTION:\n\0") + self._print(0) return false ;/ /; _compile_return_vals (~Scope s, ~parse.Node n) - _printf("Compiling return vals!\n\0") /; if (self.outputs.count == 0) return ;/ @@ -860,13 +861,10 @@ struct Function { # Generate result tmp if required out = f`.outputs.get(0) /; if (out`.loc < 0) - _printf("Making tmp!\n\0") result = s`.mk_tmp_stack(out) ;; else - _printf("Grabbing copy!\n\0") result = out`.copy() ;/ - result._print(0) ;; else ~Struct t = self._find_literal_type(s, "void\0") result._init(t) @@ -1475,7 +1473,6 @@ struct Function { s`.free_after(~lhs, true) ;/ - _printf("COMPILE_BOOL_OP\n\0") /; if (lhs.is_struct() == true) _printf("Can not use struct as boolean value\n\0") lhs.end() @@ -1527,7 +1524,6 @@ struct Function { # Compute right hand side Var rhs = self._compile_value(s, rhn) - _printf("COMPILE_BOOL_OP\n\0") /; if (rhs.is_struct() == true) _printf("Can not use struct as boolean value\n\0") lhs.end() @@ -1617,7 +1613,6 @@ struct Function { # Compute right hand side Var rhs = self._compile_value(s, rhn) - _printf("COMPILE_CMP_OP\n\0") # Check not structs /; if (lhs.is_struct() == true || rhs.is_struct() == true) _printf("Can not compare structs in this version of tnsl\n\0") diff --git a/tnslc/compile/var.tnsl b/tnslc/compile/var.tnsl index 4b023a7..4735021 100644 --- a/tnslc/compile/var.tnsl +++ b/tnslc/compile/var.tnsl @@ -372,6 +372,8 @@ struct Var { _printf("ERROR: Tried to find method \"\0") _printf(name) _printf("\" on a variable but we had a pointer in the chain\n\0") + _printf("ERROR: OFFENDING VARIABLE:\n\0") + self._print(0) return false ;/ ;/ @@ -944,7 +946,6 @@ struct Var { # Typechecking structs /; _tc_struct (~Var other) [bool] - _printf("TC_STRUCT\n\0") /; if (other`.is_struct() == false) return false ;/ @@ -1325,7 +1326,6 @@ struct Var { ~int32 p = vcpy.ptrc.get(idx) p` = set ;; else - _printf("TAKE_PTR\n\0") /; if (self.is_struct() == true) self._set_struct_r(buf, reg) ;; else |