Parser.st
changeset 80 101b42803846
parent 79 26f81a94a6ea
child 83 10c73a059351
--- a/Parser.st	Sat Mar 18 16:21:39 1995 +0100
+++ b/Parser.st	Sat Mar 25 23:11:08 1995 +0100
@@ -39,7 +39,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
 	     All Rights Reserved
 
-$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.34 1995-03-18 15:21:39 claus Exp $
+$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.35 1995-03-25 22:10:55 claus Exp $
 '!
 
 !Parser class methodsFor:'documentation'!
@@ -60,7 +60,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.34 1995-03-18 15:21:39 claus Exp $
+$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.35 1995-03-25 22:10:55 claus Exp $
 "
 !
 
@@ -804,6 +804,12 @@
 
 !Parser class methodsFor:'controlling compilation'!
 
+compileLazy
+    "return true if compiling lazy"
+
+    ^ LazyCompilation.
+!
+
 compileLazy:aBoolean
     "turn on/off lazy compilation - return previous setting.
      Actually this flag belongs into the ByteCodeCompiler subclass,
@@ -822,6 +828,12 @@
     "
 !
 
+arraysAreImmutable
+    "return true if arrays are immutable literals"
+
+    ^ ArraysAreImmutable
+!
+
 arraysAreImmutable:aBoolean
     "turn on/off immutable array literals - default is false for ST-80 compatibilty."
 
@@ -2102,8 +2114,9 @@
 	]
     ].
 
-    "is it an instance-variable ?"
     classToCompileFor notNil ifTrue:[
+	"is it an instance-variable ?"
+
 	instIndex := (self instVarNames) indexOf:varName startingAt:1.
 	instIndex ~~ 0 ifTrue:[
 	    usedInstVars isNil ifTrue:[
@@ -2124,15 +2137,21 @@
 			   name:varName
 			  index:instIndex
 		      selfValue:selfValue
-	]
-    ].
-
-    "is it a class-instance-variable ?"
-    classToCompileFor notNil ifTrue:[
+	].
+
+	"is it a class-instance-variable ?"
+
 	instIndex := (self classInstVarNames) indexOf:varName startingAt:1.
 	instIndex ~~ 0 ifTrue:[
 	    aClass := self inWhichClassIsClassInstVar:varName.
 	    aClass notNil ifTrue:[
+		usedClassVars isNil ifTrue:[
+		    usedClassVars := OrderedCollection with:varName
+		] ifFalse:[
+		    (usedClassVars includes:varName) ifFalse:[
+			usedClassVars add:varName
+		    ].
+		].
 		usedVars isNil ifTrue:[
 		    usedVars := OrderedCollection with:varName
 		] ifFalse:[
@@ -2145,11 +2164,10 @@
 			      index:instIndex
 			  selfClass:aClass
 	    ]
-	]
-    ].
-
-    "is it a class-variable ?"
-    classToCompileFor notNil ifTrue:[
+	].
+
+	"is it a class-variable ?"
+
 	instIndex := (self classVarNames) indexOf:varName startingAt:1.
 	instIndex ~~ 0 ifTrue:[
 	    aClass := self inWhichClassIsClassVar:varName.