Refactored all of the desugaring code to no longer depend on memory being initialized to 0. Everything is about 12% faster now.
This commit is contained in:
parent
d71215d494
commit
ec404ca8fe
36 changed files with 411 additions and 417 deletions
|
|
@ -35,16 +35,10 @@ static HParseResult* parse_butnot(void *env, HParseState *state) {
|
|||
}
|
||||
}
|
||||
|
||||
static HCFChoice* desugar_butnot(HAllocator *mm__, void *env) {
|
||||
assert_message(0, "'h_butnot' is not context-free, can't be desugared");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static const HParserVtable butnot_vt = {
|
||||
.parse = parse_butnot,
|
||||
.isValidRegular = h_false,
|
||||
.isValidCF = h_false, // XXX should this be true if both p1 and p2 are CF?
|
||||
.desugar = desugar_butnot,
|
||||
.compile_to_rvm = h_not_regular,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue