compiler/TCompilerContext.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 31 Aug 2015 13:53:40 +0100
changeset 4 3d80069ea3e2
child 6 0c806a7f1888
permissions -rw-r--r--
More work on basic infrastructure - types, bindings & compilation. At this point it actually can compile a simple method returning an integer value. However, full of hacks here and there and full of #notYetImplemented.

"{ Package: 'jv:tea/compiler' }"

"{ NameSpace: Smalltalk }"

Object subclass:#TCompilerContext
	instanceVariableNames:'environment unit module'
	classVariableNames:''
	poolDictionaries:''
	category:'Languages-Tea-Compiler'
!

!TCompilerContext methodsFor:'accessing'!

environment
    ^ environment
!

environment:something
    environment := something.
!

module
    module isNil ifTrue:[ 
        module := LLVMModule newWithName: unit name.
    ].
    ^ module

    "Modified: / 30-08-2015 / 09:25:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

unit
    ^ unit
!

unit:aTCompilationUnit
    unit := aTCompilationUnit.
! !