compiler/TConstantBinding.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 02 Sep 2015 09:18:00 +0100
changeset 6 0c806a7f1888
parent 4 3d80069ea3e2
child 7 7556e3d41d80
permissions -rw-r--r--
Initial support for inline assembly

"{ 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: / 25-08-2015 / 23:14:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!TConstantBinding methodsFor:'accessing'!

value
    ^ value
! !

!TConstantBinding methodsFor:'initialization'!

initializeWithValue: anObject
    value := anObject.
    value class == SmallInteger ifTrue:[ 
        type := TSimpleType named: 'tSmallInteger'.
        ^ self.
    ].
    self error: 'Unsupported constant'

    "Created: / 25-08-2015 / 23:15:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 01-09-2015 / 21:55:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!TConstantBinding methodsFor:'testing'!

isConstantBinding
    ^ true
! !

!TConstantBinding class methodsFor:'documentation'!

version_HG

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