Changes between Version 12 and Version 13 of SemiTagging


Ignore:
Timestamp:
Oct 30, 2006 4:44:38 PM (9 years ago)
Author:
alexey
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SemiTagging

    v12 v13  
    6060The benefit is that processors are typically faster at "test-and-jump to known location" than they are at "jump to this pointer".
    6161
    62 ''Alexey: add some example HC code here''
     62Under this scheme, the entry code for the {{{not}}} function would look as follows:
     63{{{
     64        if(R2 & 1 == 1) goto tagged
     65        ... stack check omitted ...
     66        R1 = R2;
     67        I64[Sp + (-8)] = sej_info;
     68        Sp = Sp + (-8);
     69        jump I64[R1];
     70tagged:
     71        R1 = R2 & ~1;  // mask pointer tag out
     72        <extract constructor tag from pointer>
     73        if(tag==0) goto sej_0_alt
     74        goto sej_1_alt
     75}}}
    6376
    6477== Tagging the LSB of an evaluated closure ==