Changeset 21970

Show
Ignore:
Timestamp:
08/20/08 18:52:17 (3 months ago)
Author:
pmurias
Message:

[smop]
fixed Makefile adding garbage to the output;
back and friends are passed to Code.mold during postcircumfix:<( )>

Location:
v6/smop
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • v6/smop/Makefile

    r21948 r21970  
    11all: 
    2         mkdir build;cd build;cmake ..;make 
     2        mkdir build;cd build;cmake ..;MAKELEVEL=0 make 
    33.PHONY : test all 
    44test: all 
    55        perl -MTest::Harness -e '@tests=<build/test/*.t>;$$Test::Harness::switches="-e \"system(shift)\"";runtests(@tests)' 
     6env: 
     7        env 
    68 
    79 
  • v6/smop/src/smop_s1p_code.c

    r21965 r21970  
    4949    SMOP__S1P__Code_struct* code = (SMOP__S1P__Code_struct*) invocant; 
    5050 
    51     smop_lowlevel_rdlock(code); 
     51    smop_lowlevel_rdlock(invocant); 
     52    SMOP__Object* outer = code->outer; 
    5253    SMOP__Object* mold = code->mold; 
    53     smop_lowlevel_unlock(code); 
     54    smop_lowlevel_unlock(invocant); 
    5455 
    5556    SMOP__Object* frame = SMOP__Mold__Frame_create(interpreter,SMOP_REFERENCE(interpreter,mold)); 
     57    SMOP__Object* back = SMOP_DISPATCH(interpreter, SMOP_RI(interpreter), 
     58      SMOP__ID__continuation, 
     59      SMOP__NATIVE__capture_create(interpreter,SMOP_REFERENCE(interpreter,interpreter), 
     60        NULL,NULL)); 
    5661 
     62    mold_reg_set(interpreter,frame,0,SMOP_REFERENCE(interpreter,interpreter)); 
     63    mold_reg_set(interpreter,frame,1,SMOP_REFERENCE(interpreter,capture)); 
     64    mold_reg_set(interpreter,frame,2,SMOP_REFERENCE(interpreter,outer)); 
     65    mold_reg_set(interpreter,frame,3,SMOP_REFERENCE(interpreter,back)); 
    5766    SMOP_DISPATCH(interpreter,SMOP_RI(interpreter),SMOP__ID__goto,frame); 
    5867 
  • v6/smop/test/21_code.m0ld

    r21965 r21970  
    22my $out_scalar = ¢SMOP__S1P__RootNamespace."postcircumfix:{ }"("$*OUT"); 
    33my $out = $out_scalar."FETCH"(); 
    4 $void = $out."print"("1..1\n"); 
     4$void = $out."print"("1..2\n"); 
    55 
    66my $Code_scalar = ¢SMOP__S1P__RootNamespace."postcircumfix:{ }"("::Code"); 
    77my $Code = $Code_scalar."FETCH"(); 
    88my $code1 = $Code."new"(:"outer"("...outer..."),:"signature"("...signature..."),:"mold"(mold { 
     9    my $interpreter; 
     10    my $capture; 
     11    my $outer; 
     12    my $back; 
     13 
    914    my $void; 
    1015    my $out_scalar = ¢SMOP__S1P__RootNamespace."postcircumfix:{ }"("$*OUT"); 
    1116    my $out = $out_scalar."FETCH"(); 
    12     $void = $out."print"("ok 1\n"); 
     17    $void = $out."print"("ok\n"); 
     18    my $void = $interpreter."goto"($back); 
    1319})); 
    1420$void = $code1."postcircumfix:( )"(); 
    15  
     21$void = $code1."postcircumfix:( )"(); 
  • v6/smop/tools/dsl

    r21933 r21970  
    33use warnings; 
    44my ($dsl,$base,$m0ld,$in, $out) = @ARGV; 
    5 warn "dsl:$dsl base:$base in:$in out:$out\n"; 
     5#warn "dsl:$dsl base:$base in:$in out:$out\n"; 
    66my $elfX = "$base/../../misc/elfish/elfX/elfX"; 
    77if ($dsl eq 'm0ld') {