Search
Thursday, 13th of August 2020, 2:46:44 UTC
3:53:03
beach
Good morning everyone!
13:29:24
lxsameer
hi folks, i'm interested to know about clasp's type system implementation. is there any article or paper related to that topic ?
13:30:00
lxsameer
also could you please point me to the code which is related to clasp's type system ?
13:34:33
Bike
lxsameer: what specifically do you want to know? for subtypep, which is most of the logic, we just use baker's algorithm, which i'd link you to but the site appears to be done
13:35:26
Bike
https://dl.acm.org/doi/10.1007/BF01807504 https://www.lrde.epita.fr/~didier/research/publications/papers/valais.19.els.pdf
13:35:34
lxsameer
Bike: i'm interested to know how you implmented a dynamic typed language on top of llvm , how do you do type infer and stuff like
13:36:22
Bike
well, we don't use llvm types as lisp types
13:37:22
Bike
all lisp objects appear to llvm as a type "T_O*", which is i8*
13:38:57
Bike
unboxed objects are represented by the obvious types, e.g. double
13:39:15
Bike
boxed objects, the T_O*, just use a conventional tagged pointer system
13:43:14
Bike
we're just starting to get type inference working, but it's totally a lisp thing; llvm is irrelevant to it
14:10:33
lxsameer
Bike: interesting, so basically these i8 values are a pointer to the data which tagged with the type of that data right ?
14:10:54
Bike
the pointer is tagged, yes.
14:11:37
lxsameer
Bike:thanks mate, I have to read those papers and the code, but i'm pretty sure i'm going to have many questions
14:11:48
Bike
those papers have nothing to do with llvm, to be clear
14:11:56
Bike
but sure, i'll try to answer any questions you have
14:12:17
Bike
we sort of have two separate type systems going, the llvm one and the lisp one
14:14:09
lxsameer
Bike: so on the llvm level you have only and only one type right, everything is in that type
14:14:34
lxsameer
Bike: oh btw, i assume we can AOT clasp code right?
14:14:47
Bike
all lisp objects are that type. like i said, we do sometimes have unboxed objects
14:15:10
Bike
depends on what you mean by AOT. it works like a normal lisp implementation, like you open up a repl and compile things from there
14:15:32
lxsameer
Bike: thank a lot friend
Thursday, 13th of August 2020, 14:46:44 UTC