freenode/#sicl - IRC Chatlog
Search
9:43:26
beach
So I guess the next step is to use the Common Lisp ELF library to see what sections can be removed without changing the program. Or I guess I could use sstrip.
10:05:12
beach
This wasn't too hard. Thanks for the help everyone. Perhaps by adding stuff to my 3-line assembly program (like data, etc) I can figure out what I absolutely need to supply in the ELF executable.
10:33:35
no-defun-allowed
Today I lost a week's worth of work cause I suck at git and I reset away all of it.
10:34:33
no-defun-allowed
Tried to undo a commit with some junk files by using `git reset --hard` and they're not in the FS.
10:39:14
ck_
if not, you were unlucky and the git gc ran in the meantime. I have recovered unlinked commits like that in the past, so it isn't out of the question in general
10:41:33
no-defun-allowed
Yeah, it's there, I tried to `git reset` to it and it gives me a list of unstaged changes and doesn't restore anything.
10:48:09
beach
Included the entire file in the data of the single section, so I got confused, because it contained more than the instructions.
11:30:21
beach
I am not sure why the Common Lisp ELF library includes sizes of various entries in the ELF file. I would assume that it could compute those.
11:31:45
beach
The question is whether client code must keep those slot values synchronized with the rest of the data. That would be too bad.
11:41:30
beach
I don't think I would have written the library this way. But it was probably partly written to examine all the fields and such in an ELF file.
15:13:02
beach
Argument parsing can be very complex, in particular in the presence of &REST and &KEY parameters. In some situations I need to call Common Lisp functions, like ERROR if there is a problem and CONS to create the &REST parameter.
15:13:15
beach
The code for argument parsing involves registers and arbitrary memory locations, so it does not belong in HIR.
15:13:22
beach
But introducing this code after HIR has been completely processed would be painful, because calling ERROR and CONS involves hoisting FDEFINITIONs and processing the resulting shared variables, something we have already done at the HIR level.
15:13:29
beach
So I came up with this solution: I am planning to introduce some new HIR instructions that take care of chunks of what is required to process arguments, like MORE-ARGUMENTS-LEFT-TO-PROCESS-P, DECREMENT-REMAINING-ARGUMENTS-POINTER, and the like.
15:13:32
beach
This way, I can introduce argument parsing before most HIR transformations happen without violating the invariant of HIR that only Common Lisp values are manipulated.
15:14:33
beach
I have not yet come up with a list of the exact instructions I need to introduce, but I will do that in the next few days.
19:15:49
karlosz_
one thing i'd like to see is that the instructions are not too opaque, so that hir transformations could transparently optimize parts of the argument handling
19:16:41
karlosz_
especially with respect to &rest args where the rest parameter never needs to be consed because it is only queried by nth or via dolist