compiler/TConstantBinding.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Tue, 22 Sep 2015 17:43:38 +0100
changeset 14 fa42d3f1a578
parent 13 97090c2baa33
child 16 17a2d1d9f205
permissions -rw-r--r--
Removed syntax for inline assembly, use <primitive: [:asm | ... ]> syntax. This one is easier to implement and less introusive, syntax-wise. And follows Smalltalk tradiiton.

"{ 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
    ^ self new initializeWithValue: anObject

    "Created: / 20-09-2015 / 07:11:25 / 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
    value := anObject.

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

!TConstantBinding methodsFor:'testing'!

isConstantBinding
    ^ true
! !

!TConstantBinding class methodsFor:'documentation'!

version_HG

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