compiler/TBlockType.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Fri, 25 Sep 2015 03:51:15 +0100
changeset 16 17a2d1d9f205
parent 7 7556e3d41d80
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 }"

TType subclass:#TBlockType
	instanceVariableNames:'parameterTypes returnType'
	classVariableNames:''
	poolDictionaries:''
	category:'Languages-Tea-Compiler-Types'
!

!TBlockType 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.
"
! !

!TBlockType class methodsFor:'instance creation'!

parameters: parameterTypes returning: returnType
    ^ self new initializeWithParameterTypes: parameterTypes returnType: returnType

    "Created: / 31-08-2015 / 10:36:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!TBlockType methodsFor:'conversion'!

asLLVMTypeInModule: aLLVMModule
    "Return the type as LLVMType"
    self subclassResponsibility

    "Created: / 31-08-2015 / 08:59:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!TBlockType methodsFor:'initialization'!

initializeWithParameterTypes: parameterTypesArg returnType: returnTypeArg    
    parameterTypes := parameterTypesArg.
    returnType := returnTypeArg.

    "Created: / 31-08-2015 / 09:41:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!TBlockType methodsFor:'testing'!

isBlockType
    ^ true

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