equal
deleted
inserted
replaced
1 "{ Package: 'jv:tea/compiler' }" |
1 "{ Package: 'jv:tea/compiler' }" |
2 |
2 |
3 "{ NameSpace: Smalltalk }" |
3 "{ NameSpace: Smalltalk }" |
4 |
4 |
5 Object subclass:#TScope |
5 TObjectWithProperties subclass:#TScope |
6 instanceVariableNames:'node parent children variables' |
6 instanceVariableNames:'node parent children variables' |
7 classVariableNames:'' |
7 classVariableNames:'' |
8 poolDictionaries:'' |
8 poolDictionaries:'' |
9 category:'Languages-Tea-Compiler-Bindings' |
9 category:'Languages-Tea-Compiler-Bindings' |
10 ! |
10 ! |
41 |
41 |
42 variables |
42 variables |
43 ^ variables ? #() |
43 ^ variables ? #() |
44 |
44 |
45 "Modified: / 19-09-2015 / 05:56:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
45 "Modified: / 19-09-2015 / 05:56:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
46 ! ! |
|
47 |
|
48 !TScope methodsFor:'accesssing - llvm'! |
|
49 |
|
50 llvmAllocas |
|
51 ^ self propertyAt: #llvmAllocas |
|
52 ifAbsent: [ parent notNil ifTrue:[ parent llvmAllocas ] ifFalse:[nil] ] |
|
53 |
|
54 "Created: / 23-09-2015 / 21:42:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
55 ! |
|
56 |
|
57 llvmAllocas: anLLVMBasicBlock |
|
58 self propertyAt: #llvmAllocas put: anLLVMBasicBlock |
|
59 |
|
60 "Created: / 23-09-2015 / 21:40:57 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
46 ! ! |
61 ! ! |
47 |
62 |
48 !TScope methodsFor:'adding & removing'! |
63 !TScope methodsFor:'adding & removing'! |
49 |
64 |
50 addSubScope: aTScope |
65 addSubScope: aTScope |
95 "Modified: / 20-09-2015 / 06:11:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
110 "Modified: / 20-09-2015 / 06:11:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
96 ! ! |
111 ! ! |
97 |
112 |
98 !TScope methodsFor:'testing'! |
113 !TScope methodsFor:'testing'! |
99 |
114 |
|
115 hasSelfArgument |
|
116 ^ (node isMethod and:[node binding mclass isMetaclass not]) |
|
117 |
|
118 "Created: / 23-09-2015 / 18:48:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
119 ! |
|
120 |
100 isBlockScope |
121 isBlockScope |
101 ^ node isBlock |
122 ^ node isBlock |
102 |
123 |
103 "Created: / 02-09-2015 / 08:57:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
124 "Created: / 02-09-2015 / 08:57:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
104 ! |
125 ! |