Search
2:12:00
Bike
instant segfault for the typeq. life is hard
2:12:28
drmeister
Can you generate any code containing the typeq?
2:13:08
Bike
i mean, i generated some code, and runningn it caused a segfault
2:17:26
drmeister
It's par for the course - I don't think I've once generated new llvm-ir and had it work the first (or ... fifth) time.
2:17:54
Bike
https://github.com/drmeister/clasp/tree/dev-typeq should build up to bclasp
2:19:05
Bike
then (if (cmp::typeq 4 fixnum) t nil) should work, and (if (cmp::typeq 4 bignum) t nil) will not
3:00:59
drmeister
That's great - that should be straightforward to debug.
3:04:46
drmeister
Building dev-typeq.
3:41:04
drmeister
It segfaults in the compiler... investigating...
5:28:14
beach
Good morning everyone!
13:28:47
drmeister
I linked dev-typeq with the debug llvm library - it's hitting an assertion failure when evaluating the GEP instruction.
13:29:06
Bike
maybe llvm doesn't like negative numbers either.
13:29:18
drmeister
I haven't quite figured out the solution.
13:29:50
drmeister
I'll take a closer look on the train in and see
13:31:16
Bike
this can't be the only place in the code that wants the header
13:31:22
drmeister
I know we can do this with pointer arithmetic but the gep instruction should generate an offset load and that will be better.
13:32:46
drmeister
Oh! Right - use the compiler lab! Generate C++ that does this and look at the IR generated
13:33:05
drmeister
My train will be here any moment.
13:33:14
Bike
i suspect that using casting to byte* and using gep is kind of not what gep is intended for, anyway
13:33:36
drmeister
Once I have my laptop up I'll send you a link where you can do this. It's neat.
13:35:37
drmeister
There's gotta be a way to do this to tell the compiler to generate an offset mov
13:35:55
Bike
we should probably ask the llvm people
13:36:19
Bike
we're basically throwing around interior pointers, which is kind of weird for C to say the last