Assuming a javascript-like language, how can we implement a system such as:
a = {};
a.foo = {};
a.foo.bar = 42;
print a.foo['bar'];
using LLVM C++ API ?
I didn’t find any documentation about complexe data types (such as an HashMap heriting from Value), so I’m kind of lost here. The LLVM C demo webpage isn’t useful neither, as there is no such data type in C/C++.
I’ve done the Kaleidoscope tutorial, but didn’t found any other really good tutorials.
Just the same way as you’ll do it on top of any other low level semantics. You have to implement your own runtime library, your own hash maps (or whatever else you’d like to use for the dynamic dispatch). LLVM does not (and should not) provide any runtime for the code it generates.