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
|
|
@ -5,13 +5,9 @@ static HParseResult* parse_nothing() {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static HCFChoice *desugar_nothing(HAllocator *mm__, void *env) {
|
||||
HCFChoice *ret = h_new(HCFChoice, 1);
|
||||
ret->type = HCF_CHOICE;
|
||||
ret->seq = h_new(HCFSequence*, 1);
|
||||
ret->seq[0] = NULL;
|
||||
ret->action = NULL;
|
||||
return ret;
|
||||
static void desugar_nothing(HAllocator *mm__, HCFStack *stk__, void *env) {
|
||||
HCFS_BEGIN_CHOICE() {
|
||||
} HCFS_END_CHOICE();
|
||||
}
|
||||
|
||||
static bool nothing_ctrvm(HRVMProg *prog, void* env) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue