Changes between Version 25 and Version 26 of SemiTagging


Ignore:
Timestamp:
Nov 3, 2006 6:05:49 PM (7 years ago)
Author:
alexey
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SemiTagging

    v25 v26  
    2424        R1 = R2; 
    2525        I64[Sp + (-8)] = notcont_info; 
     26          -- push not continuation on the stack 
    2627        Sp = Sp + (-8); 
    2728        jump I64[R1]; 
     29          -- enter x 
    2830}}} 
    2931 
     
    3436 
    3537False_info: 
    36         jump [[Sp]+4] --address to False alternative; 
     38        jump [[Sp]+8] --address to False alternative; 
    3739}}} 
    3840they just jump to the appropriate case alternative that is evaluating the closure. These addresses are calculated from the case frame that is on the top of the stack. In this case they select the alternatives from the jump table that is referred to by the {{{not}}} case frame. Below you see the {{{True}}} alternative 
     
    4648        R1 = False_closure; 
    4749        Sp = Sp + 8; 
    48         jump <address to False alternative>; 
     50        jump [[Sp]+8] --address to False alternative; 
    4951} 
    5052}}} 
     
    5456        R1 = True_closure; 
    5557        Sp = Sp + 8; 
    56         jump <address to True alternative>; 
     58        jump [[Sp]] --address to True alternative; 
    5759} 
    5860}}} 
     
    7173        if([[R2]+type_offset] == 0) goto unevaluated 
    7274        if([[R2]+type_offset] > CONSTR_NOCAF_STATIC) goto unevaluated 
    73           -- If the closure is not a constructor, we enter it 
    7475        goto evaluated 
    75           -- otherwise we can access its tag 
     76          -- If the closure type is a constructor we can extract 
     77          -- the tag directly in label evaluated. 
     78          -- Otherwise we enter it as usual: 
    7679unevaluated: 
    7780        R1 = R2; 
     
    110113tagged: 
    111114        R1 = R2 & ~1;  // mask pointer tag out 
     115        R2 = [[R1]+type_offset]; 
    112116          -- extract constructor tag from pointer 
    113         if(tag==0) goto notcont_0_alt 
     117        if(R2==0) goto notcont_0_alt 
    114118        goto notcont_1_alt 
    115119}}}