comparison nworker.rhope @ 89:5a195ee08eac

Fix memory leak and bug that was preventing First@Dictionary from working properly
author Mike Pavone <pavone@retrodev.com>
date Sat, 31 Jul 2010 00:19:15 -0400
parents 3c4325e6298f
children bcdc326b3d6e
comparison
equal deleted inserted replaced
88:f69987c58fa8 89:5a195ee08eac
1329 } 1329 }
1330 } 1330 }
1331 }{ 1331 }{
1332 ,setref <- [begin setter]Write Field["obj", name] 1332 ,setref <- [begin setter]Write Field["obj", name]
1333 { 1333 {
1334 setter <- [[~]Unbox["newval", setref] 1334 setter <- [[[~]Unbox["newval", setref]
1335 ]Release["newval"]
1335 ]Move["obj", "out"] 1336 ]Move["obj", "out"]
1336 } 1337 }
1337 } 1338 }
1338 1339
1339 out <- [[backend]Store Function[getter]]Store Function[setter] 1340 out <- [[backend]Store Function[getter]]Store Function[setter]
1420 out <- Fold["_Compile Program", backend with bps, workers with infer] 1421 out <- Fold["_Compile Program", backend with bps, workers with infer]
1421 } 1422 }
1422 1423
1423 Register Method@NProgram[prog, name, convention, inputs, outputs: out] 1424 Register Method@NProgram[prog, name, convention, inputs, outputs: out]
1424 { 1425 {
1425 out <- [prog]Worker Refs <<[ [[prog]Worker Refs >>]Set[name, Worker Ref[name, convention, inputs, outputs, Yes]]] 1426 [[prog]Worker Refs >>]Index[name]
1427 {
1428 ref <- [[[[~]Inputs <<[ Max[[~]Inputs >>, inputs] ]
1429 ]Min Inputs <<[ Min[[~]Min Inputs >>, inputs] ]
1430 ]Outputs <<[ Max[[~]Outputs >>, outputs] ]
1431 ]Min Outputs <<[ Min[[~]Min Outputs >>, outputs] ]
1432 }{
1433 ref <- Worker Ref[name, convention, inputs, outputs, Yes]
1434 }
1435 out <- [prog]Worker Refs <<[ [[prog]Worker Refs >>]Set[name, ref]]
1426 } 1436 }
1427 1437
1428 Register Worker@NProgram[prog, name, convention, inputs, outputs: out] 1438 Register Worker@NProgram[prog, name, convention, inputs, outputs: out]
1429 { 1439 {
1430 [[prog]Worker Refs >>]Index[name] 1440 [[prog]Worker Refs >>]Index[name]