Changes between Version 16 and Version 17 of SemiTagging


Ignore:
Timestamp:
Nov 3, 2006 5:19:43 PM (9 years ago)
Author:
alexey
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SemiTagging

    v16 v17  
    6666
    6767Under this scheme, the entry code for the {{{not}}} function would look as follows:
    68 {{{
    69         if(R2 & 1 == 1) goto tagged
    70         <stack check omitted>
    71         R1 = R2;
    72         I64[Sp + (-8)] = sej_info;
    73         Sp = Sp + (-8);
    74         jump I64[R1];
    75 tagged:
    76         R1 = R2 & ~1;  // mask pointer tag out
    77         <extract constructor tag from pointer>
    78         if(tag==0) goto sej_0_alt
    79         goto sej_1_alt
    80 }}}
    8168
    8269== Tagging the LSB of an evaluated closure ==
     
    9683
    9784(Simon, thanks for the example. I was hoping to not have to enter constructor closures but the second bullet example shows why entering constructors can still happen. However, can't the example just be {{{f xs = head xs}}}? --Alexey)
     85
     86{{{
     87        if(R2 & 1 == 1) goto tagged
     88        <stack check omitted>
     89        R1 = R2;
     90        I64[Sp + (-8)] = sej_info;
     91        Sp = Sp + (-8);
     92        jump I64[R1];
     93tagged:
     94        R1 = R2 & ~1;  // mask pointer tag out
     95        <extract constructor tag from pointer>
     96        if(tag==0) goto sej_0_alt
     97        goto sej_1_alt
     98}}}
     99
    98100
    99101== Using more than one bit ==