Parser.st
changeset 3442 0c7fd8c5bd86
parent 3440 5f38d5fce8be
child 3445 62037b3c3fca
--- a/Parser.st	Wed May 14 00:26:18 2014 +0200
+++ b/Parser.st	Wed May 14 00:59:12 2014 +0200
@@ -4544,23 +4544,25 @@
 
     |ex doCorrect boldName errMsg|
 
-    ex := UndefinedVariableNotification newException.
-    ex parser:self.
-    ex parameter:aName.
-    ex suspendedContext:thisContext.
-    doCorrect := ex raiseRequest.
-    doCorrect notNil ifTrue:[
-	^ doCorrect
+    UndefinedVariableNotification isHandled ifTrue:[
+        ex := UndefinedVariableNotification newException.
+        ex parser:self.
+        ex parameter:aName.
+        ex suspendedContext:thisContext.
+        doCorrect := ex raiseRequest.
+        doCorrect notNil ifTrue:[
+            ^ doCorrect
+        ].
     ].
 
     "
      already warned about this one ?
     "
     warnedUndefVars notNil ifTrue:[
-	(warnedUndefVars includes:aName) ifTrue:[
-	    "already warned about this one"
-	    ^ false
-	].
+        (warnedUndefVars includes:aName) ifTrue:[
+            "already warned about this one"
+            ^ false
+        ].
     ].
 
 "/    ignoreWarnings ifTrue:[^ false].
@@ -4576,48 +4578,48 @@
     boldName := aName allBold.
 
     (requestor isNil or:[requestor isStream]) ifTrue:[
-	errMsg := 'Error: "%1" is undefined' bindWith:boldName.
-	aName isUppercaseFirst ifFalse:[
-	    self showErrorMessage:errMsg position:pos1.
-	].
-	doCorrect := false.
+        errMsg := 'Error: "%1" is undefined' bindWith:boldName.
+        aName isUppercaseFirst ifFalse:[
+            self showErrorMessage:errMsg position:pos1.
+        ].
+        doCorrect := false.
     ] ifFalse:[
-	"
-	 ask requestor for correct/continue/abort ...
-	 it is supposed to raise abort or return true/false.
-	 True return means that correction is wanted.
-	"
-	errMsg := self errorMessageForUndefined:aName.
-	aName isUppercaseFirst ifTrue:[
-	    doCorrect := self
-			correctableWarning:errMsg withCRs
-			position:pos1 to:pos2
-	] ifFalse:[
-	    doCorrect := self
-			correctableError:errMsg withCRs
-			position:pos1 to:pos2
-	].
+        "
+         ask requestor for correct/continue/abort ...
+         it is supposed to raise abort or return true/false.
+         True return means that correction is wanted.
+        "
+        errMsg := self errorMessageForUndefined:aName.
+        aName isUppercaseFirst ifTrue:[
+            doCorrect := self
+                        correctableWarning:errMsg withCRs
+                        position:pos1 to:pos2
+        ] ifFalse:[
+            doCorrect := self
+                        correctableError:errMsg withCRs
+                        position:pos1 to:pos2
+        ].
     ].
     "/ notice: doCorrect may be a non-boolean
     doCorrect == false ifTrue:[
-	warnedUndefVars isNil ifTrue:[
-	    warnedUndefVars := Set new.
-	].
-	warnedUndefVars add:aName.
-	self classToCompileFor notNil ifTrue:[
-	    Tools::ToDoListBrowser notNil ifTrue:[
-		"/ experimental
-		self
-		    notifyTodo:errMsg position:pos1
-		    className:(self classToCompileFor name) selector:selector
-		    severity:#error priority:#high
-		    equalityParameter:aName
-		    checkAction:[:e |
-			e problemMethod notNil
-			and:[(e problemMethod usedGlobals includes:aName)
-			and:[(Smalltalk includesKey:aName) not]] ].
-	    ].
-	].
+        warnedUndefVars isNil ifTrue:[
+            warnedUndefVars := Set new.
+        ].
+        warnedUndefVars add:aName.
+        self classToCompileFor notNil ifTrue:[
+            Tools::ToDoListBrowser notNil ifTrue:[
+                "/ experimental
+                self
+                    notifyTodo:errMsg position:pos1
+                    className:(self classToCompileFor name) selector:selector
+                    severity:#error priority:#high
+                    equalityParameter:aName
+                    checkAction:[:e |
+                        e problemMethod notNil
+                        and:[(e problemMethod usedGlobals includes:aName)
+                        and:[(Smalltalk includesKey:aName) not]] ].
+            ].
+        ].
     ].
 
     ^ doCorrect
@@ -7125,10 +7127,12 @@
     class instSize: names size.
 
     names keysAndValuesDo:[:idx :instVarName |
+        |m|
+
         idx <= InlineObjectPrototype instSize ifTrue:[
-            class basicAddSelector:(instVarName asSymbol) withMethod:(InlineObjectPrototype compiledMethodAt:('i%1' bindWith:idx) asSymbol).
+            class basicAddSelector:(instVarName asSymbol) withMethod:(m := InlineObjectPrototype compiledMethodAt:('i%1' bindWith:idx) asSymbol).
             inlineObjectsAreReadonly ifFalse:[
-                class basicAddSelector:(instVarName asMutator) withMethod:(InlineObjectPrototype compiledMethodAt:('i%1:' bindWith:idx) asSymbol).
+                class basicAddSelector:(instVarName asMutator) withMethod:(m := InlineObjectPrototype compiledMethodAt:('i%1:' bindWith:idx) asSymbol).
             ].
         ] ifFalse:[
             Class withoutUpdatingChangesDo:[
@@ -11878,11 +11882,11 @@
 !Parser class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.823 2014-05-13 14:35:32 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.824 2014-05-13 22:59:12 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.823 2014-05-13 14:35:32 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libcomp/Parser.st,v 1.824 2014-05-13 22:59:12 cg Exp $'
 !
 
 version_SVN