01:28 ShimmerFairy joined 02:05 diakopter joined 04:01 stmuk joined 05:14 vendethiel joined 06:07 d4l3k_ joined 08:36 zakharyas joined 08:58 domidumont joined 09:03 domidumont joined 09:48 stmuk_ joined 10:06 vendethiel joined 10:17 brrt joined
brrt good * 10:17
i just found out that in fact several frame handler boundaries and deopt points do not, in fact, start at basic block boundaries 10:44
this is.. painful
jnthn Oh? 10:45
depot points - I'd only really expect deopt all points to be such boundaries
brrt no, for instance, iirc, the sp_guard things, they are in the middle of blocks, but they carry a deopt_all annotation 10:46
hmm, not sure that is correct
jnthn They're a deopt one, no?
brrt yes
right 10:47
:-)
i don't handle deopt_one at all yet in the expr jit, so let's not worry about that
but i've seen at least one case of a set followed by a fh start
fh end, these have been end of basic-blocks iirc
jnthn Yeah, we never jump to the start of a handler 10:48
Or more like
It being a handler doesn't mean we'll jump there
brrt fair enough
hmmm 10:49
maybe it's simpler than i though
t
i'm just wondering how to fit it into the tree 10:58
for instance, a deopt osr point in the middle of the expression means i have to break the expression (flush all computed values) 10:59
jnthn Think is, we introduce deopt-one points 11:03
*Thing 11:04
During optimization, after having formed the CFG
11:04 zakharyas joined
brrt uhuh 11:05
jnthn But really
There's nothing to stop you assembling a JIT BB graph
So you can have whatever view you want for the purpose of JITting. 11:06
brrt that is true
that would have some advantages
i'm just not sure how to do it
jnthn The current BB choices are ideal for what spesh does
brrt uhuh....
well, i'd think the jit bb 'view' would be largely a view of smaller bb's than the spesh bbs 11:07
jnthn Is there a case where JIT BB view wouldn't simply take the spesh BBs and then break some of them up?
brrt no, there is no such case, i think 11:09
well, there may be in the future, when we're going to do jit-specific optimizations 11:10
jnthn Aye, though let's make it work first :)
brrt is wondering about it 11:11
ok, one of the more significant challenges is that it is not a-priori (without knowledge of template structure) possible to determine where the blocks are 'split' 11:13
timotimo why is this so hard :P
jnthn Compilers have hard parts :P 11:14
brrt e.g. bindat_o may (usually) call MVM_repr_bindat_o or whatever it is called; breaking the basic block; it may also not do so
sp_p6oget_i breaks the basic block because it contains a conditional, although the conditional is 'value-conditional' 11:15
timotimo bindpos, probably
brrt i've so far dealt with this by ignoring it
:-)
so, my point is, i get an instruction, and only after i read the template, i could split the tree into 'basic blocks' 11:16
yes, this is all a sick perversion of compiler logic
bear with me
if i did want to split the thing into basic blocks, or something like that, i might better do that in an analysis phase 11:17
.... which is, ultimately, i guess, my point
the whole idea of translating basic blocks into expressions was because basic blocks are supposed to be uninterrupted flows of values 11:18
only for so far that this is impossible - which is in no way true of the 'broken' flows in individual templates, do we need to break the tree 11:20
it may nevertheless be a good idea to divide, or number, the 'blocks' in the tree 11:28
as a way to help in optimization and/or register allocation 11:29
jnthn Essentially, just 'cus something has no control flow at a the Moar op level doesn't mean the JITted result won't have internal control flow due to things like deopt and C calls. 11:31
brrt right :-) 11:32
jnthn So yeah, the best you can say about a BB before applying templates is that the only types of control flow you'll end up with is the sorts that a template can introduce. 11:33
brrt but the question (for me) is which of these are problematic and which are not
brrt nods
jnthn grmbl 11:37
So charrange actually ord's the chars
Right before the NFA engine ever gets to see them
*Before 11:38
otoh, synthetics are kinda meaningless there
dalek arVM: 7bd9176 | jnthn++ | src/6model/reprs/NFA.c:
Provide a way for NFA to be given synthetics.

We now accept a string (and take its first grapheme, which may be a synthetic) as well as an int (always a non-synthetic codepoint).
12:12
arVM: 79c5dc8 | jnthn++ | src/6model/reprs/NFA. (2 files):
Clarify what's graphemes and not in NFA.

No functional changes, just brings a little more clarity.
12:22
arVM: a5b14eb | jnthn++ | src/6model/reprs/NFA.c:
Serialization of synthetic graphemes in NFA.
12:40
jnthn OK, that plus an unpushed NQP patch fixes one of the two NFA bugs I wanted to take on today :)
brrt \o/ 12:41
what... is NFA again?
jnthn Nondeterministic Finite Automaton 12:42
The thingy we used for Longest Token Matching in grammars
timotimo do we have a clever thing for scanning with NFAs? probably not. but also, how common is scanning a regex that starts with an alternation? 12:43
brrt ah, that was logical 12:45
jnthn timotimo: not yet 12:46
lunch; bbiab
timotimo i think other things may be much more helpful for improving our regex performance 12:48
brrt in soviet russia, regex performance improves you! 12:54
jnthn
.oO( Regex performance is just like doping )
13:06
brrt too much of it kills? 13:12
everybody wants it but nobody will admit to it? 13:13
jnthn nqp: /<[\r\n..\r\n]>/ 13:54
o.O 13:55
13:56 camelia joined
camelia nqp-parrot: OUTPUT«Can't exec "./rakudo-inst/bin/nqp-p": No such file or directory at lib/EvalbotExecuter.pm line 193.␤exec (./rakudo-inst/bin/nqp-p /tmp/tmpfile) failed: No such file or directory␤Server error occurred! Closing Link: ns1.niner.name (Quit: camelia)␤Lost connect…» 13:57
..nqp-moarvm: OUTPUT«Illegal range endpoint in regex: \n..\r at line 2, near ">/"␤ at gen/moar/stage2/NQPHLL.nqp:521 (/home/camelia/rakudo-m-inst-2/share/nqp/lib/NQPHLL.moarvm:panic:105)␤ from gen/moar/stage2/NQPP6QRegex.nqp:1182 (/home/camelia/rakudo-m-inst-2/share/nqp/lib/NQ…»
..nqp-jvm: OUTPUT«(signal ABRT)#␤# There is insufficient memory for the Java Runtime Environment to continue.␤# pthread_getattr_np␤# An error report file with more information is saved as:␤# /tmp/jvm-10882/hs_error.log␤»
jnthn nqp: say("D\c[COMBINING DOT ABOVE]\c[COMBINING DOT BELOW]") 13:59
timotimo you should really not use "nqp:" :)
jnthn yeah, apparently not :) 14:00
d'oh
14:00 camelia joined
jnthn nqp-m: say("D\c[COMBINING DOT ABOVE]\c[COMBINING DOT BELOW]") 14:00
camelia nqp-moarvm: OUTPUT«Ḍ̇␤» 14:01
..nqp-jvm: OUTPUT«#␤# There is insufficient memory for the Java Runtime Environment to continue.␤# pthread_getattr_np␤# An error report file with more information is saved as:␤# /tmp/jvm-11837/hs_error.log␤»
..nqp-parrot: OUTPUT«Can't exec "./rakudo-inst/bin/nqp-p": No such file or directory at lib/EvalbotExecuter.pm line 193.␤exec (./rakudo-inst/bin/nqp-p /tmp/tmpfile) failed: No such file or directory␤Server error occurred! Closing Link: ns1.niner.name (Client Quit)␤Lost connectio…»
nqp-moarvm: OUTPUT«Ḍ̇␤»
jnthn nqp-m: /<[Ḍ̇..F]>/ 14:02
camelia nqp-moarvm: OUTPUT«Illegal reversed character range in regex: Ḍ̇..F at line 2, near ">/"␤ at gen/moar/stage2/NQPHLL.nqp:521 (/home/camelia/rakudo-m-inst-2/share/nqp/lib/NQPHLL.moarvm:panic:105)␤ from gen/moar/stage2/NQPP6QRegex.nqp:1202 (/home/camelia/rakudo-m-inst-2/shar…»
jnthn nqp-m: /<[Ḍ̇..\xFFF]>/
camelia nqp-moarvm: OUTPUT«Illegal reversed character range in regex: Ḍ̇..\xFFF at line 2, near ">/"␤ at gen/moar/stage2/NQPHLL.nqp:521 (/home/camelia/rakudo-m-inst-2/share/nqp/lib/NQPHLL.moarvm:panic:105)␤ from gen/moar/stage2/NQPP6QRegex.nqp:1202 (/home/camelia/rakudo-m-inst-2/…»
jnthn nqp-m: /<[Ḍ̇..\x2FFF]>/
camelia ( no output )
timotimo what does it even mean to have a character range with a synthetic included as an endpoint 14:03
jnthn timotimo: Nothing useful, which is why I've just written a patch to explicilty forbid it :) 14:04
timotimo good! 14:05
my patch runs cleanly through the spec tests
and it's pushed
brrt \o/
jnthn OK, now for the actual bug I wanted to fix... 14:07
14:15 diakopter joined, sivoais joined 14:17 sivoais joined
dalek arVM: c79bd27 | jnthn++ | src/6model/reprs/NFA. (2 files):
Teach NFA about ignoremark charrange case.
14:49
15:39 Ven_ joined
psch jnthn: what i don't see at the moment is how i can check if a given arg is actually a container in MVM_multi_cache_{add,find} 15:57
jnthn: as in, calling MVM_6model_container_iscont_i segfault if i give it .arg.o of an actual native 15:58
+s
jnthn psch: A native ref is an object
psch that's assuming i'm not misunderstanding that *_lex_refs are still containers...
ooh
jnthn psch: They are, but you won't be in the native path there
psch right
jnthn So yeah, you're likley passing a plain old int along tos omething expecting a pointer :) 15:59
*to something
psch yeah, IS_CONCRETE(0x1)...
ah, right, it already checks for != MVM_REPR_ID_NativeRef... 16:00
16:07 zakharyas joined
hoelzro o/ #moarvm 16:11
16:16 Ven_ joined, harrow joined 16:17 zakharyas joined 16:24 zakharyas joined 16:25 pyrimidine joined 16:41 Ven__ joined 16:47 domidumont joined 16:56 Ven_ joined 18:33 kjs_ joined
TimToady m: loop (my ($i, $j); $i < 3; $i, $j Z+= 1, 0.1) { say "$i $j"; if $++ > 10 { say "oops"; last } }; 19:02
camelia rakudo-moar 79b68b: OUTPUT«Use of uninitialized value of type Any in numeric context in block <unit> at /tmp/6GkHUMk3Yw:1␤Use of uninitialized value $i of type Any in string context␤Any of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block at /t…»
TimToady woohps 19:03
ww
19:28 camelia joined 19:44 Ven_ joined 19:55 Ven__ joined 20:15 Ven_ joined 20:17 kjs_ joined 20:30 Peter_R joined 21:32 Ven_ joined 21:34 colomon joined
hoelzro nwc10: how do you run the address sanitizer on roast tests? I want to pick up that callsite ownership stuff I was doing before I left for Japan, but your paste demonstrating the double free I caused is no longer active =/ 21:45
21:47 zakharyas joined
timotimo hoelzro: you just build moarvm with --asan and the address sanitizer will "be on" for everything moar does 21:59
if i understand your question right
hoelzro timotimo: that doesn't look familiar; will that detect double frees? that's really what I'm going for 22:00
although valgrind will probably catch it too 22:01
timotimo it ought to catch double frees, yeah 22:03
basically, asan is valgrind but faster (and not quite as thorough) 22:04
hoelzro ahhh
psch and clang instead of any cc
hoelzro I need clang for asan?
psch i thought so at least, isn't it a clang extension?
hoelzro and how does asan report double frees? abort()?
psch ah, gcc 4.8+ has it too 22:05
22:09 kjs_ joined 22:23 kjs_ joined
psch hm, either i'm not hitting spesh with my multicache changes or it doesn't need any changes to support them... 22:43
22:49 kjs_ joined
psch ah, but Scalar.WHICH now segfaults... :l 22:52
22:55 colomon joined 22:59 lizmat joined
psch it apparently segfaults when having a contspec for Scalar and trying to call the can_store of that contspec..? 23:10
gist.github.com/peschwa/34d7f556fa56580c3ddc is an mvm and rakudo diff, as well as the FAILing roast tests with both applied, in case anyone has an idea what i might be doing wrong... 23:11
23:42 Ven_ joined