}
next :: (use c: ^Context) -> (i32, bool) {
- if v > r.high {
+ if v >= r.high {
return 0, false;
} else {
defer v += r.step;
println(x); // Doesn't work
}
+[ ] I don't know why this doesn't work... It is complaining that it couldn't match
+ either of these cases, but if I remove the first, it matches the second. This
+ is clearly wrong behavior, but I don't immediately see where the problem is.
+
+ CanCastTo :: interface (T: type_expr, D: type_expr) {
+ cast(typeof D) T;
+ }
+
+ cast_able :: #match {
+ (_: $T, $D: type_expr) -> bool where CanCastTo(T, D) do return true; ,
+ (_: any, d: type_expr) -> bool { return false; },
+ }
+
[X] Memory reservation type checking doesn't work how I think it should. This errors for example:
-
+
x: i64 = 1;
[X] Initialization statements on control statements should be better. For example, this should
"Resolve Symbols",
"Check Types",
"Code Gen",
- "Failed",
"Finalized",
+ "Failed",
};
const char* entity_type_strings[Entity_Type_Count] = {
}
void onyx_clear_errors() {
+ if (context.cycle_detected) return;
+
bh_arr_set_length(errors.errors, 0);
}
b32 changed = ent->state != before_state;
if (context.options->verbose_output == 3) {
- if (changed) printf("SUCCESS | %s", verbose_output_buffer);
- else printf("YIELD | %s", verbose_output_buffer);
+ if (changed) printf("SUCCESS to %20s | %s", entity_state_strings[ent->state], verbose_output_buffer);
+ else printf("YIELD to %20s | %s", entity_state_strings[ent->state], verbose_output_buffer);
}
return changed;
u8* leb;
if (instr->type == WI_NOP) return;
+ if (instr->type == WI_UNREACHABLE) assert(("EMITTING UNREACHABLE!!", 0));
if (instr->type & SIMD_INSTR_MASK) {
bh_buffer_write_byte(buff, 0xFD);
// Output locals
output_locals(func, &code_buff);
+ assert(func->code);
+
// Output code
bh_arr_each(WasmInstruction, instr, func->code) output_instruction(func, instr, &code_buff);