Changeset 22915 for v6

Show
Ignore:
Timestamp:
11/07/08 23:13:54 (2 months ago)
Author:
pmurias
Message:

[smop]
removed SLIME
commented out slime using tests
commented out test 1 as it tests slightly inlegal things and is duplicated by higher level stuff
test 4 fails as we are doing DESTROYALL incorrectly now

Location:
v6/smop
Files:
5 removed
5 modified

Legend:

Unmodified
Added
Removed
  • v6/smop/CMakeLists.txt

    r22850 r22915  
    11project (smop) 
     2#SET( CMAKE_C_FLAGS "-O0 -g3 -DSMOP_LOWLEVEL_MEM_TRACE -DSMOP_HUNT_NULLS" ) 
    23SET( CMAKE_C_FLAGS "-O0 -g3 -DSMOP_LOWLEVEL_MEM_TRACE" ) 
    34#SET( CMAKE_C_FLAGS "-O0 -g3 -DSMOP_LOWLEVEL_MEM_TRACE -DSMOP_LOWLEVEL_MEM_DEBUG -DSMOP_MOLD_DEBUG -DSMOP_SLIME_DEBUG" ) 
     
    151152    src/s1p_ritest.c 
    152153    src/s1p_hash_bvalue.c 
    153     src/slime_capturize.c 
    154     src/slime_currentframe.c 
    155     src/slime_frame.c 
    156     src/slime_node.c 
    157154    src/ri.c 
    158155    src/proto.c 
     
    166163INCLUDE (FindThreads) 
    167164foreach (test_file 
    168     test/01_smop_lowlevel.c 
    169     test/02_stack.sm0p 
     165 
     166    # SLIME tests 
     167    #test/09_threads.sm0p 
     168    #test/02_stack.sm0p 
     169    #test/12_p6opaque.sm0p 
     170    #test/16_labels.sm0p 
     171    #test/17_sm0p.sm0p 
     172 
     173    # v6-sm0p 
     174    #test/14_p6opaque_methods.sm0p 
     175    #test/22_smop_s1p_attribute.sm0p 
     176    #test/28_pure_prototype_how.sm0p 
     177 
     178    #test/01_smop_lowlevel.c 
     179 
    170180    test/03_const_identifier.c 
    171181    test/04_interpreter.c 
     
    175185    test/07_native_int.c 
    176186    test/08_native_uint.c 
    177     test/09_threads.sm0p 
    178187    test/10_lowlevel_methods.c 
    179     test/12_p6opaque.sm0p 
    180     test/14_p6opaque_methods.sm0p 
    181188    test/15_hash.p6 
    182     test/16_labels.sm0p 
    183     test/17_sm0p.sm0p 
    184189    test/18_root_namespace.p6 
    185190    test/19_array.p6 
    186191    test/20_smop_s1p_ccode.c 
    187192    test/21_code.m0ld 
    188     test/22_smop_s1p_attribute.sm0p 
    189193    test/23_mold.sm0p 
    190194    test/24_m0ld.m0ld 
    191195    test/25_lexical_scope.p6 
    192196    test/27_default_block_signature.p6 
    193     test/28_pure_prototype_how.sm0p 
    194197    test/29_bind_capture_signature.p6 
    195198    test/30_array_map.m0ld 
  • v6/smop/include/smop_lowlevel.h

    r22722 r22915  
    44 
    55#include <smop.h> 
    6 #include <smop_slime.h> 
    76#include <pthread.h> 
    87 
  • v6/smop/include/smop_s1p.h

    r22711 r22915  
    6464 
    6565#define ___CONST_IDENTIFIER_ONLY___ \ 
     66    if (SMOP_RI(identifier) != SMOP_RI(SMOP__ID__new)) {\ 
     67        fprintf("%s\n",SMOP_RI(SMOP__ID__new)->id);\ 
     68    }\ 
    6669    assert(SMOP_RI(identifier) == SMOP_RI(SMOP__ID__new)) 
    6770 
  • v6/smop/src/internal.h

    r22850 r22915  
    2222     smop_native_bool_init();         \ 
    2323     smop_ri_init();                  \ 
    24      smop_proto_init();               \ 
    25      smop_slime_frame_init();         \ 
    26      smop_slime_currentframe_init();  \ 
    27      smop_slime_node_init();          \ 
    28      smop_slime_capturize_init();      
     24     smop_proto_init();                
    2925#define SMOP_INTERNAL_SHUTDOWN_SEQUENCE  \ 
    30      smop_slime_capturize_destr();       \ 
    31      smop_slime_node_destr();            \ 
    32      smop_slime_currentframe_destr();    \ 
    33      smop_slime_frame_destr();           \ 
    3426     smop_native_int_destr();            \ 
    3527     smop_native_bool_destr();           \ 
     
    143135void smop_interpreter_init(); 
    144136void smop_interpreter_destr();  
    145 void smop_slime_frame_init(); 
    146 void smop_slime_frame_destr(); 
    147 void smop_slime_currentframe_init(); 
    148 void smop_slime_currentframe_destr(); 
    149 void smop_slime_node_init(); 
    150 void smop_slime_node_destr(); 
    151 void smop_slime_capturize_init(); 
    152 void smop_slime_capturize_destr(); 
    153137void smop_native_bool_init(); 
    154138void smop_native_bool_destr(); 
  • v6/smop/src/lowlevel.sm0p

    r22512 r22915  
    105105 
    106106 
    107 SMOP__Object* SMOP__LOWLEVEL__Operators; 
    108  
    109 static SMOP__Object* lowlevelop_message(SMOP__Object* interpreter, 
    110                                         SMOP__ResponderInterface* self, 
    111                                         SMOP__Object* identifier, 
    112                                         SMOP__Object* capture) { 
    113   if (identifier == SMOP__ID__free) { 
    114     SMOP_DISPATCH(interpreter,SMOP__SLIME__CurrentFrame,SMOP__ID__free, 
    115                   SMOP__NATIVE__capture_create(interpreter,SMOP__SLIME__CurrentFrame,NULL,NULL)); 
    116 #ifdef SMOP_LOWLEVEL_MEM_TRACE 
    117     smop_mem_trace_del(capture); 
    118 #endif 
    119     smop_lowlevel_free(capture); 
    120   } else { 
    121     SMOP_RELEASE(interpreter,capture); 
    122   } 
    123   return SMOP__NATIVE__bool_false; 
    124 } 
    125107 
    126108static SMOP__Object* lowlevelop_reference(SMOP__Object* interpreter, SMOP__ResponderInterface* responder, SMOP__Object* obj) { 
     
    133115 
    134116void smop_lowlevel_init() { 
    135   SMOP__LOWLEVEL__Operators = malloc(sizeof(SMOP__ResponderInterface)); 
    136   ((SMOP__ResponderInterface*)SMOP__LOWLEVEL__Operators)->RI = NULL; 
    137   ((SMOP__ResponderInterface*)SMOP__LOWLEVEL__Operators)->MESSAGE = lowlevelop_message; 
    138   ((SMOP__ResponderInterface*)SMOP__LOWLEVEL__Operators)->REFERENCE = lowlevelop_reference; 
    139   ((SMOP__ResponderInterface*)SMOP__LOWLEVEL__Operators)->RELEASE = lowlevelop_release; 
    140   ((SMOP__ResponderInterface*)SMOP__LOWLEVEL__Operators)->id = "SMOP Lowlevel Operator"; 
    141  
    142117#ifdef SMOP_LOWLEVEL_MEM_TRACE 
    143118  trace_list_alloc = 1024; 
     
    158133  free(trace_list); 
    159134#endif 
    160   free(SMOP__LOWLEVEL__Operators); 
    161135} 
    162136 
     
    181155 
    182156      if ((SMOP__Object*)SMOP_RI(value) == SMOP__INTPTR__InterpreterInstance || 
    183           (SMOP__Object*)SMOP_RI(value) == SMOP__SLIME__Frame || 
    184           (SMOP__Object*)SMOP_RI(value) == SMOP__SLIME__Node || 
    185           (SMOP__Object*)SMOP_RI(value) == SMOP__SLIME__Capturize || 
    186157          (SMOP__Object*)SMOP_RI(value) == SMOP__NATIVE__capture || 
    187158          (SMOP__Object*)SMOP_RI(value) == SMOP__NATIVE__int || 
     
    200171      smop_lowlevel_free(value); 
    201172    } else if ((SMOP__Object*)SMOP_RI(value) == SMOP__INTPTR__InterpreterInstance || 
    202                (SMOP__Object*)SMOP_RI(value) == SMOP__SLIME__Frame || 
    203                (SMOP__Object*)SMOP_RI(value) == SMOP__SLIME__Node || 
    204                (SMOP__Object*)SMOP_RI(value) == SMOP__SLIME__Capturize || 
    205173               (SMOP__Object*)SMOP_RI(value) == SMOP__NATIVE__capture || 
    206174               (SMOP__Object*)SMOP_RI(value) == SMOP__NATIVE__int || 
     
    215183 
    216184    } else { 
    217       // This is where the continuation will be manipulated as described in the .h file. 
    218       SMOP__Object* current = SMOP_DISPATCH(interpreter, SMOP_RI(interpreter), SMOP__ID__continuation, 
    219                                             SMOP__NATIVE__capture_create(interpreter,SMOP_REFERENCE(interpreter,interpreter),NULL,NULL)); 
    220       SMOP__Object* continuation = NULL; 
    221       continuation = q:sm0p { 
    222         ; 
    223         $value.DESTROYALL($value); 
    224         $SMOP__SLIME__CurrentFrame.$SMOP__ID__forget(); 
    225         $SMOP__LOWLEVEL__Operators.$SMOP__ID__free(|$value); 
    226         $interpreter.goto(|$current); 
    227       }; 
    228       SMOP_DISPATCH(interpreter, SMOP_RI(interpreter), SMOP__ID__goto,  continuation); 
     185       SMOP_DISPATCH(interpreter, SMOP_RI(value), SMOP__ID__DESTROYALL, SMOP__NATIVE__capture_create(interpreter,value,NULL,NULL)); 
     186#ifdef SMOP_LOWLEVEL_MEM_TRACE 
     187      smop_mem_trace_del(value); 
     188#endif 
     189 
     190      smop_lowlevel_free(value); 
    229191    } 
    230192    return NULL;