@@ -82,6 +82,10 @@ move S X0=x==0 | line _Loc | call_last Ar Func D =>
8282move S X0= x== 0 | line _Loc | call_only Ar Func =>
8383 move S X0 | call_only Ar Func
8484
85+ # Move literal call arguments past line instructions so they can participate
86+ # in load-time call transformations.
87+ move S= c X0= x== 0 | line Loc => line Loc | move S X0
88+
8589# The line number in int_func_start/5 can be NIL.
8690func_line n => empty_func_line
8791
@@ -363,6 +367,23 @@ move S1=d D1=d | move S2=d D2=d | consecutive_words(S2, D1, S1, D2) =>
363367move S1= d D1= d | move S2= d D2= d | consecutive_words(S2, D2, S1, D1) =>
364368 move_two_words S2 D2 S1 D1
365369
370+ # Compile literal binary search patterns while loading. Invalid patterns decline
371+ # these transforms and retain their original runtime error behavior.
372+ #
373+
374+ move Pattern= q X0= x== 0 |
375+ call_ext _Ar= u _Func= u$bif:binary:compile_pattern/ 1 |
376+ load_binary_pattern(Pattern) =>
377+ loaded_binary_pattern(X0)
378+ move Pattern= q X0= x== 0 |
379+ call_ext_last _Ar= u _Func= u$bif:binary:compile_pattern/ 1 D |
380+ load_binary_pattern(Pattern) =>
381+ loaded_binary_pattern_last(X0, D)
382+ move Pattern= q X0= x== 0 |
383+ call_ext_only _Ar= u _Func= u$bif:binary:compile_pattern/ 1 |
384+ load_binary_pattern(Pattern) =>
385+ loaded_binary_pattern_only(X0)
386+
366387move Src Dst => i_move Src Dst
367388
368389#
0 commit comments