You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: jsrc/p.c
+3-5Lines changed: 3 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -530,8 +530,6 @@ A jtparsea(J jt, A *queue, I nwds){F1PREFIP;PSTK *stack;A z,*v;
530
530
// pt0ecam is settling from pt0 but it will be ready soon
531
531
532
532
do{
533
-
// to make the compiler keep queue in regs, you have to convince it that the path back to this loop is common enough
534
-
// to give it priority. likelys at the end of the line 0-2 code are key
535
533
536
534
if(likely((US)pt0ecam!=0)){ // if there is another valid token...
537
535
// Move in the new word and check its type. If it is a name that is not being assigned, resolve its
@@ -678,14 +676,14 @@ endname: ;
678
676
Afs1=__atomic_load_n(&stack[1].a,__ATOMIC_ACQUIRE); // in case of line 1 V0 V1 N2, we will need the flags from V1. Could be garbage
679
677
pt0ecam&=~(VJTFLGOK1+VJTFLGOK2+VASGSAFE+PTNOTLPAR+NOTFINALEXEC+(7LL<<PMASKSAVEX)); // clear all the flags we will use
680
678
681
-
if(likely(pmask!=0)){ // If all 0, nothing is dispatchable, go push next word after checking for ( . likely is an overstatement but it gives better register usage
679
+
if(withprob(pmask!=0,0.8)){ // If all 0, nothing is dispatchable, go push next word after checking for ( . likely is an overstatement but it gives better register usage
682
680
fs1=QCWORD(fs1); // clear flags from address
683
681
// We are going to execute an action routine. This will be an indirect branch, and it will mispredict. To reduce the cost of the misprediction,
684
682
// we want to pile up as many instructions as we can before the branch, preferably getting out of the way as many loads as possible so that they can finish
685
683
// during the pipeline restart. The perfect scenario would be that the branch restarts while the loads for the stack arguments are still loading.
686
684
jt->parserstackframe.parserstkend1=stack; // Save the stackpointer in case there are calls to parse in the names we execute
687
685
Ipmask567=pmask; // save before we mask high bits
688
-
if(pmask&=0x1F){ // if lines 0-4: decodes are mutually exclusive (i. e. one hot)
686
+
if(withprob(pmask&=0x1F,0.7)){ // if lines 0-4: decodes are mutually exclusive (i. e. one hot)
689
687
Ifs1flag=FAV(fs1=pmask&2?fs1:fs)->flag; // if line 1, fetch V0 flags; otherwise harmless refetch of fs flags. If line 1 matches, line 0 cannot
690
688
Ifsflag=FAV(fs)->flag; // fetch flags early - we always need them in lines 0-2
691
689
// obsolete pmask=LOWESTBIT(pmask); // leave only one bit
@@ -715,7 +713,7 @@ endname: ;
715
713
// execution. That will then execute as (name' + +) creating a fork that will assign to name. So we can inplace any execution, because
716
714
// it always produces a noun and the only things executable from the stack are tridents
0 commit comments