Joshua Gargus uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-jcg.147.mcz
==================== Summary ====================
Name: Compiler-jcg.147
Author: jcg
Time: 23 June 2010, 12:04:54.856 pm
UUID: 714d775f-78af-45dc-affc-b33d59d68da5
Ancestors: Compiler-nice.146
Change Parser>>correctVariable:interval: to allow it to look up the proposed variable in the requestor even if it starts with an uppercase letter.
=============== Diff against Compiler-nice.146 ===============
Item was changed:
----- Method: Parser>>correctVariable:interval: (in category 'error correction') -----
correctVariable: proposedVariable interval: spot
"Correct the proposedVariable to a known variable, or declare it as a new
variable if such action is requested. We support declaring lowercase
variables as temps or inst-vars, and uppercase variables as Globals or
ClassVars, depending on whether the context is nil (class=UndefinedObject).
Spot is the interval within the test stream of the variable.
rr 3/4/2004 10:26 : adds the option to define a new class. "
"Check if this is an i-var, that has been corrected already (ugly)"
"Display the pop-up menu"
+ | binding userSelection action |
- | tempIvar binding userSelection action |
(encoder classEncoding instVarNames includes: proposedVariable) ifTrue:
[^InstanceVariableNode new
name: proposedVariable
index: (encoder classEncoding allInstVarNames indexOf: proposedVariable)].
"If we can't ask the user for correction, make it undeclared"
self interactive ifFalse: [^encoder undeclared: proposedVariable].
"First check to see if the requestor knows anything about the variable"
+ (binding := requestor bindingOf: proposedVariable)
+ ifNotNil: [^encoder global: binding name: proposedVariable].
- tempIvar := proposedVariable first isLowercase.
- (tempIvar and: [(binding := requestor bindingOf: proposedVariable) notNil])
- ifTrue: [^encoder global: binding name: proposedVariable].
userSelection := requestor selectionInterval.
requestor selectFrom: spot first to: spot last.
requestor select.
"Build the menu with alternatives"
action := UndeclaredVariable
signalFor: self
name: proposedVariable
inRange: spot.
action ifNil: [^self fail].
"Execute the selected action"
requestor deselect.
requestor selectInvisiblyFrom: userSelection first to: userSelection last.
^action value!
Joshua Gargus uploaded a new version of Compiler to project The Trunk:
http://source.squeak.org/trunk/Compiler-jcg.147.mcz
==================== Summary ====================
Name: Compiler-jcg.147
Author: jcg
Time: 23 June 2010, 12:04:54.856 pm
UUID: 714d775f-78af-45dc-affc-b33d59d68da5
Ancestors: Compiler-nice.146
Change Parser>>correctVariable:interval: to allow it to look up the proposed variable in the requestor even if it starts with an uppercase letter.
=============== Diff against Compiler-nice.146 ===============
Item was changed:
----- Method: Parser>>correctVariable:interval: (in category 'error correction') -----
correctVariable: proposedVariable interval: spot
"Correct the proposedVariable to a known variable, or declare it as a new
variable if such action is requested. We support declaring lowercase
variables as temps or inst-vars, and uppercase variables as Globals or
ClassVars, depending on whether the context is nil (class=UndefinedObject).
Spot is the interval within the test stream of the variable.
rr 3/4/2004 10:26 : adds the option to define a new class. "
"Check if this is an i-var, that has been corrected already (ugly)"
"Display the pop-up menu"
+ | binding userSelection action |
- | tempIvar binding userSelection action |
(encoder classEncoding instVarNames includes: proposedVariable) ifTrue:
[^InstanceVariableNode new
name: proposedVariable
index: (encoder classEncoding allInstVarNames indexOf: proposedVariable)].
"If we can't ask the user for correction, make it undeclared"
self interactive ifFalse: [^encoder undeclared: proposedVariable].
"First check to see if the requestor knows anything about the variable"
+ (binding := requestor bindingOf: proposedVariable)
+ ifNotNil: [^encoder global: binding name: proposedVariable].
- tempIvar := proposedVariable first isLowercase.
- (tempIvar and: [(binding := requestor bindingOf: proposedVariable) notNil])
- ifTrue: [^encoder global: binding name: proposedVariable].
userSelection := requestor selectionInterval.
requestor selectFrom: spot first to: spot last.
requestor select.
"Build the menu with alternatives"
action := UndeclaredVariable
signalFor: self
name: proposedVariable
inRange: spot.
action ifNil: [^self fail].
"Execute the selected action"
requestor deselect.
requestor selectInvisiblyFrom: userSelection first to: userSelection last.
^action value!
Torsten Bergmann uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-tbn.344.mcz
==================== Summary ====================
Name: System-tbn.344
Author: tbn
Time: 22 June 2010, 10:51:39.351 am
UUID: 5f532634-f21d-ed42-9397-c7512e757b03
Ancestors: System-ar.343
recategorize #isRunningCog under vm
=============== Diff against System-ar.343 ===============
Item was changed:
+ ----- Method: SmalltalkImage>>isRunningCog (in category 'vm') -----
- ----- Method: SmalltalkImage>>isRunningCog (in category 'sources, changes log') -----
isRunningCog
"Returns true if we're running Cog"
^[(self vmParameterAt: 46) > 0] on: Error do:[:ex| ex return: false]!
Torsten Bergmann uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-tbn.344.mcz
==================== Summary ====================
Name: System-tbn.344
Author: tbn
Time: 22 June 2010, 10:51:39.351 am
UUID: 5f532634-f21d-ed42-9397-c7512e757b03
Ancestors: System-ar.343
recategorize #isRunningCog under vm
=============== Diff against System-ar.343 ===============
Item was changed:
+ ----- Method: SmalltalkImage>>isRunningCog (in category 'vm') -----
- ----- Method: SmalltalkImage>>isRunningCog (in category 'sources, changes log') -----
isRunningCog
"Returns true if we're running Cog"
^[(self vmParameterAt: 46) > 0] on: Error do:[:ex| ex return: false]!
Torsten Bergmann uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-tbn.344.mcz
==================== Summary ====================
Name: System-tbn.344
Author: tbn
Time: 22 June 2010, 10:51:39.351 am
UUID: 5f532634-f21d-ed42-9397-c7512e757b03
Ancestors: System-ar.343
recategorize #isRunningCog under vm
=============== Diff against System-ar.343 ===============
Item was changed:
+ ----- Method: SmalltalkImage>>isRunningCog (in category 'vm') -----
- ----- Method: SmalltalkImage>>isRunningCog (in category 'sources, changes log') -----
isRunningCog
"Returns true if we're running Cog"
^[(self vmParameterAt: 46) > 0] on: Error do:[:ex| ex return: false]!
Andreas Raab uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-ar.343.mcz
==================== Summary ====================
Name: System-ar.343
Author: ar
Time: 21 June 2010, 8:36:36.846 pm
UUID: 178a99de-0c0e-7c42-bf93-a594eacce7aa
Ancestors: System-ar.342
Fixes an ancient issue when launching Squeak with a script as argument. The code the converted the script name to a file url was just utterly and horribly broken and could not possibly work. With the fix, one can now again start Squeak with arguments of the form:
squeak mysqueak.image file.st
squeak mysqueak.image scripts/file.st
squeak mysqueak.image ../../svn/scripts/file.st
(and of course any kind of URL)
=============== Diff against System-ar.342 ===============
Item was changed:
----- Method: ProjectLauncher>>startUpAfterLogin (in category 'running') -----
startUpAfterLogin
| scriptName loader isUrl |
self setupFlaps.
Preferences readDocumentAtStartup ifTrue: [
HTTPClient isRunningInBrowser ifTrue:[
self setupFromParameters.
scriptName := self parameterAt: 'src'.
CodeLoader defaultBaseURL: (self parameterAt: 'Base').
] ifFalse:[
scriptName := (Smalltalk documentPath) ifNil:[''].
scriptName := scriptName convertFromSystemString.
scriptName isEmpty ifFalse:[
"figure out if script name is a URL by itself"
isUrl := (scriptName asLowercase beginsWith:'http://') or:[
(scriptName asLowercase beginsWith:'file://') or:[
(scriptName asLowercase beginsWith:'ftp://')]].
+ isUrl ifFalse:[
+ "Allow for ../dir/scriptName arguments"
+ scriptName := (FileDirectory default uri
+ resolveRelativeURI: scriptName) asString]].
- isUrl ifFalse:[scriptName := 'file:',scriptName]].
]. ]
ifFalse: [ scriptName := '' ].
scriptName isEmptyOrNil
ifTrue:[^Preferences eToyFriendly ifTrue: [self currentWorld addGlobalFlaps]].
loader := CodeLoader new.
loader loadSourceFiles: (Array with: scriptName).
(scriptName asLowercase endsWith: '.pr')
ifTrue:[self installProjectFrom: loader]
ifFalse:[loader installSourceFiles].
!
Andreas Raab uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-ar.343.mcz
==================== Summary ====================
Name: System-ar.343
Author: ar
Time: 21 June 2010, 8:36:36.846 pm
UUID: 178a99de-0c0e-7c42-bf93-a594eacce7aa
Ancestors: System-ar.342
Fixes an ancient issue when launching Squeak with a script as argument. The code the converted the script name to a file url was just utterly and horribly broken and could not possibly work. With the fix, one can now again start Squeak with arguments of the form:
squeak mysqueak.image file.st
squeak mysqueak.image scripts/file.st
squeak mysqueak.image ../../svn/scripts/file.st
(and of course any kind of URL)
=============== Diff against System-ar.342 ===============
Item was changed:
----- Method: ProjectLauncher>>startUpAfterLogin (in category 'running') -----
startUpAfterLogin
| scriptName loader isUrl |
self setupFlaps.
Preferences readDocumentAtStartup ifTrue: [
HTTPClient isRunningInBrowser ifTrue:[
self setupFromParameters.
scriptName := self parameterAt: 'src'.
CodeLoader defaultBaseURL: (self parameterAt: 'Base').
] ifFalse:[
scriptName := (Smalltalk documentPath) ifNil:[''].
scriptName := scriptName convertFromSystemString.
scriptName isEmpty ifFalse:[
"figure out if script name is a URL by itself"
isUrl := (scriptName asLowercase beginsWith:'http://') or:[
(scriptName asLowercase beginsWith:'file://') or:[
(scriptName asLowercase beginsWith:'ftp://')]].
+ isUrl ifFalse:[
+ "Allow for ../dir/scriptName arguments"
+ scriptName := (FileDirectory default uri
+ resolveRelativeURI: scriptName) asString]].
- isUrl ifFalse:[scriptName := 'file:',scriptName]].
]. ]
ifFalse: [ scriptName := '' ].
scriptName isEmptyOrNil
ifTrue:[^Preferences eToyFriendly ifTrue: [self currentWorld addGlobalFlaps]].
loader := CodeLoader new.
loader loadSourceFiles: (Array with: scriptName).
(scriptName asLowercase endsWith: '.pr')
ifTrue:[self installProjectFrom: loader]
ifFalse:[loader installSourceFiles].
!