compiler/TFunctionBinding.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Fri, 25 Sep 2015 03:51:15 +0100
changeset 16 17a2d1d9f205
parent 15 10a95d798b36
permissions -rw-r--r--
Added standalone Tea compiler - teak It allows for compilation of .tea files from the command line.

"
    Copyright (C) 2015-now Jan Vrany

    This code is not an open-source (yet). You may use this code
    for your own experiments and projects, given that:

    * all modification to the code will be sent to the
      original author for inclusion in future releases
    * this is not used in any commercial software

    This license is provisional and may (will) change in
    a future.
"
"{ Package: 'jv:tea/compiler' }"

"{ NameSpace: Smalltalk }"

TBinding subclass:#TFunctionBinding
	instanceVariableNames:'returnType parameterTypes'
	classVariableNames:''
	poolDictionaries:''
	category:'Languages-Tea-Compiler-Bindings'
!

!TFunctionBinding class methodsFor:'documentation'!

copyright
"
    Copyright (C) 2015-now Jan Vrany

    This code is not an open-source (yet). You may use this code
    for your own experiments and projects, given that:

    * all modification to the code will be sent to the
      original author for inclusion in future releases
    * this is not used in any commercial software

    This license is provisional and may (will) change in
    a future.
"
! !

!TFunctionBinding methodsFor:'accessing'!

parameterTypes
    ^ parameterTypes
!

returnType
    ^ returnType
!

type
    ^ returnType

    "Created: / 31-08-2015 / 12:03:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 02-09-2015 / 17:02:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!TFunctionBinding methodsFor:'accesssing - llvm'!

llvmValue
    ^ self propertyAt: #llvmValue ifAbsent:[ nil ]

    "Created: / 23-09-2015 / 21:14:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

llvmValue: anLLVMValue
    self propertyAt: #llvmValue put: anLLVMValue

    "Created: / 23-09-2015 / 21:14:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!TFunctionBinding methodsFor:'converting'!

asLLVMValueInModule: aLLVMModule
    self subclassResponsibility

    "Created: / 15-09-2015 / 07:03:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!TFunctionBinding methodsFor:'initialization'!

parameterTypes: aCollection
    parameterTypes := aCollection

    "Created: / 02-09-2015 / 17:03:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

returnType: aTType
    returnType := aTType

    "Created: / 02-09-2015 / 17:03:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !