Mercurial > repos > rhope
comparison nworker.rhope @ 40:789a146a48e1
Started adding support for naked values in user defined objects
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 09 Oct 2009 01:01:26 -0400 |
parents | 640f541e9116 |
children | aabda74c7a88 |
comparison
equal
deleted
inserted
replaced
39:3d92bc1352c2 | 40:789a146a48e1 |
---|---|
764 } | 764 } |
765 | 765 |
766 Make Init[func,field:out] | 766 Make Init[func,field:out] |
767 { | 767 { |
768 name <- [field]Index[0] | 768 name <- [field]Index[0] |
769 out <- [func]Set Field Null["obj", name] | 769 variant <- [[field]Index[1]]Variant >> |
770 If[[variant] = ["Boxed"]] | |
771 { | |
772 out <- [func]Set Field Null["obj", name] | |
773 }{ | |
774 out <- func | |
775 } | |
770 } | 776 } |
771 | 777 |
772 Make Copy[func,field:out] | 778 Make Copy[func,field:out] |
773 { | 779 { |
774 name <- [field]Index[0] | 780 name <- [field]Index[0] |
775 got <- [func]Read Field["obj", name] {} | 781 variant <- [[field]Index[1]]Variant >> |
776 { | 782 If[[variant] = ["Boxed"]] |
777 stream <- [[got]Instruction Stream | 783 { |
778 ]AddRef No Dest[~] | 784 got <- [func]Read Field["obj", name] {} |
779 out <- [got]Do If[~, stream] | 785 { |
786 stream <- [[got]Instruction Stream | |
787 ]AddRef No Dest[~] | |
788 out <- [got]Do If[~, stream] | |
789 } | |
790 }{ | |
791 out <- func | |
780 } | 792 } |
781 } | 793 } |
782 | 794 |
783 Make Cleanup[func,field:out] | 795 Make Cleanup[func,field:out] |
784 { | 796 { |
785 name <- [field]Index[0] | 797 name <- [field]Index[0] |
786 got <- [func]Read Field["obj", name] {} | 798 variant <- [[field]Index[1]]Variant >> |
787 { | 799 If[[variant] = ["Boxed"]] |
788 stream <- [[got]Instruction Stream | 800 { |
789 ]Release[~] | 801 got <- [func]Read Field["obj", name] {} |
790 out <- [got]Do If[~, stream] | 802 { |
803 stream <- [[got]Instruction Stream | |
804 ]Release[~] | |
805 out <- [got]Do If[~, stream] | |
806 } | |
807 }{ | |
808 out <- func | |
791 } | 809 } |
792 } | 810 } |
793 | 811 |
794 Make Special@NBlueprint[bp,backend,func name,bp name,pop worker:out] | 812 Make Special@NBlueprint[bp,backend,func name,bp name,pop worker:out] |
795 { | 813 { |