-
Notifications
You must be signed in to change notification settings - Fork 145
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
Bytecode to bir #1472
Bytecode to bir #1472
Commits on Jul 31, 2023
-
bytecode compiler: compile 0-receiving calls as such
rather than as calls that futz with MV. This can be used as a correctness condition, and it makes compiling to IR easier.
Configuration menu - View commit details
-
Copy full SHA for 4d097a5 - Browse repository at this point
Copy the full SHA 4d097a5View commit details -
Don't try to print unbound structure slots
The unbound objects still cause all kinds of bad problems like segffaults that we absolutely do not want to be user-exposed.
Configuration menu - View commit details
-
Copy full SHA for e0b162d - Browse repository at this point
Copy the full SHA e0b162dView commit details -
Change VM MV call semantics to skip a copy
This uniformly puts arguments on the VM stack before a call, VM or not, and saves a copy for multi-argument-form mv calls (the copy into the mv vector by pop-values). But my actual impetus is this structure makes the compilation to BIR easier, as all mv-calls are preceded by push/append-values, like how BIR requires a value-collect for any mv call. I had to increase the VM stack size to keep the build working, though. Bit worrying. The failure was when compiling the package definition for closer-mop, of all things.
Configuration menu - View commit details
-
Copy full SHA for fad16ca - Browse repository at this point
Copy the full SHA fad16caView commit details -
Configuration menu - View commit details
-
Copy full SHA for 621fa41 - Browse repository at this point
Copy the full SHA 621fa41View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5137396 - Browse repository at this point
Copy the full SHA 5137396View commit details -
Refactor clasp-cleavir translate
This localizes the LLVM stuff in an entry point that accepts BIR, so if we produce BIR by some other means (e.g. from bytecode) we can reuse said stuff.
Configuration menu - View commit details
-
Copy full SHA for 11b2ee1 - Browse repository at this point
Copy the full SHA 11b2ee1View commit details -
Configuration menu - View commit details
-
Copy full SHA for e7a791d - Browse repository at this point
Copy the full SHA e7a791dView commit details -
Configuration menu - View commit details
-
Copy full SHA for f5eeb50 - Browse repository at this point
Copy the full SHA f5eeb50View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1b88df4 - Browse repository at this point
Copy the full SHA 1b88df4View commit details -
Integrate bytecode-to-bir into clasp
Still needs work, but it's functional.
Configuration menu - View commit details
-
Copy full SHA for 9f66ac3 - Browse repository at this point
Copy the full SHA 9f66ac3View commit details -
If we need to test bytecodeness, we can just look at the type of the simple fun.
Configuration menu - View commit details
-
Copy full SHA for c77c0cb - Browse repository at this point
Copy the full SHA c77c0cbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0ee844d - Browse repository at this point
Copy the full SHA 0ee844dView commit details -
this makes setq a little less ridiculous to generate - we just use a stack spot instead of a local variable. This will reduce the number of local variables needed by some functions. Also makes things a little easier on bytecode-to-bir. It was screwing things up in that the temporary variable was conflated with earlier bound variables, which caused problems when the variable was closed over.
Configuration menu - View commit details
-
Copy full SHA for 0ce7eae - Browse repository at this point
Copy the full SHA 0ce7eaeView commit details -
bytecode FASLs: more extensible debug info representation
I will be adding more for the sake of further compilation, and this will make that easier. It also makes it possible to assert that the debug infos are in order (i.e. their START indices are nondecreasing) which is very convenient for the compiler and debugger.
Configuration menu - View commit details
-
Copy full SHA for 7cc74c8 - Browse repository at this point
Copy the full SHA 7cc74c8View commit details -
Configuration menu - View commit details
-
Copy full SHA for b97ef86 - Browse repository at this point
Copy the full SHA b97ef86View commit details -
Configuration menu - View commit details
-
Copy full SHA for b1cf063 - Browse repository at this point
Copy the full SHA b1cf063View commit details -
bytecode compiler: preserve some variable declarations
Doing optional variables etc is going to be annoying
Configuration menu - View commit details
-
Copy full SHA for e883bb1 - Browse repository at this point
Copy the full SHA e883bb1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 807f579 - Browse repository at this point
Copy the full SHA 807f579View commit details -
bytecode compiler: more precise source locations for functions
FLET might need a little more work
Configuration menu - View commit details
-
Copy full SHA for 5029037 - Browse repository at this point
Copy the full SHA 5029037View commit details -
Configuration menu - View commit details
-
Copy full SHA for 96f6646 - Browse repository at this point
Copy the full SHA 96f6646View commit details -
Configuration menu - View commit details
-
Copy full SHA for a4815b0 - Browse repository at this point
Copy the full SHA a4815b0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6e8b10f - Browse repository at this point
Copy the full SHA 6e8b10fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1a291ef - Browse repository at this point
Copy the full SHA 1a291efView commit details -
The bytecode compiler will have to keep track of optimize declarations for the btb compiler.
Configuration menu - View commit details
-
Copy full SHA for 6a76f41 - Browse repository at this point
Copy the full SHA 6a76f41View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7728800 - Browse repository at this point
Copy the full SHA 7728800View commit details -
bytecode compiler: actually use passed source info
christ, i am stupid sometimes
Configuration menu - View commit details
-
Copy full SHA for 6fe4be8 - Browse repository at this point
Copy the full SHA 6fe4be8View commit details -
bytecode compiler: don't record declarations redundantly
This cuts down on pointless annotations.
Configuration menu - View commit details
-
Copy full SHA for 5f4783e - Browse repository at this point
Copy the full SHA 5f4783eView commit details -
Configuration menu - View commit details
-
Copy full SHA for bcdb93e - Browse repository at this point
Copy the full SHA bcdb93eView commit details -
btb compiler: annotations are sorted already
By generation, and also in LTV FASLs
Configuration menu - View commit details
-
Copy full SHA for 67cf907 - Browse repository at this point
Copy the full SHA 67cf907View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2192509 - Browse repository at this point
Copy the full SHA 2192509View commit details -
btb compiler: track optimization policy
not gonna lie, this code is kind of ugly.
Configuration menu - View commit details
-
Copy full SHA for caea7c6 - Browse repository at this point
Copy the full SHA caea7c6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 09d306a - Browse repository at this point
Copy the full SHA 09d306aView commit details -
Configuration menu - View commit details
-
Copy full SHA for dd84ea3 - Browse repository at this point
Copy the full SHA dd84ea3View commit details -
Configuration menu - View commit details
-
Copy full SHA for aef6a8f - Browse repository at this point
Copy the full SHA aef6a8fView commit details -
btb compiler: remove old kludge
No longer necessary given the variable annotations and DUP.
Configuration menu - View commit details
-
Copy full SHA for 413b6d7 - Browse repository at this point
Copy the full SHA 413b6d7View commit details -
Configuration menu - View commit details
-
Copy full SHA for e9d8573 - Browse repository at this point
Copy the full SHA e9d8573View commit details -
Configuration menu - View commit details
-
Copy full SHA for e90c789 - Browse repository at this point
Copy the full SHA e90c789View commit details -
bytecode compiler: ensure debug infos are generated ordered
Functions being relocated means that just generating the debug infos all in the same module vector as you go can result in non monotonic positions.
Configuration menu - View commit details
-
Copy full SHA for fda6203 - Browse repository at this point
Copy the full SHA fda6203View commit details -
bytecode compiler: maintain mv/stack state in unreachable code
This is a pretty messy solution. drop-mv never actually needs to be executed, but it lets the compiler treat unconditional jumps as not happening for the purpose of compiling unreachable code correctly. FIX ME
Configuration menu - View commit details
-
Copy full SHA for 542a438 - Browse repository at this point
Copy the full SHA 542a438View commit details -
bytecode compiler: fix memberEq usage
without the notnilp it always returns true, which screws a few things up. durr
Configuration menu - View commit details
-
Copy full SHA for 89a4720 - Browse repository at this point
Copy the full SHA 89a4720View commit details -
Configuration menu - View commit details
-
Copy full SHA for b73ed52 - Browse repository at this point
Copy the full SHA b73ed52View commit details -
Configuration menu - View commit details
-
Copy full SHA for 74492f8 - Browse repository at this point
Copy the full SHA 74492f8View commit details -
Configuration menu - View commit details
-
Copy full SHA for feb8589 - Browse repository at this point
Copy the full SHA feb8589View commit details -
record and use bytecode block names from tagbody
The more important intent of this is to store information about PHIs to simplify the btb compiler.
Configuration menu - View commit details
-
Copy full SHA for 218e305 - Browse repository at this point
Copy the full SHA 218e305View commit details -
Remove ThreadLocalState from snapshot workers
It does not seem to be used anywhere. It adds extra memory to the threads which is then never used, since those threads never even run Lisp code. Running the constructors can also be complicated and is again unnecessary.
Configuration menu - View commit details
-
Copy full SHA for 65723f8 - Browse repository at this point
Copy the full SHA 65723f8View commit details -
Allocate VM stack outside of ThreadLocalState
Having a large array inside the VirtualMachine (and thus the ThreadLocalState) seems to crash the linker on Mac. It's also just sort of wonky. Probably ideally we'd have a more sophisticated setup here with mmap and guard pages and growth and yada yada, but this works ok. There is a definite suboptimality in allocating the entire max stack size all at once, but it's not _too_ big so maybe it's ok. It also means that the GC will walk the entire stack for pointers, including the inactive part, but Boehm is probably not capable of doing something more complex anyway. Or if it is it's wizardry.
Configuration menu - View commit details
-
Copy full SHA for 3b4fc09 - Browse repository at this point
Copy the full SHA 3b4fc09View commit details -
This was apparently used for parallel linking at some point but was dummied out for mysterious reasons. Even without that, I suspect that the thread pool wouldn't need to be global.
Configuration menu - View commit details
-
Copy full SHA for 5c14773 - Browse repository at this point
Copy the full SHA 5c14773View commit details