compiler/TScope.st
changeset 15 10a95d798b36
parent 13 97090c2baa33
child 16 17a2d1d9f205
--- a/compiler/TScope.st	Tue Sep 22 17:43:38 2015 +0100
+++ b/compiler/TScope.st	Wed Sep 23 22:21:44 2015 +0100
@@ -2,7 +2,7 @@
 
 "{ NameSpace: Smalltalk }"
 
-Object subclass:#TScope
+TObjectWithProperties subclass:#TScope
 	instanceVariableNames:'node parent children variables'
 	classVariableNames:''
 	poolDictionaries:''
@@ -45,6 +45,21 @@
     "Modified: / 19-09-2015 / 05:56:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!TScope methodsFor:'accesssing - llvm'!
+
+llvmAllocas
+    ^ self propertyAt: #llvmAllocas 
+            ifAbsent: [ parent notNil ifTrue:[ parent llvmAllocas ] ifFalse:[nil] ]
+
+    "Created: / 23-09-2015 / 21:42:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+llvmAllocas: anLLVMBasicBlock
+    self propertyAt: #llvmAllocas put: anLLVMBasicBlock
+
+    "Created: / 23-09-2015 / 21:40:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !TScope methodsFor:'adding & removing'!
 
 addSubScope: aTScope
@@ -97,6 +112,12 @@
 
 !TScope methodsFor:'testing'!
 
+hasSelfArgument
+    ^ (node isMethod and:[node binding mclass isMetaclass not])
+
+    "Created: / 23-09-2015 / 18:48:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 isBlockScope
     ^ node isBlock