- Timestamp:
- 11/09/08 21:55:00 (2 months ago)
- Location:
- v6
- Files:
-
- 4 modified
-
mildew/mildew (modified) (1 diff)
-
mildew/src/AST.pm (modified) (1 diff)
-
mildew/t/if.t (modified) (1 diff)
-
smop/src/native_int.ri (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
v6/mildew/mildew
r22933 r22943 325 325 my $stm = $m->{statement_control}; 326 326 if ($stm->{sym} eq 'if') { 327 my $then = AST::Call->new(identifier=>string 'postcircumfix:( )',capture => AST::Capture->new( 328 invocant => AST::Call->new(identifier=>string 'new', 329 capture => AST::Capture->new( 330 invocant => FETCH(lookup('Code')), 331 positional => [], 332 named => [ 333 string 'mold' => $stm->{xblock}{pblock}{block}->emit_m0ld, 334 string 'outer' => reg '$scope' 335 ]) 336 ), 337 positional => [AST::Call->new( 338 identifier => string "capturize", 339 capture => AST::Capture->new( 340 invocant => reg '¢SMOP__S1P__Capturize', 341 positional => [] 342 ) 343 )] 344 )); 327 345 AST::If->new( 328 cond => $stm->{xblock}{EXPR}->emit_m0ld,329 then => $stm->{xblock}{pblock}{block}->emit_m0ld330 );346 cond => $stm->{xblock}{EXPR}->emit_m0ld, 347 then => $then 348 ); 331 349 } else { 332 350 XXX('unkown sym in statement_control') -
v6/mildew/src/AST.pm
r22936 r22943 54 54 $cond.$/. 55 55 'my '.$id_cond.'_val = '.$id_cond.'."FETCH"();'.$/. 56 'my '.$id_cond.'_bool = '.$id_cond.'_val." bool"();'.$/.56 'my '.$id_cond.'_bool = '.$id_cond.'_val."true"();'.$/. 57 57 'if '.$id_cond.'_bool { goto '.$label_then.' } else { goto '.$label_else.' };'.$/. 58 58 $label_then.':'.$/. 59 59 $then.$/. 60 60 $label_else.': noop;'.$/; 61 } 62 sub pretty { 63 my ($self) = @_; 64 'if ' . $self->cond->pretty . " {\n" 65 . AST::indent($self->then->pretty) . "\n" 66 . "}\n" 61 67 } 62 68 -
v6/mildew/t/if.t
r22860 r22943 1 1 $OUT.print("1..1\n"); 2 if True { 2 if 0 { 3 $OUT.print("not ok 1\n"); 4 } 5 if 1 { 3 6 $OUT.print("ok 1\n"); 4 7 } -
v6/smop/src/native_int.ri
r22940 r22943 29 29 %method defined 30 30 ret = SMOP__NATIVE__bool_true; 31 %method true 32 smop_lowlevel_wrlock(invocant); 33 ret = ((smop_native_int_struct*)invocant)->intvalue ? SMOP__NATIVE__bool_true : SMOP__NATIVE__bool_false; 34 smop_lowlevel_unlock(invocant); 31 35 %method FETCH 32 36 ___VALUE_FETCH___;
