Show
Ignore:
Timestamp:
07/03/08 23:23:38 (5 months ago)
Author:
ruoso
Message:

[smop] still more work on p6opaque, few bugs fixed, some slime bugs still.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • v6/smop/test/12_p6opaque.sm0p

    r21129 r21201  
    88  smop_init(); 
    99 
    10   printf("1..5\n"); 
     10  printf("1..4\n"); 
    1111 
    1212 
     
    1616                                                                         SMOP__INTPTR__InterpreterInstance,NULL,NULL)); 
    1717  SMOP__Object* frame; 
    18   SMOP__Object* scalar1 = SMOP__S1P__Scalar_create(SMOP__NATIVE__bool_true); 
    19    
     18  SMOP__Object* how = SMOP__NATIVE__bool_true; 
     19  SMOP__Object* p6opaque =  
     20    SMOP_DISPATCH(SMOP__INTPTR__InterpreterInstance, SMOP__p6opaque__RI, 
     21                  SMOP__ID__REPR_CREATE, SMOP__NATIVE__capture_create(SMOP__INTPTR__InterpreterInstance, 
     22                                                                      SMOP__INTPTR__InterpreterInstance,NULL,NULL)); 
     23 
    2024  $frame = q:sm0p { 
    21     $scalar1; 
    22     SMOP__p6opaque__RI.SMOP__ID__REPR_CREATE(); 
    23     SMOP__SLIME__CurrentFrame.move_capturize(SMOP__SLIME__Capturize.new(2,(1),(),1)); 
    24     $scalar1.SMOP__ID__STORE(); 
     25    ; 
     26    $p6opaque.SMOP__ID__new(); 
    2527  }; 
     28  //  SMOP__SLIME__CurrentFrame.move_responder(7,2); 
     29  //  SMOP__SLIME__CurrentFrame.move_capturize(SMOP__SLIME__Capturize.new(9,(),(),1)); 
     30  //  SMOP__p6opaque__RI.SMOP__ID__new(); 
     31  //}; 
    2632 
    2733  if (!frame) printf("not "); 
    2834  printf("ok 1 - frame created.\n"); 
    2935 
     36  SMOP_RELEASE(interpreter,p6opaque); 
    3037  SMOP_DISPATCH(interpreter, SMOP_RI(interpreter), 
    3138                SMOP__ID__goto, 
     
    4148 
    4249 
    43   SMOP__Object* r1 = SMOP__S1P__Scalar_FETCH(scalar1); 
    44   if (SMOP_RI(r1) != (SMOP__ResponderInterface*)SMOP__p6opaque__RI) printf("not "); 
    45   printf("ok 4 - P6 Opaque created inside the interpreter loop\n"); 
    46  
    47   SMOP_RELEASE(interpreter,scalar1); 
    48  
    49   SMOP_DISPATCH(interpreter, SMOP_RI(interpreter), 
    50                 SMOP__ID__loop, SMOP__NATIVE__capture_create(interpreter, 
    51                                                              SMOP_REFERENCE(interpreter,interpreter), 
    52                                                              NULL, NULL)); 
    53  
    5450  SMOP_RELEASE(SMOP__INTPTR__InterpreterInstance,interpreter); 
    5551 
    56   printf("ok 5 - Scalar destroyed should free the p6opaque object also.\n"); 
     52  printf("ok 4 - Scalar destroyed should free the p6opaque object also.\n"); 
    5753 
    5854  smop_destr();