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

Enable patches specified in Primus lisp #141

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

philzook58
Copy link
Collaborator

@philzook58 philzook58 commented Jan 3, 2022

  • Enables patches to be provided in primus lisp. If the bap command is run bap vibes --config=config.json --primus-lisp-load=mypatches where you have mypatches.lisp available on the primus lisp path (the current directory works, you can add others with --primus-lisp-add). There is a field in the config.json file "lisp-code" which is disjoint with "patch-code". I should change that name,, since it must refer to the name of a function in the patch.lisp file and does not contain the lisp code itself.
  • Refactored the checking condition for assembly patches. It is much more straightforward now. The patch_code is store in Data and that is checked to decide which parts of the compiler to run instead of checking to see if assembly has been produced already or not.
  • Renamed bir to semantics in some spots where the variable is not bir.

Foreseen problems:

  • We probably need to create a derived target that contains that high level variables names that are imported from outside the patch.
  • We need to tuck away Call information into special slots. It is not clear how to do this. As a separate core_theory analysis?
  • It doesn't seem like naive preassignment is working anymore

One could make primus code go into the config file by using the code here https://gist.github.com/philzook58/c94835438daaffa5cfbb2882c2711265

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant