Build files regenerated
authorJan Vrany <jan.vrany@fit.cvut.cz>
Thu, 29 Mar 2012 18:03:58 +0000
changeset 37be8c2dd09dff
parent 36 1bfd09c6b3d8
child 38 a64f4ad690f5
Build files regenerated
IRAccess.st
IRBlockReturnTop.st
IRBuilder.st
IRBuilderTest.st
IRBytecodeGenerator.st
IRClosure.st
IRConstant.st
IRDecompiler.st
IRDup.st
IRFunction.st
IRInstVarAccess.st
IRInstVarRead.st
IRInstVarStore.st
IRInstruction.st
IRInterpreter.st
IRJump.st
IRJumpIf.st
IRJumpOverBlock.st
IRLine.st
IRLiteralVariableAccess.st
IRLiteralVariableRead.st
IRLiteralVariableStore.st
IRMethod.st
IRPop.st
IRPrinter.st
IRReturn.st
IRSend.st
IRSequence.st
IRStackCount.st
IRTempAccess.st
IRTempRead.st
IRTempStore.st
IRTransformTest.st
IRTranslator.st
Make.proto
Make.spec
Makefile
abbrev.stc
bc.mak
bmake.bat
cvut_stx_goodies_newcompiler.st
extensions.st
libInit.cc
newcompiler.rc
vcmake.bat
     1.1 --- a/IRAccess.st	Tue Nov 15 21:28:05 2011 +0000
     1.2 +++ b/IRAccess.st	Thu Mar 29 18:03:58 2012 +0000
     1.3 @@ -29,13 +29,13 @@
     1.4  !IRAccess class methodsFor:'documentation'!
     1.5  
     1.6  version
     1.7 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRAccess.st,v 1.3 2009/10/08 11:57:08 fm Exp $'
     1.8 +    ^ '$Id$'
     1.9  !
    1.10  
    1.11  version_CVS
    1.12 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRAccess.st,v 1.3 2009/10/08 11:57:08 fm Exp $'
    1.13 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRAccess.st,v 1.3 2009/10/08 11:57:08 fm Exp §'
    1.14  !
    1.15  
    1.16  version_SVN
    1.17 -    ^ '$Id$'
    1.18 +    ^ '$Id::                                                                                                                        $'
    1.19  ! !
     2.1 --- a/IRBlockReturnTop.st	Tue Nov 15 21:28:05 2011 +0000
     2.2 +++ b/IRBlockReturnTop.st	Thu Mar 29 18:03:58 2012 +0000
     2.3 @@ -41,13 +41,13 @@
     2.4  !IRBlockReturnTop class methodsFor:'documentation'!
     2.5  
     2.6  version
     2.7 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRBlockReturnTop.st,v 1.3 2009/10/08 11:58:58 fm Exp $'
     2.8 +    ^ '$Id$'
     2.9  !
    2.10  
    2.11  version_CVS
    2.12 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRBlockReturnTop.st,v 1.3 2009/10/08 11:58:58 fm Exp $'
    2.13 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRBlockReturnTop.st,v 1.3 2009/10/08 11:58:58 fm Exp §'
    2.14  !
    2.15  
    2.16  version_SVN
    2.17 -    ^ '$Id$'
    2.18 +    ^ '$Id::                                                                                                                        $'
    2.19  ! !
     3.1 --- a/IRBuilder.st	Tue Nov 15 21:28:05 2011 +0000
     3.2 +++ b/IRBuilder.st	Thu Mar 29 18:03:58 2012 +0000
     3.3 @@ -106,13 +106,6 @@
     3.4      "Modified: / 30-03-2009 / 11:15:46 / Jan Vrany <vranyj1@fel.cvut.cz>"
     3.5  !
     3.6  
     3.7 -tempNames
     3.8 -
     3.9 -    ^ir tempNames
    3.10 -
    3.11 -    "Modified: / 30-03-2009 / 11:15:46 / Jan Vrany <vranyj1@fel.cvut.cz>"
    3.12 -!
    3.13 -
    3.14  testJumpAheadTarget: label
    3.15  
    3.16  	jumpAheadStacks at: label ifPresent: [:stack |
    3.17 @@ -127,20 +120,6 @@
    3.18  	self addTemps: {tempKey}
    3.19  !
    3.20  
    3.21 -addTempIfNotDefined: tempKey
    3.22 -
    3.23 -        self addTempsIfNotDefined: (Array with: tempKey)
    3.24 -
    3.25 -    "Created: / 23-03-2010 / 13:46:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    3.26 -!
    3.27 -
    3.28 -addTempsIfNotDefined: temps
    3.29 -
    3.30 -    ir addTempsIfNotDefined: temps
    3.31 -
    3.32 -    "Created: / 23-03-2010 / 13:46:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    3.33 -!
    3.34 -
    3.35  initialize
    3.36  
    3.37      ^self initializeFor: IRMethod new.
    3.38 @@ -478,13 +457,13 @@
    3.39  !IRBuilder class methodsFor:'documentation'!
    3.40  
    3.41  version
    3.42 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRBuilder.st,v 1.3 2009/10/08 11:57:58 fm Exp $'
    3.43 +    ^ '$Id$'
    3.44  !
    3.45  
    3.46  version_CVS
    3.47 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRBuilder.st,v 1.3 2009/10/08 11:57:58 fm Exp $'
    3.48 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRBuilder.st,v 1.3 2009/10/08 11:57:58 fm Exp §'
    3.49  !
    3.50  
    3.51  version_SVN
    3.52 -    ^ '$Id$'
    3.53 +    ^ '$Id::                                                                                                                        $'
    3.54  ! !
     4.1 --- a/IRBuilderTest.st	Tue Nov 15 21:28:05 2011 +0000
     4.2 +++ b/IRBuilderTest.st	Thu Mar 29 18:03:58 2012 +0000
     4.3 @@ -186,11 +186,10 @@
     4.4  
     4.5  !IRBuilderTest methodsFor:'testing'!
     4.6  
     4.7 -error
     4.8 +halt
     4.9          "Redefinition for testing the #send:toSuperOf:"
    4.10  
    4.11      "Created: / 11-06-2008 / 16:08:52 / Jan Vrany <vranyj1@fel.cvut.cz>"
    4.12 -    "Created: / 15-11-2011 / 22:27:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    4.13  !
    4.14  
    4.15  isThisEverCalled
    4.16 @@ -465,7 +464,7 @@
    4.17      iRMethod := (IRBuilder new)
    4.18                  numRargs:1;
    4.19                  addTemps:#( #self );
    4.20 -                pushLiteralVariable:#ArithmeticError;
    4.21 +                pushLiteralVariable:(ArithmeticValue bindingOf:#ArithmeticSignal);
    4.22                  returnTop;
    4.23                  ir.
    4.24      aCompiledMethod := iRMethod compiledCode.
    4.25 @@ -474,7 +473,6 @@
    4.26                  = ArithmeticValue arithmeticSignal).
    4.27  
    4.28      "Modified: / 11-06-2008 / 11:31:32 / Jan Vrany <vranyj1@fel.cvut.cz>"
    4.29 -    "Modified: / 15-11-2011 / 22:25:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    4.30  !
    4.31  
    4.32  testLiteralVariableGlobale
    4.33 @@ -670,7 +668,7 @@
    4.34                  numRargs:1;
    4.35                  addTemps:#( #self );
    4.36                  pushReceiver;
    4.37 -                send:#error toSuperOf:IRBuilderTest;
    4.38 +                send:#halt toSuperOf:IRBuilderTest;
    4.39                  returnTop;
    4.40                  ir.
    4.41      aCompiledMethod := iRMethod compiledCode.
    4.42 @@ -682,7 +680,6 @@
    4.43          raise:Error.
    4.44  
    4.45      "Modified: / 11-06-2008 / 16:09:12 / Jan Vrany <vranyj1@fel.cvut.cz>"
    4.46 -    "Modified: / 15-11-2011 / 22:25:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    4.47  !
    4.48  
    4.49  testStorIntoVariable
    4.50 @@ -692,7 +689,7 @@
    4.51                  numRargs:1;
    4.52                  addTemps:#( #self );
    4.53                  pushLiteral:4;
    4.54 -                storeIntoLiteralVariable:(#'IRBuilderTest:TestToPush');
    4.55 +                storeIntoLiteralVariable:(IRBuilderTest bindingOf:#TestToPush);
    4.56                  returnTop;
    4.57                  ir.
    4.58      aCompiledMethod := iRMethod compiledCode.
    4.59 @@ -700,8 +697,6 @@
    4.60      aCompiledMethod valueWithReceiver:nil arguments:#().
    4.61      self assert:(IRBuilderTest testToPush = 4).
    4.62      IRBuilderTest testToPush:nil.
    4.63 -
    4.64 -    "Modified: / 15-11-2011 / 22:27:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    4.65  !
    4.66  
    4.67  testStoreTemp
    4.68 @@ -1035,5 +1030,5 @@
    4.69  !
    4.70  
    4.71  version_SVN
    4.72 -    ^ '$Id$'
    4.73 +    ^ '$Id::                                                                                                                        $'
    4.74  ! !
     5.1 --- a/IRBytecodeGenerator.st	Tue Nov 15 21:28:05 2011 +0000
     5.2 +++ b/IRBytecodeGenerator.st	Thu Mar 29 18:03:58 2012 +0000
     5.3 @@ -37,6 +37,17 @@
     5.4  
     5.5  !IRBytecodeGenerator methodsFor:'accessing'!
     5.6  
     5.7 +getCode
     5.8 +
     5.9 +    "
    5.10 +        Private entry for IRBytecodeGenerator>>makeBlock:
    5.11 +    "
    5.12 +
    5.13 +    ^code
    5.14 +
    5.15 +    "Created: / 30-03-2009 / 19:00:07 / Jan Vrany <vranyj1@fel.cvut.cz>"
    5.16 +!
    5.17 +
    5.18  properties: aDictionary
    5.19  
    5.20      properties := aDictionary.
    5.21 @@ -213,6 +224,7 @@
    5.22                  at: index + 1 
    5.23                  put: (closureCode at: index + 1) + pos + 4]].
    5.24  
    5.25 +
    5.26      code addAll: closureCode.
    5.27  
    5.28      "Patch number of closure bytecodes"
    5.29 @@ -220,7 +232,6 @@
    5.30  
    5.31      "Created: / 30-03-2009 / 18:16:10 / Jan Vrany <vranyj1@fel.cvut.cz>"
    5.32      "Modified: / 12-05-2009 / 08:58:11 / Jan Vrany <vranyj1@fel.cvut.cz>"
    5.33 -    "Modified: / 23-03-2010 / 22:34:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    5.34  !
    5.35  
    5.36  popTop
    5.37 @@ -715,38 +726,6 @@
    5.38      "Modified: / 13-05-2009 / 10:42:16 / Jan Vrany <vranyj1@fel.cvut.cz>"
    5.39  !
    5.40  
    5.41 -getCode
    5.42 -
    5.43 -        | stream basicBlockStartOffset |
    5.44 -        [ orderSeq
    5.45 -                inject: false
    5.46 -                into: [:changed :seqId | (self updateJump: seqId) | changed]
    5.47 -        ] whileTrue.
    5.48 -
    5.49 -        stream := (OrderedCollection new: 200) writeStream.
    5.50 -        basicBlockStartOffset := 0. 
    5.51 -        orderSeq do: [:seqId |
    5.52 -                (instrMaps at: seqId) do: [:assoc |
    5.53 -                        assoc key "instr" bytecodeIndex: stream position + assoc value.
    5.54 -                ].
    5.55 -                "Patch makeBlock offsets"
    5.56 -                (seqCode at: seqId) withIndexDo:
    5.57 -                    [:instr :index|
    5.58 -                    instr == #makeBlock ifTrue:
    5.59 -                        [(seqCode at: seqId) 
    5.60 -                            at: index + 1
    5.61 -                            put: ((seqCode at: seqId) at: index + 1) + basicBlockStartOffset]].
    5.62 -
    5.63 -                stream nextPutAll: (seqCode at: seqId).
    5.64 -                basicBlockStartOffset := basicBlockStartOffset + (seqCode at: seqId) size.
    5.65 -        ].
    5.66 -        ^stream contents
    5.67 -
    5.68 -    "Created: / 11-06-2008 / 14:00:43 / Jan Vrany <vranyj1@fel.cvut.cz>"
    5.69 -    "Modified: / 13-05-2009 / 11:15:41 / Jan Vrany <vranyj1@fel.cvut.cz>"
    5.70 -    "Modified: / 24-03-2010 / 08:42:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    5.71 -!
    5.72 -
    5.73  literals
    5.74  
    5.75      ^literals asArray
    5.76 @@ -829,13 +808,13 @@
    5.77  !IRBytecodeGenerator class methodsFor:'documentation'!
    5.78  
    5.79  version
    5.80 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRBytecodeGenerator.st,v 1.3 2009/10/08 12:04:39 fm Exp $'
    5.81 +    ^ '$Id$'
    5.82  !
    5.83  
    5.84  version_CVS
    5.85 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRBytecodeGenerator.st,v 1.3 2009/10/08 12:04:39 fm Exp $'
    5.86 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRBytecodeGenerator.st,v 1.3 2009/10/08 12:04:39 fm Exp §'
    5.87  !
    5.88  
    5.89  version_SVN
    5.90 -    ^ '$Id$'
    5.91 +    ^ '$Id::                                                                                                                        $'
    5.92  ! !
     6.1 --- a/IRClosure.st	Tue Nov 15 21:28:05 2011 +0000
     6.2 +++ b/IRClosure.st	Thu Mar 29 18:03:58 2012 +0000
     6.3 @@ -10,6 +10,10 @@
     6.4  
     6.5  !IRClosure methodsFor:'accessing'!
     6.6  
     6.7 +environmentIr
     6.8 +    ^ environmentIr
     6.9 +!
    6.10 +
    6.11  environmentIr:something
    6.12      environmentIr := something.
    6.13  ! !
    6.14 @@ -55,13 +59,13 @@
    6.15  !IRClosure class methodsFor:'documentation'!
    6.16  
    6.17  version
    6.18 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRClosure.st,v 1.3 2009/10/08 12:00:40 fm Exp $'
    6.19 +    ^ '$Id$'
    6.20  !
    6.21  
    6.22  version_CVS
    6.23 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRClosure.st,v 1.3 2009/10/08 12:00:40 fm Exp $'
    6.24 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRClosure.st,v 1.3 2009/10/08 12:00:40 fm Exp §'
    6.25  !
    6.26  
    6.27  version_SVN
    6.28 -    ^ '$Id$'
    6.29 +    ^ '$Id::                                                                                                                        $'
    6.30  ! !
     7.1 --- a/IRConstant.st	Tue Nov 15 21:28:05 2011 +0000
     7.2 +++ b/IRConstant.st	Thu Mar 29 18:03:58 2012 +0000
     7.3 @@ -61,13 +61,13 @@
     7.4  !IRConstant class methodsFor:'documentation'!
     7.5  
     7.6  version
     7.7 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRConstant.st,v 1.3 2009/10/08 12:03:32 fm Exp $'
     7.8 +    ^ '$Id$'
     7.9  !
    7.10  
    7.11  version_CVS
    7.12 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRConstant.st,v 1.3 2009/10/08 12:03:32 fm Exp $'
    7.13 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRConstant.st,v 1.3 2009/10/08 12:03:32 fm Exp §'
    7.14  !
    7.15  
    7.16  version_SVN
    7.17 -    ^ '$Id$'
    7.18 +    ^ '$Id::                                                                                                                        $'
    7.19  ! !
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/IRDecompiler.st	Thu Mar 29 18:03:58 2012 +0000
     8.3 @@ -0,0 +1,1305 @@
     8.4 +"{ Package: 'cvut:stx/goodies/newcompiler' }"
     8.5 +
     8.6 +IRInterpreter subclass:#IRDecompiler
     8.7 +	instanceVariableNames:'stack sp scope currentInstr valueLabelMap mapEmptyStatement'
     8.8 +	classVariableNames:''
     8.9 +	poolDictionaries:''
    8.10 +	category:'NewCompiler-IR'
    8.11 +!
    8.12 +
    8.13 +IRDecompiler comment:'I interpret IRMethod instructions and generate a Smalltalk abstract syntax tree rooted at a RBMethodNode.
    8.14 +This is implemented like a shift-reduce parser.  Each instruction either causes a node to be pushed on the stack (shift), or causes one or more nodes to be popped and combined into a single node which is push back on the stack (reduce).  Most reduction is done at the "label: labelNum" instruction where it tries to reduce jump structures into control messages like #ifTrue:, whileFalse:, etc.
    8.15 +Several pseudo nodes (RBPseudoNode and subclasses) are used to represent basic instructions that have not been reduced to real AST nodes yet.
    8.16 +'
    8.17 +!
    8.18 +
    8.19 +
    8.20 +!IRDecompiler class methodsFor:'as yet unclassified'!
    8.21 +
    8.22 +dummySelector: numArgs
    8.23 +	"Answer a dummy selector with number of args"
    8.24 +
    8.25 +	| sel |
    8.26 +	sel _ 'unknown'.
    8.27 +	1 to: numArgs do: [:i |
    8.28 +		sel _ sel, 'with:'].
    8.29 +	^ sel asSymbol
    8.30 +! !
    8.31 +
    8.32 +!IRDecompiler methodsFor:'accessing'!
    8.33 +
    8.34 +scope
    8.35 +
    8.36 +	^scope
    8.37 +! !
    8.38 +
    8.39 +!IRDecompiler methodsFor:'init'!
    8.40 +
    8.41 +addTempToScope: ir 
    8.42 +
    8.43 +	"Temp may be created only if they are not used in the method"
    8.44 +	0 to: ir numRargs - 1 do: [:i | (scope 
    8.45 +		rawVarAt: i 
    8.46 +		ifNone: [
    8.47 +			scope capturedVars do: [:each | 
    8.48 +				each index = i ifTrue:[
    8.49 +					scope tempVarAt: scope capturedVars size + scope tempVars size.
    8.50 +					^self]].
    8.51 +			scope tempVarAt: i]) markArg]
    8.52 +!
    8.53 +
    8.54 +decompileIR: ir 
    8.55 +	| sequenceNode temps args goto seq value method |
    8.56 +	scope isBlockScope 
    8.57 +		ifTrue:[(scope addTemp: 'parent env') markArg]
    8.58 +		ifFalse:[(scope addTemp: 'self') markArg].
    8.59 +	ir tempKeys do: [:temp | scope tempVarAt: temp].
    8.60 +	0 to: ir numRargs - 1 do: [:i | (scope tempVarAt: i) markArg].
    8.61 +	self interpret: ir.
    8.62 +	
    8.63 +	self addTempToScope: ir.
    8.64 +	self label: #return.
    8.65 +	self Label: #return.
    8.66 +	(self endCase: #lastReturn) ifFalse:[self Label: #return.].
    8.67 +	goto := self Goto.
    8.68 +	value := self ValueOrNone.
    8.69 +	seq := self Sequence.
    8.70 +	self removeClosureCreation: seq.
    8.71 +	sp = 1 ifFalse: [stack explore. self error: 'error'].
    8.72 +	value ifNotNil: [seq addNode: value].
    8.73 +	sequenceNode := (self newBlock: seq return: goto) body.
    8.74 +	temps := scope compactIndexTemps asArray.
    8.75 +	ir tempKeys: temps.
    8.76 +	args := (temps first: ir numRargs) allButFirst.
    8.77 +	args := args collect: [:var | self newVar: var].
    8.78 +	temps := temps allButFirst: ir numRargs.
    8.79 +	sequenceNode temporaries: (temps collect: [:var | self newVar: var]), 
    8.80 +		((scope capturedVars select:[:var | var name ~= 'self' and: [var sourceTemp == nil]]) 
    8.81 +			collect:[:var | self newVar: var]).
    8.82 +	method := (RBMethodNode new)
    8.83 +				selectorParts: (self 
    8.84 +							newSelectorParts: (self class dummySelector: args size));
    8.85 +				arguments: args;
    8.86 +				body: sequenceNode;
    8.87 +				primitiveNode: ir primitiveNode;
    8.88 +				scope: scope.
    8.89 +	sequenceNode parent: method.
    8.90 +	Preferences compileBlocksAsClosures 
    8.91 +		ifFalse: [ASTFixDecompileBlockScope new visitNode: method].
    8.92 +	^ method
    8.93 +!
    8.94 +
    8.95 +removeClosureCreation: seq 
    8.96 +	(Preferences compileBlocksAsClosures 
    8.97 +		and: [seq statements size > 0]
    8.98 +		and: [seq statements first isClosureEnvironmentCreation]) ifTrue: [
    8.99 +			seq statements removeFirst.
   8.100 +			(seq statements size > 0
   8.101 +				and: [seq statements first isClosureEnvironmentRegistration])
   8.102 +				ifTrue: [seq statements removeFirst]].
   8.103 +			
   8.104 +	[Preferences compileBlocksAsClosures
   8.105 +		and: [seq statements size > 0]
   8.106 +		and: [seq statements first isClosureRegistrationAndCreation
   8.107 +			or: [seq statements first isSelfClosureRegistration]
   8.108 +			or: [seq statements first isTempClosureRegistration]]]
   8.109 +					whileTrue: [seq statements removeFirst]
   8.110 +!
   8.111 +
   8.112 +scope: aLexicalScope
   8.113 +
   8.114 +	scope := aLexicalScope
   8.115 +! !
   8.116 +
   8.117 +!IRDecompiler methodsFor:'instructions'!
   8.118 +
   8.119 +goto: seqNum
   8.120 +
   8.121 +	self stackPush: (RBPseudoGotoNode new destination: seqNum).
   8.122 +!
   8.123 +
   8.124 +if: bool goto: seqNum1 otherwise: seqNum2
   8.125 +
   8.126 +	self stackPush: (RBPseudoIfNode new
   8.127 +		boolean: bool;
   8.128 +		destination: seqNum1;
   8.129 +		otherwise: seqNum2)
   8.130 +!
   8.131 +
   8.132 +label: seqNum
   8.133 +
   8.134 +	stack isEmpty ifTrue: [  "start"
   8.135 +		^ stack addLast: (RBPseudoLabelNode new destination: seqNum)].
   8.136 +
   8.137 +	self captureEmptyStatement.
   8.138 +	"Reduce jump structures to one of the following if possible"
   8.139 +	[	(self endBlock: seqNum) or: [
   8.140 +		 (self endAndOr: seqNum) or: [
   8.141 +		  (self endAndOr2: seqNum) or: [
   8.142 +		   (self endIfThen: seqNum) or: [
   8.143 +		    (self endIfThen2: seqNum) or:[
   8.144 +		      (self endIfThenElse: seqNum) or: [
   8.145 +		       (self endCase: seqNum) or: [
   8.146 +		        (self endToDo: seqNum) or: [
   8.147 +		         (self endWhile: seqNum) or: [
   8.148 +			     (self endWhile2: seqNum) or: [
   8.149 +			      (self endIfNil: seqNum)]]]]]]]]]]
   8.150 +	] whileTrue.
   8.151 +
   8.152 +	stack addLast: (RBPseudoLabelNode new destination: seqNum).
   8.153 +!
   8.154 +
   8.155 +popTop
   8.156 +
   8.157 +	| value |
   8.158 +	stack last ifNil: [^ stack removeLast].  "pop no-op from #simplifyTempAssign:"
   8.159 +	[stack last isLabel 
   8.160 +		and: [(stack atLast:2) isGoto] 
   8.161 +		and: [stack last destination = (stack atLast: 2) destination]]
   8.162 +			whileTrue: [
   8.163 +				stack removeLast.
   8.164 +				stack removeLast].
   8.165 +	stack last isValue ifTrue: [
   8.166 +		(stack atLast: 2) isSequence ifTrue: [
   8.167 +			value := stack removeLast.
   8.168 +			^ stack last addNode: value.
   8.169 +		] ifFalse: [(stack atLast: 2) isPseudo ifTrue: [
   8.170 +			value := stack removeLast.
   8.171 +			^ stack addLast: (RBSequenceNode statements: {value}).
   8.172 +		]].
   8.173 +	].
   8.174 +	stack addLast: RBPseudoPopNode new
   8.175 +!
   8.176 +
   8.177 +pushBlock: irMethod
   8.178 +
   8.179 +	self block: irMethod env: nil
   8.180 +!
   8.181 +
   8.182 +pushBlockMethod: irMethod
   8.183 +
   8.184 +	"block will recognized when send: #createBlock:"
   8.185 +	self pushLiteral: irMethod
   8.186 +!
   8.187 +
   8.188 +pushDup
   8.189 +
   8.190 +	stack addLast: RBPseudoDupNode new
   8.191 +!
   8.192 +
   8.193 +pushInstVar: index
   8.194 +	
   8.195 +	self stackPush: (self newVar: (scope instanceScope instVar: index))
   8.196 +!
   8.197 +
   8.198 +pushLiteral: object
   8.199 +
   8.200 +	self stackPush: (self newLiteral: object).
   8.201 +!
   8.202 +
   8.203 +pushLiteralVariable: object
   8.204 +
   8.205 +	| var |
   8.206 +	var := scope lookupVar: object key asString.
   8.207 +	self stackPush: (self newVar: var)
   8.208 +!
   8.209 +
   8.210 +pushTemp: tempIndex
   8.211 +
   8.212 +	| var |
   8.213 +	var := scope basicTempVarAt: tempIndex.
   8.214 +	var isTemp ifTrue: [var cantBeCapture].
   8.215 +	self stackPush: (self newVar: var).
   8.216 +!
   8.217 +
   8.218 +remoteReturn
   8.219 +
   8.220 +	stack removeLast.  "pop home context free var"
   8.221 +	self goto: #return.
   8.222 +!
   8.223 +
   8.224 +returnTop
   8.225 +
   8.226 +	self goto: #return.
   8.227 +!
   8.228 +
   8.229 +send: selector numArgs: numArgs
   8.230 +
   8.231 +        | args rcvr |
   8.232 +        selector = #caseError ifTrue:[^self stackPush: (RBPseudoSendNode new selector: selector)].
   8.233 +        args := OrderedCollection new.
   8.234 +        [       selector numArgs timesRepeat: [args addFirst: self Value].
   8.235 +                rcvr := self Value.
   8.236 +        ] on: Abort do: [
   8.237 +                [self stackPush: (RBPseudoSendNode new selector: selector).
   8.238 +                ^self cascade] on: Abort do:[^false]
   8.239 +        ].
   8.240 +
   8.241 +        Preferences compileBlocksAsClosures 
   8.242 +                        ifTrue: [ (rcvr isLiteral and: [selector = #createBlock:]) ifTrue: [
   8.243 +                                         ^ self block: rcvr value env: args first]]
   8.244 +                        ifFalse: [ (selector = #blockCopy:) ifTrue: [
   8.245 +                                         ^ self stackPush: (RBPseudoSendNode new selector: selector; arguments: args)]].
   8.246 +
   8.247 +        self stackPush: (self simplify: (RBMessageNode new
   8.248 +                receiver: rcvr
   8.249 +                selectorParts: (self newSelectorParts: selector)
   8.250 +                arguments: args)).
   8.251 +
   8.252 +    "Created: / 01-12-2008 / 19:40:52 / Jan Vrany <vranyj1@fel.cvut.cz>"
   8.253 +!
   8.254 +
   8.255 +send: selector numArgs: numArgs toSuperOf: behavior
   8.256 +
   8.257 +        | args rcvr |
   8.258 +        args := OrderedCollection new.
   8.259 +        selector numArgs timesRepeat: [args addFirst: self Value].
   8.260 +        rcvr := self Value.
   8.261 +        (rcvr isVariable and: [rcvr name = 'self']) ifFalse: [self patternError].
   8.262 +
   8.263 +        rcvr identifierToken: (SqueakToken value: 'super' start: 0).
   8.264 +        self stackPush: (RBMessageNode new
   8.265 +                receiver: rcvr
   8.266 +                selectorParts: (self newSelectorParts: selector)
   8.267 +                arguments: args).
   8.268 +
   8.269 +    "Created: / 01-12-2008 / 19:45:52 / Jan Vrany <vranyj1@fel.cvut.cz>"
   8.270 +!
   8.271 +
   8.272 +storeIntoLiteralVariable: association
   8.273 +
   8.274 +	| var |
   8.275 +	var := scope lookupVar: association key asString.
   8.276 +	self stackPush: (self simplifyTempAssign:
   8.277 +		(RBAssignmentNode variable: (self newVar: (var markWrite)) value: self Value))
   8.278 +!
   8.279 +
   8.280 +storeTemp: tempIndex
   8.281 +
   8.282 +	| var |
   8.283 +	var := scope basicTempVarAt: tempIndex.
   8.284 +	var isCaptured ifFalse: [var cantBeCapture].
   8.285 +	var isTemp ifTrue:[
   8.286 +		var isArg: false].
   8.287 +	self stackPush: (self simplifyTempAssign:
   8.288 +		(RBAssignmentNode variable: (self newVar: (var markWrite)) value: self Value)).
   8.289 +! !
   8.290 +
   8.291 +!IRDecompiler methodsFor:'interpret'!
   8.292 +
   8.293 +interpretInstruction: irInstruction
   8.294 +
   8.295 +	currentInstr := irInstruction.
   8.296 +	super interpretInstruction: irInstruction.
   8.297 +!
   8.298 +
   8.299 +interpretSequence: instructionSequence
   8.300 +
   8.301 +	super interpretSequence: instructionSequence.
   8.302 +	"currentInstr := nil."
   8.303 +! !
   8.304 +
   8.305 +!IRDecompiler methodsFor:'old blocks'!
   8.306 +
   8.307 +blockReturnTop
   8.308 +
   8.309 +	self goto: #return.
   8.310 +!
   8.311 +
   8.312 +endBlock: seqNum
   8.313 +
   8.314 +	| blockSeq block goto startBlock |
   8.315 +	[
   8.316 +		goto := self GotoOrReturn: seqNum.
   8.317 +		(goto isRet 
   8.318 +			or:[goto mapInstr notNil 
   8.319 +				and: [goto mapInstr isBlockReturnTop]]) ifFalse: [self abort].
   8.320 +		sp = 0 ifTrue: [self abort].
   8.321 +		blockSeq := self Sequence2.
   8.322 +		startBlock := self Label.
   8.323 +		block := self Block.
   8.324 +		(goto isRet not
   8.325 +			and:[goto mapInstr notNil] 
   8.326 +			and: [goto mapInstr isBlockReturnTop]
   8.327 +			and: [block successor ~= seqNum]) ifTrue:[
   8.328 +				self stackPush: block.
   8.329 +				self stackPush: startBlock.
   8.330 +				self stackPush: blockSeq. 
   8.331 +				self stackPush: goto.
   8.332 +				self abort].
   8.333 +		self Send.
   8.334 +	] on: Abort do: [^ false].
   8.335 +
   8.336 +	self stackPush: (self newBlock: blockSeq return: goto).	
   8.337 +	stack last arguments: block arguments.
   8.338 +	"No extra scope is need if we don't use any temporaries and arguments.
   8.339 +	so we remove them"
   8.340 +	(stack last arguments isEmpty and: [stack last body temporaries isEmpty])
   8.341 +		ifTrue:[ASTReplaceVariableScope replace: stack last scope: scope outerScope ].
   8.342 +	scope := scope outerScope.
   8.343 +	currentInstr := nil.
   8.344 +	self goto: block successor.
   8.345 +	^ true
   8.346 +!
   8.347 +
   8.348 +jumpOverBlock: seqNum1  to: seqNum2
   8.349 +	| numArgs args oldscope pseudoBlock |
   8.350 +
   8.351 +	oldscope := scope.
   8.352 +	self scope: (scope newBlockScope).
   8.353 +	oldscope tempVarAt: 0.
   8.354 +	(scope addObjectTemp: (oldscope tempVarAt: 0)).
   8.355 +	numArgs := stack last arguments first value.
   8.356 +	self stackPush: (pseudoBlock := RBPseudoBlockNode new).
   8.357 +	
   8.358 +	args := OrderedCollection new.
   8.359 +	numArgs timesRepeat: [ | var instr |
   8.360 +		instr :=  currentInstr blockSequence removeFirst.
   8.361 + 		var := oldscope tempVarAt: instr number.
   8.362 +		args add: (self newVar: var).
   8.363 +		var isUnused ifTrue: [oldscope removeTempFromOldBlock: var].
   8.364 +		scope addObjectTemp: var.
   8.365 +		currentInstr blockSequence first isPop 
   8.366 +			ifFalse: [
   8.367 +				currentInstr blockSequence sequence addFirst: (IRInstruction pushTemp: var index)]
   8.368 +			ifTrue:[currentInstr blockSequence removeFirst].
   8.369 +		
   8.370 +	].
   8.371 +	args := args reverse.
   8.372 +	pseudoBlock
   8.373 +		block: seqNum1;
   8.374 +		successor: seqNum2;
   8.375 +		arguments: args
   8.376 +	
   8.377 +!
   8.378 +
   8.379 +storeInstVar: number
   8.380 +
   8.381 +	| var |
   8.382 +	var := scope  instanceScope instVar: number.
   8.383 +	self stackPush: (RBAssignmentNode variable: (self newVar: var)  value:  self Value)
   8.384 +! !
   8.385 +
   8.386 +!IRDecompiler methodsFor:'priv instructions'!
   8.387 +
   8.388 +addReturn: statements from: goto
   8.389 +
   8.390 +		| ret |
   8.391 +		statements last isReturn ifTrue:[^self].
   8.392 +		ret := RBReturnNode value: statements last.
   8.393 +		Preferences compileBlocksAsClosures ifTrue:[
   8.394 +			scope isHome ifFalse: [ret homeBinding: scope outerEnvScope thisEnvVar]].
   8.395 +		goto mapInstr sourceNode: ret.
   8.396 +		statements atLast: 1 put: ret.
   8.397 +!
   8.398 +
   8.399 +block: method env: envRefNode
   8.400 +
   8.401 +	self stackPush: (IRDecompiler new
   8.402 +		scope: (scope newBlockScope "capturedVars: vars");
   8.403 +		decompileIR: method ir)
   8.404 +		asBlock
   8.405 +!
   8.406 +
   8.407 +cascade
   8.408 +
   8.409 +	| messages selector args rcvr |
   8.410 +	messages := OrderedCollection new.
   8.411 +	"last message"
   8.412 +	selector _ self Send selector.
   8.413 +	args := OrderedCollection new.
   8.414 +	selector numArgs timesRepeat: [args addFirst: self Value].
   8.415 +	messages addFirst: selector -> args.
   8.416 +
   8.417 +	"rest of messages"
   8.418 +	[(rcvr := self ValueOrNone) isNil] whileTrue: [
   8.419 +		self Pop.
   8.420 +		selector := self Send selector.
   8.421 +		args := OrderedCollection new.
   8.422 +		selector numArgs timesRepeat: [args addFirst: self Value].
   8.423 +		self Dup.
   8.424 +		messages addFirst: selector -> args.
   8.425 +	].
   8.426 +
   8.427 +	messages := messages collect: [:assoc |
   8.428 +		RBMessageNode
   8.429 +			receiver: rcvr
   8.430 +			selector: assoc key
   8.431 +			arguments: assoc value].
   8.432 +	self stackPush: (RBCascadeNode messages: messages).
   8.433 +!
   8.434 +
   8.435 +endAndOr2: seqNum
   8.436 +
   8.437 +	| goto seq p if2 test else o if1 seqValue elseTest otherwise |
   8.438 +	[
   8.439 +		goto _ self Goto.
   8.440 +		seqValue _ self ValueOrNone.
   8.441 +		seq _ self Sequence.
   8.442 +		p _ self Label destination.
   8.443 +		if2 _ self IfGoto: seqNum otherwise: p.
   8.444 +		elseTest _ self Value.
   8.445 +		else _ self SequenceBackTo: goto destination.
   8.446 +		o _ self Label destination.
   8.447 +		o = goto destination ifTrue: [self abort].
   8.448 +		if1 _ self IfGoto: seqNum otherwise: o.
   8.449 +		test _ self Value.
   8.450 +	] on: Abort do: [^ false].
   8.451 +
   8.452 +	if1 boolean = if2 boolean 
   8.453 +		ifFalse: [
   8.454 +			otherwise := RBSequenceNode statements: #().
   8.455 +			otherwise addNode: (self newLiteral: if2 boolean).
   8.456 +			self stackPush: (RBMessageNode
   8.457 +				receiver: test 
   8.458 +				selector: (if2 boolean ifTrue: [#ifTrue:ifFalse:] ifFalse: [#ifFalse:ifTrue:]) 
   8.459 +				arguments: {self newBlock: (else addNode: elseTest).
   8.460 +					self newBlock: otherwise}).]
   8.461 +		ifTrue:[self stackPush: (RBMessageNode
   8.462 +			receiver: test
   8.463 +			selector: (if2 boolean ifTrue: [#or:] ifFalse: [#and:])
   8.464 +			arguments: {self newBlock: (else addNode: elseTest)})].
   8.465 +	stack addLast: if2.
   8.466 +	self label: p.
   8.467 +	stack addLast: seq.
   8.468 +	seqValue ifNotNil: [stack addLast: seqValue].
   8.469 +	stack addLast: goto.
   8.470 +	^ true
   8.471 +!
   8.472 +
   8.473 +endAndOr: seqNum
   8.474 +
   8.475 +	| o test branches if body block sel1 sel2 if2 |
   8.476 +	branches := OrderedCollection new.
   8.477 +	[
   8.478 +		(if2 := self If) otherwise = seqNum ifFalse: [self abort].
   8.479 +		[	test := self Value.
   8.480 +			body := self Sequence.
   8.481 +			branches add: {body. test}.
   8.482 +			o := self Label destination.
   8.483 +			(if := self If) otherwise = o ifFalse: [self abort].
   8.484 +			if destination = seqNum
   8.485 +		] whileFalse: [
   8.486 +			if boolean = if2 boolean ifFalse: [self abort].
   8.487 +			if destination = if2 destination ifFalse: [self abort].
   8.488 +		].
   8.489 +		if boolean = if2 boolean ifTrue: [self abort].
   8.490 +		test := self Value.
   8.491 +	] on: Abort do: [^ false].
   8.492 +
   8.493 +	if boolean
   8.494 +		ifTrue: [sel1 := #or:. sel2 := #and:]
   8.495 +		ifFalse: [sel1 := #and:. sel2 := #or:].
   8.496 +	block := self newBlock: (branches first first addNode: branches first second).
   8.497 +	branches allButFirstDo: [:pair |
   8.498 +		block := self newBlock: (pair first addNode: (RBMessageNode
   8.499 +				receiver: pair second
   8.500 +				selector: sel2
   8.501 +				arguments: {block})).
   8.502 +	].
   8.503 +	self stackPush: (RBMessageNode
   8.504 +		receiver: test
   8.505 +		selector: sel1
   8.506 +		arguments: {block}).
   8.507 +	stack addLast: if2.
   8.508 +	^ true
   8.509 +!
   8.510 +
   8.511 +endCase: seqNum
   8.512 +
   8.513 +	| otherwiseGoto goto node otherwiseValue otherwiseSeq n branchValue branchSeq f caseValue caseSeq rcvr branches message seqEnd afterOterwise seq afterOterwiseValue |
   8.514 +	branches := OrderedCollection new.
   8.515 +	[	"otherwise"
   8.516 +		otherwiseGoto := self Goto.
   8.517 +		node := self stackDown.
   8.518 +		node isSequence ifTrue: [(node statements size = 1 
   8.519 +			and:[node statements first isSend] 
   8.520 +			and: [
   8.521 +				node := node statements first. 
   8.522 +				node selector == #caseError]) ifFalse: [
   8.523 +					otherwiseSeq := node] ].
   8.524 +		(node isPop or: [node isSend and: [node selector == #caseError]]) ifTrue: [
   8.525 +			node isPop ifTrue: [node := self Send].
   8.526 +			node selector == #caseError ifFalse: [self abort].
   8.527 +		] ifFalse: [
   8.528 +			sp := sp + 1.  "stackUp"
   8.529 +			
   8.530 +			seqNum == #lastReturn 
   8.531 +				ifFalse: [
   8.532 +					otherwiseValue := self ValueOrNone.
   8.533 +					otherwiseSeq := self Sequence]
   8.534 +				ifTrue: [
   8.535 +					afterOterwiseValue := self ValueOrNone.
   8.536 +					otherwiseSeq := RBSequenceNode statements: #().
   8.537 +					afterOterwise := self SequenceOtherwise].
   8.538 +		].
   8.539 +		n := self Label destination.
   8.540 +		"last case branch"
   8.541 +		seqNum == #lastReturn 
   8.542 +			ifFalse: [goto := self GotoOrReturn: seqNum]
   8.543 +			ifTrue: [
   8.544 +				seqEnd := n.
   8.545 +				goto := self GotoOrReturn: n.
   8.546 +				otherwiseGoto := goto].
   8.547 +		branchValue := self ValueOrNone.
   8.548 +		branchSeq := self Sequence.
   8.549 +		(stack at: sp) isPop ifTrue: [self stackDown].
   8.550 +		f := self Label destination.
   8.551 +		
   8.552 +		"last case"
   8.553 +		self IfGoto: n otherwise: f.
   8.554 +		self Send selector == #= ifFalse: [self abort].
   8.555 +		caseValue := self Value.
   8.556 +		caseSeq := self Sequence.
   8.557 +		otherwiseSeq ifNil: [self Dup].
   8.558 +		branches addFirst: ({caseSeq. caseValue} -> {branchSeq. branchValue. goto}).
   8.559 +
   8.560 +		[(rcvr := self ValueOrNone) isNil] whileTrue: [
   8.561 +			"case branch"
   8.562 +			n := self Label destination.
   8.563 +			seqNum == #lastReturn 
   8.564 +				ifFalse: [goto := self GotoOrReturn: seqNum]
   8.565 +				ifTrue: [goto := self GotoOrReturn: seqEnd].
   8.566 +			branchValue := self ValueOrNone.
   8.567 +			branchSeq := self Sequence.
   8.568 +			self Pop.
   8.569 +			f := self Label destination.
   8.570 +			"case"
   8.571 +			self IfGoto: n otherwise: f.
   8.572 +			self Send selector == #= ifFalse: [self abort].
   8.573 +			caseValue := self Value.
   8.574 +			caseSeq := self Sequence.
   8.575 +			self Dup.
   8.576 +			branches addFirst: ({caseSeq. caseValue} -> {branchSeq. branchValue. goto}).
   8.577 +		].
   8.578 +	] on: Abort do: [^ false].
   8.579 +
   8.580 +	branches := branches collect: [:assoc |
   8.581 +		assoc key second
   8.582 +			ifNotNil: [assoc key first addNode: assoc key second].
   8.583 +		assoc value second
   8.584 +			ifNotNil: [assoc value first addNode: assoc value second].
   8.585 +		RBMessageNode
   8.586 +			receiver: (self newBlock: assoc key first return: nil)
   8.587 +			selector: #->
   8.588 +			arguments:
   8.589 +				{self newBlock: assoc value first return: assoc value third}
   8.590 +	].
   8.591 +	message := otherwiseSeq
   8.592 +		ifNil: [
   8.593 +			RBMessageNode
   8.594 +				receiver: rcvr
   8.595 +				selector: #caseOf:
   8.596 +				arguments: {RBArrayNode statements: branches}]
   8.597 +		ifNotNil: [
   8.598 +			otherwiseValue
   8.599 +				ifNotNil: [otherwiseSeq addNode: otherwiseValue].
   8.600 +			RBMessageNode
   8.601 +				receiver: rcvr
   8.602 +				selector: #caseOf:otherwise:
   8.603 +				arguments: 
   8.604 +					{RBArrayNode statements: branches.
   8.605 +					self newBlock: otherwiseSeq return: otherwiseGoto}.
   8.606 +		].
   8.607 +	self stackPush: message.
   8.608 +	seqNum == #lastReturn ifTrue: [
   8.609 +		self popTop.
   8.610 +		seq := self Sequence.
   8.611 +		afterOterwise ifNotNil:[seq statements addAllLast: afterOterwise statements].
   8.612 +		self stackPush: seq.
   8.613 +		afterOterwiseValue ifNotNil:[self stackPush: afterOterwiseValue].
   8.614 +		branchValue := 1].
   8.615 +	branchValue ifNil: [self popTop].
   8.616 +	self stackPush: otherwiseGoto.
   8.617 +	^ true
   8.618 +!
   8.619 +
   8.620 +endIfNil: seqNum
   8.621 +
   8.622 +	| goto branch o if rcvr value |
   8.623 +	[
   8.624 +		goto := self Goto.
   8.625 +		value := self Value.
   8.626 +		branch := self Sequence.
   8.627 +		self Pop.
   8.628 +		o := self Label destination.
   8.629 +		if := self IfGoto: seqNum otherwise: o.
   8.630 +		self Send selector == #== ifFalse: [self abort].
   8.631 +		(self Value isLiteral: [:v | v isNil]) ifFalse: [self abort].
   8.632 +		self Dup.
   8.633 +		rcvr := self Value.
   8.634 +	] on: Abort do: [^ false].
   8.635 +
   8.636 +	branch addNode: value.
   8.637 +	self stackPush: (RBMessageNode
   8.638 +		receiver: rcvr
   8.639 +		selector: (if boolean ifTrue: [#ifNotNil:] ifFalse: [#ifNil:])
   8.640 +		arguments: {self newBlock: branch return: goto}).
   8.641 +	self goto: seqNum.
   8.642 +	^ true
   8.643 +!
   8.644 +
   8.645 +endIfThen2: seqNum
   8.646 +
   8.647 +	| goto branch o if test value gotoNum branch2 |
   8.648 +	[
   8.649 +		goto := self Goto.
   8.650 +		(goto mapInstr ~= nil 
   8.651 +			and: [goto mapInstr isJump]
   8.652 +			and: [goto mapInstr destination size = 1]  
   8.653 +			and: [goto mapInstr destination last isJump]) 
   8.654 +				ifTrue: [gotoNum := goto 
   8.655 +					mapInstr destination last destination orderNumber]
   8.656 +				ifFalse:[self abort].
   8.657 +		(currentInstr ~= nil 
   8.658 +			and: [currentInstr isJump] 
   8.659 +			and: [currentInstr destination orderNumber = goto destination])
   8.660 +				ifFalse: [self abort].
   8.661 +		value := self Value.
   8.662 +		branch := self Sequence.
   8.663 +		o := self Label destination.
   8.664 +		seqNum = gotoNum 
   8.665 +			ifFalse:[if := self IfGoto: gotoNum otherwise: o]
   8.666 +			ifTrue:[self abort].
   8.667 +		test := self Value.
   8.668 +	] on: Abort do: [^ false].
   8.669 +	
   8.670 +	value ifNotNil: [branch addNode: value].
   8.671 +	branch2 := RBSequenceNode statements: #().
   8.672 +	branch2 addNode: (self newLiteral: if boolean).
   8.673 +	self stackPush: (self simplify: (RBMessageNode
   8.674 +		receiver: test
   8.675 +		selector: (if boolean ifTrue: [#ifFalse:ifTrue:] ifFalse: [#ifTrue:ifFalse:])
   8.676 +		arguments: {self newBlock: branch return: goto.
   8.677 +			self newBlock: branch2})).
   8.678 +	self goto: goto destination.
   8.679 +	^true
   8.680 +!
   8.681 +
   8.682 +endIfThen3: seqNum
   8.683 +
   8.684 +	| goto branch o if test value |
   8.685 +	[
   8.686 +		goto := self Goto.
   8.687 +		(goto destination == seqNum or: [self isExplicitReturn: goto])
   8.688 +			ifFalse: [self abort].
   8.689 +		goto isRet ifTrue: [value := self Value].
   8.690 +		branch := self Sequence.
   8.691 +		o := self Label destination.
   8.692 +		if := self If.
   8.693 +		((if destination = seqNum 
   8.694 +			or: [if destination = (mapEmptyStatement at: seqNum ifAbsent:[seqNum])])
   8.695 +				and: [if otherwise = o])
   8.696 +			ifFalse:[self abort].
   8.697 +		test := self Value.
   8.698 +	] on: Abort do: [^ false].
   8.699 +	
   8.700 +
   8.701 +	value ifNotNil: [branch addNode: value].
   8.702 +	self stackPush: (self simplify: (RBMessageNode
   8.703 +		receiver: test
   8.704 +		selector: (if boolean ifTrue: [#ifFalse:] ifFalse: [#ifTrue:])
   8.705 +		arguments: {self newBlock: branch return: goto})).
   8.706 +	self popTop.
   8.707 +	self goto: seqNum.
   8.708 +	^ true
   8.709 +!
   8.710 +
   8.711 +endIfThen: seqNum
   8.712 +
   8.713 +	| goto branch o if test value |
   8.714 +	[
   8.715 +		goto := self Goto.
   8.716 +		(goto destination == seqNum or: [self isExplicitReturn: goto])
   8.717 +			ifFalse: [self abort].
   8.718 +		goto isRet ifTrue: [value := self Value].
   8.719 +		branch := self Sequence.
   8.720 +		o := self Label destination.
   8.721 +		if := self IfGoto: seqNum otherwise: o.
   8.722 +		test := self Value.
   8.723 +	] on: Abort do: [^ false].
   8.724 +	
   8.725 +
   8.726 +	value ifNotNil: [branch addNode: value].
   8.727 +	self stackPush: (self simplify: (RBMessageNode
   8.728 +		receiver: test
   8.729 +		selector: (if boolean ifTrue: [#ifFalse:] ifFalse: [#ifTrue:])
   8.730 +		arguments: {self newBlock: branch return: goto})).
   8.731 +	self popTop.
   8.732 +	self goto: seqNum.
   8.733 +	^ true
   8.734 +!
   8.735 +
   8.736 +endIfThenElse: seqNum
   8.737 +
   8.738 +	| goto2 else d goto1 then o if test value2 value1 |
   8.739 +	[
   8.740 +		goto2 := self Goto.
   8.741 +		value2 := self ValueOrNone.
   8.742 +		else := self Sequence.
   8.743 +		d := self Label destination.
   8.744 +		goto1 := self Goto.
   8.745 +		((self isExplicitReturn: goto2) or: [goto2 destination == goto1 destination]) ifFalse: [self abort].
   8.746 +		value1 := self ValueOrNone.
   8.747 +		then := self Sequence.
   8.748 +		o := self Label destination.
   8.749 +		if := self IfGoto: d otherwise: o.
   8.750 +		test := self Value.
   8.751 +	] on: Abort do: [^ false].
   8.752 +
   8.753 +	value2 ifNotNil: [else addNode: value2].
   8.754 +	value1 ifNotNil: [then addNode: value1].
   8.755 +	(self isExplicitReturn: goto1) ifTrue:[self addReturn: then statements from: goto1].
   8.756 +	(self isExplicitReturn: goto2) ifTrue:[self addReturn: else statements from: goto2].
   8.757 +	self stackPush: (self simplify: (else isEmpty
   8.758 +		ifTrue: [RBMessageNode
   8.759 +			receiver: test
   8.760 +			selector: (if boolean ifTrue: [#ifFalse:] ifFalse: [#ifTrue:])
   8.761 +			arguments: {self newBlock: then return: goto1}]
   8.762 +		ifFalse: [RBMessageNode
   8.763 +			receiver: test
   8.764 +			selector: (if boolean
   8.765 +				ifTrue: [#ifFalse:ifTrue:]
   8.766 +				ifFalse: [#ifTrue:ifFalse:])
   8.767 +			arguments: {
   8.768 +				self newBlock: then return: goto1.
   8.769 +				self newBlock: else return: goto2}])).
   8.770 +	value1 ifNil: [self popTop].
   8.771 +	currentInstr := goto1 mapInstr.
   8.772 +	self stackPush: goto1.
   8.773 +	(else statements isEmpty and:
   8.774 +	 [stack anySatisfy: [:n | n isIf and: [n destination = d]]]
   8.775 +	) ifTrue: [
   8.776 +		self label: d.
   8.777 +		currentInstr := goto2 mapInstr.
   8.778 +		self stackPush: goto2.
   8.779 +	].
   8.780 +	^ true
   8.781 +!
   8.782 +
   8.783 +endToDo: seqNum
   8.784 +
   8.785 +	| start limit incr iter step loopBlock o if test limitExpr init |
   8.786 +	[
   8.787 +		start := self Goto destination.
   8.788 +		limit := self Value.
   8.789 +		incr := self Assignment.
   8.790 +		iter := incr variable.
   8.791 +		(incr value isMessage and:
   8.792 +		 [incr value selector == #+ and:
   8.793 +		  [incr value receiver isVariable and: 
   8.794 +		   [incr value receiver binding == iter binding]]]
   8.795 +		) ifFalse: [self abort].
   8.796 +		step := incr value arguments first.
   8.797 +		loopBlock := self Sequence.
   8.798 +		o := self Label destination.
   8.799 +		if := self IfGoto: seqNum otherwise: o.
   8.800 +		test := self Value.
   8.801 +		(test isMessage and:
   8.802 +		 [(test selector == #<= or: [test selector == #>=]) and:
   8.803 +		  [(valueLabelMap at: test arguments first ifAbsent: [self abort]) destination = start]]
   8.804 +		) ifFalse: [self abort].
   8.805 +		limitExpr := test arguments first.
   8.806 +		limitExpr isAssignment ifTrue: [
   8.807 +			(limitExpr variable binding index == limit binding index 
   8.808 +				and:[limitExpr variable binding scope == limit binding scope]) ifFalse: [self abort].
   8.809 +			limitExpr := limitExpr value.
   8.810 +		].
   8.811 +		init := test receiver.
   8.812 +		(init isAssignment and: [init variable binding == iter binding])
   8.813 +			ifFalse: [self abort].
   8.814 +	] on: Abort do: [^ false].
   8.815 +	limit isVariable 
   8.816 +		ifTrue:[scope 
   8.817 +			removeTemp: limit binding 
   8.818 +			ifAbsent:[Preferences compileBlocksAsClosures 
   8.819 +				ifFalse:[scope removeTempFromOldBlock: limit]]].
   8.820 +	loopBlock := self newBlock: loopBlock.
   8.821 +	loopBlock arguments: {iter}.
   8.822 +	self stackPush: ((step isLiteral: [:c | c = 1])
   8.823 +		ifTrue: [RBMessageNode
   8.824 +				receiver: init value
   8.825 +				selector: #to:do:
   8.826 +				arguments: {limitExpr. loopBlock}]
   8.827 +		ifFalse: [RBMessageNode
   8.828 +				receiver: init value
   8.829 +				selector: #to:by:do:
   8.830 +				arguments: {limitExpr. step. loopBlock}]).
   8.831 +	self popTop.
   8.832 +	self goto: seqNum.
   8.833 +	^ true
   8.834 +!
   8.835 +
   8.836 +endWhile2: seqNum
   8.837 +
   8.838 +	| start loopBlock if test sequence o goto previousStack |
   8.839 +	[
   8.840 +		stack := (previousStack := stack) copy.
   8.841 +		start := (goto := self Goto) destination.
   8.842 +		self stackPush: goto.
   8.843 +		[self endIfThen3: start] whileTrue.
   8.844 +		start :=  self Goto destination.
   8.845 +		loopBlock _ self Sequence.
   8.846 +		o _ self Label destination.
   8.847 +		if _ self IfGoto: seqNum otherwise: o.
   8.848 +		test _ self Value.
   8.849 +		sequence _ self SequenceBackTo: start.
   8.850 +		self Label: start.
   8.851 +		sp _ sp + 1.  "stackUp"
   8.852 +	] on: Abort do: [stack := previousStack. ^ false].
   8.853 +	loopBlock isEmpty
   8.854 +		ifTrue:[self stackPush: (self simplify: (RBMessageNode
   8.855 +			receiver: (self newBlock: (sequence addNode: test))
   8.856 +			selector: (if boolean ifTrue: [#whileFalse] ifFalse: [#whileTrue])
   8.857 +			arguments: #()))]
   8.858 +		ifFalse:[self stackPush: (self simplify: (RBMessageNode
   8.859 +			receiver: (self newBlock: (sequence addNode: test))
   8.860 +			selector: (if boolean ifTrue: [#whileFalse:] ifFalse: [#whileTrue:])
   8.861 +			arguments: {self newBlock: loopBlock}))].
   8.862 +	self popTop.
   8.863 +	self goto: seqNum.
   8.864 +	^ true
   8.865 +!
   8.866 +
   8.867 +endWhile: seqNum
   8.868 +
   8.869 +	| start loopBlock if test sequence o |
   8.870 +	[
   8.871 +		start _ self Goto destination.
   8.872 +		loopBlock _ self Sequence.
   8.873 +		o _ self Label destination.
   8.874 +		if _ self IfGoto: seqNum otherwise: o.
   8.875 +		test _ self Value.
   8.876 +		sequence _ self SequenceBackTo: start.
   8.877 +		self Label: start.
   8.878 +		sp _ sp + 1.  "stackUp"
   8.879 +	] on: Abort do: [^ false].
   8.880 +	loopBlock isEmpty
   8.881 +		ifTrue:[self stackPush: (self simplify: (RBMessageNode
   8.882 +			receiver: (self newBlock: (sequence addNode: test))
   8.883 +			selector: (if boolean ifTrue: [#whileFalse] ifFalse: [#whileTrue])
   8.884 +			arguments: #()))]
   8.885 +		ifFalse:[self stackPush: (self simplify: (RBMessageNode
   8.886 +			receiver: (self newBlock: (sequence addNode: test))
   8.887 +			selector: (if boolean ifTrue: [#whileFalse:] ifFalse: [#whileTrue:])
   8.888 +			arguments: {self newBlock: loopBlock}))].
   8.889 +	self popTop.
   8.890 +	self goto: seqNum.
   8.891 +	^ true
   8.892 +! !
   8.893 +
   8.894 +!IRDecompiler methodsFor:'private'!
   8.895 +
   8.896 +captureEmptyStatement
   8.897 +	| by replace node |
   8.898 +	
   8.899 +	[by := self Goto destination.
   8.900 +	replace := self Label destination.
   8.901 +	replace = 0 ifTrue: [self abort]] 
   8.902 +			on: Abort
   8.903 +			do: [^ false].
   8.904 +	mapEmptyStatement at: by put: replace.
   8.905 +	sp := nil.
   8.906 +	^ true
   8.907 +!
   8.908 +
   8.909 +fixInnerFreeVar: aRcvrTemp
   8.910 +
   8.911 +	| scopeInnerFreeVar |
   8.912 +	scopeInnerFreeVar := scope outerScope.
   8.913 +	[aRcvrTemp scope = scopeInnerFreeVar] whileFalse:[
   8.914 +		scopeInnerFreeVar hasInnerFreeVars: true.
   8.915 +		scopeInnerFreeVar := scopeInnerFreeVar outerScope].
   8.916 +	aRcvrTemp scope hasInnerFreeVars: true
   8.917 +!
   8.918 +
   8.919 +initialize
   8.920 +
   8.921 +	stack := OrderedCollection new.
   8.922 +	scope := nil parseScope newMethodScope.  "in case never set"
   8.923 +	valueLabelMap := IdentityDictionary new.
   8.924 +	mapEmptyStatement := IdentityDictionary new
   8.925 +!
   8.926 +
   8.927 +isExplicitReturn: goto
   8.928 +
   8.929 +	Preferences compileBlocksAsClosures 
   8.930 +		ifTrue:[^ goto isRet 
   8.931 +			and: [goto mapInstr notNil] 
   8.932 +			and: [goto mapInstr isRemote or: [scope isBlockScope not]]]
   8.933 +		ifFalse: [^goto isRet and: [goto mapInstr isBlockReturnTop not]]
   8.934 +!
   8.935 +
   8.936 +mapNode: node
   8.937 +
   8.938 +	currentInstr ifNil: [^ self].
   8.939 +	node isPseudo
   8.940 +		ifTrue: [node mapInstr: currentInstr]
   8.941 +		ifFalse: [currentInstr sourceNode: node]
   8.942 +!
   8.943 +
   8.944 +newBlock: sequence
   8.945 +
   8.946 +	^ self newBlock: sequence return: nil
   8.947 +!
   8.948 +
   8.949 +newBlock: sequence return: goto
   8.950 +
   8.951 +	| statements block |
   8.952 +	statements := sequence statements.
   8.953 +	(goto notNil and: [self isExplicitReturn: goto]) ifTrue: [
   8.954 +		self addReturn: statements from: goto
   8.955 +	].
   8.956 +	sequence statements: statements.
   8.957 +	block := RBBlockNode body: sequence.
   8.958 +	sequence parent: block.
   8.959 +	Preferences compileBlocksAsClosures ifFalse: [block scope: scope].
   8.960 +	^block
   8.961 +!
   8.962 +
   8.963 +newLiteral: literal
   8.964 +
   8.965 +	^ RBLiteralNode value: literal
   8.966 +!
   8.967 +
   8.968 +newSelectorParts: selector
   8.969 +
   8.970 +	^ selector keywords collect: [:word |
   8.971 +		RBLiteralToken value: word]
   8.972 +!
   8.973 +
   8.974 +newVar: semVar
   8.975 +
   8.976 +	^ RBVariableNode new
   8.977 +		identifierToken: (RBIdentifierToken value: semVar name start: 0);
   8.978 +		binding: semVar
   8.979 +!
   8.980 +
   8.981 +simplify: mess
   8.982 +	"mess is a messageNode.  If it is a message created by the compiler convert it back to its normal form"
   8.983 +
   8.984 +	| rcvr var |
   8.985 +"	(mess selector == #value and: [mess receiver isLiteral]) ifTrue: [
   8.986 +		^ self newVar: (GlobalVar new assoc: mess receiver value; scope: scope)
   8.987 +	]."
   8.988 +
   8.989 +	(mess selector = #privSetInHolder: and: [mess arguments first isLiteral]) ifTrue: [
   8.990 +		^ RBAssignmentNode
   8.991 +			variable: (self newVar: (GlobalVar new assoc: mess arguments first value; scope: scope) markWrite)
   8.992 +			value: mess receiver
   8.993 +	].
   8.994 +
   8.995 +	(mess selector = #privGetInstVar: and:
   8.996 +	 [mess arguments first isLiteral and:
   8.997 +	  [mess receiver isVariable]]) ifTrue: [
   8.998 +		rcvr := mess receiver binding.
   8.999 +		rcvr == scope receiverVar ifTrue: [
  8.1000 +			^ self newVar: (scope receiverVarAt: mess arguments first value)].
  8.1001 +		(rcvr isContextVar and: [mess arguments first value == 5]) ifTrue: [
  8.1002 +			var := scope tempVarAt: -1.
  8.1003 +			^self newVar: var].
  8.1004 +		(rcvr isCaptured and:[rcvr sourceTemp = rcvr scope receiverVar])
  8.1005 +			ifTrue:[
  8.1006 +				self fixInnerFreeVar: rcvr.
  8.1007 +				^self newVar: (rcvr scope receiverVarAt: mess arguments first value)].
  8.1008 +		rcvr isEnv ifTrue: [^self newVar: (rcvr scope captureVarAt: mess arguments first value)]].
  8.1009 +
  8.1010 +	(mess selector = #privStoreIn:instVar: and:
  8.1011 +	 [mess arguments last isLiteral and:
  8.1012 +	  [mess arguments first isVariable]]) ifTrue: [
  8.1013 +		rcvr := mess arguments first binding.
  8.1014 +		(mess receiver name = 'self' and: [rcvr isEnv]) 
  8.1015 +			ifTrue:[scope captureSelf: mess arguments last value. 
  8.1016 +				^mess].
  8.1017 +		rcvr == scope  receiverVar ifTrue: [^ RBAssignmentNode
  8.1018 +				variable: (self newVar: (scope receiverVarForAssignmentAt: mess arguments last value) markWrite) 
  8.1019 +				value: mess receiver].
  8.1020 +		(rcvr isCaptured and:[rcvr sourceTemp = rcvr scope receiverVar])
  8.1021 +			ifTrue:[
  8.1022 +				self fixInnerFreeVar: rcvr.
  8.1023 +				^RBAssignmentNode
  8.1024 +					variable: (self newVar: (rcvr scope receiverVarForAssignmentAt: mess arguments last value) markWrite) 
  8.1025 +					value: mess receiver].
  8.1026 +		mess isClosureEnvironmentRegistration
  8.1027 +			ifTrue: [
  8.1028 +				scope captureSelf: mess arguments last value.
  8.1029 +				^mess].
  8.1030 +		rcvr isEnv ifTrue:[
  8.1031 +			mess receiver isTemp 
  8.1032 +				ifTrue:[var := (scope 
  8.1033 +					captureVarAt: mess arguments last value  
  8.1034 +					sourceTemp: mess receiver binding) markWrite.]
  8.1035 +				ifFalse:[var := (scope 
  8.1036 +					captureVarAt: mess arguments last value sourceTemp: ((TempVar new)
  8.1037 +								name: (scope captureVarName: mess arguments last value);
  8.1038 +								index: mess arguments last value;
  8.1039 +								scope: self;
  8.1040 +								cantBeCapture)) markWrite
  8.1041 +					].
  8.1042 +			^ RBAssignmentNode
  8.1043 +				variable: (self newVar: var)
  8.1044 +				value: mess receiver]].
  8.1045 +	^mess
  8.1046 +!
  8.1047 +
  8.1048 +simplifyTempAssign: assignment
  8.1049 +	"If it is a assignment created by the compiler convert it back to its normal form"
  8.1050 +
  8.1051 +	| mess |
  8.1052 +	((mess := assignment value) isMessage and: 
  8.1053 +	 [mess selector = #wrapInTempHolder and:
  8.1054 +	  [mess receiver isLiteral: [:v | v isNil]]]
  8.1055 +	) ifTrue: [
  8.1056 +		^ nil  "no-op"
  8.1057 +	].
  8.1058 +
  8.1059 +	^ assignment
  8.1060 +! !
  8.1061 +
  8.1062 +!IRDecompiler methodsFor:'stack'!
  8.1063 +
  8.1064 +Assignment
  8.1065 +
  8.1066 +	| node |
  8.1067 +	(node := self stackDown) isAssignment ifTrue: [^ node].
  8.1068 +	self abort
  8.1069 +!
  8.1070 +
  8.1071 +Block
  8.1072 +
  8.1073 +	| node |
  8.1074 +	(node := self stackDown) isBlock ifTrue: [^ node].
  8.1075 +	self abort
  8.1076 +!
  8.1077 +
  8.1078 +Dup
  8.1079 +
  8.1080 +	| node |
  8.1081 +	(node := self stackDown) isDup ifTrue: [^ node].
  8.1082 +	self abort
  8.1083 +!
  8.1084 +
  8.1085 +Goto
  8.1086 +
  8.1087 +	| node |
  8.1088 +	(node := self stackDown) isGoto ifTrue: [^ node].
  8.1089 +	self abort
  8.1090 +!
  8.1091 +
  8.1092 +Goto: seqNum
  8.1093 +
  8.1094 +	| goto |
  8.1095 +	(goto := self Goto) destination = seqNum ifTrue: [^ goto].
  8.1096 +	self abort
  8.1097 +!
  8.1098 +
  8.1099 +GotoOrReturn: seqNum
  8.1100 +
  8.1101 +	| goto |
  8.1102 +	goto := self Goto.
  8.1103 +	(goto destination = seqNum or: [goto isRet]) ifTrue: [^ goto].
  8.1104 +	self abort
  8.1105 +!
  8.1106 +
  8.1107 +If
  8.1108 +
  8.1109 +	| node |
  8.1110 +	(node := self stackDown) isIf ifTrue: [^ node].
  8.1111 +	self abort
  8.1112 +!
  8.1113 +
  8.1114 +IfGoto: seqNum otherwise: seqNum2
  8.1115 +
  8.1116 +	| if |
  8.1117 +	((if := self If) destination = seqNum and: [if otherwise = seqNum2])
  8.1118 +		ifTrue: [^ if].
  8.1119 +	self abort
  8.1120 +!
  8.1121 +
  8.1122 +Label
  8.1123 +
  8.1124 +	| node |
  8.1125 +	(node := self stackDown) isLabel ifTrue: [^ node].
  8.1126 +	self abort
  8.1127 +!
  8.1128 +
  8.1129 +Label: seqNum
  8.1130 +
  8.1131 +	| label |
  8.1132 +	(label := self Label) destination = seqNum ifTrue: [^ label].
  8.1133 +	self abort
  8.1134 +!
  8.1135 +
  8.1136 +Pop
  8.1137 +
  8.1138 +	| node |
  8.1139 +	(node := self stackDown) isPop ifTrue: [^ node].
  8.1140 +	self abort
  8.1141 +!
  8.1142 +
  8.1143 +Send
  8.1144 +
  8.1145 +	| node |
  8.1146 +	(node := self stackDown) isPseudoSend ifTrue: [^ node].
  8.1147 +	self abort
  8.1148 +!
  8.1149 +
  8.1150 +Sequence
  8.1151 +	| node seq i goto |
  8.1152 +	seq := RBSequenceNode statements: #().
  8.1153 +	i := self spIndex.
  8.1154 +	[node := stack at: i.
  8.1155 +	node isSequence 
  8.1156 +		ifTrue: 
  8.1157 +			[seq addNodesFirst: node statements.
  8.1158 +			node := stack at: (i := i - 1)].
  8.1159 +	(node isLabel and: [i > 1]) 
  8.1160 +		ifFalse: 
  8.1161 +			[sp := i.
  8.1162 +			^ seq].
  8.1163 +	goto := stack at: (i := i - 1).
  8.1164 +	goto isGoto and: [goto destination = node destination]] 
  8.1165 +			whileTrue: [i := i - 1].
  8.1166 +	sp := i + 1.
  8.1167 +	^ seq
  8.1168 +!
  8.1169 +
  8.1170 +Sequence2
  8.1171 +	| node seq i block temps label |
  8.1172 +	seq := RBSequenceNode statements: #().
  8.1173 +	i := self spIndex.
  8.1174 +	node := stack at: i.
  8.1175 +	[(node isLabel and: [(stack at: i - 1) isGoto] and:[node destination = (stack at: i - 1) destination])
  8.1176 +		ifTrue:[
  8.1177 +			i := i - 2.
  8.1178 +			node := stack at: i].
  8.1179 +	(node isLabel not and: [i > 1])] whileTrue: 
  8.1180 +			[
  8.1181 +			node isSequence 
  8.1182 +				ifTrue: [seq addNodesFirst: node statements]
  8.1183 +				ifFalse: [seq addNodeFirst: node].
  8.1184 +			i := i - 1.
  8.1185 +			node := stack at: i].
  8.1186 +	sp := i.
  8.1187 +	label := self Label.
  8.1188 +	block := self Block.
  8.1189 +	self stackPush: block.
  8.1190 +	self stackPush: label.
  8.1191 +	"Add the temporaries find"
  8.1192 +	temps := scope tempVars asArray allButFirst.
  8.1193 +	temps := temps select: [:each | ((block arguments 
  8.1194 +							collect: [:var | var binding])  includes: each) not].
  8.1195 +	seq temporaries: (temps collect: [:var | self newVar: var]).
  8.1196 +	^ seq
  8.1197 +!
  8.1198 +
  8.1199 +SequenceBackTo: labelNum 
  8.1200 +	| node seq i goto |
  8.1201 +	seq := RBSequenceNode statements: #().
  8.1202 +	i := self spIndex.
  8.1203 +	[node := stack at: i.
  8.1204 +	node isSequence 
  8.1205 +		ifTrue: 
  8.1206 +			[seq addNodesFirst: node statements.
  8.1207 +			node := stack at: (i := i - 1)].
  8.1208 +	(node isLabel and: [i > 1]) 
  8.1209 +		ifFalse: 
  8.1210 +			[sp := i.
  8.1211 +			^ seq].
  8.1212 +	node destination = labelNum 
  8.1213 +		ifTrue: 
  8.1214 +			[sp := i.
  8.1215 +			^ seq].
  8.1216 +	goto := stack at: (i := i - 1).
  8.1217 +	goto isGoto and: [goto destination = node destination]] 
  8.1218 +			whileTrue: [i := i - 1].
  8.1219 +	sp := i + 1.
  8.1220 +	^ seq
  8.1221 +!
  8.1222 +
  8.1223 +SequenceOtherwise
  8.1224 +	| node seq i |
  8.1225 +	seq := RBSequenceNode statements: #().
  8.1226 +	i := self spIndex.
  8.1227 +	node := stack at: i.
  8.1228 +	node isSequence ifTrue: [
  8.1229 +			seq addNodesFirst: node statements.
  8.1230 +			self stackDown]
  8.1231 +		ifFalse:[node isLabel ifFalse:[self abort]].
  8.1232 +	^ seq
  8.1233 +!
  8.1234 +
  8.1235 +Value
  8.1236 +
  8.1237 +	| node |
  8.1238 +	node := self ValueOrNone.
  8.1239 +	node ifNil: [self abort].
  8.1240 +	^ node
  8.1241 +!
  8.1242 +
  8.1243 +ValueOrNone
  8.1244 +	| node i label |
  8.1245 +	i := self spIndex.
  8.1246 +	[node := stack at: i.
  8.1247 +	node isValue 
  8.1248 +		ifTrue: 
  8.1249 +			[label ifNotNil: [valueLabelMap at: node put: label].
  8.1250 +			sp := i - 1.
  8.1251 +			^ node].
  8.1252 +	(node isLabel and: [i > 1]) ifFalse: [^ nil].
  8.1253 +	label := node.
  8.1254 +	node := stack at: (i := i - 1).
  8.1255 +	node isGoto and: [node destination = label destination]] 
  8.1256 +			whileTrue: [i := i - 1].
  8.1257 +	^ nil
  8.1258 +!
  8.1259 +
  8.1260 +abort
  8.1261 +
  8.1262 +	| spWas |
  8.1263 +	spWas := sp.
  8.1264 +	sp := nil.
  8.1265 +	Abort signal
  8.1266 +!
  8.1267 +
  8.1268 +fixStack
  8.1269 +
  8.1270 +	sp ifNotNil: [stack removeLast: (stack size - sp)].
  8.1271 +	sp := nil.
  8.1272 +!
  8.1273 +
  8.1274 +spIndex
  8.1275 +	^ sp ifNil: [sp := stack size]
  8.1276 +!
  8.1277 +
  8.1278 +stackDown
  8.1279 +
  8.1280 +	| node |
  8.1281 +	sp ifNil: [sp _ stack size].
  8.1282 +	sp = 0 ifTrue: [self abort].
  8.1283 +	node _ stack at: sp.
  8.1284 +	sp _ sp - 1.
  8.1285 +	^ node
  8.1286 +!
  8.1287 +
  8.1288 +stackPush: node
  8.1289 +
  8.1290 +	self fixStack.
  8.1291 +	stack addLast: node.
  8.1292 +	node ifNil: [^ self].  "no op"
  8.1293 +	self mapNode: node.
  8.1294 +! !
  8.1295 +
  8.1296 +!IRDecompiler class methodsFor:'documentation'!
  8.1297 +
  8.1298 +version
  8.1299 +    ^ '$Id$'
  8.1300 +!
  8.1301 +
  8.1302 +version_CVS
  8.1303 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRDecompiler.st,v 1.3 2009/10/08 12:04:20 fm Exp §'
  8.1304 +!
  8.1305 +
  8.1306 +version_SVN
  8.1307 +    ^ '$Id::                                                                                                                        $'
  8.1308 +! !
     9.1 --- a/IRDup.st	Tue Nov 15 21:28:05 2011 +0000
     9.2 +++ b/IRDup.st	Thu Mar 29 18:03:58 2012 +0000
     9.3 @@ -21,13 +21,13 @@
     9.4  !IRDup class methodsFor:'documentation'!
     9.5  
     9.6  version
     9.7 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRDup.st,v 1.3 2009/10/08 11:57:50 fm Exp $'
     9.8 +    ^ '$Id$'
     9.9  !
    9.10  
    9.11  version_CVS
    9.12 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRDup.st,v 1.3 2009/10/08 11:57:50 fm Exp $'
    9.13 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRDup.st,v 1.3 2009/10/08 11:57:50 fm Exp §'
    9.14  !
    9.15  
    9.16  version_SVN
    9.17 -    ^ '$Id$'
    9.18 +    ^ '$Id::                                                                                                                        $'
    9.19  ! !
    10.1 --- a/IRFunction.st	Tue Nov 15 21:28:05 2011 +0000
    10.2 +++ b/IRFunction.st	Thu Mar 29 18:03:58 2012 +0000
    10.3 @@ -50,23 +50,6 @@
    10.4      "Modified: / 12-08-2009 / 09:22:05 / Jan Vrany <vranyj1@fel.cvut.cz>"
    10.5  !
    10.6  
    10.7 -addTempsIfNotDefined: temps
    10.8 -
    10.9 -    | ir tempsToAdd |
   10.10 -    ir := self.
   10.11 -    tempsToAdd := temps asSet.
   10.12 -    [ ir isNil ] whileFalse: 
   10.13 -        [ir tempNames do:
   10.14 -            [:temp|
   10.15 -            (tempsToAdd includes:temp)
   10.16 -                ifTrue:[tempsToAdd remove: temp]].
   10.17 -        ir := ir environmentIr].
   10.18 -    tempsToAdd isEmpty ifTrue:[^self].
   10.19 -    self addTemps: tempsToAdd
   10.20 -
   10.21 -    "Created: / 23-03-2010 / 13:51:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   10.22 -!
   10.23 -
   10.24  additionalLiterals
   10.25  	^additionalLiterals.
   10.26  !
   10.27 @@ -110,10 +93,6 @@
   10.28  	^self allInstructionsMatching: [:bc | bc isTempStore].
   10.29  !
   10.30  
   10.31 -environmentIr
   10.32 -    ^ environmentIr
   10.33 -!
   10.34 -
   10.35  ir
   10.36  	^self.
   10.37  !
   10.38 @@ -195,12 +174,11 @@
   10.39  inspector2TabIRCode
   10.40  
   10.41      ^Tools::Inspector2Tab new
   10.42 -        label: 'IR Code';
   10.43 -        priority: 75;
   10.44 -        text: self longPrintString.
   10.45 +	label: 'IR Code';
   10.46 +	priority: 75;
   10.47 +	view: ((ScrollableView for:TextView) contents: self longPrintString; yourself)
   10.48  
   10.49      "Created: / 11-06-2008 / 01:05:16 / Jan Vrany <vranyj1@fel.cvut.cz>"
   10.50 -    "Modified: / 15-02-2010 / 13:04:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   10.51  ! !
   10.52  
   10.53  !IRFunction methodsFor:'decompiling'!
   10.54 @@ -500,13 +478,13 @@
   10.55  !IRFunction class methodsFor:'documentation'!
   10.56  
   10.57  version
   10.58 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRFunction.st,v 1.4 2009/10/08 11:59:08 fm Exp $'
   10.59 +    ^ '$Id$'
   10.60  !
   10.61  
   10.62  version_CVS
   10.63 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRFunction.st,v 1.4 2009/10/08 11:59:08 fm Exp $'
   10.64 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRFunction.st,v 1.4 2009/10/08 11:59:08 fm Exp §'
   10.65  !
   10.66  
   10.67  version_SVN
   10.68 -    ^ '$Id$'
   10.69 +    ^ '$Id::                                                                                                                        $'
   10.70  ! !
    11.1 --- a/IRInstVarAccess.st	Tue Nov 15 21:28:05 2011 +0000
    11.2 +++ b/IRInstVarAccess.st	Thu Mar 29 18:03:58 2012 +0000
    11.3 @@ -30,13 +30,13 @@
    11.4  !IRInstVarAccess class methodsFor:'documentation'!
    11.5  
    11.6  version
    11.7 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRInstVarAccess.st,v 1.3 2009/10/08 12:01:34 fm Exp $'
    11.8 +    ^ '$Id$'
    11.9  !
   11.10  
   11.11  version_CVS
   11.12 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRInstVarAccess.st,v 1.3 2009/10/08 12:01:34 fm Exp $'
   11.13 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRInstVarAccess.st,v 1.3 2009/10/08 12:01:34 fm Exp §'
   11.14  !
   11.15  
   11.16  version_SVN
   11.17 -    ^ '$Id$'
   11.18 +    ^ '$Id::                                                                                                                        $'
   11.19  ! !
    12.1 --- a/IRInstVarRead.st	Tue Nov 15 21:28:05 2011 +0000
    12.2 +++ b/IRInstVarRead.st	Thu Mar 29 18:03:58 2012 +0000
    12.3 @@ -30,13 +30,13 @@
    12.4  !IRInstVarRead class methodsFor:'documentation'!
    12.5  
    12.6  version
    12.7 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRInstVarRead.st,v 1.3 2009/10/08 11:56:08 fm Exp $'
    12.8 +    ^ '$Id$'
    12.9  !
   12.10  
   12.11  version_CVS
   12.12 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRInstVarRead.st,v 1.3 2009/10/08 11:56:08 fm Exp $'
   12.13 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRInstVarRead.st,v 1.3 2009/10/08 11:56:08 fm Exp §'
   12.14  !
   12.15  
   12.16  version_SVN
   12.17 -    ^ '$Id$'
   12.18 +    ^ '$Id::                                                                                                                        $'
   12.19  ! !
    13.1 --- a/IRInstVarStore.st	Tue Nov 15 21:28:05 2011 +0000
    13.2 +++ b/IRInstVarStore.st	Thu Mar 29 18:03:58 2012 +0000
    13.3 @@ -33,13 +33,13 @@
    13.4  !IRInstVarStore class methodsFor:'documentation'!
    13.5  
    13.6  version
    13.7 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRInstVarStore.st,v 1.3 2009/10/08 11:59:32 fm Exp $'
    13.8 +    ^ '$Id$'
    13.9  !
   13.10  
   13.11  version_CVS
   13.12 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRInstVarStore.st,v 1.3 2009/10/08 11:59:32 fm Exp $'
   13.13 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRInstVarStore.st,v 1.3 2009/10/08 11:59:32 fm Exp §'
   13.14  !
   13.15  
   13.16  version_SVN
   13.17 -    ^ '$Id$'
   13.18 +    ^ '$Id::                                                                                                                        $'
   13.19  ! !
    14.1 --- a/IRInstruction.st	Tue Nov 15 21:28:05 2011 +0000
    14.2 +++ b/IRInstruction.st	Thu Mar 29 18:03:58 2012 +0000
    14.3 @@ -409,13 +409,13 @@
    14.4  !IRInstruction class methodsFor:'documentation'!
    14.5  
    14.6  version
    14.7 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRInstruction.st,v 1.3 2009/10/08 11:55:09 fm Exp $'
    14.8 +    ^ '$Id$'
    14.9  !
   14.10  
   14.11  version_CVS
   14.12 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRInstruction.st,v 1.3 2009/10/08 11:55:09 fm Exp $'
   14.13 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRInstruction.st,v 1.3 2009/10/08 11:55:09 fm Exp §'
   14.14  !
   14.15  
   14.16  version_SVN
   14.17 -    ^ '$Id$'
   14.18 +    ^ '$Id::                                                                                                                        $'
   14.19  ! !
    15.1 --- a/IRInterpreter.st	Tue Nov 15 21:28:05 2011 +0000
    15.2 +++ b/IRInterpreter.st	Thu Mar 29 18:03:58 2012 +0000
    15.3 @@ -111,13 +111,13 @@
    15.4  !IRInterpreter class methodsFor:'documentation'!
    15.5  
    15.6  version
    15.7 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRInterpreter.st,v 1.3 2009/10/08 11:58:54 fm Exp $'
    15.8 +    ^ '$Id$'
    15.9  !
   15.10  
   15.11  version_CVS
   15.12 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRInterpreter.st,v 1.3 2009/10/08 11:58:54 fm Exp $'
   15.13 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRInterpreter.st,v 1.3 2009/10/08 11:58:54 fm Exp §'
   15.14  !
   15.15  
   15.16  version_SVN
   15.17 -    ^ '$Id$'
   15.18 +    ^ '$Id::                                                                                                                        $'
   15.19  ! !
    16.1 --- a/IRJump.st	Tue Nov 15 21:28:05 2011 +0000
    16.2 +++ b/IRJump.st	Thu Mar 29 18:03:58 2012 +0000
    16.3 @@ -52,13 +52,13 @@
    16.4  !IRJump class methodsFor:'documentation'!
    16.5  
    16.6  version
    16.7 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRJump.st,v 1.3 2009/10/08 12:01:23 fm Exp $'
    16.8 +    ^ '$Id$'
    16.9  !
   16.10  
   16.11  version_CVS
   16.12 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRJump.st,v 1.3 2009/10/08 12:01:23 fm Exp $'
   16.13 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRJump.st,v 1.3 2009/10/08 12:01:23 fm Exp §'
   16.14  !
   16.15  
   16.16  version_SVN
   16.17 -    ^ '$Id$'
   16.18 +    ^ '$Id::                                                                                                                        $'
   16.19  ! !
    17.1 --- a/IRJumpIf.st	Tue Nov 15 21:28:05 2011 +0000
    17.2 +++ b/IRJumpIf.st	Thu Mar 29 18:03:58 2012 +0000
    17.3 @@ -61,13 +61,13 @@
    17.4  !IRJumpIf class methodsFor:'documentation'!
    17.5  
    17.6  version
    17.7 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRJumpIf.st,v 1.3 2009/10/08 12:05:24 fm Exp $'
    17.8 +    ^ '$Id$'
    17.9  !
   17.10  
   17.11  version_CVS
   17.12 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRJumpIf.st,v 1.3 2009/10/08 12:05:24 fm Exp $'
   17.13 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRJumpIf.st,v 1.3 2009/10/08 12:05:24 fm Exp §'
   17.14  !
   17.15  
   17.16  version_SVN
   17.17 -    ^ '$Id$'
   17.18 +    ^ '$Id::                                                                                                                        $'
   17.19  ! !
    18.1 --- a/IRJumpOverBlock.st	Tue Nov 15 21:28:05 2011 +0000
    18.2 +++ b/IRJumpOverBlock.st	Thu Mar 29 18:03:58 2012 +0000
    18.3 @@ -40,13 +40,13 @@
    18.4  !IRJumpOverBlock class methodsFor:'documentation'!
    18.5  
    18.6  version
    18.7 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRJumpOverBlock.st,v 1.3 2009/10/08 11:56:16 fm Exp $'
    18.8 +    ^ '$Id$'
    18.9  !
   18.10  
   18.11  version_CVS
   18.12 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRJumpOverBlock.st,v 1.3 2009/10/08 11:56:16 fm Exp $'
   18.13 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRJumpOverBlock.st,v 1.3 2009/10/08 11:56:16 fm Exp §'
   18.14  !
   18.15  
   18.16  version_SVN
   18.17 -    ^ '$Id$'
   18.18 +    ^ '$Id::                                                                                                                        $'
   18.19  ! !
    19.1 --- a/IRLine.st	Tue Nov 15 21:28:05 2011 +0000
    19.2 +++ b/IRLine.st	Thu Mar 29 18:03:58 2012 +0000
    19.3 @@ -34,13 +34,13 @@
    19.4  !IRLine class methodsFor:'documentation'!
    19.5  
    19.6  version
    19.7 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRLine.st,v 1.3 2009/10/08 12:03:44 fm Exp $'
    19.8 +    ^ '$Id$'
    19.9  !
   19.10  
   19.11  version_CVS
   19.12 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRLine.st,v 1.3 2009/10/08 12:03:44 fm Exp $'
   19.13 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRLine.st,v 1.3 2009/10/08 12:03:44 fm Exp §'
   19.14  !
   19.15  
   19.16  version_SVN
   19.17 -    ^ '$Id$'
   19.18 +    ^ '$Id::                                                                                                                        $'
   19.19  ! !
    20.1 --- a/IRLiteralVariableAccess.st	Tue Nov 15 21:28:05 2011 +0000
    20.2 +++ b/IRLiteralVariableAccess.st	Thu Mar 29 18:03:58 2012 +0000
    20.3 @@ -33,13 +33,13 @@
    20.4  !IRLiteralVariableAccess class methodsFor:'documentation'!
    20.5  
    20.6  version
    20.7 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRLiteralVariableAccess.st,v 1.3 2009/10/08 11:59:04 fm Exp $'
    20.8 +    ^ '$Id$'
    20.9  !
   20.10  
   20.11  version_CVS
   20.12 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRLiteralVariableAccess.st,v 1.3 2009/10/08 11:59:04 fm Exp $'
   20.13 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRLiteralVariableAccess.st,v 1.3 2009/10/08 11:59:04 fm Exp §'
   20.14  !
   20.15  
   20.16  version_SVN
   20.17 -    ^ '$Id$'
   20.18 +    ^ '$Id::                                                                                                                        $'
   20.19  ! !
    21.1 --- a/IRLiteralVariableRead.st	Tue Nov 15 21:28:05 2011 +0000
    21.2 +++ b/IRLiteralVariableRead.st	Thu Mar 29 18:03:58 2012 +0000
    21.3 @@ -27,13 +27,13 @@
    21.4  !IRLiteralVariableRead class methodsFor:'documentation'!
    21.5  
    21.6  version
    21.7 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRLiteralVariableRead.st,v 1.3 2009/10/08 12:03:40 fm Exp $'
    21.8 +    ^ '$Id$'
    21.9  !
   21.10  
   21.11  version_CVS
   21.12 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRLiteralVariableRead.st,v 1.3 2009/10/08 12:03:40 fm Exp $'
   21.13 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRLiteralVariableRead.st,v 1.3 2009/10/08 12:03:40 fm Exp §'
   21.14  !
   21.15  
   21.16  version_SVN
   21.17 -    ^ '$Id$'
   21.18 +    ^ '$Id::                                                                                                                        $'
   21.19  ! !
    22.1 --- a/IRLiteralVariableStore.st	Tue Nov 15 21:28:05 2011 +0000
    22.2 +++ b/IRLiteralVariableStore.st	Thu Mar 29 18:03:58 2012 +0000
    22.3 @@ -27,13 +27,13 @@
    22.4  !IRLiteralVariableStore class methodsFor:'documentation'!
    22.5  
    22.6  version
    22.7 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRLiteralVariableStore.st,v 1.3 2009/10/08 11:56:40 fm Exp $'
    22.8 +    ^ '$Id$'
    22.9  !
   22.10  
   22.11  version_CVS
   22.12 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRLiteralVariableStore.st,v 1.3 2009/10/08 11:56:40 fm Exp $'
   22.13 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRLiteralVariableStore.st,v 1.3 2009/10/08 11:56:40 fm Exp §'
   22.14  !
   22.15  
   22.16  version_SVN
   22.17 -    ^ '$Id$'
   22.18 +    ^ '$Id::                                                                                                                        $'
   22.19  ! !
    23.1 --- a/IRMethod.st	Tue Nov 15 21:28:05 2011 +0000
    23.2 +++ b/IRMethod.st	Thu Mar 29 18:03:58 2012 +0000
    23.3 @@ -52,13 +52,13 @@
    23.4  !IRMethod class methodsFor:'documentation'!
    23.5  
    23.6  version
    23.7 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRMethod.st,v 1.3 2009/10/08 11:56:48 fm Exp $'
    23.8 +    ^ '$Id$'
    23.9  !
   23.10  
   23.11  version_CVS
   23.12 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRMethod.st,v 1.3 2009/10/08 11:56:48 fm Exp $'
   23.13 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRMethod.st,v 1.3 2009/10/08 11:56:48 fm Exp §'
   23.14  !
   23.15  
   23.16  version_SVN
   23.17 -    ^ '$Id$'
   23.18 +    ^ '$Id::                                                                                                                        $'
   23.19  ! !
    24.1 --- a/IRPop.st	Tue Nov 15 21:28:05 2011 +0000
    24.2 +++ b/IRPop.st	Thu Mar 29 18:03:58 2012 +0000
    24.3 @@ -27,13 +27,13 @@
    24.4  !IRPop class methodsFor:'documentation'!
    24.5  
    24.6  version
    24.7 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRPop.st,v 1.3 2009/10/08 11:57:32 fm Exp $'
    24.8 +    ^ '$Id$'
    24.9  !
   24.10  
   24.11  version_CVS
   24.12 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRPop.st,v 1.3 2009/10/08 11:57:32 fm Exp $'
   24.13 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRPop.st,v 1.3 2009/10/08 11:57:32 fm Exp §'
   24.14  !
   24.15  
   24.16  version_SVN
   24.17 -    ^ '$Id$'
   24.18 +    ^ '$Id::                                                                                                                        $'
   24.19  ! !
    25.1 --- a/IRPrinter.st	Tue Nov 15 21:28:05 2011 +0000
    25.2 +++ b/IRPrinter.st	Thu Mar 29 18:03:58 2012 +0000
    25.3 @@ -210,13 +210,13 @@
    25.4  !IRPrinter class methodsFor:'documentation'!
    25.5  
    25.6  version
    25.7 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRPrinter.st,v 1.3 2009/10/08 12:00:24 fm Exp $'
    25.8 +    ^ '$Id$'
    25.9  !
   25.10  
   25.11  version_CVS
   25.12 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRPrinter.st,v 1.3 2009/10/08 12:00:24 fm Exp $'
   25.13 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRPrinter.st,v 1.3 2009/10/08 12:00:24 fm Exp §'
   25.14  !
   25.15  
   25.16  version_SVN
   25.17 -    ^ '$Id$'
   25.18 +    ^ '$Id::                                                                                                                        $'
   25.19  ! !
    26.1 --- a/IRReturn.st	Tue Nov 15 21:28:05 2011 +0000
    26.2 +++ b/IRReturn.st	Thu Mar 29 18:03:58 2012 +0000
    26.3 @@ -42,13 +42,13 @@
    26.4  !IRReturn class methodsFor:'documentation'!
    26.5  
    26.6  version
    26.7 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRReturn.st,v 1.3 2009/10/08 12:01:32 fm Exp $'
    26.8 +    ^ '$Id$'
    26.9  !
   26.10  
   26.11  version_CVS
   26.12 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRReturn.st,v 1.3 2009/10/08 12:01:32 fm Exp $'
   26.13 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRReturn.st,v 1.3 2009/10/08 12:01:32 fm Exp §'
   26.14  !
   26.15  
   26.16  version_SVN
   26.17 -    ^ '$Id$'
   26.18 +    ^ '$Id::                                                                                                                        $'
   26.19  ! !
    27.1 --- a/IRSend.st	Tue Nov 15 21:28:05 2011 +0000
    27.2 +++ b/IRSend.st	Thu Mar 29 18:03:58 2012 +0000
    27.3 @@ -78,13 +78,13 @@
    27.4  !IRSend class methodsFor:'documentation'!
    27.5  
    27.6  version
    27.7 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRSend.st,v 1.3 2009/10/08 12:03:48 fm Exp $'
    27.8 +    ^ '$Id$'
    27.9  !
   27.10  
   27.11  version_CVS
   27.12 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRSend.st,v 1.3 2009/10/08 12:03:48 fm Exp $'
   27.13 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRSend.st,v 1.3 2009/10/08 12:03:48 fm Exp §'
   27.14  !
   27.15  
   27.16  version_SVN
   27.17 -    ^ '$Id$'
   27.18 +    ^ '$Id::                                                                                                                        $'
   27.19  ! !
    28.1 --- a/IRSequence.st	Tue Nov 15 21:28:05 2011 +0000
    28.2 +++ b/IRSequence.st	Thu Mar 29 18:03:58 2012 +0000
    28.3 @@ -407,13 +407,13 @@
    28.4  !IRSequence class methodsFor:'documentation'!
    28.5  
    28.6  version
    28.7 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRSequence.st,v 1.3 2009/10/08 11:59:45 fm Exp $'
    28.8 +    ^ '$Id$'
    28.9  !
   28.10  
   28.11  version_CVS
   28.12 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRSequence.st,v 1.3 2009/10/08 11:59:45 fm Exp $'
   28.13 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRSequence.st,v 1.3 2009/10/08 11:59:45 fm Exp §'
   28.14  !
   28.15  
   28.16  version_SVN
   28.17 -    ^ '$Id$'
   28.18 +    ^ '$Id::                                                                                                                        $'
   28.19  ! !
    29.1 --- a/IRStackCount.st	Tue Nov 15 21:28:05 2011 +0000
    29.2 +++ b/IRStackCount.st	Thu Mar 29 18:03:58 2012 +0000
    29.3 @@ -121,13 +121,13 @@
    29.4  !IRStackCount class methodsFor:'documentation'!
    29.5  
    29.6  version
    29.7 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRStackCount.st,v 1.3 2009/10/08 11:59:57 fm Exp $'
    29.8 +    ^ '$Id$'
    29.9  !
   29.10  
   29.11  version_CVS
   29.12 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRStackCount.st,v 1.3 2009/10/08 11:59:57 fm Exp $'
   29.13 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRStackCount.st,v 1.3 2009/10/08 11:59:57 fm Exp §'
   29.14  !
   29.15  
   29.16  version_SVN
   29.17 -    ^ '$Id$'
   29.18 +    ^ '$Id::                                                                                                                        $'
   29.19  ! !
    30.1 --- a/IRTempAccess.st	Tue Nov 15 21:28:05 2011 +0000
    30.2 +++ b/IRTempAccess.st	Thu Mar 29 18:03:58 2012 +0000
    30.3 @@ -59,13 +59,13 @@
    30.4  !IRTempAccess class methodsFor:'documentation'!
    30.5  
    30.6  version
    30.7 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRTempAccess.st,v 1.3 2009/10/08 12:03:42 fm Exp $'
    30.8 +    ^ '$Id$'
    30.9  !
   30.10  
   30.11  version_CVS
   30.12 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRTempAccess.st,v 1.3 2009/10/08 12:03:42 fm Exp $'
   30.13 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRTempAccess.st,v 1.3 2009/10/08 12:03:42 fm Exp §'
   30.14  !
   30.15  
   30.16  version_SVN
   30.17 -    ^ '$Id$'
   30.18 +    ^ '$Id::                                                                                                                        $'
   30.19  ! !
    31.1 --- a/IRTempRead.st	Tue Nov 15 21:28:05 2011 +0000
    31.2 +++ b/IRTempRead.st	Thu Mar 29 18:03:58 2012 +0000
    31.3 @@ -29,13 +29,13 @@
    31.4  !IRTempRead class methodsFor:'documentation'!
    31.5  
    31.6  version
    31.7 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRTempRead.st,v 1.3 2009/10/08 12:00:10 fm Exp $'
    31.8 +    ^ '$Id$'
    31.9  !
   31.10  
   31.11  version_CVS
   31.12 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRTempRead.st,v 1.3 2009/10/08 12:00:10 fm Exp $'
   31.13 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRTempRead.st,v 1.3 2009/10/08 12:00:10 fm Exp §'
   31.14  !
   31.15  
   31.16  version_SVN
   31.17 -    ^ '$Id$'
   31.18 +    ^ '$Id::                                                                                                                        $'
   31.19  ! !
    32.1 --- a/IRTempStore.st	Tue Nov 15 21:28:05 2011 +0000
    32.2 +++ b/IRTempStore.st	Thu Mar 29 18:03:58 2012 +0000
    32.3 @@ -29,13 +29,13 @@
    32.4  !IRTempStore class methodsFor:'documentation'!
    32.5  
    32.6  version
    32.7 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRTempStore.st,v 1.3 2009/10/08 12:04:11 fm Exp $'
    32.8 +    ^ '$Id$'
    32.9  !
   32.10  
   32.11  version_CVS
   32.12 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRTempStore.st,v 1.3 2009/10/08 12:04:11 fm Exp $'
   32.13 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRTempStore.st,v 1.3 2009/10/08 12:04:11 fm Exp §'
   32.14  !
   32.15  
   32.16  version_SVN
   32.17 -    ^ '$Id$'
   32.18 +    ^ '$Id::                                                                                                                        $'
   32.19  ! !
    33.1 --- a/IRTransformTest.st	Tue Nov 15 21:28:05 2011 +0000
    33.2 +++ b/IRTransformTest.st	Thu Mar 29 18:03:58 2012 +0000
    33.3 @@ -60,13 +60,12 @@
    33.4          (iRMethod allSequences last) last delete.
    33.5  
    33.6          (iRMethod allSequences last)
    33.7 -                        addInstructions: (Array with:(IRInstruction pushLiteral: 2) with: (IRInstruction returnTop)).
    33.8 +                        addInstructions: {(IRInstruction pushLiteral: 2). (IRInstruction returnTop)}.
    33.9  
   33.10          aCompiledMethod := iRMethod compiledCode.
   33.11          self should: [(aCompiledMethod valueWithReceiver: nil arguments: #() ) = 2].
   33.12  
   33.13      "Modified: / 30-03-2009 / 19:40:10 / Jan Vrany <vranyj1@fel.cvut.cz>"
   33.14 -    "Modified: / 07-05-2011 / 14:17:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   33.15  !
   33.16  
   33.17  testAddIntructionsBefore
   33.18 @@ -83,13 +82,12 @@
   33.19          push := (iRMethod allSequences last) at: (iRMethod allSequences size - 1) .
   33.20  
   33.21          (iRMethod allSequences last)
   33.22 -                        addInstructions: (Array with:(IRInstruction pushLiteral: 2) with: (IRInstruction returnTop)) before: push.
   33.23 +                        addInstructions: {(IRInstruction pushLiteral: 2). (IRInstruction returnTop)} before: push.
   33.24  
   33.25          aCompiledMethod := iRMethod compiledCode.
   33.26          self should: [(aCompiledMethod valueWithReceiver: nil arguments: #() ) = 2].
   33.27  
   33.28      "Modified: / 30-03-2009 / 19:40:21 / Jan Vrany <vranyj1@fel.cvut.cz>"
   33.29 -    "Modified: / 07-05-2011 / 14:18:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   33.30  !
   33.31  
   33.32  testAddIntructionsBeforeFromLList
   33.33 @@ -165,13 +163,13 @@
   33.34  !IRTransformTest class methodsFor:'documentation'!
   33.35  
   33.36  version
   33.37 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRTransformTest.st,v 1.3 2009/10/08 11:56:52 fm Exp $'
   33.38 +    ^ '$Id$'
   33.39  !
   33.40  
   33.41  version_CVS
   33.42 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRTransformTest.st,v 1.3 2009/10/08 11:56:52 fm Exp $'
   33.43 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRTransformTest.st,v 1.3 2009/10/08 11:56:52 fm Exp §'
   33.44  !
   33.45  
   33.46  version_SVN
   33.47 -    ^ '$Id$'
   33.48 +    ^ '$Id::                                                                                                                        $'
   33.49  ! !
    34.1 --- a/IRTranslator.st	Tue Nov 15 21:28:05 2011 +0000
    34.2 +++ b/IRTranslator.st	Thu Mar 29 18:03:58 2012 +0000
    34.3 @@ -167,11 +167,10 @@
    34.4          kind == #BArg ifTrue:[^gen pushBlockArg: index].
    34.5          kind == #BVar ifTrue:[^gen pushBlockVar: index].
    34.6  
    34.7 -        self error:'Should never be reached'.
    34.8 +        self halt:'Should never be reached'.
    34.9  
   34.10      "Created: / 30-03-2009 / 14:06:28 / Jan Vrany <vranyj1@fel.cvut.cz>"
   34.11      "Modified: / 30-03-2009 / 19:02:32 / Jan Vrany <vranyj1@fel.cvut.cz>"
   34.12 -    "Modified: / 09-04-2010 / 15:05:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   34.13  !
   34.14  
   34.15  remoteReturn
   34.16 @@ -372,13 +371,13 @@
   34.17  !IRTranslator class methodsFor:'documentation'!
   34.18  
   34.19  version
   34.20 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRTranslator.st,v 1.3 2009/10/08 12:04:47 fm Exp $'
   34.21 +    ^ '$Id$'
   34.22  !
   34.23  
   34.24  version_CVS
   34.25 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRTranslator.st,v 1.3 2009/10/08 12:04:47 fm Exp $'
   34.26 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/IRTranslator.st,v 1.3 2009/10/08 12:04:47 fm Exp §'
   34.27  !
   34.28  
   34.29  version_SVN
   34.30 -    ^ '$Id$'
   34.31 +    ^ '$Id::                                                                                                                        $'
   34.32  ! !
    35.1 --- a/Make.proto	Tue Nov 15 21:28:05 2011 +0000
    35.2 +++ b/Make.proto	Thu Mar 29 18:03:58 2012 +0000
    35.3 @@ -1,7 +1,7 @@
    35.4  # $Header$
    35.5  #
    35.6  # DO NOT EDIT
    35.7 -# automagically generated from the projectDefinition: cvut_stx_goodies_newcompiler.
    35.8 +# automagically generated from the projectDefinition: cvut_stx_goodies_newcompiler at 2012-03-29 19:04:24.824.
    35.9  #
   35.10  # Warning: once you modify this file, do not rerun
   35.11  # stmkmp or projectDefinition-build again - otherwise, your changes are lost.
   35.12 @@ -34,7 +34,7 @@
   35.13  # add the path(es) here:,
   35.14  # ********** OPTIONAL: MODIFY the next lines ***
   35.15  # LOCALINCLUDES=-Ifoo -Ibar
   35.16 -LOCALINCLUDES= -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser -I$(INCLUDE_TOP)/stx/libwidg -I$(INCLUDE_TOP)/stx/goodies/sunit -I$(INCLUDE_TOP)/stx/libbasic2 -I$(INCLUDE_TOP)/stx/libcompat -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/libcomp -I$(INCLUDE_TOP)/stx/libtool
   35.17 +LOCALINCLUDES= -I$(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser -I$(INCLUDE_TOP)/stx/libwidg -I$(INCLUDE_TOP)/stx/goodies/libtool3 -I$(INCLUDE_TOP)/stx/goodies/sunit -I$(INCLUDE_TOP)/stx/libbasic2 -I$(INCLUDE_TOP)/stx/libcompat -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/libcomp -I$(INCLUDE_TOP)/stx/libtool
   35.18  
   35.19  
   35.20  # if you need any additional defines for embedded C code,
   35.21 @@ -44,7 +44,7 @@
   35.22  LOCALDEFINES=
   35.23  
   35.24  LIBNAME=libcvut_stx_goodies_newcompiler
   35.25 -STCLOCALOPT='-package=$(PACKAGE)' -I. $(LOCALINCLUDES) $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) -H.  -varPrefix=$(LIBNAME)
   35.26 +STCLOCALOPT='-package=$(PACKAGE)' -I. $(LOCALINCLUDES) $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) -headerDir=.  -varPrefix=$(LIBNAME)
   35.27  
   35.28  
   35.29  # ********** OPTIONAL: MODIFY the next line ***
   35.30 @@ -63,17 +63,31 @@
   35.31  
   35.32  all:: preMake classLibRule postMake
   35.33  
   35.34 -pre_objs::  update-svn-revision
   35.35 +pre_objs::  
   35.36  
   35.37  
   35.38  
   35.39 -update-svn-revision:
   35.40 -	if [ ! -r .svnversion -o "$(shell svnversion -n)" != "$(shell cat .svnversion)" ]; then \
   35.41 -		svnversion -n > .svnversion; \
   35.42 -		sed -i -e "s/\"\$$SVN\-Revision:\".*\"\$$\"/\"\$$SVN-Revision:\"'$(shell svnversion -n)'\"\$$\"/g" \
   35.43 -			cvut_stx_goodies_newcompiler.st; \
   35.44 +
   35.45 +# Update SVN revision in stx_libbasic3.st
   35.46 +ifneq (,$(findstring .svn,$(wildcard .svn)))
   35.47 +.svnversion: *.st
   35.48 +	if [ -d .svn ]; then \
   35.49 +		rev=$(shell svnversion -n); \
   35.50 +		echo -n $$rev > .svnversion; \
   35.51 +	else \
   35.52 +		echo -n exported > .svnversion; \
   35.53  	fi
   35.54 -.PHONY: update-svn-revision
   35.55 +
   35.56 +cvut_stx_goodies_newcompiler.o: cvut_stx_goodies_newcompiler.st .svnversion 
   35.57 +	if [ -d .svn ]; then \
   35.58 +		rev2="$(shell printf "%-16s" $$(cat .svnversion))"; \
   35.59 +		sed -e "s/\"\$$SVN\-Revision:\".*\"\$$\"/\"\$$SVN-Revision:\"\'$$rev2\'\"\$$\"/g" $< > .cvut_stx_goodies_newcompiler.svn.st; \
   35.60 +	fi
   35.61 +	$(MAKE) CC="$(CLASSLIB_CC)" OPT="$(OPT)" SEPINITCODE="$(SEPINITCODE)" STC="$(STC)" STFILE=.cvut_stx_goodies_newcompiler.svn $(O_RULE);
   35.62 +	mv .cvut_stx_goodies_newcompiler.svn.$(O) cvut_stx_goodies_newcompiler.$(O) 
   35.63 +endif
   35.64 +
   35.65 +
   35.66  
   35.67  
   35.68  # add more install actions here
   35.69 @@ -90,20 +104,22 @@
   35.70  
   35.71  prereq: $(REQUIRED_SUPPORT_DIRS)
   35.72  	cd $(TOP)/libbasic && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
   35.73 +	cd $(TOP)/goodies/libtool3 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
   35.74  	cd $(TOP)/goodies/refactoryBrowser/parser && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
   35.75  	cd $(TOP)/libbasic2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
   35.76  	cd $(TOP)/libcomp && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
   35.77  	cd $(TOP)/libview && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
   35.78 -	cd $(TOP)/libbasic3 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
   35.79 +	cd $(TOP)/libdb && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
   35.80  	cd $(TOP)/libview2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
   35.81  	cd $(TOP)/libboss && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
   35.82 -	cd $(TOP)/goodies/xml/vw && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
   35.83 +	cd $(TOP)/libdb/libodbc && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
   35.84 +	cd $(TOP)/libdb/libsqlite && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
   35.85  	cd $(TOP)/goodies/sunit && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
   35.86  	cd $(TOP)/libui && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
   35.87 -	cd $(TOP)/goodies/xml/stx && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
   35.88 +	cd $(TOP)/libbasic3 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
   35.89  	cd $(TOP)/libwidg && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
   35.90 +	cd $(TOP)/libhtml && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
   35.91  	cd $(TOP)/libwidg2 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
   35.92 -	cd $(TOP)/libwidg3 && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
   35.93  	cd $(TOP)/libtool && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
   35.94  	cd $(TOP)/libcompat && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
   35.95  	cd $(TOP)/librun && $(MAKE) "CFLAGS_LOCAL=$(GLOBALDEFINES)"
   35.96 @@ -111,6 +127,7 @@
   35.97  
   35.98  
   35.99  cleanjunk::
  35.100 +	-rm -f *.s *.s2
  35.101  
  35.102  clean::
  35.103  	-rm -f *.o *.H
  35.104 @@ -131,6 +148,7 @@
  35.105  $(OUTDIR)IRAccess.$(O) IRAccess.$(H): IRAccess.st $(INCLUDE_TOP)/cvut/stx/goodies/newcompiler/IRInstruction.$(H) $(INCLUDE_TOP)/stx/libbasic/Link.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
  35.106  $(OUTDIR)IRClosure.$(O) IRClosure.$(H): IRClosure.st $(INCLUDE_TOP)/cvut/stx/goodies/newcompiler/IRFunction.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
  35.107  $(OUTDIR)IRConstant.$(O) IRConstant.$(H): IRConstant.st $(INCLUDE_TOP)/cvut/stx/goodies/newcompiler/IRInstruction.$(H) $(INCLUDE_TOP)/stx/libbasic/Link.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
  35.108 +$(OUTDIR)IRDecompiler.$(O) IRDecompiler.$(H): IRDecompiler.st $(INCLUDE_TOP)/cvut/stx/goodies/newcompiler/IRInterpreter.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
  35.109  $(OUTDIR)IRDup.$(O) IRDup.$(H): IRDup.st $(INCLUDE_TOP)/cvut/stx/goodies/newcompiler/IRInstruction.$(H) $(INCLUDE_TOP)/stx/libbasic/Link.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
  35.110  $(OUTDIR)IRJump.$(O) IRJump.$(H): IRJump.st $(INCLUDE_TOP)/cvut/stx/goodies/newcompiler/IRInstruction.$(H) $(INCLUDE_TOP)/stx/libbasic/Link.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
  35.111  $(OUTDIR)IRLine.$(O) IRLine.$(H): IRLine.st $(INCLUDE_TOP)/cvut/stx/goodies/newcompiler/IRInstruction.$(H) $(INCLUDE_TOP)/stx/libbasic/Link.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    36.1 --- a/Make.spec	Tue Nov 15 21:28:05 2011 +0000
    36.2 +++ b/Make.spec	Thu Mar 29 18:03:58 2012 +0000
    36.3 @@ -1,7 +1,7 @@
    36.4  # $Header$
    36.5  #
    36.6 -# DO NOT EDIT 
    36.7 -# automagically generated from the projectDefinition: cvut_stx_goodies_newcompiler.
    36.8 +# DO NOT EDIT
    36.9 +# automagically generated from the projectDefinition: cvut_stx_goodies_newcompiler at 2012-03-29 19:04:23.686.
   36.10  #
   36.11  # Warning: once you modify this file, do not rerun
   36.12  # stmkmp or projectDefinition-build again - otherwise, your changes are lost.
   36.13 @@ -18,7 +18,7 @@
   36.14  
   36.15  
   36.16  # Argument(s) to the stc compiler (stc --usage).
   36.17 -#  -H.         : create header files locally
   36.18 +#  -headerDir=. : create header files locally
   36.19  #                (if removed, they will be created as common
   36.20  #  -Pxxx       : defines the package
   36.21  #  -Zxxx       : a prefix for variables within the classLib
   36.22 @@ -61,6 +61,7 @@
   36.23  	IRAccess \
   36.24  	IRClosure \
   36.25  	IRConstant \
   36.26 +	IRDecompiler \
   36.27  	IRDup \
   36.28  	IRJump \
   36.29  	IRLine \
   36.30 @@ -98,6 +99,7 @@
   36.31      $(OUTDIR)IRAccess.$(O) \
   36.32      $(OUTDIR)IRClosure.$(O) \
   36.33      $(OUTDIR)IRConstant.$(O) \
   36.34 +    $(OUTDIR)IRDecompiler.$(O) \
   36.35      $(OUTDIR)IRDup.$(O) \
   36.36      $(OUTDIR)IRJump.$(O) \
   36.37      $(OUTDIR)IRLine.$(O) \
    37.1 --- a/Makefile	Tue Nov 15 21:28:05 2011 +0000
    37.2 +++ b/Makefile	Thu Mar 29 18:03:58 2012 +0000
    37.3 @@ -1,7 +1,7 @@
    37.4  #
    37.5 -# DO NOT EDIT 
    37.6 +# DO NOT EDIT
    37.7  #
    37.8 -# make uses this file (Makefile) only, if there is no 
    37.9 +# make uses this file (Makefile) only, if there is no
   37.10  # file named "makefile" (lower-case m) in the same directory.
   37.11  # My only task is to generate the real makefile and call make again.
   37.12  # Thereafter, I am no longer used and needed.
   37.13 @@ -16,4 +16,4 @@
   37.14  include Make.proto
   37.15  
   37.16  makefile:
   37.17 -	$(TOP)/rules/stmkmf     
   37.18 +	$(TOP)/rules/stmkmf
    38.1 --- a/abbrev.stc	Tue Nov 15 21:28:05 2011 +0000
    38.2 +++ b/abbrev.stc	Thu Mar 29 18:03:58 2012 +0000
    38.3 @@ -1,16 +1,20 @@
    38.4 +# automagically generated by the project definition
    38.5 +# this file is needed for stc to be able to compile modules independently.
    38.6 +# it provides information about a classes filename, category and especially namespace.
    38.7  IRBuilder IRBuilder cvut:stx/goodies/newcompiler 'NewCompiler-IR' 0
    38.8 -IRBuilderTest IRBuilderTest cvut:stx/goodies/newcompiler 'NewCompiler-IR-Tests' 4
    38.9 +IRBuilderTest IRBuilderTest cvut:stx/goodies/newcompiler 'NewCompiler-IR-Tests' 1
   38.10  IRBytecodeGenerator IRBytecodeGenerator cvut:stx/goodies/newcompiler 'NewCompiler-Bytecode' 0
   38.11  IRFunction IRFunction cvut:stx/goodies/newcompiler 'NewCompiler-IR' 0
   38.12  IRInstruction IRInstruction cvut:stx/goodies/newcompiler 'NewCompiler-IR' 0
   38.13  IRInterpreter IRInterpreter cvut:stx/goodies/newcompiler 'NewCompiler-IR' 0
   38.14  IRSequence IRSequence cvut:stx/goodies/newcompiler 'NewCompiler-IR' 0
   38.15  IRStackCount IRStackCount cvut:stx/goodies/newcompiler 'NewCompiler-Bytecode' 0
   38.16 -IRTransformTest IRTransformTest cvut:stx/goodies/newcompiler 'NewCompiler-IR-Tests' 4
   38.17 -cvut_stx_goodies_newcompiler cvut_stx_goodies_newcompiler cvut:stx/goodies/newcompiler '* Projects & Packages *' 4
   38.18 +IRTransformTest IRTransformTest cvut:stx/goodies/newcompiler 'NewCompiler-IR-Tests' 1
   38.19 +cvut_stx_goodies_newcompiler cvut_stx_goodies_newcompiler cvut:stx/goodies/newcompiler '* Projects & Packages *' 3
   38.20  IRAccess IRAccess cvut:stx/goodies/newcompiler 'NewCompiler-IR' 0
   38.21  IRClosure IRClosure cvut:stx/goodies/newcompiler 'NewCompiler-IR' 0
   38.22  IRConstant IRConstant cvut:stx/goodies/newcompiler 'NewCompiler-IR' 0
   38.23 +IRDecompiler IRDecompiler cvut:stx/goodies/newcompiler 'NewCompiler-IR' 0
   38.24  IRDup IRDup cvut:stx/goodies/newcompiler 'NewCompiler-IR' 0
   38.25  IRJump IRJump cvut:stx/goodies/newcompiler 'NewCompiler-IR' 0
   38.26  IRLine IRLine cvut:stx/goodies/newcompiler 'NewCompiler-IR' 0
    39.1 --- a/bc.mak	Tue Nov 15 21:28:05 2011 +0000
    39.2 +++ b/bc.mak	Thu Mar 29 18:03:58 2012 +0000
    39.3 @@ -1,18 +1,24 @@
    39.4  # $Header$
    39.5  #
    39.6  # DO NOT EDIT
    39.7 -# automagically generated from the projectDefinition: cvut_stx_goodies_newcompiler.
    39.8 +# automagically generated from the projectDefinition: cvut_stx_goodies_newcompiler at 2012-03-29 19:04:25.464.
    39.9  #
   39.10  # Warning: once you modify this file, do not rerun
   39.11  # stmkmp or projectDefinition-build again - otherwise, your changes are lost.
   39.12  #
   39.13 -# This file contains make rules for the win32 platform (using borland-bcc).
   39.14 +# Notice, that the name bc.mak is historical (from times, when only borland c was supported).
   39.15 +# This file contains make rules for the win32 platform using either borland-bcc or visual-c.
   39.16  # It shares common definitions with the unix-make in Make.spec.
   39.17 -# The nt.mak supports the following targets:
   39.18 +# The bc.mak supports the following targets:
   39.19  #    bmake         - compile all st-files to a classLib (dll)
   39.20  #    bmake clean   - clean all temp files
   39.21  #    bmake clobber - clean all
   39.22  #
   39.23 +# Historic Note:
   39.24 +#  this used to contain only rules to make with borland 
   39.25 +#    (called via bmake, by "make.exe -f bc.mak")
   39.26 +#  this has changed; it is now also possible to build using microsoft visual c
   39.27 +#    (called via vcmake, by "make.exe -f bc.mak -DUSEVC")
   39.28  #
   39.29  TOP=..\..\..\..\stx
   39.30  INCLUDE_TOP=$(TOP)\..
   39.31 @@ -28,10 +34,10 @@
   39.32  
   39.33  
   39.34  
   39.35 -LOCALINCLUDES= -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser -I$(INCLUDE_TOP)\stx\libwidg -I$(INCLUDE_TOP)\stx\goodies\sunit -I$(INCLUDE_TOP)\stx\libbasic2 -I$(INCLUDE_TOP)\stx\libcompat -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\libcomp -I$(INCLUDE_TOP)\stx\libtool
   39.36 +LOCALINCLUDES= -I$(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser -I$(INCLUDE_TOP)\stx\libwidg -I$(INCLUDE_TOP)\stx\goodies\libtool3 -I$(INCLUDE_TOP)\stx\goodies\sunit -I$(INCLUDE_TOP)\stx\libbasic2 -I$(INCLUDE_TOP)\stx\libcompat -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\libcomp -I$(INCLUDE_TOP)\stx\libtool
   39.37  LOCALDEFINES=
   39.38  
   39.39 -STCLOCALOPT=-package=$(PACKAGE) -I. $(LOCALINCLUDES) -H. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES)  -varPrefix=$(LIBNAME)
   39.40 +STCLOCALOPT=-package=$(PACKAGE) -I. $(LOCALINCLUDES) -headerDir=. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES)  -varPrefix=$(LIBNAME)
   39.41  LOCALLIBS=
   39.42  
   39.43  OBJS= $(COMMON_OBJS) $(WIN32_OBJS)
   39.44 @@ -45,20 +51,22 @@
   39.45  # build all prerequisite packages for this package
   39.46  prereq:
   39.47  	pushd ..\..\..\..\stx\libbasic & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
   39.48 +	pushd ..\..\..\..\stx\goodies\libtool3 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
   39.49  	pushd ..\..\..\..\stx\goodies\refactoryBrowser\parser & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
   39.50  	pushd ..\..\..\..\stx\libbasic2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
   39.51  	pushd ..\..\..\..\stx\libcomp & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
   39.52  	pushd ..\..\..\..\stx\libview & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
   39.53 -	pushd ..\..\..\..\stx\libbasic3 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
   39.54 +	pushd ..\..\..\..\stx\libdb & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
   39.55  	pushd ..\..\..\..\stx\libview2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
   39.56  	pushd ..\..\..\..\stx\libboss & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
   39.57 -	pushd ..\..\..\..\stx\goodies\xml\vw & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
   39.58 +	pushd ..\..\..\..\stx\libdb\libodbc & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
   39.59 +	pushd ..\..\..\..\stx\libdb\libsqlite & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
   39.60  	pushd ..\..\..\..\stx\goodies\sunit & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
   39.61  	pushd ..\..\..\..\stx\libui & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
   39.62 -	pushd ..\..\..\..\stx\goodies\xml\stx & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
   39.63 +	pushd ..\..\..\..\stx\libbasic3 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
   39.64  	pushd ..\..\..\..\stx\libwidg & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
   39.65 +	pushd ..\..\..\..\stx\libhtml & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
   39.66  	pushd ..\..\..\..\stx\libwidg2 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
   39.67 -	pushd ..\..\..\..\stx\libwidg3 & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
   39.68  	pushd ..\..\..\..\stx\libtool & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
   39.69  	pushd ..\..\..\..\stx\libcompat & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
   39.70  	pushd ..\..\..\..\stx\librun & $(MAKE_BAT) "CFLAGS_LOCAL=$(GLOBALDEFINES) "
   39.71 @@ -66,6 +74,7 @@
   39.72  
   39.73  
   39.74  
   39.75 +
   39.76  # BEGINMAKEDEPEND --- do not remove this line; make depend needs it
   39.77  $(OUTDIR)IRBuilder.$(O) IRBuilder.$(H): IRBuilder.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   39.78  $(OUTDIR)IRBytecodeGenerator.$(O) IRBytecodeGenerator.$(H): IRBytecodeGenerator.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   39.79 @@ -78,6 +87,7 @@
   39.80  $(OUTDIR)IRAccess.$(O) IRAccess.$(H): IRAccess.st $(INCLUDE_TOP)\cvut\stx\goodies\newcompiler\IRInstruction.$(H) $(INCLUDE_TOP)\stx\libbasic\Link.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   39.81  $(OUTDIR)IRClosure.$(O) IRClosure.$(H): IRClosure.st $(INCLUDE_TOP)\cvut\stx\goodies\newcompiler\IRFunction.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   39.82  $(OUTDIR)IRConstant.$(O) IRConstant.$(H): IRConstant.st $(INCLUDE_TOP)\cvut\stx\goodies\newcompiler\IRInstruction.$(H) $(INCLUDE_TOP)\stx\libbasic\Link.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   39.83 +$(OUTDIR)IRDecompiler.$(O) IRDecompiler.$(H): IRDecompiler.st $(INCLUDE_TOP)\cvut\stx\goodies\newcompiler\IRInterpreter.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   39.84  $(OUTDIR)IRDup.$(O) IRDup.$(H): IRDup.st $(INCLUDE_TOP)\cvut\stx\goodies\newcompiler\IRInstruction.$(H) $(INCLUDE_TOP)\stx\libbasic\Link.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   39.85  $(OUTDIR)IRJump.$(O) IRJump.$(H): IRJump.st $(INCLUDE_TOP)\cvut\stx\goodies\newcompiler\IRInstruction.$(H) $(INCLUDE_TOP)\stx\libbasic\Link.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   39.86  $(OUTDIR)IRLine.$(O) IRLine.$(H): IRLine.st $(INCLUDE_TOP)\cvut\stx\goodies\newcompiler\IRInstruction.$(H) $(INCLUDE_TOP)\stx\libbasic\Link.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
    40.1 --- a/bmake.bat	Tue Nov 15 21:28:05 2011 +0000
    40.2 +++ b/bmake.bat	Thu Mar 29 18:03:58 2012 +0000
    40.3 @@ -3,6 +3,6 @@
    40.4  @REM type bmake, and wait...
    40.5  @REM do not edit - automatically generated from ProjectDefinition
    40.6  @REM -------
    40.7 -make.exe -N -f bc.mak %1 %2
    40.8 +make.exe -N -f bc.mak %*
    40.9  
   40.10  
    41.1 --- a/cvut_stx_goodies_newcompiler.st	Tue Nov 15 21:28:05 2011 +0000
    41.2 +++ b/cvut_stx_goodies_newcompiler.st	Thu Mar 29 18:03:58 2012 +0000
    41.3 @@ -11,48 +11,37 @@
    41.4  !cvut_stx_goodies_newcompiler class methodsFor:'description'!
    41.5  
    41.6  preRequisites
    41.7 -    "list all required packages.
    41.8 -     This list can be maintained manually or (better) generated and
    41.9 -     updated by scanning the superclass hierarchies and looking for
   41.10 -     global variable accesses. (the browser has a menu function for that)
   41.11 -     Howevery, often too much is found, and you may want to explicitely
   41.12 -     exclude individual packages in the #excludedFromPrerequisites method."
   41.13 -
   41.14      ^ #(
   41.15 -        #'stx:goodies/refactoryBrowser/parser'
   41.16 +        #'stx:goodies/libtool3'    "Tools::Inspector2Tab - referenced by IRFunction>>inspector2TabIRCode "
   41.17 +        #'stx:goodies/refactoryBrowser/parser'    "RBIdentifierToken - referenced by IRDecompiler>>newVar: "
   41.18          #'stx:goodies/sunit'    "TestCase - superclass of IRTransformTest "
   41.19          #'stx:libbasic'    "Link - superclass of IRLine "
   41.20          #'stx:libbasic2'    "OrderedDictionary - referenced by IRBytecodeGenerator>>initialize "
   41.21          #'stx:libcomp'    "PrimitiveNode - referenced by IRFunction>>initialize "
   41.22 -        #'stx:libcompat'
   41.23 -        #'stx:libtool'    "Tools::Inspector2Tab - referenced by IRFunction>>inspector2TabIRCode "
   41.24 -        #'stx:libwidg'
   41.25 +        #'stx:libcompat'    "Preferences - referenced by IRDecompiler>>removeClosureCreation: "
   41.26 +        #'stx:libwidg'    "ScrollableView - referenced by IRFunction>>inspector2TabIRCode "
   41.27      )
   41.28  ! !
   41.29  
   41.30  !cvut_stx_goodies_newcompiler class methodsFor:'description - contents'!
   41.31  
   41.32  classNamesAndAttributes
   41.33 -    "lists the classes which are to be included in the project.
   41.34 -     Each entry in the list may be: a single class-name (symbol),
   41.35 -     or an array-literal consisting of class name and attributes.
   41.36 -     Attributes are: #autoload or #<os> where os is one of win32, unix,..."
   41.37 -
   41.38      ^ #(
   41.39          "<className> or (<className> attributes...) in load order"
   41.40          IRBuilder
   41.41 -        (IRBuilderTest autoload)
   41.42 +        IRBuilderTest
   41.43          IRBytecodeGenerator
   41.44          IRFunction
   41.45          IRInstruction
   41.46          IRInterpreter
   41.47          IRSequence
   41.48          IRStackCount
   41.49 -        (IRTransformTest autoload)
   41.50 +        IRTransformTest
   41.51          #'cvut_stx_goodies_newcompiler'
   41.52          IRAccess
   41.53          IRClosure
   41.54          IRConstant
   41.55 +        IRDecompiler
   41.56          IRDup
   41.57          IRJump
   41.58          IRLine
   41.59 @@ -78,9 +67,6 @@
   41.60  !
   41.61  
   41.62  extensionMethodNames
   41.63 -    "lists the extension methods which are to be included in the project.
   41.64 -     Entries are 2-element array literals, consisting of class-name and selector."
   41.65 -
   41.66      ^ #(
   41.67          ByteCodeCompiler literalArray:
   41.68          Class binding
   41.69 @@ -124,23 +110,32 @@
   41.70  
   41.71  !cvut_stx_goodies_newcompiler class methodsFor:'description - svn'!
   41.72  
   41.73 +svnRepositoryUrlString
   41.74 +    "Return a SVN repository URL of myself.
   41.75 +     (Generated since 2011-04-08)
   41.76 +     Do not make the string shorter!!!!!! We have to use fixed-length keyword!!!!!!
   41.77 +    "        
   41.78 +
   41.79 +    ^ '$URL::                                                                                                                        $'
   41.80 +!
   41.81 +
   41.82  svnRevisionNr
   41.83      "Return a SVN revision number of myself.
   41.84       This number is updated after a commit"
   41.85  
   41.86 -    ^ "$SVN-Revision:"'34M'"$"
   41.87 +    ^ "$SVN-Revision:"'nil             '"$"
   41.88  ! !
   41.89  
   41.90  !cvut_stx_goodies_newcompiler class methodsFor:'documentation'!
   41.91  
   41.92  version
   41.93 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/cvut_stx_goodies_newcompiler.st,v 1.4 2009/10/08 12:00:46 fm Exp $'
   41.94 +    ^ '$Id$'
   41.95  !
   41.96  
   41.97  version_CVS
   41.98 -    ^ '$Header: /cvs/stx/cvut/stx/goodies/newcompiler/cvut_stx_goodies_newcompiler.st,v 1.4 2009/10/08 12:00:46 fm Exp $'
   41.99 +    ^ '§Header: /cvs/stx/cvut/stx/goodies/newcompiler/cvut_stx_goodies_newcompiler.st,v 1.4 2009/10/08 12:00:46 fm Exp §'
  41.100  !
  41.101  
  41.102  version_SVN
  41.103 -    ^ '$Id$'
  41.104 +    ^ '$Id::                                                                                                                        $'
  41.105  ! !
    42.1 --- a/extensions.st	Tue Nov 15 21:28:05 2011 +0000
    42.2 +++ b/extensions.st	Thu Mar 29 18:03:58 2012 +0000
    42.3 @@ -1,6 +1,4 @@
    42.4 -"{ Package: 'cvut:stx/goodies/newcompiler' }"
    42.5 -
    42.6 -!
    42.7 +"{ Package: 'cvut:stx/goodies/newcompiler' }"!
    42.8  
    42.9  !ByteCodeCompiler methodsFor:'accessing'!
   42.10  
   42.11 @@ -11,6 +9,7 @@
   42.12  
   42.13      "Created: / 03-11-2008 / 14:09:33 / Jan Vrany <vranyj1@fel.cvut.cz>"
   42.14  ! !
   42.15 +
   42.16  !Class methodsFor:'accessing'!
   42.17  
   42.18  binding
   42.19 @@ -19,8 +18,18 @@
   42.20  
   42.21      "Created: / 11-06-2008 / 11:20:35 / Jan Vrany <vranyj1@fel.cvut.cz>"
   42.22  ! !
   42.23 +
   42.24 +!Class methodsFor:'accessing'!
   42.25 +
   42.26 +bindingOf: classVarName
   42.27 +
   42.28 +    ^(self fullName , ':' , classVarName) asSymbol
   42.29 +
   42.30 +    "Created: / 11-06-2008 / 11:29:19 / Jan Vrany <vranyj1@fel.cvut.cz>"
   42.31 +! !
   42.32 +
   42.33  !cvut_stx_goodies_newcompiler class methodsFor:'documentation'!
   42.34  
   42.35  extensionsVersion_SVN
   42.36 -    ^ '$Id$'
   42.37 -! !
   42.38 +    ^ '$Id::                                                                                                                        $'
   42.39 +! !
   42.40 \ No newline at end of file
    43.1 --- a/libInit.cc	Tue Nov 15 21:28:05 2011 +0000
    43.2 +++ b/libInit.cc	Thu Mar 29 18:03:58 2012 +0000
    43.3 @@ -38,6 +38,7 @@
    43.4  _IRAccess_Init(pass,__pRT__,snd);
    43.5  _IRClosure_Init(pass,__pRT__,snd);
    43.6  _IRConstant_Init(pass,__pRT__,snd);
    43.7 +_IRDecompiler_Init(pass,__pRT__,snd);
    43.8  _IRDup_Init(pass,__pRT__,snd);
    43.9  _IRJump_Init(pass,__pRT__,snd);
   43.10  _IRLine_Init(pass,__pRT__,snd);
    44.1 --- a/newcompiler.rc	Tue Nov 15 21:28:05 2011 +0000
    44.2 +++ b/newcompiler.rc	Thu Mar 29 18:03:58 2012 +0000
    44.3 @@ -1,15 +1,17 @@
    44.4  //
    44.5 -// DO NOT EDIT 
    44.6 +// DO NOT EDIT
    44.7  // automagically generated from the projectDefinition: cvut_stx_goodies_newcompiler.
    44.8  //
    44.9  VS_VERSION_INFO VERSIONINFO
   44.10 -  FILEVERSION     6,1,33,33
   44.11 -  PRODUCTVERSION  6,1,2,1
   44.12 +  FILEVERSION     6,2,0,1
   44.13 +  PRODUCTVERSION  6,2,1,1
   44.14 +#if (__BORLANDC__)
   44.15    FILEFLAGSMASK   VS_FF_DEBUG | VS_FF_PRERELEASE
   44.16    FILEFLAGS       VS_FF_PRERELEASE | VS_FF_SPECIALBUILD
   44.17    FILEOS          VOS_NT_WINDOWS32
   44.18    FILETYPE        VFT_DLL
   44.19    FILESUBTYPE     VS_USER_DEFINED
   44.20 +#endif
   44.21  
   44.22  BEGIN
   44.23    BLOCK "StringFileInfo"
   44.24 @@ -18,12 +20,12 @@
   44.25      BEGIN
   44.26        VALUE "CompanyName", "CVUT FEI & Mathieu Suen\0"
   44.27        VALUE "FileDescription", "Smalltalk/X Bytecode generation library based on Squeak's NewCompiler (LIB)\0"
   44.28 -      VALUE "FileVersion", "6.1.33.33\0"
   44.29 +      VALUE "FileVersion", "6.2.0.1\0"
   44.30        VALUE "InternalName", "cvut:stx/goodies/newcompiler\0"
   44.31        VALUE "LegalCopyright", "Copyright Jan Vrany & Mathieu Suen 2008\0"
   44.32        VALUE "ProductName", "NewCompiler\0"
   44.33 -      VALUE "ProductVersion", "6.1.2.1\0"
   44.34 -      VALUE "ProductDate", "Sat, 07 May 2011 13:19:03 GMT\0"
   44.35 +      VALUE "ProductVersion", "6.2.1.1\0"
   44.36 +      VALUE "ProductDate", "Thu, 29 Mar 2012 18:04:25 GMT\0"
   44.37      END
   44.38  
   44.39    END
    45.1 --- a/vcmake.bat	Tue Nov 15 21:28:05 2011 +0000
    45.2 +++ b/vcmake.bat	Thu Mar 29 18:03:58 2012 +0000
    45.3 @@ -3,6 +3,10 @@
    45.4  @REM type vcmake, and wait...
    45.5  @REM do not edit - automatically generated from ProjectDefinition
    45.6  @REM -------
    45.7 -make.exe -N -f bc.mak -DUSEVC %1 %2
    45.8  
    45.9 +@if not defined VSINSTALLDIR (
   45.10 +	call "C:\Program Files\Microsoft Visual Studio 10.0"\VC\bin\vcvars32.bat
   45.11 +)
   45.12 +make.exe -N -f bc.mak -DUSEVC %*
   45.13  
   45.14 +