compiler/TConstantBinding.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 16 Sep 2015 05:29:43 +0100
changeset 11 6d39860d0fdb
parent 10 2b9beeac547e
child 13 97090c2baa33
permissions -rw-r--r--
First shot on #ifTrie:ifFalse: special form

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

"{ NameSpace: Smalltalk }"

TValueBinding subclass:#TConstantBinding
	instanceVariableNames:'value'
	classVariableNames:''
	poolDictionaries:''
	category:'Languages-Tea-Compiler-Bindings'
!


!TConstantBinding class methodsFor:'instance creation'!

value: anObject type: aTType
    ^ self new initializeWithValue: anObject type: aTType

    "Created: / 15-09-2015 / 08:19:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!TConstantBinding methodsFor:'accessing'!

value
    ^ value
! !

!TConstantBinding methodsFor:'converting'!

asLLVMValueInModule: aLLVMModule
    value isInteger ifTrue:[ 
        ^ LLVMConstant sint: value type: (type asLLVMTypeInModule: aLLVMModule ).
    ].
    ^ self notYetImplemented

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

!TConstantBinding methodsFor:'initialization'!

initializeWithValue: anObject type: aTType
    value := anObject.
    type := aTType.

    "Created: / 15-09-2015 / 08:19:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!TConstantBinding methodsFor:'testing'!

isConstantBinding
    ^ true
! !

!TConstantBinding class methodsFor:'documentation'!

version_HG

    ^ '$Changeset: <not expanded> $'
! !