Yashas Samaga B L
Yashas Samaga B L
1. I am unsure about the license. I want to keep this as liberal as possible without violating any terms. 2. I planned on targetting closely related versions but I...
## grow literal queue exponentially (currently linear) In `chk_grow_litq`, the compiler does the following to resize the literal queue: `litmax +=sDEF_LITMAX;` This causes O(n^2) cells to be copied but this...
``` #define flgDEPRECATED 0x01 /* symbol is deprecated (avoid use) */ #define flagNAKED 0x10 /* function is naked */ #define flagPREDEF 0x20 /* symbol is pre-defined; successor of uPREDEF */...
## use `enum` instead of `#define` for assign token numbers ``` #define taMULT 256 /* *= */ #define taDIV 257 /* /= */ #define taMOD 258 /* %= */ #define...
## scope mechanism We could use a new concept of *scope number* instead of the file number. This would be useful for implementing the `#section` directive (and probably new features)....
There are many more unused items in the code. - `iREFFUNC` (appears to be a synonym for `iFUNCTN` but has a different value) - `tDBLCOLON`
## `pushstk` crash (copying to null pointer) ``` SC_FUNC void pushstk(stkitem val) { assert(stkidxstktop); newstack=(stkitem*)malloc(newsize*sizeof(stkitem)); if (newstack==NULL) error(102,"parser stack"); /* stack overflow (recursive include?) */ /* swap the stacks */...
## `plungequalifiedfile` problems 1. `path` & `real_path` memory leak in early return 2. copying to null pointer `path`/`real_path` would crash the compiler ``` SC_FUNC int plungequalifiedfile(char *name) { static char...
## `iREFFUNC` is unused The compiler only checks against `ident` being `iREFFUNC` but never assigns it.
@Dayvison can you please rebase with dev?