Skip to content

Discard AST, TOKEN and ERRORS after compilation. #7

@CTRLRLTY

Description

@CTRLRLTY

Running jary_compile_* will allocate this struct

struct exec {
	const struct jy_tkns  *tkns;
	const struct jy_asts  *asts;
	const struct jy_jay   *jay;
	const struct tkn_errs *errs;
	char		      *path;
};

This struct only contain one useful field jay, while the rest is not used at all. Remove that struct and inline the jay field into the the struct jary.

struct jary {
\\ ...
	const char     *errmsg;
        // struct exec *code         <- replace this
	const struct jy_jay   *jay; // with this
	struct sqlite3 *db;
\\ ...

};

Check JARY/lib/jay/jary.c.

Make sure to update every reference to the code field with the new jay field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions