Add ERRORK opcode to trigger constant errors

This commit is contained in:
Emanuele Torre authored and Nico Williams committed 2023-08-04 11:47:34 -05:00
1 parent 71941a0d47
commit 5fc5453409
4 files changed
+16

No files matched your search

+7
View File
@@ -144,6 +144,13 @@ block gen_op_simple(opcode op) {
}
block gen_error(jv constant) {
assert(opcode_describe(ERRORK)->flags & OP_HAS_CONSTANT);
inst *i = inst_new(ERRORK);
i->imm.constant = constant;
return inst_block(i);
}
block gen_const(jv constant) {
assert(opcode_describe(LOADK)->flags & OP_HAS_CONSTANT);
inst* i = inst_new(LOADK);