freenode/#clasp - IRC Chatlog
Search
3:26:03
drmeister
An alternative to always_inline may be to declare the builtins 'inline' and '__attribute__((used))' and then remove the 'used' list when we want to delete the builtin functions after inlining them.
3:48:13
Bike
i'm no longer sure how it could possibly have built them and then crashed when i try to start up
3:49:39
Bike
it finished building like five minutes before i was going to leave, so i just ran it, it segfaulted, i went "uuuuugh" and left
3:51:54
drmeister
Yeah - also - I changed my builtins - I'm experimenting with __attribute__((used))
3:54:14
drmeister
Hmm, Martin needs to go up to Boston - what if you swung by here for a few days and then drove up with him? - But you have dog sitting issues and he was supposed to be here Wednesday.
6:05:15
drmeister
::notify Bike - I found the problem - yeesh - I was optimizing the module before creating the static ctor that invokes the startup function. Since the startup function wasn't declared external and wasn't referenced by anything it was removed!!!
6:30:13
drmeister
::notify Bike The problem wasn't the always_inline - that was fine. We just need to add the functions to inline, inline them, remove them, add the ctor and only THEN optimize the module.
7:48:30
Shinmera
beach: Indeed. This is an exercise from my lecture. http://plaster.tymoon.eu/view/999
13:04:19
drmeister
Oh noooos! The dreaded "Diamond inheritance problem" that demonstrates that multiple inheritance is scary.
13:14:17
heisig
He probably means C++, where you explicitly have to tell the compiler about diamond inheritance, or it will accidentally emit several versions of each slot.
13:15:16
beach
I guess they didn't know about my fast generic dispatch technique when they designed the language.
13:15:42
beach
Or, more likely, at the time, table-based techniques were faster, so they did what they could with such techniques.
13:16:22
jackdaniel
sad consequence of that is that you can't add subclasses to the party from a shared object (because it is already finalized in this sense)
13:17:28
heisig
There is vtable dispatch for virtual member functions in C++. Which gives rise to such beautiful things as the visitor pattern.
13:17:57
beach
jackdaniel: You know perfectly well that it dispatches (using vtables or whatever they are called) on the first (implicit) argument.
13:19:09
beach
I hear it used to be fast at the time. That can't be the case anymore with such dispatch techniques.
13:20:59
kpoeck
I have to admit that I needed 5 google searches before having a c++ test program that did runtime dispatch
13:21:30
jackdaniel
beach: you are right, according to link from kpoeck dispatch may be dynamic in c++. as of first implicit argument it is not that relevant, I didn't claim c++'s gfs are as capable as cl's
13:24:01
jackdaniel
and I didn't know not only perfectly well, but at all. this part is interesting: "Since C++ does not support late binding, the virtual table in a C++ object cannot be modified at run-time, which limits the potential set of dispatch targets to a finite set chosen at compile time. "
13:38:19
drmeister
Hello - I'm getting ready for the day - I have a presentation to give down near Washington.
13:40:19
drmeister
Bike: It looks like everything is building fine. The problem was that "with-module" macro - I should not have written it to do optimization at the end of the macro - it hides the optimization step.
13:40:27
drmeister
https://github.com/clasp-developers/clasp/blob/dev/src/lisp/kernel/cmp/compile.lsp#L11
13:40:46
drmeister
Later today I'll move the optimization step out into the callers so that it is explicit.
13:41:44
drmeister
LLVM is aggressive about removing functions that aren't pinned/referenced in the module in some way.
13:51:54
Bike
really seemed like it was in optimize-module-for-compile-file as called by the remove builtins thing
13:51:54
Colleen
Bike: drmeister said 7 hours, 46 minutes ago: - I found the problem - yeesh - I was optimizing the module before creating the static ctor that invokes the startup function. Since the startup function wasn't declared external and wasn't referenced by anything it was removed!!!
13:51:54
Colleen
Bike: drmeister said 7 hours, 21 minutes ago: The problem wasn't the always_inline - that was fine. We just need to add the functions to inline, inline them, remove them, add the ctor and only THEN optimize the module.
13:51:54
Colleen
Bike: drmeister said 6 hours, 59 minutes ago: I pushed all of the changes and everything seems to build.