Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add primitive type to struct when installing #50

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

beardhatcode
Copy link
Contributor

The types of the primitives seem not to be stored by the install macro. This PR fixes that.

@tolauwae
Copy link
Member

Strangely, the Types are all still zero initialized when resolving the primitives. Same situation in the install_primitive macro.

bool resolve_primitive(char *symbol, Primitive *val) {
debug("Resolve primitives (%d) for %s \n", ALL_PRIMITIVES, symbol);
for (auto &primitive : primitives) {
// printf("Checking %s = %s \n", symbol, primitive.name);
if (!strcmp(symbol, primitive.name)) {
debug("FOUND PRIMITIVE\n");
*val = primitive.f;
return true;
}
}
FATAL("Could not find primitive %s \n", symbol);
return false;
}

@tolauwae tolauwae changed the base branch from master to main October 19, 2022 09:04
@tolauwae tolauwae force-pushed the main branch 2 times, most recently from 29000c0 to adee735 Compare July 4, 2023 11:40
@tolauwae tolauwae added the on hold Awaiting analysis on how to proceed label Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on hold Awaiting analysis on how to proceed
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

None yet

2 participants