- Timestamp:
- 09/15/08 10:58:57 (2 months ago)
- Location:
- v6/smop
- Files:
-
- 4 modified
-
src/smop_interpreter.c (modified) (2 diffs)
-
src/smop_s1p_code.sm0p (modified) (1 diff)
-
test/21_code.m0ld (modified) (1 diff)
-
test/modified_pugs_output.m0ld (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
v6/smop/src/smop_interpreter.c
r22017 r22251 3 3 #include <stdlib.h> 4 4 #include <smop.h> 5 #include <smop_s1p.h> 5 6 #include <smop_lowlevel.h> 6 7 … … 275 276 smop_lowlevel_unlock(capture); 276 277 if (cont) SMOP_RELEASE(interpreter,cont); 278 } else { 279 ___UNKNOWN_METHOD___ 277 280 } 278 281 SMOP_RELEASE(interpreter, invocant); -
v6/smop/src/smop_s1p_code.sm0p
r22192 r22251 135 135 $void = $lexical_outer_container."STORE"($outer); 136 136 137 my $actualcapture = $capture."positional"(0); 137 # for method postcircumfix:<( )> ($capture) {...} instead of the specced method postcircumfix:<( )> (|$capture) {...} 138 #my $actualcapture = $capture."positional"(0); 139 #$void = $signature."BIND"($actualcapture,$lexical); 138 140 139 $void = $signature."BIND"($actualcapture,$lexical); 141 $void = $signature."BIND"($capture,$lexical); 142 140 143 my $frame_proto = ¢SMOP__Mold__Frame; 141 144 my $frame = $frame_proto."new"($mold); -
v6/smop/test/21_code.m0ld
r22206 r22251 33 33 })); 34 34 35 my $capture = ¢SMOP__S1P__Capturize."capturize"("ok 1\n"); 36 $void = $code1."postcircumfix:( )"($capture); 37 $capture = ¢SMOP__S1P__Capturize."capturize"("ok 2\n"); 38 $void = $code1."postcircumfix:( )"($capture); 39 $capture = ¢SMOP__S1P__Capturize."capturize"(); 40 $void = $code1."postcircumfix:( )"($capture); 35 $void = $code1."postcircumfix:( )"("ok 1\n"); 36 $void = $code1."postcircumfix:( )"("ok 2\n"); 37 $void = $code1."postcircumfix:( )"(); -
v6/smop/test/modified_pugs_output.m0ld
r22249 r22251 1 1 my $void; 2 my $scope = ¢SMOP__S1P__LexicalScope."new"(); 3 2 4 my $OUT_root_scalar = ¢SMOP__S1P__RootNamespace."postcircumfix:{ }"("$*OUT"); 3 5 my $OUT_root = $OUT_root_scalar."FETCH"(); 6 my $OUT_scalar = $scope."postcircumfix:{ }"("$*OUT"); 7 $void = $OUT_scalar."STORE"($OUT_root); 4 8 5 my $void = $OUT_root."print"("creating scope...\n");6 my $scope = ¢SMOP__S1P__LexicalScope."new"();7 9 8 my $void = $OUT_root."print"("1\n");9 10 my $Code_scalar = $scope."postcircumfix:{ }"("Code"); 10 my $void = $OUT_root."print"("2\n");11 11 my $Code_root_scalar = ¢SMOP__S1P__RootNamespace."postcircumfix:{ }"("::Code"); 12 my $void = $OUT_root."print"("3\n");13 12 my $Code_root = $Code_root_scalar."FETCH"(); 14 my $void = $OUT_root."print"("4\n");15 13 $void = $Code_scalar."STORE"($Code_root); 16 14 17 my $void = $OUT_root."print"("5\n");18 my $OUT_scalar = $scope."postcircumfix:{ }"("$*OUT");19 my $void = $OUT_root."print"("6\n");20 $void = $OUT_scalar."STORE"($OUT_root);21 15 22 my $void = $OUT_root."print"("7\n"); 23 ### 16 ############################################################## 24 17 25 18 my $interpreter; 26 19 my $scope; 27 #my $void;28 my $Code_scalar = $scope." postcircumfix:{ }"("Code");20 my $void; 21 my $Code_scalar = $scope."lookup"("Code"); 29 22 my $Code = $Code_scalar."FETCH"(); 30 23 my $id2 = $Code."new"(:"outer"($scope),:"mold"(mold { … … 32 25 my $scope; 33 26 my $void; 34 my $Code_scalar = $scope." postcircumfix:{ }"("Code");27 my $Code_scalar = $scope."lookup"("Code"); 35 28 my $Code = $Code_scalar."FETCH"(); 36 29 my $id3 = $Code."new"(:"outer"($scope),:"mold"(mold { … … 38 31 my $scope; 39 32 my $void; 40 my $Code_scalar = $scope." postcircumfix:{ }"("Code");33 my $Code_scalar = $scope."lookup"("Code"); 41 34 my $Code = $Code_scalar."FETCH"(); 42 #noop 43 my $id5 = $scope."postcircumfix:{ }"("$*OUT"); 44 my $id6 = "Hello World"; 45 my $id4 = $id5."say"($id6); 46 $void = $interpreter."return"($id4); 35 my $id6 = $scope."lookup"("$*OUT"); 36 my $id5 = $id6."FETCH"(); 37 my $id7 = "1..1\nok 1\n"; 38 my $id4 = $id5."print"($id7); 39 my $continuation = $interpreter."continuation"(); 40 my $back = $continuation."back"(); 41 my $void = $back."setr"($id4); 42 $void = $interpreter."goto"($back); 47 43 })); 48 $void = $interpreter."return"($id3); 44 my $continuation = $interpreter."continuation"(); 45 my $back = $continuation."back"(); 46 my $void = $back."setr"($id3); 47 $void = $interpreter."goto"($back); 49 48 })); 50 49 my $id1 = $id2."postcircumfix:( )"(); 51 my $id7 = $scope."postcircumfix:{ }"("$_"); 52 my $void = $id1."postcircumfix:( )"($id7); 50 my $id9 = $scope."lookup"("$_"); 51 my $id8 = $id9."FETCH"(); 52 my $void = $id1."postcircumfix:( )"($id8);
