Changeset 21178

Show
Ignore:
Timestamp:
07/03/08 14:51:52 (5 months ago)
Author:
ruoso
Message:

[SMOP] p6opaque delegates method calls to the how (still not working)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • v6/smop/src/p6opaque.c

    r21129 r21178  
    105105    ret = smop_lowlevel_alloc(sizeof(SMOP__p6opaque_struct)); 
    106106    ret->RI = (SMOP__ResponderInterface*)SMOP__p6opaque__RI; 
    107   } else if (identifier == SMOP__ID__DESTROYALL) { 
    108     fprintf(stderr,"[SMOP p6opaque] DESTROYALL not implemented\n"); 
     107  } else if (identifier == SMOP__ID__REPR_how) { 
     108    fprintf(stderr,"[SMOP p6opaque] .^!how not implemented"); 
     109    ret = SMOP__NATIVE__bool_true; 
    109110  } else { 
    110     fprintf(stderr,"[SMOP p6opaque] Unkown method called\n"); 
     111    // as we want to support different captures, we'll start to use a 
     112    // sm0p frame in here, to use the capture as high-level and not as 
     113    // low-level 
     114    ret = SMOP__NATIVE__bool_true; 
     115    SMOP__Object* frame; 
     116    SMOP__Object* continuation = SMOP_DISPATCH(interpreter, SMOP_RI(interpreter), 
     117                                               SMOP__ID__continuation, interpreter); 
     118    $frame = q:sm0p { 
     119      $capture; 
     120      $identifier; 
     121      $capture.SMOP__ID__invocant(); 
     122      SMOP__SLIME__CurrentFrame.copy(1); 
     123      SMOP__SLIME__CurrentFrame.move_capturize(SMOP__SLIME__Capturize.new(1,(),(),1)); 
     124      SMOP__p6opaque__RI.SMOP__ID__REPR_how(); 
     125      SMOP__SLIME__CurrentFrame.copy(1); 
     126      SMOP__SLIME__CurrentFrame.move_responder(2,2); 
     127      SMOP__SLIME__CurrentFrame.move_capturize(SMOP__SLIME__Capturize.new(2,(6,7,8),(),1)); 
     128      SMOP__NATIVE__bool_true.SMOP__ID__dispatch(); 
     129      $continuation; 
     130      SMOP__SLIME__CurrentFrame.move_capturize(SMOP__SLIME__Capturize.new(1,(2),(),1)); 
     131      $continuation.setr(); 
     132      $interpreter.goto(|$continuation); 
     133    }; 
     134    SMOP_DISPATCH(interpreter, SMOP_RI(interpreter), 
     135                  SMOP__ID__goto, 
     136                  frame); 
     137 
    111138  } 
    112139  SMOP_RELEASE(interpreter,capture);