Added support for local variables and #whileTrue: special form
authorJan Vrany <jan.vrany@fit.cvut.cz>
Wed, 23 Sep 2015 22:21:44 +0100
changeset 1510a95d798b36
parent 14 fa42d3f1a578
child 16 17a2d1d9f205
Added support for local variables and #whileTrue: special form

Allocate all local variables in a special basic block named
`allocas`. Added support for #whileTrue: special form.
compiler/Make.proto
compiler/Make.spec
compiler/TAutomaticType.st
compiler/TBinding.st
compiler/TCompilerPass.st
compiler/TFunctionBinding.st
compiler/TLLVMCodeGenerator.st
compiler/TObjectWithProperties.st
compiler/TScope.st
compiler/TSemanticAnalyser.st
compiler/TSimpleType.st
compiler/TType.st
compiler/TTypechecker.st
compiler/TValueBinding.st
compiler/abbrev.stc
compiler/bc.mak
compiler/extensions.st
compiler/jv_tea_compiler.st
compiler/libInit.cc
     1.1 --- a/compiler/Make.proto	Tue Sep 22 17:43:38 2015 +0100
     1.2 +++ b/compiler/Make.proto	Wed Sep 23 22:21:44 2015 +0100
     1.3 @@ -127,7 +127,6 @@
     1.4  
     1.5  
     1.6  # BEGINMAKEDEPEND --- do not remove this line; make depend needs it
     1.7 -$(OUTDIR)TBinding.$(O) TBinding.$(H): TBinding.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
     1.8  $(OUTDIR)TClassDefinition.$(O) TClassDefinition.$(H): TClassDefinition.st $(INCLUDE_TOP)/stx/goodies/ring/RGBehaviorDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGClassDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGClassDescriptionDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGGlobalDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
     1.9  $(OUTDIR)TCompilationUnitDefinition.$(O) TCompilationUnitDefinition.$(H): TCompilationUnitDefinition.st $(INCLUDE_TOP)/stx/goodies/ring/RGAbstractContainer.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.10  $(OUTDIR)TCompiler.$(O) TCompiler.$(H): TCompiler.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.11 @@ -138,35 +137,38 @@
    1.12  $(OUTDIR)TMetaDefinition.$(O) TMetaDefinition.$(H): TMetaDefinition.st $(INCLUDE_TOP)/stx/goodies/ring/RGBehaviorDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGClassDescriptionDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGGlobalDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGMetaclassDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.13  $(OUTDIR)TMethodDefinition.$(O) TMethodDefinition.$(H): TMethodDefinition.st $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGElementDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGMethodDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.14  $(OUTDIR)TNamespaceDefinition.$(O) TNamespaceDefinition.$(H): TNamespaceDefinition.st $(INCLUDE_TOP)/stx/goodies/ring/RGAbstractContainer.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGContainer.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGNamespace.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.15 +$(OUTDIR)TObjectWithProperties.$(O) TObjectWithProperties.$(H): TObjectWithProperties.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.16  $(OUTDIR)TParser.$(O) TParser.$(H): TParser.st $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBParser.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.17  $(OUTDIR)TProgramNodeVisitor.$(O) TProgramNodeVisitor.$(H): TProgramNodeVisitor.st $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBProgramNodeVisitor.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.18 -$(OUTDIR)TScope.$(O) TScope.$(H): TScope.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.19  $(OUTDIR)TSourceReader.$(O) TSourceReader.$(H): TSourceReader.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.20  $(OUTDIR)TSpecialFormNode.$(O) TSpecialFormNode.$(H): TSpecialFormNode.st $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBMessageNode.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBProgramNode.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBStatementNode.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBValueNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.21 -$(OUTDIR)TType.$(O) TType.$(H): TType.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.22  $(OUTDIR)TTypeNode.$(O) TTypeNode.$(H): TTypeNode.st $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBProgramNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.23  $(OUTDIR)TTypeSpecNode.$(O) TTypeSpecNode.$(H): TTypeSpecNode.st $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBProgramNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.24  $(OUTDIR)jv_tea_compiler.$(O) jv_tea_compiler.$(H): jv_tea_compiler.st $(INCLUDE_TOP)/stx/libbasic/LibraryDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(STCHDR)
    1.25 -$(OUTDIR)TBlockType.$(O) TBlockType.$(H): TBlockType.st $(INCLUDE_TOP)/jv/tea/compiler/TType.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.26 -$(OUTDIR)TClassBinding.$(O) TClassBinding.$(H): TClassBinding.st $(INCLUDE_TOP)/jv/tea/compiler/TBinding.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.27 +$(OUTDIR)TBinding.$(O) TBinding.$(H): TBinding.st $(INCLUDE_TOP)/jv/tea/compiler/TObjectWithProperties.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.28  $(OUTDIR)TCompilerPass.$(O) TCompilerPass.$(H): TCompilerPass.st $(INCLUDE_TOP)/jv/tea/compiler/TProgramNodeVisitor.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBProgramNodeVisitor.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.29  $(OUTDIR)TEnvironment.$(O) TEnvironment.$(H): TEnvironment.st $(INCLUDE_TOP)/jv/tea/compiler/TNamespaceDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGAbstractContainer.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGContainer.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGNamespace.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.30  $(OUTDIR)TFilesystemProvider.$(O) TFilesystemProvider.$(H): TFilesystemProvider.st $(INCLUDE_TOP)/jv/tea/compiler/TEnvironmentProvider.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.31 -$(OUTDIR)TFunctionBinding.$(O) TFunctionBinding.$(H): TFunctionBinding.st $(INCLUDE_TOP)/jv/tea/compiler/TBinding.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.32 -$(OUTDIR)TNamespaceBinding.$(O) TNamespaceBinding.$(H): TNamespaceBinding.st $(INCLUDE_TOP)/jv/tea/compiler/TBinding.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.33 -$(OUTDIR)TSimpleType.$(O) TSimpleType.$(H): TSimpleType.st $(INCLUDE_TOP)/jv/tea/compiler/TType.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.34 +$(OUTDIR)TScope.$(O) TScope.$(H): TScope.st $(INCLUDE_TOP)/jv/tea/compiler/TObjectWithProperties.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.35  $(OUTDIR)TSimpleTypeNode.$(O) TSimpleTypeNode.$(H): TSimpleTypeNode.st $(INCLUDE_TOP)/jv/tea/compiler/TTypeNode.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBProgramNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.36 -$(OUTDIR)TValueBinding.$(O) TValueBinding.$(H): TValueBinding.st $(INCLUDE_TOP)/jv/tea/compiler/TBinding.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.37 -$(OUTDIR)TBlockBinding.$(O) TBlockBinding.$(H): TBlockBinding.st $(INCLUDE_TOP)/jv/tea/compiler/TBinding.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TFunctionBinding.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.38 -$(OUTDIR)TConstantBinding.$(O) TConstantBinding.$(H): TConstantBinding.st $(INCLUDE_TOP)/jv/tea/compiler/TBinding.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TValueBinding.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.39 +$(OUTDIR)TType.$(O) TType.$(H): TType.st $(INCLUDE_TOP)/jv/tea/compiler/TObjectWithProperties.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.40 +$(OUTDIR)TAutomaticType.$(O) TAutomaticType.$(H): TAutomaticType.st $(INCLUDE_TOP)/jv/tea/compiler/TObjectWithProperties.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TType.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.41 +$(OUTDIR)TBlockType.$(O) TBlockType.$(H): TBlockType.st $(INCLUDE_TOP)/jv/tea/compiler/TObjectWithProperties.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TType.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.42 +$(OUTDIR)TClassBinding.$(O) TClassBinding.$(H): TClassBinding.st $(INCLUDE_TOP)/jv/tea/compiler/TBinding.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TObjectWithProperties.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.43 +$(OUTDIR)TFunctionBinding.$(O) TFunctionBinding.$(H): TFunctionBinding.st $(INCLUDE_TOP)/jv/tea/compiler/TBinding.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TObjectWithProperties.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.44  $(OUTDIR)TLLVMCodeGenerator.$(O) TLLVMCodeGenerator.$(H): TLLVMCodeGenerator.st $(INCLUDE_TOP)/jv/tea/compiler/TCompilerPass.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TProgramNodeVisitor.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBProgramNodeVisitor.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.45 -$(OUTDIR)TMethodBinding.$(O) TMethodBinding.$(H): TMethodBinding.st $(INCLUDE_TOP)/jv/tea/compiler/TBinding.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TFunctionBinding.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.46 +$(OUTDIR)TNamespaceBinding.$(O) TNamespaceBinding.$(H): TNamespaceBinding.st $(INCLUDE_TOP)/jv/tea/compiler/TBinding.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TObjectWithProperties.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.47  $(OUTDIR)TSemanticAnalyser.$(O) TSemanticAnalyser.$(H): TSemanticAnalyser.st $(INCLUDE_TOP)/jv/tea/compiler/TCompilerPass.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TProgramNodeVisitor.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBProgramNodeVisitor.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.48 +$(OUTDIR)TSimpleType.$(O) TSimpleType.$(H): TSimpleType.st $(INCLUDE_TOP)/jv/tea/compiler/TObjectWithProperties.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TType.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.49  $(OUTDIR)TTypechecker.$(O) TTypechecker.$(H): TTypechecker.st $(INCLUDE_TOP)/jv/tea/compiler/TCompilerPass.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TProgramNodeVisitor.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBProgramNodeVisitor.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.50 -$(OUTDIR)TVariableBinding.$(O) TVariableBinding.$(H): TVariableBinding.st $(INCLUDE_TOP)/jv/tea/compiler/TBinding.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TValueBinding.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.51 -$(OUTDIR)TArgumentBinding.$(O) TArgumentBinding.$(H): TArgumentBinding.st $(INCLUDE_TOP)/jv/tea/compiler/TBinding.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TValueBinding.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TVariableBinding.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.52 -$(OUTDIR)TLocalBinding.$(O) TLocalBinding.$(H): TLocalBinding.st $(INCLUDE_TOP)/jv/tea/compiler/TBinding.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TValueBinding.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TVariableBinding.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.53 -$(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBBlockNode.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBMethodNode.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBProgramNode.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBReturnNode.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBStatementNode.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBToken.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBValueNode.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBVariableNode.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGBehaviorDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGClassDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGClassDescriptionDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGElementDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGGlobalDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGMetaclassDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGMethodDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.54 +$(OUTDIR)TValueBinding.$(O) TValueBinding.$(H): TValueBinding.st $(INCLUDE_TOP)/jv/tea/compiler/TBinding.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TObjectWithProperties.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.55 +$(OUTDIR)TBlockBinding.$(O) TBlockBinding.$(H): TBlockBinding.st $(INCLUDE_TOP)/jv/tea/compiler/TBinding.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TFunctionBinding.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TObjectWithProperties.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.56 +$(OUTDIR)TConstantBinding.$(O) TConstantBinding.$(H): TConstantBinding.st $(INCLUDE_TOP)/jv/tea/compiler/TBinding.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TObjectWithProperties.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TValueBinding.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.57 +$(OUTDIR)TMethodBinding.$(O) TMethodBinding.$(H): TMethodBinding.st $(INCLUDE_TOP)/jv/tea/compiler/TBinding.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TFunctionBinding.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TObjectWithProperties.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.58 +$(OUTDIR)TVariableBinding.$(O) TVariableBinding.$(H): TVariableBinding.st $(INCLUDE_TOP)/jv/tea/compiler/TBinding.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TObjectWithProperties.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TValueBinding.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.59 +$(OUTDIR)TArgumentBinding.$(O) TArgumentBinding.$(H): TArgumentBinding.st $(INCLUDE_TOP)/jv/tea/compiler/TBinding.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TObjectWithProperties.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TValueBinding.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TVariableBinding.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.60 +$(OUTDIR)TLocalBinding.$(O) TLocalBinding.$(H): TLocalBinding.st $(INCLUDE_TOP)/jv/tea/compiler/TBinding.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TObjectWithProperties.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TValueBinding.$(H) $(INCLUDE_TOP)/jv/tea/compiler/TVariableBinding.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.61 +$(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBAssignmentNode.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBBlockNode.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBMethodNode.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBProgramNode.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBReturnNode.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBStatementNode.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBToken.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBValueNode.$(H) $(INCLUDE_TOP)/stx/goodies/refactoryBrowser/parser/RBVariableNode.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGBehaviorDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGClassDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGClassDescriptionDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGElementDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGGlobalDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGMetaclassDefinition.$(H) $(INCLUDE_TOP)/stx/goodies/ring/RGMethodDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
    1.62  
    1.63  # ENDMAKEDEPEND --- do not remove this line
    1.64  
     2.1 --- a/compiler/Make.spec	Tue Sep 22 17:43:38 2015 +0100
     2.2 +++ b/compiler/Make.spec	Wed Sep 23 22:21:44 2015 +0100
     2.3 @@ -51,7 +51,6 @@
     2.4  STCWARNINGS=-warnNonStandard
     2.5  
     2.6  COMMON_CLASSES= \
     2.7 -	TBinding \
     2.8  	TClassDefinition \
     2.9  	TCompilationUnitDefinition \
    2.10  	TCompiler \
    2.11 @@ -62,31 +61,34 @@
    2.12  	TMetaDefinition \
    2.13  	TMethodDefinition \
    2.14  	TNamespaceDefinition \
    2.15 +	TObjectWithProperties \
    2.16  	TParser \
    2.17  	TProgramNodeVisitor \
    2.18 -	TScope \
    2.19  	TSourceReader \
    2.20  	TSpecialFormNode \
    2.21 -	TType \
    2.22  	TTypeNode \
    2.23  	TTypeSpecNode \
    2.24  	jv_tea_compiler \
    2.25 -	TBlockType \
    2.26 -	TClassBinding \
    2.27 +	TBinding \
    2.28  	TCompilerPass \
    2.29  	TEnvironment \
    2.30  	TFilesystemProvider \
    2.31 +	TScope \
    2.32 +	TSimpleTypeNode \
    2.33 +	TType \
    2.34 +	TAutomaticType \
    2.35 +	TBlockType \
    2.36 +	TClassBinding \
    2.37  	TFunctionBinding \
    2.38 +	TLLVMCodeGenerator \
    2.39  	TNamespaceBinding \
    2.40 +	TSemanticAnalyser \
    2.41  	TSimpleType \
    2.42 -	TSimpleTypeNode \
    2.43 +	TTypechecker \
    2.44  	TValueBinding \
    2.45  	TBlockBinding \
    2.46  	TConstantBinding \
    2.47 -	TLLVMCodeGenerator \
    2.48  	TMethodBinding \
    2.49 -	TSemanticAnalyser \
    2.50 -	TTypechecker \
    2.51  	TVariableBinding \
    2.52  	TArgumentBinding \
    2.53  	TLocalBinding \
    2.54 @@ -95,7 +97,6 @@
    2.55  
    2.56  
    2.57  COMMON_OBJS= \
    2.58 -    $(OUTDIR_SLASH)TBinding.$(O) \
    2.59      $(OUTDIR_SLASH)TClassDefinition.$(O) \
    2.60      $(OUTDIR_SLASH)TCompilationUnitDefinition.$(O) \
    2.61      $(OUTDIR_SLASH)TCompiler.$(O) \
    2.62 @@ -106,31 +107,34 @@
    2.63      $(OUTDIR_SLASH)TMetaDefinition.$(O) \
    2.64      $(OUTDIR_SLASH)TMethodDefinition.$(O) \
    2.65      $(OUTDIR_SLASH)TNamespaceDefinition.$(O) \
    2.66 +    $(OUTDIR_SLASH)TObjectWithProperties.$(O) \
    2.67      $(OUTDIR_SLASH)TParser.$(O) \
    2.68      $(OUTDIR_SLASH)TProgramNodeVisitor.$(O) \
    2.69 -    $(OUTDIR_SLASH)TScope.$(O) \
    2.70      $(OUTDIR_SLASH)TSourceReader.$(O) \
    2.71      $(OUTDIR_SLASH)TSpecialFormNode.$(O) \
    2.72 -    $(OUTDIR_SLASH)TType.$(O) \
    2.73      $(OUTDIR_SLASH)TTypeNode.$(O) \
    2.74      $(OUTDIR_SLASH)TTypeSpecNode.$(O) \
    2.75      $(OUTDIR_SLASH)jv_tea_compiler.$(O) \
    2.76 -    $(OUTDIR_SLASH)TBlockType.$(O) \
    2.77 -    $(OUTDIR_SLASH)TClassBinding.$(O) \
    2.78 +    $(OUTDIR_SLASH)TBinding.$(O) \
    2.79      $(OUTDIR_SLASH)TCompilerPass.$(O) \
    2.80      $(OUTDIR_SLASH)TEnvironment.$(O) \
    2.81      $(OUTDIR_SLASH)TFilesystemProvider.$(O) \
    2.82 +    $(OUTDIR_SLASH)TScope.$(O) \
    2.83 +    $(OUTDIR_SLASH)TSimpleTypeNode.$(O) \
    2.84 +    $(OUTDIR_SLASH)TType.$(O) \
    2.85 +    $(OUTDIR_SLASH)TAutomaticType.$(O) \
    2.86 +    $(OUTDIR_SLASH)TBlockType.$(O) \
    2.87 +    $(OUTDIR_SLASH)TClassBinding.$(O) \
    2.88      $(OUTDIR_SLASH)TFunctionBinding.$(O) \
    2.89 +    $(OUTDIR_SLASH)TLLVMCodeGenerator.$(O) \
    2.90      $(OUTDIR_SLASH)TNamespaceBinding.$(O) \
    2.91 +    $(OUTDIR_SLASH)TSemanticAnalyser.$(O) \
    2.92      $(OUTDIR_SLASH)TSimpleType.$(O) \
    2.93 -    $(OUTDIR_SLASH)TSimpleTypeNode.$(O) \
    2.94 +    $(OUTDIR_SLASH)TTypechecker.$(O) \
    2.95      $(OUTDIR_SLASH)TValueBinding.$(O) \
    2.96      $(OUTDIR_SLASH)TBlockBinding.$(O) \
    2.97      $(OUTDIR_SLASH)TConstantBinding.$(O) \
    2.98 -    $(OUTDIR_SLASH)TLLVMCodeGenerator.$(O) \
    2.99      $(OUTDIR_SLASH)TMethodBinding.$(O) \
   2.100 -    $(OUTDIR_SLASH)TSemanticAnalyser.$(O) \
   2.101 -    $(OUTDIR_SLASH)TTypechecker.$(O) \
   2.102      $(OUTDIR_SLASH)TVariableBinding.$(O) \
   2.103      $(OUTDIR_SLASH)TArgumentBinding.$(O) \
   2.104      $(OUTDIR_SLASH)TLocalBinding.$(O) \
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/compiler/TAutomaticType.st	Wed Sep 23 22:21:44 2015 +0100
     3.3 @@ -0,0 +1,41 @@
     3.4 +"{ Package: 'jv:tea/compiler' }"
     3.5 +
     3.6 +"{ NameSpace: Smalltalk }"
     3.7 +
     3.8 +TType subclass:#TAutomaticType
     3.9 +	instanceVariableNames:''
    3.10 +	classVariableNames:''
    3.11 +	poolDictionaries:''
    3.12 +	category:'Languages-Tea-Compiler-Types'
    3.13 +!
    3.14 +
    3.15 +!TAutomaticType methodsFor:'comparing'!
    3.16 +
    3.17 += anotherType
    3.18 +    ^ anotherType class == self class
    3.19 +
    3.20 +    "Created: / 23-09-2015 / 16:26:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    3.21 +!
    3.22 +
    3.23 +hash
    3.24 +    ^ self class hash
    3.25 +
    3.26 +    "Created: / 23-09-2015 / 16:26:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    3.27 +! !
    3.28 +
    3.29 +!TAutomaticType methodsFor:'printing & storing'!
    3.30 +
    3.31 +printWithoutAnglesOn:aStream
    3.32 +    aStream nextPutAll: '#auto'
    3.33 +
    3.34 +    "Created: / 23-09-2015 / 16:27:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    3.35 +! !
    3.36 +
    3.37 +!TAutomaticType methodsFor:'testing'!
    3.38 +
    3.39 +isAutomaticType
    3.40 +    ^ true
    3.41 +
    3.42 +    "Created: / 23-09-2015 / 16:32:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    3.43 +! !
    3.44 +
     4.1 --- a/compiler/TBinding.st	Tue Sep 22 17:43:38 2015 +0100
     4.2 +++ b/compiler/TBinding.st	Wed Sep 23 22:21:44 2015 +0100
     4.3 @@ -2,7 +2,7 @@
     4.4  
     4.5  "{ NameSpace: Smalltalk }"
     4.6  
     4.7 -Object subclass:#TBinding
     4.8 +TObjectWithProperties subclass:#TBinding
     4.9  	instanceVariableNames:''
    4.10  	classVariableNames:''
    4.11  	poolDictionaries:''
     5.1 --- a/compiler/TCompilerPass.st	Tue Sep 22 17:43:38 2015 +0100
     5.2 +++ b/compiler/TCompilerPass.st	Wed Sep 23 22:21:44 2015 +0100
     5.3 @@ -3,7 +3,7 @@
     5.4  "{ NameSpace: Smalltalk }"
     5.5  
     5.6  TProgramNodeVisitor subclass:#TCompilerPass
     5.7 -	instanceVariableNames:'context currentClass currentMethod currentScope'
     5.8 +	instanceVariableNames:'context'
     5.9  	classVariableNames:''
    5.10  	poolDictionaries:''
    5.11  	category:'Languages-Tea-Compiler-Internals'
    5.12 @@ -89,24 +89,14 @@
    5.13  
    5.14  !TCompilerPass methodsFor:'visitor-double dispatching'!
    5.15  
    5.16 -acceptBlockNode: aBlockNode
    5.17 -    currentScope := aBlockNode scope.
    5.18 -    super acceptBlockNode: aBlockNode
    5.19 -
    5.20 -    "Created: / 02-09-2015 / 07:20:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    5.21 -!
    5.22 -
    5.23  acceptClassDefinition: aTClassDefinition
    5.24      self visitDefinition: aTClassDefinition theMetaclass.
    5.25 -
    5.26 -    currentClass := aTClassDefinition.
    5.27      aTClassDefinition methodDictionary do:[:each | 
    5.28          self visitDefinition: each
    5.29      ].
    5.30 -    currentClass := nil.
    5.31  
    5.32      "Created: / 29-08-2015 / 21:50:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    5.33 -    "Modified: / 31-08-2015 / 11:03:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    5.34 +    "Modified: / 23-09-2015 / 06:16:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    5.35  !
    5.36  
    5.37  acceptCompilationUnitDefinition: aTCompilationUnitDefinition
    5.38 @@ -136,39 +126,19 @@
    5.39  !
    5.40  
    5.41  acceptMetaclassDefinition: aTClassDefinition
    5.42 -    currentClass := aTClassDefinition.
    5.43      aTClassDefinition methodDictionary do:[:each | 
    5.44          self visitDefinition: each
    5.45      ].
    5.46 -    currentClass := nil.
    5.47  
    5.48      "Created: / 29-08-2015 / 21:54:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    5.49 -    "Modified: / 31-08-2015 / 11:03:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    5.50 +    "Modified: / 23-09-2015 / 06:16:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    5.51  !
    5.52  
    5.53  acceptMethodDefinition: aTMethodDefinition
    5.54 -    currentMethod := aTMethodDefinition.
    5.55      self visitNode: aTMethodDefinition parseTree.
    5.56 -    currentMethod := nil.
    5.57  
    5.58      "Created: / 29-08-2015 / 21:55:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    5.59 -    "Modified: / 31-08-2015 / 11:03:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    5.60 -!
    5.61 -
    5.62 -acceptMethodNode: aMethodNode
    5.63 -
    5.64 -    currentScope := aMethodNode scope.
    5.65 -    self visitArguments: aMethodNode arguments.        
    5.66 -    self visitNode: aMethodNode returnTypeSpec. 
    5.67 -    "/ If method node contains inline assembly, then visit that inline assembly
    5.68 -    "/ node but nothing else!!
    5.69 -    aMethodNode body statements first isInlineAssembly ifTrue:[ 
    5.70 -        self visitNode: aMethodNode body statements first
    5.71 -    ] ifFalse:[ 
    5.72 -        self visitNode: aMethodNode body
    5.73 -    ].
    5.74 -
    5.75 -    "Created: / 02-09-2015 / 07:16:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    5.76 +    "Modified: / 23-09-2015 / 06:17:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    5.77  !
    5.78  
    5.79  acceptSequenceNode: aSequenceNode 
     6.1 --- a/compiler/TFunctionBinding.st	Tue Sep 22 17:43:38 2015 +0100
     6.2 +++ b/compiler/TFunctionBinding.st	Wed Sep 23 22:21:44 2015 +0100
     6.3 @@ -26,6 +26,20 @@
     6.4      "Modified: / 02-09-2015 / 17:02:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     6.5  ! !
     6.6  
     6.7 +!TFunctionBinding methodsFor:'accesssing - llvm'!
     6.8 +
     6.9 +llvmValue
    6.10 +    ^ self propertyAt: #llvmValue ifAbsent:[ nil ]
    6.11 +
    6.12 +    "Created: / 23-09-2015 / 21:14:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    6.13 +!
    6.14 +
    6.15 +llvmValue: anLLVMValue
    6.16 +    self propertyAt: #llvmValue put: anLLVMValue
    6.17 +
    6.18 +    "Created: / 23-09-2015 / 21:14:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    6.19 +! !
    6.20 +
    6.21  !TFunctionBinding methodsFor:'converting'!
    6.22  
    6.23  asLLVMValueInModule: aLLVMModule
     7.1 --- a/compiler/TLLVMCodeGenerator.st	Tue Sep 22 17:43:38 2015 +0100
     7.2 +++ b/compiler/TLLVMCodeGenerator.st	Wed Sep 23 22:21:44 2015 +0100
     7.3 @@ -9,6 +9,7 @@
     7.4  	category:'Languages-Tea-Compiler-Internals'
     7.5  !
     7.6  
     7.7 +
     7.8  !TLLVMCodeGenerator class methodsFor:'initialization'!
     7.9  
    7.10  initialize
    7.11 @@ -79,16 +80,25 @@
    7.12  !TLLVMCodeGenerator methodsFor:'visiting'!
    7.13  
    7.14  visitArgument: anRBVariableNode
    7.15 -    | binding |
    7.16 +    | binding value |
    7.17  
    7.18      binding := anRBVariableNode binding.
    7.19 -    binding isArgumentBinding ifTrue:[ 
    7.20 -        (function parameterAt: binding index) name: anRBVariableNode name.
    7.21 +    binding isArgumentBinding ifTrue:[
    7.22 +        value :=  function parameterAt: binding index.
    7.23 +        value name: binding name.
    7.24      ] ifFalse:[ 
    7.25 -        self notYetImplemented.
    7.26 +        | block allocas |
    7.27 +
    7.28 +        allocas := anRBVariableNode scope llvmAllocas.
    7.29 +        block := asm block.
    7.30 +        asm block: allocas.
    7.31 +        value := asm alloca: (binding type asLLVMTypeInModule: context module)  as: binding name.
    7.32 +        asm block: block.
    7.33      ].
    7.34 +    binding llvmValue: value.
    7.35  
    7.36      "Created: / 02-09-2015 / 08:43:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    7.37 +    "Modified: / 23-09-2015 / 21:47:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    7.38  ! !
    7.39  
    7.40  !TLLVMCodeGenerator methodsFor:'visitor-double dispatching'!
    7.41 @@ -100,9 +110,15 @@
    7.42  !
    7.43  
    7.44  acceptAssignmentNode: anAssignmentNode 
    7.45 -    self notYetImplemented
    7.46 +    | value binding |
    7.47 +
    7.48 +    value := self visitNode: anAssignmentNode value.
    7.49 +    binding := anAssignmentNode variable binding.
    7.50 +    asm store: value _: binding llvmValue.
    7.51 +    ^ value
    7.52  
    7.53      "Created: / 31-08-2015 / 10:14:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    7.54 +    "Modified: / 23-09-2015 / 21:52:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    7.55  !
    7.56  
    7.57  acceptBlockNode: aBlockNode 
    7.58 @@ -151,25 +167,27 @@
    7.59      "Modified: / 16-09-2015 / 05:28:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    7.60  !
    7.61  
    7.62 -acceptInlineAssemblyNode: aTInlineAssemblyNode
    7.63 -    | emitMethodNode emitMethod|
    7.64 +acceptIfTrueNode: node 
    7.65 +    | condition thenBody thenBlock thenResult joinBlock result |
    7.66  
    7.67 -    emitMethodNode := RBMethodNode new.
    7.68 -    emitMethodNode arguments: (aTInlineAssemblyNode arguments collect:[ :e|e copy]) , { RBVariableNode named: 'zelf' } , (aTInlineAssemblyNode topNode arguments collect:[ :e|e copy]).
    7.69 -    emitMethodNode body: aTInlineAssemblyNode body copy.
    7.70 -    emitMethodNode variableNodesDo:[ :variableNode |
    7.71 -        variableNode name = 'self' ifTrue:[ 
    7.72 -            variableNode name: 'zelf'.
    7.73 -        ].
    7.74 +    condition := self visitNode: node receiver.  
    7.75 +    thenBody  := node arguments first body.
    7.76 +    thenBlock := function addBasicBlock.
    7.77 +
    7.78 +    joinBlock := function addBasicBlock.
    7.79 +
    7.80 +    asm if: condition then: thenBlock else: joinBlock.
    7.81 +    "/ Code true-branch
    7.82 +    asm block: thenBlock.
    7.83 +    thenResult := self visitNode: thenBody.
    7.84 +    thenResult isReturnInst ifFalse:[  
    7.85 +        joinBlock notNil ifTrue:[ joinBlock function addBasicBlock ].
    7.86 +        asm br: joinBlock.
    7.87      ].
    7.88 -    emitMethodNode selector:(String streamContents: [ :s | emitMethodNode arguments size timesRepeat:[s nextPutAll:'_:'] ]).
    7.89 -    emitMethod := Compiler compile: emitMethodNode formattedCode forClass: UndefinedObject install: false.
    7.90 -    emitMethod
    7.91 -        valueWithReceiver: nil
    7.92 -        arguments: { asm } , ((1 to: function numArgs) collect: [ :i | function parameterAt: i ])
    7.93  
    7.94 -    "Created: / 02-09-2015 / 06:53:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    7.95 -    "Modified: / 02-09-2015 / 10:30:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    7.96 +    asm block: joinBlock.
    7.97 +
    7.98 +    "Created: / 23-09-2015 / 21:57:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    7.99  !
   7.100  
   7.101  acceptLiteralNode: aLiteralNode
   7.102 @@ -193,13 +211,20 @@
   7.103  !
   7.104  
   7.105  acceptMethodNode: aMethodNode 
   7.106 +    | allocas entry |
   7.107 +
   7.108      function := aMethodNode binding asLLVMValueInModule: context module.
   7.109 -    asm := function builder.
   7.110 -    super acceptMethodNode: aMethodNode
   7.111 +    allocas := function addBasicBlockNamed: 'allocas'.
   7.112 +    entry := function addBasicBlockNamed: 'entry'.
   7.113 +    aMethodNode scope llvmAllocas: allocas.
   7.114 +    asm := entry builder.
   7.115 +    super acceptMethodNode: aMethodNode.
   7.116 +    "/ Finally, link allocas to entry.
   7.117 +    asm block: allocas.
   7.118 +    asm br: entry.
   7.119  
   7.120      "Created: / 31-08-2015 / 09:42:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   7.121 -    "Modified: / 15-09-2015 / 07:17:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   7.122 -    "Modified (format): / 15-09-2015 / 08:17:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   7.123 +    "Modified: / 23-09-2015 / 22:32:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   7.124  !
   7.125  
   7.126  acceptOptimizedNode: anOptimizedNode 
   7.127 @@ -214,6 +239,32 @@
   7.128      "Created: / 31-08-2015 / 10:13:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   7.129  !
   7.130  
   7.131 +acceptPrimitiveNode: aPragmaNode
   7.132 +    | primitiveBlock methodIsForMeta emitMethodNode emitMethod |
   7.133 +
   7.134 +    primitiveBlock := aPragmaNode arguments first.
   7.135 +    methodIsForMeta := aPragmaNode parent binding mclass isMetaclass.
   7.136 +    emitMethodNode := RBMethodNode new.
   7.137 +    emitMethodNode arguments: 
   7.138 +                        (primitiveBlock arguments collect:[ :e|e copy]) , 
   7.139 +                        (methodIsForMeta ifFalse:[{ RBVariableNode named: 'zelf' }] ifTrue:[#()]) , 
   7.140 +                        (primitiveBlock topNode arguments collect:[ :e|e copy]).
   7.141 +    emitMethodNode body: primitiveBlock body copy.
   7.142 +    emitMethodNode variableNodesDo:[ :variableNode |
   7.143 +        variableNode name = 'self' ifTrue:[ 
   7.144 +            variableNode name: 'zelf'.
   7.145 +        ].
   7.146 +    ].
   7.147 +    emitMethodNode selector:(String streamContents: [ :s | emitMethodNode arguments size timesRepeat:[s nextPutAll:'_:'] ]).
   7.148 +    emitMethod := Compiler compile: emitMethodNode formattedCode forClass: UndefinedObject install: false.
   7.149 +    emitMethod
   7.150 +        valueWithReceiver: nil
   7.151 +        arguments: { asm } , ((1 to: function numArgs) collect: [ :i | function parameterAt: i ])
   7.152 +
   7.153 +    "Created: / 22-09-2015 / 18:03:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   7.154 +    "Modified: / 23-09-2015 / 06:27:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   7.155 +!
   7.156 +
   7.157  acceptReturnNode: aReturnNode 
   7.158      | value |
   7.159  
   7.160 @@ -237,10 +288,50 @@
   7.161  !
   7.162  
   7.163  acceptVariableNode: aVariableNode
   7.164 -    self notYetImplemented
   7.165 +    | binding |
   7.166 +
   7.167 +    binding := aVariableNode binding.
   7.168 +    ^ binding isArgumentBinding ifTrue:[
   7.169 +        binding llvmValue.
   7.170 +    ] ifFalse:[ 
   7.171 +        asm load: binding llvmValue.
   7.172 +    ].
   7.173  
   7.174      "Created: / 31-08-2015 / 10:13:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   7.175 +    "Modified: / 23-09-2015 / 22:30:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   7.176 +!
   7.177 +
   7.178 +acceptWhileTrueNode: node 
   7.179 +    | loopConditionBlock loopConditionBody loopConditionResult loopBodyBody loopBodyBlock loopBodyResult joinBlock |
   7.180 +
   7.181 +    loopConditionBody := node receiver body.
   7.182 +    loopConditionBlock := function addBasicBlock.
   7.183 +
   7.184 +    loopBodyBody  := node arguments first body.
   7.185 +    loopBodyBlock := function addBasicBlock.
   7.186 +
   7.187 +    joinBlock := function addBasicBlock.
   7.188 +
   7.189 +    asm br: loopConditionBlock.
   7.190 +    asm block: loopConditionBlock.
   7.191 +    loopConditionResult := self visitNode: loopConditionBody.
   7.192 +    asm if: loopConditionResult then: loopBodyBlock else: joinBlock.
   7.193 +    asm block: loopBodyBlock.
   7.194 +    loopBodyResult := self visitNode: loopBodyBody.
   7.195 +    loopBodyResult isReturnInst ifFalse:[
   7.196 +        asm br: loopConditionBlock
   7.197 +    ].
   7.198 +    asm block: joinBlock
   7.199 +
   7.200 +    "Created: / 23-09-2015 / 22:02:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   7.201  ! !
   7.202  
   7.203 +!TLLVMCodeGenerator class methodsFor:'documentation'!
   7.204 +
   7.205 +version_HG
   7.206 +
   7.207 +    ^ '$Changeset: <not expanded> $'
   7.208 +! !
   7.209 +
   7.210  
   7.211  TLLVMCodeGenerator initialize!
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/compiler/TObjectWithProperties.st	Wed Sep 23 22:21:44 2015 +0100
     8.3 @@ -0,0 +1,95 @@
     8.4 +"{ Package: 'jv:tea/compiler' }"
     8.5 +
     8.6 +"{ NameSpace: Smalltalk }"
     8.7 +
     8.8 +Object subclass:#TObjectWithProperties
     8.9 +	instanceVariableNames:'properties'
    8.10 +	classVariableNames:''
    8.11 +	poolDictionaries:''
    8.12 +	category:'Languages-Tea-Compiler-Internals'
    8.13 +!
    8.14 +
    8.15 +!TObjectWithProperties methodsFor:'accessing-properties'!
    8.16 +
    8.17 +hasProperty: aKey
    8.18 +    "Test if the property aKey is present."
    8.19 +    
    8.20 +    ^ properties notNil and: [ properties includesKey: aKey ]
    8.21 +
    8.22 +    "Created: / 20-08-2015 / 18:25:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    8.23 +!
    8.24 +
    8.25 +propertyAt: aKey
    8.26 +    "Answer the property value associated with aKey."
    8.27 +    
    8.28 +    ^ self propertyAt: aKey ifAbsent: [ self error: 'Property not found' ]
    8.29 +
    8.30 +    "Created: / 20-08-2015 / 18:23:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    8.31 +!
    8.32 +
    8.33 +propertyAt: aKey ifAbsent: aBlock
    8.34 +    "Answer the property value associated with aKey or, if aKey 
    8.35 +     isn't found, answer the result of evaluating aBlock."
    8.36 +    
    8.37 +    ^ properties isNil
    8.38 +        ifTrue: [ aBlock value ]
    8.39 +        ifFalse: [ properties at: aKey ifAbsent: aBlock ]
    8.40 +
    8.41 +    "Created: / 20-08-2015 / 18:23:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    8.42 +!
    8.43 +
    8.44 +propertyAt: aKey ifAbsentPut: aBlock
    8.45 +    "Answer the property associated with aKey or, if aKey isn't found 
    8.46 +     store the result of evaluating aBlock as new value."
    8.47 +    
    8.48 +    ^ self propertyAt: aKey ifAbsent: [ self propertyAt: aKey put: aBlock value ]
    8.49 +
    8.50 +    "Created: / 20-08-2015 / 18:24:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    8.51 +!
    8.52 +
    8.53 +propertyAt: aKey put: anObject
    8.54 +    "Set the property at aKey to be anObject. If aKey is not found, create a new entry 
    8.55 +     for aKey and set is value to anObject. Answer anObject."
    8.56 +
    8.57 +    ^ (properties ifNil: [ properties := RBSmallDictionary new: 1 ])
    8.58 +            at: aKey put: anObject
    8.59 +
    8.60 +    "Created: / 20-08-2015 / 18:24:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    8.61 +!
    8.62 +
    8.63 +removeProperty: aKey
    8.64 +    "Remove the property with aKey. Answer the property or raise 
    8.65 +     an error if aKey isn't found."
    8.66 +    
    8.67 +    ^ self removeProperty: aKey ifAbsent: [ self error: 'Property not found' ].
    8.68 +
    8.69 +    "Created: / 20-08-2015 / 18:30:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    8.70 +!
    8.71 +
    8.72 +removeProperty: aKey ifAbsent: aBlock
    8.73 +    "Remove the property with aKey. Answer the value or, if aKey isn't found, answer the result of evaluating aBlock."
    8.74 +    
    8.75 +    | answer |
    8.76 +    properties isNil ifTrue: [ ^ aBlock value ].
    8.77 +    answer := properties removeKey: aKey ifAbsent: aBlock.
    8.78 +    properties isEmpty ifTrue: [ properties := nil ].
    8.79 +    ^ answer
    8.80 +
    8.81 +    "Created: / 20-08-2015 / 18:30:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    8.82 +! !
    8.83 +
    8.84 +!TObjectWithProperties methodsFor:'attributes access'!
    8.85 +
    8.86 +objectAttributes
    8.87 +    ^ properties
    8.88 +
    8.89 +    "Created: / 20-08-2015 / 18:32:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    8.90 +    "Modified (format): / 23-09-2015 / 21:11:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    8.91 +!
    8.92 +
    8.93 +objectAttributes:aCollection
    8.94 +    properties := aCollection
    8.95 +
    8.96 +    "Created: / 23-09-2015 / 21:11:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    8.97 +! !
    8.98 +
     9.1 --- a/compiler/TScope.st	Tue Sep 22 17:43:38 2015 +0100
     9.2 +++ b/compiler/TScope.st	Wed Sep 23 22:21:44 2015 +0100
     9.3 @@ -2,7 +2,7 @@
     9.4  
     9.5  "{ NameSpace: Smalltalk }"
     9.6  
     9.7 -Object subclass:#TScope
     9.8 +TObjectWithProperties subclass:#TScope
     9.9  	instanceVariableNames:'node parent children variables'
    9.10  	classVariableNames:''
    9.11  	poolDictionaries:''
    9.12 @@ -45,6 +45,21 @@
    9.13      "Modified: / 19-09-2015 / 05:56:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    9.14  ! !
    9.15  
    9.16 +!TScope methodsFor:'accesssing - llvm'!
    9.17 +
    9.18 +llvmAllocas
    9.19 +    ^ self propertyAt: #llvmAllocas 
    9.20 +            ifAbsent: [ parent notNil ifTrue:[ parent llvmAllocas ] ifFalse:[nil] ]
    9.21 +
    9.22 +    "Created: / 23-09-2015 / 21:42:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    9.23 +!
    9.24 +
    9.25 +llvmAllocas: anLLVMBasicBlock
    9.26 +    self propertyAt: #llvmAllocas put: anLLVMBasicBlock
    9.27 +
    9.28 +    "Created: / 23-09-2015 / 21:40:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    9.29 +! !
    9.30 +
    9.31  !TScope methodsFor:'adding & removing'!
    9.32  
    9.33  addSubScope: aTScope
    9.34 @@ -97,6 +112,12 @@
    9.35  
    9.36  !TScope methodsFor:'testing'!
    9.37  
    9.38 +hasSelfArgument
    9.39 +    ^ (node isMethod and:[node binding mclass isMetaclass not])
    9.40 +
    9.41 +    "Created: / 23-09-2015 / 18:48:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    9.42 +!
    9.43 +
    9.44  isBlockScope
    9.45      ^ node isBlock
    9.46  
    10.1 --- a/compiler/TSemanticAnalyser.st	Tue Sep 22 17:43:38 2015 +0100
    10.2 +++ b/compiler/TSemanticAnalyser.st	Wed Sep 23 22:21:44 2015 +0100
    10.3 @@ -40,29 +40,69 @@
    10.4      ] ifFalse:[ 
    10.5          binding := TArgumentBinding name:anRBVariableNode name.
    10.6          binding index: (anRBVariableNode parent arguments indexOf: anRBVariableNode)                                
    10.7 -                       + (anRBVariableNode parent scope isMethodScope ifTrue:[1] ifFalse:[0])     
    10.8 +                       + (anRBVariableNode parent scope hasSelfArgument ifTrue:[1] ifFalse:[0])     
    10.9      ].
   10.10      anRBVariableNode parent scope addVariable: binding.
   10.11      super visitArgument: anRBVariableNode.
   10.12  
   10.13      "Created: / 25-08-2015 / 22:51:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   10.14 -    "Modified: / 19-09-2015 / 06:17:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   10.15 +    "Modified: / 23-09-2015 / 18:48:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   10.16  ! !
   10.17  
   10.18  !TSemanticAnalyser methodsFor:'visitor-double dispatching'!
   10.19  
   10.20  acceptBlockNode: aBlockNode
   10.21 -    | scope |
   10.22 +    | scope binding |
   10.23      aBlockNode parent isSpecialFormNode ifTrue:[ 
   10.24          scope := TScope node: aBlockNode parent: aBlockNode parent scope
   10.25      ] ifFalse:[ 
   10.26          scope := TScope node: aBlockNode
   10.27      ].
   10.28      aBlockNode scope: scope.
   10.29 +
   10.30 +    binding := TBlockBinding new.
   10.31 +    binding parameterTypes: aBlockNode parameterTypes.
   10.32 +    binding returnType: aBlockNode returnType.
   10.33 +    aBlockNode binding: binding.
   10.34 +
   10.35      super acceptBlockNode: aBlockNode
   10.36  
   10.37      "Created: / 25-08-2015 / 22:30:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   10.38 -    "Modified: / 19-09-2015 / 06:16:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   10.39 +    "Modified: / 23-09-2015 / 16:31:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   10.40 +!
   10.41 +
   10.42 +acceptIfTrueIfFalseNode: node 
   10.43 +    node arguments first isBlock ifFalse:[ 
   10.44 +        context reportSemanticError: 'First argument (true block) of ifTrue:ifFalse: special form is not a block'.
   10.45 +    ] ifTrue:[ 
   10.46 +        node arguments first arguments notEmptyOrNil ifTrue:[ 
   10.47 +            context reportSemanticError: 'First argument (true block) of ifTrue::ifFalse: special form may not have any arguments'.
   10.48 +        ]
   10.49 +    ].  
   10.50 +    node arguments second isBlock ifFalse:[ 
   10.51 +        context reportSemanticError: 'Second argument (false block) of ifTrue:ifFalse: special form is not a block'.
   10.52 +    ] ifTrue:[ 
   10.53 +        node arguments second arguments notEmptyOrNil ifTrue:[ 
   10.54 +            context reportSemanticError: 'Second argument (false block) of ifTrue::ifFalse: special form may not have any arguments'.
   10.55 +        ]
   10.56 +    ].  
   10.57 +
   10.58 +    ^ self acceptMessageNode: node.
   10.59 +
   10.60 +    "Created: / 23-09-2015 / 14:20:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   10.61 +!
   10.62 +
   10.63 +acceptIfTrueNode: node
   10.64 +    node arguments first isBlock ifFalse:[ 
   10.65 +        context reportSemanticError: 'Argument (true block) of ifTrue: special form is not a block'.
   10.66 +    ] ifTrue:[ 
   10.67 +        node arguments first arguments notEmptyOrNil ifTrue:[ 
   10.68 +            context reportSemanticError: 'Argument (true block) of ifTrue: special form may not have any arguments'.
   10.69 +        ]
   10.70 +    ].     
   10.71 +    self acceptMessageNode: node
   10.72 +
   10.73 +    "Created: / 23-09-2015 / 14:18:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   10.74  !
   10.75  
   10.76  acceptLiteralNode: aRBLiteralNode
   10.77 @@ -89,7 +129,7 @@
   10.78  
   10.79      scope   := TScope node: aMethodNode.
   10.80      bindingForSelf := TArgumentBinding name:'self'.
   10.81 -    bindingForSelf index: self.
   10.82 +    bindingForSelf index: 1.
   10.83      scope addVariable: bindingForSelf.
   10.84  
   10.85      aMethodNode scope: scope.
   10.86 @@ -97,7 +137,7 @@
   10.87      super acceptMethodNode: aMethodNode
   10.88  
   10.89      "Created: / 25-08-2015 / 22:29:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   10.90 -    "Modified: / 13-09-2015 / 09:30:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   10.91 +    "Modified: / 23-09-2015 / 18:31:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   10.92  !
   10.93  
   10.94  acceptVariableNode: aVariableNode
   10.95 @@ -113,6 +153,26 @@
   10.96  
   10.97      "Created: / 25-08-2015 / 23:00:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   10.98      "Modified: / 20-09-2015 / 06:14:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   10.99 +!
  10.100 +
  10.101 +acceptWhileTrueNode: node
  10.102 +    node receiver isBlock ifFalse:[ 
  10.103 +        context reportSemanticError: 'Receiver (condition) of whileTrue: special form is not a block'.
  10.104 +    ] ifTrue:[ 
  10.105 +        node receiver arguments notEmptyOrNil ifTrue:[ 
  10.106 +            context reportSemanticError: 'Receiver (condition) of whileTrue: special form may not have any arguments'.
  10.107 +        ]
  10.108 +    ].
  10.109 +    node arguments first isBlock ifFalse:[ 
  10.110 +        context reportSemanticError: 'Argument (loop body) of whileTrue: special form is not a block'.
  10.111 +    ] ifTrue:[ 
  10.112 +        node arguments first arguments notEmptyOrNil ifTrue:[ 
  10.113 +            context reportSemanticError: 'Argument (loop body) of whileTrue: special form may not have any arguments'.
  10.114 +        ]
  10.115 +    ].
  10.116 +    super acceptWhileTrueNode: node
  10.117 +
  10.118 +    "Created: / 23-09-2015 / 14:10:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  10.119  ! !
  10.120  
  10.121  !TSemanticAnalyser class methodsFor:'documentation'!
    11.1 --- a/compiler/TSimpleType.st	Tue Sep 22 17:43:38 2015 +0100
    11.2 +++ b/compiler/TSimpleType.st	Wed Sep 23 22:21:44 2015 +0100
    11.3 @@ -70,14 +70,6 @@
    11.4  
    11.5  !TSimpleType methodsFor:'printing & storing'!
    11.6  
    11.7 -printOn:aStream
    11.8 -    aStream nextPut: $<; space.
    11.9 -    self printWithoutAnglesOn:aStream.
   11.10 -    aStream space; nextPut: $>.
   11.11 -
   11.12 -    "Created: / 25-08-2015 / 23:22:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   11.13 -!
   11.14 -
   11.15  printWithoutAnglesOn:aStream
   11.16      aStream nextPutAll: name
   11.17  
    12.1 --- a/compiler/TType.st	Tue Sep 22 17:43:38 2015 +0100
    12.2 +++ b/compiler/TType.st	Wed Sep 23 22:21:44 2015 +0100
    12.3 @@ -2,7 +2,7 @@
    12.4  
    12.5  "{ NameSpace: Smalltalk }"
    12.6  
    12.7 -Object subclass:#TType
    12.8 +TObjectWithProperties subclass:#TType
    12.9  	instanceVariableNames:''
   12.10  	classVariableNames:''
   12.11  	poolDictionaries:''
   12.12 @@ -37,9 +37,9 @@
   12.13  printOn:aStream
   12.14      aStream nextPut: $<; space.
   12.15      self printWithoutAnglesOn:aStream.
   12.16 -    aStream nextPut: $>; space.
   12.17 +    aStream space; nextPut: $>.
   12.18  
   12.19 -    "Modified: / 21-08-2015 / 13:46:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   12.20 +    "Modified: / 23-09-2015 / 16:32:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   12.21  !
   12.22  
   12.23  printWithoutAnglesOn:aStream
   12.24 @@ -50,6 +50,12 @@
   12.25  
   12.26  !TType methodsFor:'testing'!
   12.27  
   12.28 +isAutomaticType
   12.29 +    ^ false
   12.30 +
   12.31 +    "Created: / 23-09-2015 / 16:32:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   12.32 +!
   12.33 +
   12.34  isBlockType
   12.35      ^ false
   12.36  
   12.37 @@ -73,6 +79,6 @@
   12.38  !
   12.39  
   12.40  version_HG
   12.41 -    ^ 'Path: jv/tea/compiler/TType.st, Version: 1.0, User: jv, Time: 2015-08-26T07:46:38.380+01'
   12.42 +    ^ '$Path: jv/tea/compiler/TType.st, Version: 1.0, User: jv, Time: 2015-08-26T07:46:38.380+01$'
   12.43  ! !
   12.44  
    13.1 --- a/compiler/TTypechecker.st	Tue Sep 22 17:43:38 2015 +0100
    13.2 +++ b/compiler/TTypechecker.st	Wed Sep 23 22:21:44 2015 +0100
    13.3 @@ -25,6 +25,24 @@
    13.4  
    13.5  !TTypechecker methodsFor:'visitor-double dispatching'!
    13.6  
    13.7 +acceptBlockNode: aBlockNode 
    13.8 +    | formalType actualType  |
    13.9 +
   13.10 +    super acceptBlockNode: aBlockNode.
   13.11 +
   13.12 +    formalType := aBlockNode binding type.
   13.13 +    actualType := aBlockNode body statements last binding type.
   13.14 +    formalType isAutomaticType ifTrue:[ 
   13.15 +        aBlockNode binding returnType: actualType.
   13.16 +    ] ifFalse:[ 
   13.17 +        formalType = actualType ifFalse:[ 
   13.18 +            context reportTypeError: ('Block return type is specified as %1 but actually is %3' bindWith: formalType with: actualType).
   13.19 +        ].
   13.20 +    ].
   13.21 +
   13.22 +    "Created: / 23-09-2015 / 16:44:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   13.23 +!
   13.24 +
   13.25  acceptIfTrueIfFalseNode: node
   13.26      | receiverType booleanType |
   13.27  
   13.28 @@ -94,6 +112,25 @@
   13.29  
   13.30      "Created: / 02-09-2015 / 10:34:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   13.31      "Modified: / 14-09-2015 / 14:22:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   13.32 +!
   13.33 +
   13.34 +acceptWhileTrueNode: node
   13.35 +    | receiverType booleanType |
   13.36 +
   13.37 +    (node isCascaded not or: [node isFirstCascaded]) ifTrue: [
   13.38 +        self visitNode: node receiver
   13.39 +    ].
   13.40 +    node arguments do: [:each | self visitNode: each].
   13.41 +
   13.42 +    receiverType := node receiver binding type.
   13.43 +    booleanType := context environment binding lookupClassBoolean type.
   13.44 +
   13.45 +    receiverType = booleanType ifFalse:[ 
   13.46 +        context reportTypeError: 'receiver of ifTrue:ifFalse: special form must be of type tBoolean (is ' , receiverType printString.
   13.47 +    ].
   13.48 +
   13.49 +    "Created: / 23-09-2015 / 14:06:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   13.50 +    "Modified: / 23-09-2015 / 16:46:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   13.51  ! !
   13.52  
   13.53  !TTypechecker class methodsFor:'documentation'!
    14.1 --- a/compiler/TValueBinding.st	Tue Sep 22 17:43:38 2015 +0100
    14.2 +++ b/compiler/TValueBinding.st	Wed Sep 23 22:21:44 2015 +0100
    14.3 @@ -33,3 +33,17 @@
    14.4      "Created: / 31-08-2015 / 11:49:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    14.5  ! !
    14.6  
    14.7 +!TValueBinding methodsFor:'accesssing - llvm'!
    14.8 +
    14.9 +llvmValue
   14.10 +    ^ self propertyAt: #llvmValue ifAbsent:[ nil ]
   14.11 +
   14.12 +    "Created: / 23-09-2015 / 21:14:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   14.13 +!
   14.14 +
   14.15 +llvmValue: anLLVMValue
   14.16 +    self propertyAt: #llvmValue put: anLLVMValue
   14.17 +
   14.18 +    "Created: / 23-09-2015 / 21:14:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   14.19 +! !
   14.20 +
    15.1 --- a/compiler/abbrev.stc	Tue Sep 22 17:43:38 2015 +0100
    15.2 +++ b/compiler/abbrev.stc	Wed Sep 23 22:21:44 2015 +0100
    15.3 @@ -1,48 +1,50 @@
    15.4  # automagically generated by the project definition
    15.5  # this file is needed for stc to be able to compile modules independently.
    15.6  # it provides information about a classes filename, category and especially namespace.
    15.7 -TBinding TBinding jv:tea/compiler 'Languages-Tea-Compiler-Bindings' 0
    15.8  TClassDefinition TClassDefinition jv:tea/compiler 'Languages-Tea-Compiler-Model' 0
    15.9  TCompilationUnitDefinition TCompilationUnitDefinition jv:tea/compiler 'Languages-Tea-Compiler-Model' 0
   15.10  TCompiler TCompiler jv:tea/compiler 'Languages-Tea-Compiler' 0
   15.11  TCompilerContext TCompilerContext jv:tea/compiler 'Languages-Tea-Compiler' 0
   15.12  TCompilerError TCompilerError jv:tea/compiler 'Languages-Tea-Compiler-Exceptions' 1
   15.13 +TCompilerExamples TCompilerExamples jv:tea/compiler 'Languages-Tea-Compiler-Examples' 1
   15.14  TEnvironmentProvider TEnvironmentProvider jv:tea/compiler 'Languages-Tea-Compiler-Model-Provider' 0
   15.15  TFormatter TFormatter jv:tea/compiler 'Languages-Tea-Compiler-AST' 0
   15.16  TMetaDefinition TMetaDefinition jv:tea/compiler 'Languages-Tea-Compiler-Model' 0
   15.17  TMethodDefinition TMethodDefinition jv:tea/compiler 'Languages-Tea-Compiler-Model' 0
   15.18  TNamespaceDefinition TNamespaceDefinition jv:tea/compiler 'Languages-Tea-Compiler-Model' 0
   15.19 +TObjectWithProperties TObjectWithProperties jv:tea/compiler 'Languages-Tea-Compiler-Internals' 0
   15.20  TParser TParser jv:tea/compiler 'Languages-Tea-Compiler-AST' 0
   15.21 -TParserTests TParserTests jv:tea/compiler 'Languages-Tea-Compiler-AST-Tests' 1
   15.22  TProgramNodeVisitor TProgramNodeVisitor jv:tea/compiler 'Languages-Tea-Compiler-AST' 0
   15.23 -TScope TScope jv:tea/compiler 'Languages-Tea-Compiler-Bindings' 0
   15.24  TSourceReader TSourceReader jv:tea/compiler 'Languages-Tea-Compiler-Model' 0
   15.25  TSpecialFormNode TSpecialFormNode jv:tea/compiler 'Languages-Tea-Compiler-AST' 0
   15.26 -TType TType jv:tea/compiler 'Languages-Tea-Compiler-Types' 0
   15.27  TTypeNode TTypeNode jv:tea/compiler 'Languages-Tea-Compiler-AST' 0
   15.28  TTypeSpecNode TTypeSpecNode jv:tea/compiler 'Languages-Tea-Compiler-AST' 0
   15.29  jv_tea_compiler jv_tea_compiler jv:tea/compiler '* Projects & Packages *' 3
   15.30 -TBlockType TBlockType jv:tea/compiler 'Languages-Tea-Compiler-Types' 0
   15.31 -TClassBinding TClassBinding jv:tea/compiler 'Languages-Tea-Compiler-Bindings' 0
   15.32 +TBinding TBinding jv:tea/compiler 'Languages-Tea-Compiler-Bindings' 0
   15.33  TCompilerPass TCompilerPass jv:tea/compiler 'Languages-Tea-Compiler-Internals' 0
   15.34  TEnvironment TEnvironment jv:tea/compiler 'Languages-Tea-Compiler-Model' 0
   15.35  TFilesystemProvider TFilesystemProvider jv:tea/compiler 'Languages-Tea-Compiler-Model-Provider' 0
   15.36 +TScope TScope jv:tea/compiler 'Languages-Tea-Compiler-Bindings' 0
   15.37 +TSimpleTypeNode TSimpleTypeNode jv:tea/compiler 'Languages-Tea-Compiler-AST' 0
   15.38 +TType TType jv:tea/compiler 'Languages-Tea-Compiler-Types' 0
   15.39 +TAutomaticType TAutomaticType jv:tea/compiler 'Languages-Tea-Compiler-Types' 0
   15.40 +TBlockType TBlockType jv:tea/compiler 'Languages-Tea-Compiler-Types' 0
   15.41 +TClassBinding TClassBinding jv:tea/compiler 'Languages-Tea-Compiler-Bindings' 0
   15.42  TFunctionBinding TFunctionBinding jv:tea/compiler 'Languages-Tea-Compiler-Bindings' 0
   15.43 +TLLVMCodeGenerator TLLVMCodeGenerator jv:tea/compiler 'Languages-Tea-Compiler-Internals' 0
   15.44  TNamespaceBinding TNamespaceBinding jv:tea/compiler 'Languages-Tea-Compiler-Bindings' 0
   15.45 +TSemanticAnalyser TSemanticAnalyser jv:tea/compiler 'Languages-Tea-Compiler-Internals' 0
   15.46  TSimpleType TSimpleType jv:tea/compiler 'Languages-Tea-Compiler-Types' 0
   15.47 -TSimpleTypeNode TSimpleTypeNode jv:tea/compiler 'Languages-Tea-Compiler-AST' 0
   15.48 +TTypechecker TTypechecker jv:tea/compiler 'Languages-Tea-Compiler-Internals' 0
   15.49  TValueBinding TValueBinding jv:tea/compiler 'Languages-Tea-Compiler-Bindings' 0
   15.50  TBlockBinding TBlockBinding jv:tea/compiler 'Languages-Tea-Compiler-Bindings' 0
   15.51  TConstantBinding TConstantBinding jv:tea/compiler 'Languages-Tea-Compiler-Bindings' 0
   15.52 -TLLVMCodeGenerator TLLVMCodeGenerator jv:tea/compiler 'Languages-Tea-Compiler-Internals' 0
   15.53  TMethodBinding TMethodBinding jv:tea/compiler 'Languages-Tea-Compiler-Bindings' 0
   15.54 -TSemanticAnalyser TSemanticAnalyser jv:tea/compiler 'Languages-Tea-Compiler-Internals' 0
   15.55 -TTypechecker TTypechecker jv:tea/compiler 'Languages-Tea-Compiler-Internals' 0
   15.56  TVariableBinding TVariableBinding jv:tea/compiler 'Languages-Tea-Compiler-Bindings' 0
   15.57  TArgumentBinding TArgumentBinding jv:tea/compiler 'Languages-Tea-Compiler-Bindings' 0
   15.58  TLocalBinding TLocalBinding jv:tea/compiler 'Languages-Tea-Compiler-Bindings' 0
   15.59 -TCompilerExamples TCompilerExamples jv:tea/compiler 'Languages-Tea-Compiler-Examples' 1
   15.60  TMethodDefinitionTests TMethodDefinitionTests jv:tea/compiler 'Languages-Tea-Compiler-Model-Tests' 1
   15.61 +TParserTests TParserTests jv:tea/compiler 'Languages-Tea-Compiler-AST-Tests' 1
   15.62  TSemanticAnalyserTests TSemanticAnalyserTests jv:tea/compiler 'Languages-Tea-Compiler-Internals-Tests' 1
   15.63  TSourceReaderTests TSourceReaderTests jv:tea/compiler 'Languages-Tea-Compiler-Model-Tests' 1
   15.64  TTypecheckerTests TTypecheckerTests jv:tea/compiler 'Languages-Tea-Compiler-Internals-Tests' 1
    16.1 --- a/compiler/bc.mak	Tue Sep 22 17:43:38 2015 +0100
    16.2 +++ b/compiler/bc.mak	Wed Sep 23 22:21:44 2015 +0100
    16.3 @@ -74,7 +74,6 @@
    16.4  
    16.5  
    16.6  # BEGINMAKEDEPEND --- do not remove this line; make depend needs it
    16.7 -$(OUTDIR)TBinding.$(O) TBinding.$(H): TBinding.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
    16.8  $(OUTDIR)TClassDefinition.$(O) TClassDefinition.$(H): TClassDefinition.st $(INCLUDE_TOP)\stx\goodies\ring\RGBehaviorDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGClassDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGClassDescriptionDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGGlobalDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
    16.9  $(OUTDIR)TCompilationUnitDefinition.$(O) TCompilationUnitDefinition.$(H): TCompilationUnitDefinition.st $(INCLUDE_TOP)\stx\goodies\ring\RGAbstractContainer.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.10  $(OUTDIR)TCompiler.$(O) TCompiler.$(H): TCompiler.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.11 @@ -85,35 +84,38 @@
   16.12  $(OUTDIR)TMetaDefinition.$(O) TMetaDefinition.$(H): TMetaDefinition.st $(INCLUDE_TOP)\stx\goodies\ring\RGBehaviorDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGClassDescriptionDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGGlobalDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGMetaclassDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.13  $(OUTDIR)TMethodDefinition.$(O) TMethodDefinition.$(H): TMethodDefinition.st $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGElementDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGMethodDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.14  $(OUTDIR)TNamespaceDefinition.$(O) TNamespaceDefinition.$(H): TNamespaceDefinition.st $(INCLUDE_TOP)\stx\goodies\ring\RGAbstractContainer.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGContainer.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGNamespace.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.15 +$(OUTDIR)TObjectWithProperties.$(O) TObjectWithProperties.$(H): TObjectWithProperties.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.16  $(OUTDIR)TParser.$(O) TParser.$(H): TParser.st $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBParser.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.17  $(OUTDIR)TProgramNodeVisitor.$(O) TProgramNodeVisitor.$(H): TProgramNodeVisitor.st $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBProgramNodeVisitor.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.18 -$(OUTDIR)TScope.$(O) TScope.$(H): TScope.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.19  $(OUTDIR)TSourceReader.$(O) TSourceReader.$(H): TSourceReader.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.20  $(OUTDIR)TSpecialFormNode.$(O) TSpecialFormNode.$(H): TSpecialFormNode.st $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBMessageNode.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBProgramNode.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBStatementNode.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBValueNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.21 -$(OUTDIR)TType.$(O) TType.$(H): TType.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.22  $(OUTDIR)TTypeNode.$(O) TTypeNode.$(H): TTypeNode.st $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBProgramNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.23  $(OUTDIR)TTypeSpecNode.$(O) TTypeSpecNode.$(H): TTypeSpecNode.st $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBProgramNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.24  $(OUTDIR)jv_tea_compiler.$(O) jv_tea_compiler.$(H): jv_tea_compiler.st $(INCLUDE_TOP)\stx\libbasic\LibraryDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(STCHDR)
   16.25 -$(OUTDIR)TBlockType.$(O) TBlockType.$(H): TBlockType.st $(INCLUDE_TOP)\jv\tea\compiler\TType.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.26 -$(OUTDIR)TClassBinding.$(O) TClassBinding.$(H): TClassBinding.st $(INCLUDE_TOP)\jv\tea\compiler\TBinding.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.27 +$(OUTDIR)TBinding.$(O) TBinding.$(H): TBinding.st $(INCLUDE_TOP)\jv\tea\compiler\TObjectWithProperties.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.28  $(OUTDIR)TCompilerPass.$(O) TCompilerPass.$(H): TCompilerPass.st $(INCLUDE_TOP)\jv\tea\compiler\TProgramNodeVisitor.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBProgramNodeVisitor.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.29  $(OUTDIR)TEnvironment.$(O) TEnvironment.$(H): TEnvironment.st $(INCLUDE_TOP)\jv\tea\compiler\TNamespaceDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGAbstractContainer.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGContainer.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGNamespace.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.30  $(OUTDIR)TFilesystemProvider.$(O) TFilesystemProvider.$(H): TFilesystemProvider.st $(INCLUDE_TOP)\jv\tea\compiler\TEnvironmentProvider.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.31 -$(OUTDIR)TFunctionBinding.$(O) TFunctionBinding.$(H): TFunctionBinding.st $(INCLUDE_TOP)\jv\tea\compiler\TBinding.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.32 -$(OUTDIR)TNamespaceBinding.$(O) TNamespaceBinding.$(H): TNamespaceBinding.st $(INCLUDE_TOP)\jv\tea\compiler\TBinding.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.33 -$(OUTDIR)TSimpleType.$(O) TSimpleType.$(H): TSimpleType.st $(INCLUDE_TOP)\jv\tea\compiler\TType.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.34 +$(OUTDIR)TScope.$(O) TScope.$(H): TScope.st $(INCLUDE_TOP)\jv\tea\compiler\TObjectWithProperties.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.35  $(OUTDIR)TSimpleTypeNode.$(O) TSimpleTypeNode.$(H): TSimpleTypeNode.st $(INCLUDE_TOP)\jv\tea\compiler\TTypeNode.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBProgramNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.36 -$(OUTDIR)TValueBinding.$(O) TValueBinding.$(H): TValueBinding.st $(INCLUDE_TOP)\jv\tea\compiler\TBinding.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.37 -$(OUTDIR)TBlockBinding.$(O) TBlockBinding.$(H): TBlockBinding.st $(INCLUDE_TOP)\jv\tea\compiler\TBinding.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TFunctionBinding.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.38 -$(OUTDIR)TConstantBinding.$(O) TConstantBinding.$(H): TConstantBinding.st $(INCLUDE_TOP)\jv\tea\compiler\TBinding.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TValueBinding.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.39 +$(OUTDIR)TType.$(O) TType.$(H): TType.st $(INCLUDE_TOP)\jv\tea\compiler\TObjectWithProperties.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.40 +$(OUTDIR)TAutomaticType.$(O) TAutomaticType.$(H): TAutomaticType.st $(INCLUDE_TOP)\jv\tea\compiler\TObjectWithProperties.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TType.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.41 +$(OUTDIR)TBlockType.$(O) TBlockType.$(H): TBlockType.st $(INCLUDE_TOP)\jv\tea\compiler\TObjectWithProperties.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TType.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.42 +$(OUTDIR)TClassBinding.$(O) TClassBinding.$(H): TClassBinding.st $(INCLUDE_TOP)\jv\tea\compiler\TBinding.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TObjectWithProperties.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.43 +$(OUTDIR)TFunctionBinding.$(O) TFunctionBinding.$(H): TFunctionBinding.st $(INCLUDE_TOP)\jv\tea\compiler\TBinding.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TObjectWithProperties.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.44  $(OUTDIR)TLLVMCodeGenerator.$(O) TLLVMCodeGenerator.$(H): TLLVMCodeGenerator.st $(INCLUDE_TOP)\jv\tea\compiler\TCompilerPass.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TProgramNodeVisitor.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBProgramNodeVisitor.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.45 -$(OUTDIR)TMethodBinding.$(O) TMethodBinding.$(H): TMethodBinding.st $(INCLUDE_TOP)\jv\tea\compiler\TBinding.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TFunctionBinding.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.46 +$(OUTDIR)TNamespaceBinding.$(O) TNamespaceBinding.$(H): TNamespaceBinding.st $(INCLUDE_TOP)\jv\tea\compiler\TBinding.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TObjectWithProperties.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.47  $(OUTDIR)TSemanticAnalyser.$(O) TSemanticAnalyser.$(H): TSemanticAnalyser.st $(INCLUDE_TOP)\jv\tea\compiler\TCompilerPass.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TProgramNodeVisitor.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBProgramNodeVisitor.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.48 +$(OUTDIR)TSimpleType.$(O) TSimpleType.$(H): TSimpleType.st $(INCLUDE_TOP)\jv\tea\compiler\TObjectWithProperties.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TType.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.49  $(OUTDIR)TTypechecker.$(O) TTypechecker.$(H): TTypechecker.st $(INCLUDE_TOP)\jv\tea\compiler\TCompilerPass.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TProgramNodeVisitor.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBProgramNodeVisitor.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.50 -$(OUTDIR)TVariableBinding.$(O) TVariableBinding.$(H): TVariableBinding.st $(INCLUDE_TOP)\jv\tea\compiler\TBinding.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TValueBinding.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.51 -$(OUTDIR)TArgumentBinding.$(O) TArgumentBinding.$(H): TArgumentBinding.st $(INCLUDE_TOP)\jv\tea\compiler\TBinding.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TValueBinding.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TVariableBinding.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.52 -$(OUTDIR)TLocalBinding.$(O) TLocalBinding.$(H): TLocalBinding.st $(INCLUDE_TOP)\jv\tea\compiler\TBinding.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TValueBinding.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TVariableBinding.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.53 -$(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBBlockNode.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBMethodNode.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBProgramNode.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBReturnNode.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBStatementNode.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBToken.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBValueNode.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBVariableNode.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGBehaviorDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGClassDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGClassDescriptionDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGElementDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGGlobalDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGMetaclassDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGMethodDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.54 +$(OUTDIR)TValueBinding.$(O) TValueBinding.$(H): TValueBinding.st $(INCLUDE_TOP)\jv\tea\compiler\TBinding.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TObjectWithProperties.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.55 +$(OUTDIR)TBlockBinding.$(O) TBlockBinding.$(H): TBlockBinding.st $(INCLUDE_TOP)\jv\tea\compiler\TBinding.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TFunctionBinding.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TObjectWithProperties.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.56 +$(OUTDIR)TConstantBinding.$(O) TConstantBinding.$(H): TConstantBinding.st $(INCLUDE_TOP)\jv\tea\compiler\TBinding.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TObjectWithProperties.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TValueBinding.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.57 +$(OUTDIR)TMethodBinding.$(O) TMethodBinding.$(H): TMethodBinding.st $(INCLUDE_TOP)\jv\tea\compiler\TBinding.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TFunctionBinding.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TObjectWithProperties.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.58 +$(OUTDIR)TVariableBinding.$(O) TVariableBinding.$(H): TVariableBinding.st $(INCLUDE_TOP)\jv\tea\compiler\TBinding.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TObjectWithProperties.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TValueBinding.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.59 +$(OUTDIR)TArgumentBinding.$(O) TArgumentBinding.$(H): TArgumentBinding.st $(INCLUDE_TOP)\jv\tea\compiler\TBinding.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TObjectWithProperties.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TValueBinding.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TVariableBinding.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.60 +$(OUTDIR)TLocalBinding.$(O) TLocalBinding.$(H): TLocalBinding.st $(INCLUDE_TOP)\jv\tea\compiler\TBinding.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TObjectWithProperties.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TValueBinding.$(H) $(INCLUDE_TOP)\jv\tea\compiler\TVariableBinding.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.61 +$(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBAssignmentNode.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBBlockNode.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBMethodNode.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBProgramNode.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBReturnNode.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBStatementNode.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBToken.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBValueNode.$(H) $(INCLUDE_TOP)\stx\goodies\refactoryBrowser\parser\RBVariableNode.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGBehaviorDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGClassDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGClassDescriptionDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGElementDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGGlobalDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGMetaclassDefinition.$(H) $(INCLUDE_TOP)\stx\goodies\ring\RGMethodDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
   16.62  
   16.63  # ENDMAKEDEPEND --- do not remove this line
   16.64  
    17.1 --- a/compiler/extensions.st	Tue Sep 22 17:43:38 2015 +0100
    17.2 +++ b/compiler/extensions.st	Wed Sep 23 22:21:44 2015 +0100
    17.3 @@ -1,5 +1,40 @@
    17.4  "{ Package: 'jv:tea/compiler' }"!
    17.5  
    17.6 +!RBAssignmentNode methodsFor:'accessing'!
    17.7 +
    17.8 +binding
    17.9 +    ^ variable binding
   17.10 +
   17.11 +    "Created: / 23-09-2015 / 16:45:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   17.12 +! !
   17.13 +
   17.14 +!RBAssignmentNode methodsFor:'accessing'!
   17.15 +
   17.16 +binding: aTBinding
   17.17 +    self shouldNotImplement
   17.18 +
   17.19 +    "Created: / 23-09-2015 / 16:45:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   17.20 +! !
   17.21 +
   17.22 +!RBBlockNode methodsFor:'accessing'!
   17.23 +
   17.24 +parameterTypes
   17.25 +    ^arguments collect:[ :arg | arg type ]
   17.26 +
   17.27 +    "Created: / 23-09-2015 / 16:30:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   17.28 +! !
   17.29 +
   17.30 +!RBBlockNode methodsFor:'accessing'!
   17.31 +
   17.32 +returnType
   17.33 +    | spec |
   17.34 +
   17.35 +    spec := self returnTypeSpec.
   17.36 +    ^ spec notNil ifTrue:[ spec asType ] ifFalse:[ TAutomaticType new ]
   17.37 +
   17.38 +    "Created: / 23-09-2015 / 16:28:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   17.39 +! !
   17.40 +
   17.41  !RBBlockNode methodsFor:'accessing'!
   17.42  
   17.43  returnTypeSpec
   17.44 @@ -39,6 +74,25 @@
   17.45  
   17.46  !RBMethodNode methodsFor:'accessing'!
   17.47  
   17.48 +parameterTypes
   17.49 +    ^arguments collect:[ :arg | arg type ]
   17.50 +
   17.51 +    "Created: / 23-09-2015 / 16:30:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   17.52 +! !
   17.53 +
   17.54 +!RBMethodNode methodsFor:'accessing'!
   17.55 +
   17.56 +returnType
   17.57 +    | spec |
   17.58 +
   17.59 +    spec := self returnTypeSpec.
   17.60 +    ^ spec notNil ifTrue:[ spec asType ] ifFalse:[ TAutomaticType new ]
   17.61 +
   17.62 +    "Created: / 23-09-2015 / 16:28:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   17.63 +! !
   17.64 +
   17.65 +!RBMethodNode methodsFor:'accessing'!
   17.66 +
   17.67  returnTypeSpec
   17.68      "Return the TTypeSpecNode describing the return type of the
   17.69       method"
   17.70 @@ -148,6 +202,17 @@
   17.71  
   17.72  !RBVariableNode methodsFor:'accessing'!
   17.73  
   17.74 +type
   17.75 +    | spec |
   17.76 +
   17.77 +    spec := self typeSpec.
   17.78 +    ^ spec notNil ifTrue:[ spec asType ] ifFalse:[ TAutomaticType new ]
   17.79 +
   17.80 +    "Created: / 23-09-2015 / 16:29:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   17.81 +! !
   17.82 +
   17.83 +!RBVariableNode methodsFor:'accessing'!
   17.84 +
   17.85  typeSpec
   17.86      "Return the TTypeSpecNode associated with this variable node
   17.87       (if this node is for variable declaration) or nil (otherwise)"
    18.1 --- a/compiler/jv_tea_compiler.st	Tue Sep 22 17:43:38 2015 +0100
    18.2 +++ b/compiler/jv_tea_compiler.st	Wed Sep 23 22:21:44 2015 +0100
    18.3 @@ -30,10 +30,10 @@
    18.4       by searching along the inheritance chain of all of my classes."
    18.5  
    18.6      ^ #(
    18.7 -        #'stx:goodies/refactoryBrowser/parser'    "RBBlockNode - extended"
    18.8 +        #'stx:goodies/refactoryBrowser/parser'    "RBAssignmentNode - extended"
    18.9          #'stx:goodies/ring'    "RGAbstractContainer - superclass of TCompilationUnitDefinition"
   18.10          #'stx:goodies/sunit'    "TestAsserter - superclass of TCompilerExamples"
   18.11 -        #'stx:libbasic'    "Error - superclass of TCompilerError"
   18.12 +        #'stx:libbasic'    "Autoload - superclass of TMethodDefinitionTests"
   18.13      )
   18.14  !
   18.15  
   18.16 @@ -73,48 +73,50 @@
   18.17  
   18.18      ^ #(
   18.19          "<className> or (<className> attributes...) in load order"
   18.20 -        TBinding
   18.21          TClassDefinition
   18.22          TCompilationUnitDefinition
   18.23          TCompiler
   18.24          TCompilerContext
   18.25          TCompilerError
   18.26 +        (TCompilerExamples autoload)
   18.27          TEnvironmentProvider
   18.28          TFormatter
   18.29          TMetaDefinition
   18.30          TMethodDefinition
   18.31          TNamespaceDefinition
   18.32 +        TObjectWithProperties
   18.33          TParser
   18.34 -        (TParserTests autoload)
   18.35          TProgramNodeVisitor
   18.36 -        TScope
   18.37          TSourceReader
   18.38          TSpecialFormNode
   18.39 -        TType
   18.40          TTypeNode
   18.41          TTypeSpecNode
   18.42          #'jv_tea_compiler'
   18.43 -        TBlockType
   18.44 -        TClassBinding
   18.45 +        TBinding
   18.46          TCompilerPass
   18.47          TEnvironment
   18.48          TFilesystemProvider
   18.49 +        TScope
   18.50 +        TSimpleTypeNode
   18.51 +        TType
   18.52 +        TAutomaticType
   18.53 +        TBlockType
   18.54 +        TClassBinding
   18.55          TFunctionBinding
   18.56 +        TLLVMCodeGenerator
   18.57          TNamespaceBinding
   18.58 +        TSemanticAnalyser
   18.59          TSimpleType
   18.60 -        TSimpleTypeNode
   18.61 +        TTypechecker
   18.62          TValueBinding
   18.63          TBlockBinding
   18.64          TConstantBinding
   18.65 -        TLLVMCodeGenerator
   18.66          TMethodBinding
   18.67 -        TSemanticAnalyser
   18.68 -        TTypechecker
   18.69          TVariableBinding
   18.70          TArgumentBinding
   18.71          TLocalBinding
   18.72 -        (TCompilerExamples autoload)
   18.73          (TMethodDefinitionTests autoload)
   18.74 +        (TParserTests autoload)
   18.75          (TSemanticAnalyserTests autoload)
   18.76          (TSourceReaderTests autoload)
   18.77          (TTypecheckerTests autoload)
   18.78 @@ -149,6 +151,13 @@
   18.79          RBToken isTInlineAssemblyEnd
   18.80          RGDefinition isCompilationUnit
   18.81          RBProgramNode isSpecialFormNode
   18.82 +        RBAssignmentNode binding
   18.83 +        RBAssignmentNode binding:
   18.84 +        RBBlockNode parameterTypes
   18.85 +        RBBlockNode returnType
   18.86 +        RBMethodNode parameterTypes
   18.87 +        RBMethodNode returnType
   18.88 +        RBVariableNode type
   18.89      )
   18.90  ! !
   18.91  
    19.1 --- a/compiler/libInit.cc	Tue Sep 22 17:43:38 2015 +0100
    19.2 +++ b/compiler/libInit.cc	Wed Sep 23 22:21:44 2015 +0100
    19.3 @@ -27,7 +27,6 @@
    19.4  void _libjv_tea_compiler_Init(pass, __pRT__, snd)
    19.5  OBJ snd; struct __vmData__ *__pRT__; {
    19.6  __BEGIN_PACKAGE2__("libjv_tea_compiler", _libjv_tea_compiler_Init, "jv:tea/compiler");
    19.7 -_TBinding_Init(pass,__pRT__,snd);
    19.8  _TClassDefinition_Init(pass,__pRT__,snd);
    19.9  _TCompilationUnitDefinition_Init(pass,__pRT__,snd);
   19.10  _TCompiler_Init(pass,__pRT__,snd);
   19.11 @@ -38,31 +37,34 @@
   19.12  _TMetaDefinition_Init(pass,__pRT__,snd);
   19.13  _TMethodDefinition_Init(pass,__pRT__,snd);
   19.14  _TNamespaceDefinition_Init(pass,__pRT__,snd);
   19.15 +_TObjectWithProperties_Init(pass,__pRT__,snd);
   19.16  _TParser_Init(pass,__pRT__,snd);
   19.17  _TProgramNodeVisitor_Init(pass,__pRT__,snd);
   19.18 -_TScope_Init(pass,__pRT__,snd);
   19.19  _TSourceReader_Init(pass,__pRT__,snd);
   19.20  _TSpecialFormNode_Init(pass,__pRT__,snd);
   19.21 -_TType_Init(pass,__pRT__,snd);
   19.22  _TTypeNode_Init(pass,__pRT__,snd);
   19.23  _TTypeSpecNode_Init(pass,__pRT__,snd);
   19.24  _jv_137tea_137compiler_Init(pass,__pRT__,snd);
   19.25 -_TBlockType_Init(pass,__pRT__,snd);
   19.26 -_TClassBinding_Init(pass,__pRT__,snd);
   19.27 +_TBinding_Init(pass,__pRT__,snd);
   19.28  _TCompilerPass_Init(pass,__pRT__,snd);
   19.29  _TEnvironment_Init(pass,__pRT__,snd);
   19.30  _TFilesystemProvider_Init(pass,__pRT__,snd);
   19.31 +_TScope_Init(pass,__pRT__,snd);
   19.32 +_TSimpleTypeNode_Init(pass,__pRT__,snd);
   19.33 +_TType_Init(pass,__pRT__,snd);
   19.34 +_TAutomaticType_Init(pass,__pRT__,snd);
   19.35 +_TBlockType_Init(pass,__pRT__,snd);
   19.36 +_TClassBinding_Init(pass,__pRT__,snd);
   19.37  _TFunctionBinding_Init(pass,__pRT__,snd);
   19.38 +_TLLVMCodeGenerator_Init(pass,__pRT__,snd);
   19.39  _TNamespaceBinding_Init(pass,__pRT__,snd);
   19.40 +_TSemanticAnalyser_Init(pass,__pRT__,snd);
   19.41  _TSimpleType_Init(pass,__pRT__,snd);
   19.42 -_TSimpleTypeNode_Init(pass,__pRT__,snd);
   19.43 +_TTypechecker_Init(pass,__pRT__,snd);
   19.44  _TValueBinding_Init(pass,__pRT__,snd);
   19.45  _TBlockBinding_Init(pass,__pRT__,snd);
   19.46  _TConstantBinding_Init(pass,__pRT__,snd);
   19.47 -_TLLVMCodeGenerator_Init(pass,__pRT__,snd);
   19.48  _TMethodBinding_Init(pass,__pRT__,snd);
   19.49 -_TSemanticAnalyser_Init(pass,__pRT__,snd);
   19.50 -_TTypechecker_Init(pass,__pRT__,snd);
   19.51  _TVariableBinding_Init(pass,__pRT__,snd);
   19.52  _TArgumentBinding_Init(pass,__pRT__,snd);
   19.53  _TLocalBinding_Init(pass,__pRT__,snd);