github.com/moarvm/moarvm | IRC logs at colabti.org/irclogger/irclogger_logs/moarvm
Set by AlexDaniel on 12 June 2018.
MasterDuke timotimo: "VALGRIND_CREATE_BLOCK returns a "block handle", which is a C int value. You can pass this block handle to VALGRIND_DISCARD." we don't have any good/existing way of passing this around do we? 00:02
MasterDuke dogbert17: around? 00:27
MasterDuke dogbert17, timotimo: i've run dogbert17's shortened example in github.com/MoarVM/MoarVM/issues/1093 a bunch of times using my moarvm that i compiled for github.com/MoarVM/MoarVM/issues/1023 (i.e., with --valgrind, GC_DEBUG=2, and that VALGRIND_CREATE_BLOCK patch) and i don't get any problems at all. just `line 12: sleep 25 Timeout. Asking the process to stop Proc finished: exitcode=0 signal=1 Program finished` 01:40
dogbert17 MasterDuke: confirmed, when changing the nursery size and settin MVM_GC_DEBUG != 0 hides the bug 12:52
brrt \o 13:43
I've been thinking again.... 13:50
I think I want to move to a linear IR in the 'expression' JIT
Internally
The external interface can still maintain the existing tree form
The main advantage of a linear IR is that every operation gets an (explicit) location 13:53
dogbert17 hello brrt 14:07
are there any disadvantages to your new approach? 14:08
brrt dogbert17: sure. One thing that is very cheep in the graph approach is to insert code in the tree (you can just append to the end of the buffer, then write the pointer) 19:17
... that doesn't have to be more expensive in the linear IR, but if you intend to use a single buffer, then you need to shift everything 19:20
for instance, spesh uses a double-linked list 19:21
that's not so bad, actually 19:22
but it is quite expensive in memory, as I need a *lot* of opcodes to represent a simple thing
e.g. a single add_i would expand to 5 or so nodes 19:23
so that'd be 80 bytes just to maintain the double-linked list
and, double-linked lists preclude the use of addresses as identifiers 19:24
nine but how long are these lists in practice? 21:10
brrt nine: I want them to contain all the basic blocks eventually, so, longish 22:13