Make "not" a builtin function rather than syntax.

Fixes a really awkward grammar issue.
This commit is contained in:
Stephen Dolan committed 2012-09-17 21:08:43 +01:00
1 parent 297a0679d1
commit 830610cef8
6 files changed
+10 -14

No files matched your search

+1 -6
View File
@@ -361,7 +361,7 @@ block gen_definedor(block a, block b) {
return c;
}
static block gen_condbranch(block iftrue, block iffalse) {
block gen_condbranch(block iftrue, block iffalse) {
block b = gen_noop();
block_append(&iftrue, gen_op_target(JUMP, iffalse));
block_append(&b, gen_op_target(JUMP_F, iftrue));
@@ -398,11 +398,6 @@ block gen_or(block a, block b) {
return code;
}
block gen_not(block a) {
return block_join(a, gen_condbranch(gen_op_const(LOADK, jv_false()),
gen_op_const(LOADK, jv_true())));
}
block gen_cond(block cond, block iftrue, block iffalse) {
block b = gen_op_simple(DUP);
block_append(&b, cond);