--- a/IRBuilderTest.st Wed May 13 08:23:00 2009 +0000
+++ b/IRBuilderTest.st Wed May 13 09:30:49 2009 +0000
@@ -859,6 +859,36 @@
"Created: / 30-03-2009 / 23:03:48 / Jan Vrany <vranyj1@fel.cvut.cz>"
!
+testBlock_block_in_another_basic_block
+ |aCompiledMethod irBuilder|
+
+ irBuilder := (IRBuilder new)
+ numRargs:1;
+ addTemps:#( #self );
+ pushLiteral: false;
+ pushLiteral: true;
+ jumpAheadTo: #end if: false;
+ pushBlockUsingBuilder:[:builder |
+ builder
+ numRargs: 0;
+ pushLiteral: true;
+ returnTop
+ ];
+ send: #value;
+ jumpAheadTarget: #end;
+ returnTop;
+ ir.
+ "
+ irBuilder ir
+ "
+
+ aCompiledMethod := irBuilder compiledCode.
+ self assert:(aCompiledMethod isKindOf:CompiledMethod).
+ self assert:((aCompiledMethod valueWithReceiver:1 arguments:#()) = true).
+
+ "Created: / 13-05-2009 / 11:24:48 / Jan Vrany <vranyj1@fel.cvut.cz>"
+!
+
testBlock_exceptionHandler
|aCompiledMethod irBuilder|