--- a/PeekableStream.st Mon Mar 18 22:12:08 2013 +0000
+++ b/PeekableStream.st Fri Mar 22 09:18:54 2013 +0000
@@ -46,6 +46,7 @@
"
! !
+
!PeekableStream class methodsFor:'initialization'!
initialize
@@ -64,6 +65,7 @@
"Modified: / 23-10-2006 / 16:34:41 / cg"
! !
+
!PeekableStream class methodsFor:'Signal constants'!
currentFileInDirectoryQuerySignal
@@ -100,6 +102,7 @@
"Modified: / 23-10-2006 / 16:32:49 / cg"
! !
+
!PeekableStream class methodsFor:'queries'!
currentFileInDirectory
@@ -118,6 +121,7 @@
"Modified: / 23-10-2006 / 16:33:40 / cg"
! !
+
!PeekableStream methodsFor:'chunk input/output'!
nextChunk
@@ -219,6 +223,7 @@
^ theString
! !
+
!PeekableStream methodsFor:'fileIn'!
fileIn
@@ -260,6 +265,7 @@
"Modified: / 13.11.2001 / 10:14:04 / cg"
! !
+
!PeekableStream methodsFor:'positioning'!
skipAny:skipCollection
@@ -362,6 +368,7 @@
"
! !
+
!PeekableStream methodsFor:'private fileIn'!
basicFileInNotifying:someone passChunk:passChunk
@@ -373,7 +380,7 @@
packageQuerySignal nameSpaceQuerySignal usedNameSpaceQuerySignal
changeDefaultApplicationNotificationSignal
defaultApplicationQuerySignal defaultApplication
- confirmationQuerySignal handledSignals passedSignals askSomeoneForPackage outerContext|
+ confirmationQuerySignal handledSignals passedSignals askSomeoneForPackage outerContext askForVariableTypeOfUndeclaredQuery|
self skipSeparators.
lastValue := self peek.
@@ -445,11 +452,20 @@
handledSignals add:packageQuerySignal.
handledSignals add:usedNameSpaceQuerySignal.
handledSignals add:nameSpaceQuerySignal.
-
handledSignals add:confirmationQuerySignal.
- handledSignals add:Parser askForVariableTypeOfUndeclaredQuery.
-
passedSignals add:confirmationQuerySignal.
+ Parser notNil ifTrue:[
+ "only if libcomp is present"
+ "Also catch a 'Parser askForVariableTypeOfUndeclaredQuery' and proceed with nil.
+ Imagine somebody has autodefine workspace variables on and then
+ evaluate Smalltalk loadPackage:'xyz' that loads code from source (using file-in),
+ certainly we don't want to compile workspace variable access for every
+ not-yet-loaded class in some namespace.
+ This is demonstrated by Regression::CompilerTests2>>test_01
+ and this change actually fixes this test."
+ askForVariableTypeOfUndeclaredQuery := Parser askForVariableTypeOfUndeclaredQuery.
+ handledSignals add:askForVariableTypeOfUndeclaredQuery.
+ ].
outerContext := thisContext.
@@ -494,9 +510,9 @@
"don't pop up dialogs"
ex proceedWith:false
].
- sig == Parser askForVariableTypeOfUndeclaredQuery ifTrue:[
- "no autodefined variables or so"
- ex proceedWith: nil.
+ sig == askForVariableTypeOfUndeclaredQuery ifTrue:[
+ "no autodefined variables or so"
+ ex proceedWith:nil.
].
] do:[
[self atEnd] whileFalse:[
@@ -505,9 +521,9 @@
].
^ lastValue
- "Modified: / 10-09-1999 / 16:54:01 / stefan"
- "Modified: / 16-11-2001 / 16:21:28 / cg"
- "Modified (format): / 18-03-2013 / 17:45:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 10.9.1999 / 16:54:01 / stefan"
+ "Modified: / 16.11.2001 / 16:21:28 / cg"
+ "Modified: / 18-03-2013 / 17:45:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
fileInNextChunkNotifying:someone
@@ -650,6 +666,7 @@
"/ self halt.
! !
+
!PeekableStream methodsFor:'reading'!
nextDecimalInteger
@@ -895,6 +912,7 @@
"Modified: 4.1.1997 / 23:38:05 / cg"
! !
+
!PeekableStream methodsFor:'reading-strings'!
nextAlphaNumericWord
@@ -1029,14 +1047,15 @@
"Modified: 15.5.1996 / 17:51:42 / cg"
! !
+
!PeekableStream class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/PeekableStream.st,v 1.41 2012-11-19 15:00:10 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/PeekableStream.st,v 1.42 2013-03-19 13:15:55 stefan Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/PeekableStream.st,v 1.41 2012-11-19 15:00:10 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/PeekableStream.st,v 1.42 2013-03-19 13:15:55 stefan Exp $'
!
version_HG