Skip to content

If I got this right, can I import MIR binary files as modules and use them as libraries (.so)? #274

Answered by vnmakarov
rempas asked this question in Q&A
Discussion options

You must be logged in to vote
  • A Mir program consists of modules and these modules are added to the programs context (right?).

Yes, modules are the highest level entities of in the context.

I don't know if it's written somewhere (and I just missed it because I didn't gave much focus yet) but I guess that a binary file that the MIR_read (MIR_context_t ctx, FILE *f) function reads, is treated as a module and it is added to the context that is passed in the parameter "ctx". And when we use the MIR Generator, it just generates the context so everything is included.

File can contains more than one module. All modules from the file are added to the context by MIR_read.

Before generation of machine code for functions in…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@rempas
Comment options

Answer selected by rempas
Comment options

You must be logged in to vote
1 reply
@rempas
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants