Changeset 4911
- Timestamp:
- 06/22/05 19:19:04 (4 years ago)
- svk:copy_cache_prev:
- 6641
- Files:
-
- 2 modified
-
ext/Test/lib/Test.pm (modified) (2 diffs)
-
src/Pugs/Compile/PIR.hs (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ext/Test/lib/Test.pm
r4385 r4911 203 203 $context = "TODO for release" if $num_of_tests_run == $force_todo_test_junction; 204 204 205 my $ok := $cond ?? "ok " :: "not ok ";206 205 my $out = $desc.defined ?? " - $desc" :: ""; 207 206 $out = "$out <pos:$?CALLER::CALLER::POSITION>" if $ALWAYS_CALLER; … … 209 208 my $context_out = $context.defined ?? " # $context" :: ""; 210 209 211 say $ok, $num_of_tests_run, $out, $context_out; 210 say "not " unless $cond; 211 say "ok ", $num_of_tests_run, $out, $context_out; 212 212 213 213 report_failure($context, $got, $expected) unless $cond; -
src/Pugs/Compile/PIR.hs
r4909 r4911 182 182 instance Compile (SubName, VCode) [PIL Decl] where 183 183 compile (name, vsub) | packageOf name /= packageOf (subName vsub) = do 184 let storeC = P Assign[PVar $ qualify name] (PExp . PVar . qualify $ subName vsub)184 let storeC = PBind [PVar $ qualify name] (PExp . PVar . qualify $ subName vsub) 185 185 bodyC = PStmts (PStmt . PExp $ storeC) PNil 186 186 exportL = "__export_" ++ (render $ varText name) … … 473 473 tellIns $ lhsC <== rhsC 474 474 return lhsC 475 trans (PBind [PVar name] rhs) 476 | Just (pkg, name') <- isQualified (qualify name) = do 477 rhsC <- trans rhs 478 tellIns $ "store_global" .- [lit pkg, lit name', rhsC] 479 trans (PVar name) 475 480 trans (PBind [lhs] rhs) = do 476 481 lhsC <- enter tcLValue $ trans lhs … … 498 503 then mapM trans (head args : map PThunk (tail args)) 499 504 else mapM trans args 505 -- XXX WORKAROUND PARROT BUG (see below) 506 pmc <- genLV "app" 507 -- XXX - probe if funC is slurpy, then modify ExpLV pmc accordingly 508 tellIns $ [reg pmc] <-& funC $ argsC 509 return pmc 510 {- XXX PARROT BUG -- tailcall broken 500 511 case cxt of 501 512 TTailCall _ -> do … … 507 518 tellIns $ [reg pmc] <-& funC $ argsC 508 519 return pmc 520 -} 509 521 where 510 522 -- XXX HACK
