Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.700.mcz
==================== Summary ====================
Name: Kernel-eem.700
Author: eem
Time: 28 June 2012, 10:30:56.246 am
UUID: 18c57dcf-d75b-4c61-b5a3-67a9f8cfa4f6
Ancestors: Kernel-fbs.699
Back out of my bogus fix to runUntilErrorOrReturnFrom:.
My "fix" breaks non-local return in the debugger.
I can't find my original case that justified the new code
(although it was that in the debugger too much stack was
unwound), and so it needs to be backed-out and we need
to find good test cases to fix this correctly.
=============== Diff against Kernel-fbs.699 ===============
Item was changed:
----- Method: ContextPart>>runUntilErrorOrReturnFrom: (in category 'controlling') -----
runUntilErrorOrReturnFrom: aSender
"ASSUMES aSender is a sender of self. Execute self's stack until aSender returns or an unhandled exception is raised. Return a pair containing the new top context and a possibly nil exception. The exception is not nil if it was raised before aSender returned and it was not handled. The exception is returned rather than openning the debugger, giving the caller the choice of how to handle it."
"Self is run by jumping directly to it (the active process abandons thisContext and executes self). However, before jumping to self we insert an ensure block under aSender that jumps back to thisContext when evaluated. We also insert an exception handler under aSender that jumps back to thisContext when an unhandled exception is raised. In either case, the inserted ensure and exception handler are removed once control jumps back to thisContext."
+ | error ctxt here topContext |
- | error ctxt here topContext aSendersSender |
here := thisContext.
- aSendersSender := aSender sender.
"Insert ensure and exception handler contexts under aSender"
error := nil.
ctxt := aSender insertSender: (ContextPart
contextOn: UnhandledError do: [:ex |
error ifNil: [
error := ex exception.
topContext := thisContext.
ex resumeUnchecked: here jump]
ifNotNil: [ex pass]
]).
ctxt := ctxt insertSender: (ContextPart
contextEnsure: [error ifNil: [
topContext := thisContext.
here jump]
]).
self jump. "Control jumps to self"
"Control resumes here once above ensure block or exception handler is executed"
^ error ifNil: [
"No error was raised, remove ensure context by stepping until popped"
+ [ctxt isDead] whileFalse: [topContext := topContext stepToCallee].
+ {topContext. nil}
- [ctxt isDead or: [aSender isDead]] whileFalse: [topContext := topContext stepToCallee].
- ^{aSender isDead
- ifTrue:
- [| retValue |
- retValue := (ctxt method == (BlockClosure >> #ensure:)
- or: [ctxt method == (BlockClosure >> #ifCurtailed:)]) ifTrue:
- [ctxt tempAt: 3]. "returnValue in ensure: and result in ifCurtailed:"
- aSendersSender push: retValue.
- aSendersSender]
- ifFalse: [topContext].
- nil}
] ifNotNil: [
"Error was raised, remove inserted above contexts then return signaler context"
aSender terminateTo: ctxt sender. "remove above ensure and handler contexts"
{topContext. error}
].
!
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.700.mcz
==================== Summary ====================
Name: Kernel-eem.700
Author: eem
Time: 28 June 2012, 10:30:56.246 am
UUID: 18c57dcf-d75b-4c61-b5a3-67a9f8cfa4f6
Ancestors: Kernel-fbs.699
Back out of my bogus fix to runUntilErrorOrReturnFrom:.
My "fix" breaks non-local return in the debugger.
I can't find my original case that justified the new code
(although it was that in the debugger too much stack was
unwound), and so it needs to be backed-out and we need
to find good test cases to fix this correctly.
=============== Diff against Kernel-fbs.699 ===============
Item was changed:
----- Method: ContextPart>>runUntilErrorOrReturnFrom: (in category 'controlling') -----
runUntilErrorOrReturnFrom: aSender
"ASSUMES aSender is a sender of self. Execute self's stack until aSender returns or an unhandled exception is raised. Return a pair containing the new top context and a possibly nil exception. The exception is not nil if it was raised before aSender returned and it was not handled. The exception is returned rather than openning the debugger, giving the caller the choice of how to handle it."
"Self is run by jumping directly to it (the active process abandons thisContext and executes self). However, before jumping to self we insert an ensure block under aSender that jumps back to thisContext when evaluated. We also insert an exception handler under aSender that jumps back to thisContext when an unhandled exception is raised. In either case, the inserted ensure and exception handler are removed once control jumps back to thisContext."
+ | error ctxt here topContext |
- | error ctxt here topContext aSendersSender |
here := thisContext.
- aSendersSender := aSender sender.
"Insert ensure and exception handler contexts under aSender"
error := nil.
ctxt := aSender insertSender: (ContextPart
contextOn: UnhandledError do: [:ex |
error ifNil: [
error := ex exception.
topContext := thisContext.
ex resumeUnchecked: here jump]
ifNotNil: [ex pass]
]).
ctxt := ctxt insertSender: (ContextPart
contextEnsure: [error ifNil: [
topContext := thisContext.
here jump]
]).
self jump. "Control jumps to self"
"Control resumes here once above ensure block or exception handler is executed"
^ error ifNil: [
"No error was raised, remove ensure context by stepping until popped"
+ [ctxt isDead] whileFalse: [topContext := topContext stepToCallee].
+ {topContext. nil}
- [ctxt isDead or: [aSender isDead]] whileFalse: [topContext := topContext stepToCallee].
- ^{aSender isDead
- ifTrue:
- [| retValue |
- retValue := (ctxt method == (BlockClosure >> #ensure:)
- or: [ctxt method == (BlockClosure >> #ifCurtailed:)]) ifTrue:
- [ctxt tempAt: 3]. "returnValue in ensure: and result in ifCurtailed:"
- aSendersSender push: retValue.
- aSendersSender]
- ifFalse: [topContext].
- nil}
] ifNotNil: [
"Error was raised, remove inserted above contexts then return signaler context"
aSender terminateTo: ctxt sender. "remove above ensure and handler contexts"
{topContext. error}
].
!
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.700.mcz
==================== Summary ====================
Name: Kernel-eem.700
Author: eem
Time: 28 June 2012, 10:30:56.246 am
UUID: 18c57dcf-d75b-4c61-b5a3-67a9f8cfa4f6
Ancestors: Kernel-fbs.699
Back out of my bogus fix to runUntilErrorOrReturnFrom:.
My "fix" breaks non-local return in the debugger.
I can't find my original case that justified the new code
(although it was that in the debugger too much stack was
unwound), and so it needs to be backed-out and we need
to find good test cases to fix this correctly.
=============== Diff against Kernel-fbs.699 ===============
Item was changed:
----- Method: ContextPart>>runUntilErrorOrReturnFrom: (in category 'controlling') -----
runUntilErrorOrReturnFrom: aSender
"ASSUMES aSender is a sender of self. Execute self's stack until aSender returns or an unhandled exception is raised. Return a pair containing the new top context and a possibly nil exception. The exception is not nil if it was raised before aSender returned and it was not handled. The exception is returned rather than openning the debugger, giving the caller the choice of how to handle it."
"Self is run by jumping directly to it (the active process abandons thisContext and executes self). However, before jumping to self we insert an ensure block under aSender that jumps back to thisContext when evaluated. We also insert an exception handler under aSender that jumps back to thisContext when an unhandled exception is raised. In either case, the inserted ensure and exception handler are removed once control jumps back to thisContext."
+ | error ctxt here topContext |
- | error ctxt here topContext aSendersSender |
here := thisContext.
- aSendersSender := aSender sender.
"Insert ensure and exception handler contexts under aSender"
error := nil.
ctxt := aSender insertSender: (ContextPart
contextOn: UnhandledError do: [:ex |
error ifNil: [
error := ex exception.
topContext := thisContext.
ex resumeUnchecked: here jump]
ifNotNil: [ex pass]
]).
ctxt := ctxt insertSender: (ContextPart
contextEnsure: [error ifNil: [
topContext := thisContext.
here jump]
]).
self jump. "Control jumps to self"
"Control resumes here once above ensure block or exception handler is executed"
^ error ifNil: [
"No error was raised, remove ensure context by stepping until popped"
+ [ctxt isDead] whileFalse: [topContext := topContext stepToCallee].
+ {topContext. nil}
- [ctxt isDead or: [aSender isDead]] whileFalse: [topContext := topContext stepToCallee].
- ^{aSender isDead
- ifTrue:
- [| retValue |
- retValue := (ctxt method == (BlockClosure >> #ensure:)
- or: [ctxt method == (BlockClosure >> #ifCurtailed:)]) ifTrue:
- [ctxt tempAt: 3]. "returnValue in ensure: and result in ifCurtailed:"
- aSendersSender push: retValue.
- aSendersSender]
- ifFalse: [topContext].
- nil}
] ifNotNil: [
"Error was raised, remove inserted above contexts then return signaler context"
aSender terminateTo: ctxt sender. "remove above ensure and handler contexts"
{topContext. error}
].
!
Eliot Miranda uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-eem.131.mcz
==================== Summary ====================
Name: Network-eem.131
Author: eem
Time: 28 June 2012, 8:58:07.094 am
UUID: df89a3e5-a9c1-46d0-a2fa-39d72e105cda
Ancestors: Network-dtl.130
Add some Croquet URI manipulation routines used by the
Cog VMMaker to the base Network package.
=============== Diff against Network-dtl.130 ===============
Item was added:
+ ----- Method: DosFileDirectory>>uriPathToPlatformPath: (in category '*network-uri') -----
+ uriPathToPlatformPath: aString
+ "Convert a URI path (w/ forward slashes) into a platform path if necessary.
+ Also make sure we deal properly with shares vs. drives"
+ | parts |
+ parts := aString findTokens: '/'.
+ (parts first endsWith: ':') ifTrue:[
+ "it's a drive - compose c:\foo\bar"
+ ^aString allButFirst copyReplaceAll: '/' with: '\'
+ ] ifFalse:[
+ "it's a share - compose \\share\foo\bar"
+ ^'\', (aString copyReplaceAll: '/' with: '\')
+ ].!
Item was added:
+ ----- Method: FileDirectory>>pathFromURI: (in category '*network-uri') -----
+ pathFromURI: aString
+ | path |
+ aString class == Array ifTrue:["bullet-proofing"
+ ^FileDirectory pathFrom: {self pathName}, aString].
+ "To support paths like foo/bar/user#2.doc, use #allButScheme instead of #path"
+ path := (self uri resolveRelativeURI: aString) allButScheme.
+ ^self uriPathToPlatformPath: path
+ !
Item was added:
+ ----- Method: FileDirectory>>uriPathToPlatformPath: (in category '*network-uri') -----
+ uriPathToPlatformPath: aString
+ "Convert a URI path (w/ forward slashes) into a platform path if necessary"
+ ^aString!
Item was added:
+ ----- Method: HierarchicalURI>>allButScheme (in category 'printing') -----
+ allButScheme
+ "Answer the entire url except its scheme"
+
+ ^String streamContents:[:s|
+ authority ifNotNil:[self authority printOn: s].
+ s nextPutAll: super allButScheme.
+ query ifNotNil:[s nextPutAll: query].
+ ].!
Item was added:
+ ----- Method: URI>>allButScheme (in category 'printing') -----
+ allButScheme
+ "Answer the entire url except its scheme"
+
+ ^String streamContents:[:s|
+ s nextPutAll: schemeSpecificPart.
+ fragment ifNotNil: [
+ s nextPut: $# .
+ s nextPutAll: self fragment]
+ ].!
Eliot Miranda uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-eem.131.mcz
==================== Summary ====================
Name: Network-eem.131
Author: eem
Time: 28 June 2012, 8:58:07.094 am
UUID: df89a3e5-a9c1-46d0-a2fa-39d72e105cda
Ancestors: Network-dtl.130
Add some Croquet URI manipulation routines used by the
Cog VMMaker to the base Network package.
=============== Diff against Network-dtl.130 ===============
Item was added:
+ ----- Method: DosFileDirectory>>uriPathToPlatformPath: (in category '*network-uri') -----
+ uriPathToPlatformPath: aString
+ "Convert a URI path (w/ forward slashes) into a platform path if necessary.
+ Also make sure we deal properly with shares vs. drives"
+ | parts |
+ parts := aString findTokens: '/'.
+ (parts first endsWith: ':') ifTrue:[
+ "it's a drive - compose c:\foo\bar"
+ ^aString allButFirst copyReplaceAll: '/' with: '\'
+ ] ifFalse:[
+ "it's a share - compose \\share\foo\bar"
+ ^'\', (aString copyReplaceAll: '/' with: '\')
+ ].!
Item was added:
+ ----- Method: FileDirectory>>pathFromURI: (in category '*network-uri') -----
+ pathFromURI: aString
+ | path |
+ aString class == Array ifTrue:["bullet-proofing"
+ ^FileDirectory pathFrom: {self pathName}, aString].
+ "To support paths like foo/bar/user#2.doc, use #allButScheme instead of #path"
+ path := (self uri resolveRelativeURI: aString) allButScheme.
+ ^self uriPathToPlatformPath: path
+ !
Item was added:
+ ----- Method: FileDirectory>>uriPathToPlatformPath: (in category '*network-uri') -----
+ uriPathToPlatformPath: aString
+ "Convert a URI path (w/ forward slashes) into a platform path if necessary"
+ ^aString!
Item was added:
+ ----- Method: HierarchicalURI>>allButScheme (in category 'printing') -----
+ allButScheme
+ "Answer the entire url except its scheme"
+
+ ^String streamContents:[:s|
+ authority ifNotNil:[self authority printOn: s].
+ s nextPutAll: super allButScheme.
+ query ifNotNil:[s nextPutAll: query].
+ ].!
Item was added:
+ ----- Method: URI>>allButScheme (in category 'printing') -----
+ allButScheme
+ "Answer the entire url except its scheme"
+
+ ^String streamContents:[:s|
+ s nextPutAll: schemeSpecificPart.
+ fragment ifNotNil: [
+ s nextPut: $# .
+ s nextPutAll: self fragment]
+ ].!
Eliot Miranda uploaded a new version of Network to project The Trunk:
http://source.squeak.org/trunk/Network-eem.131.mcz
==================== Summary ====================
Name: Network-eem.131
Author: eem
Time: 28 June 2012, 8:58:07.094 am
UUID: df89a3e5-a9c1-46d0-a2fa-39d72e105cda
Ancestors: Network-dtl.130
Add some Croquet URI manipulation routines used by the
Cog VMMaker to the base Network package.
=============== Diff against Network-dtl.130 ===============
Item was added:
+ ----- Method: DosFileDirectory>>uriPathToPlatformPath: (in category '*network-uri') -----
+ uriPathToPlatformPath: aString
+ "Convert a URI path (w/ forward slashes) into a platform path if necessary.
+ Also make sure we deal properly with shares vs. drives"
+ | parts |
+ parts := aString findTokens: '/'.
+ (parts first endsWith: ':') ifTrue:[
+ "it's a drive - compose c:\foo\bar"
+ ^aString allButFirst copyReplaceAll: '/' with: '\'
+ ] ifFalse:[
+ "it's a share - compose \\share\foo\bar"
+ ^'\', (aString copyReplaceAll: '/' with: '\')
+ ].!
Item was added:
+ ----- Method: FileDirectory>>pathFromURI: (in category '*network-uri') -----
+ pathFromURI: aString
+ | path |
+ aString class == Array ifTrue:["bullet-proofing"
+ ^FileDirectory pathFrom: {self pathName}, aString].
+ "To support paths like foo/bar/user#2.doc, use #allButScheme instead of #path"
+ path := (self uri resolveRelativeURI: aString) allButScheme.
+ ^self uriPathToPlatformPath: path
+ !
Item was added:
+ ----- Method: FileDirectory>>uriPathToPlatformPath: (in category '*network-uri') -----
+ uriPathToPlatformPath: aString
+ "Convert a URI path (w/ forward slashes) into a platform path if necessary"
+ ^aString!
Item was added:
+ ----- Method: HierarchicalURI>>allButScheme (in category 'printing') -----
+ allButScheme
+ "Answer the entire url except its scheme"
+
+ ^String streamContents:[:s|
+ authority ifNotNil:[self authority printOn: s].
+ s nextPutAll: super allButScheme.
+ query ifNotNil:[s nextPutAll: query].
+ ].!
Item was added:
+ ----- Method: URI>>allButScheme (in category 'printing') -----
+ allButScheme
+ "Answer the entire url except its scheme"
+
+ ^String streamContents:[:s|
+ s nextPutAll: schemeSpecificPart.
+ fragment ifNotNil: [
+ s nextPut: $# .
+ s nextPutAll: self fragment]
+ ].!
Bert Freudenberg uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-bf.89.mcz
==================== Summary ====================
Name: EToys-bf.89
Author: bf
Time: 27 June 2012, 12:01:21.329 am
UUID: 61a6aa3b-57c9-4b8e-9b35-c7bd9698e035
Ancestors: EToys-cmm.88
Remove UndefinedObject>>initialize, and add it back as class-side method of GeeMailMorph, where it was before.
=============== Diff against EToys-cmm.88 ===============
Item was removed:
- (PackageInfo named: 'EToys') preamble: '"below, add code to be run before the loading of this package"'!
Item was added:
+ ----- Method: GeeMailMorph class>>initialize (in category '*etoys-customevents-user events') -----
+ initialize
+ "AlansTextPlusMorph initialize"
+ ScriptingSystem addCustomEventFor: self named: #scrolledIntoView help: 'when I am scrolled into view in a GeeMailMorph' targetMorphClass: Morph.
+ ScriptingSystem addCustomEventFor: self named: #scrolledOutOfView help: 'when I am scrolled out of view in a GeeMailMorph' targetMorphClass: Morph.
+ !
Item was added:
+ ----- Method: GeeMailMorph class>>unload (in category '*etoys-customevents-user events') -----
+ unload
+ ScriptingSystem removeCustomEventNamed: #scrolledIntoView for: self.
+ ScriptingSystem removeCustomEventNamed: #scrolledOutOfView for: self.!
Item was removed:
- ----- Method: UndefinedObject>>initialize (in category '*Etoys-*Morphic-customevents-class initialization') -----
- initialize
- "AlansTextPlusMorph initialize"
- ScriptingSystem addCustomEventFor: self named: #scrolledIntoView help: 'when I am scrolled into view in a GeeMailMorph' targetMorphClass: Morph.
- ScriptingSystem addCustomEventFor: self named: #scrolledOutOfView help: 'when I am scrolled out of view in a GeeMailMorph' targetMorphClass: Morph.
- !
Item was removed:
- (PackageInfo named: 'EToys') preambleOfRemoval: '"below, add code to prepare for the unloading of this package"'!
Item was removed:
- (PackageInfo named: 'EToys') postscript: '"below, add code to be run after the loading of this package"'!
Bert Freudenberg uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-bf.89.mcz
==================== Summary ====================
Name: EToys-bf.89
Author: bf
Time: 27 June 2012, 12:01:21.329 am
UUID: 61a6aa3b-57c9-4b8e-9b35-c7bd9698e035
Ancestors: EToys-cmm.88
Remove UndefinedObject>>initialize, and add it back as class-side method of GeeMailMorph, where it was before.
=============== Diff against EToys-cmm.88 ===============
Item was removed:
- (PackageInfo named: 'EToys') preamble: '"below, add code to be run before the loading of this package"'!
Item was added:
+ ----- Method: GeeMailMorph class>>initialize (in category '*etoys-customevents-user events') -----
+ initialize
+ "AlansTextPlusMorph initialize"
+ ScriptingSystem addCustomEventFor: self named: #scrolledIntoView help: 'when I am scrolled into view in a GeeMailMorph' targetMorphClass: Morph.
+ ScriptingSystem addCustomEventFor: self named: #scrolledOutOfView help: 'when I am scrolled out of view in a GeeMailMorph' targetMorphClass: Morph.
+ !
Item was added:
+ ----- Method: GeeMailMorph class>>unload (in category '*etoys-customevents-user events') -----
+ unload
+ ScriptingSystem removeCustomEventNamed: #scrolledIntoView for: self.
+ ScriptingSystem removeCustomEventNamed: #scrolledOutOfView for: self.!
Item was removed:
- ----- Method: UndefinedObject>>initialize (in category '*Etoys-*Morphic-customevents-class initialization') -----
- initialize
- "AlansTextPlusMorph initialize"
- ScriptingSystem addCustomEventFor: self named: #scrolledIntoView help: 'when I am scrolled into view in a GeeMailMorph' targetMorphClass: Morph.
- ScriptingSystem addCustomEventFor: self named: #scrolledOutOfView help: 'when I am scrolled out of view in a GeeMailMorph' targetMorphClass: Morph.
- !
Item was removed:
- (PackageInfo named: 'EToys') preambleOfRemoval: '"below, add code to prepare for the unloading of this package"'!
Item was removed:
- (PackageInfo named: 'EToys') postscript: '"below, add code to be run after the loading of this package"'!
Bert Freudenberg uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-bf.89.mcz
==================== Summary ====================
Name: EToys-bf.89
Author: bf
Time: 27 June 2012, 12:01:21.329 am
UUID: 61a6aa3b-57c9-4b8e-9b35-c7bd9698e035
Ancestors: EToys-cmm.88
Remove UndefinedObject>>initialize, and add it back as class-side method of GeeMailMorph, where it was before.
=============== Diff against EToys-cmm.88 ===============
Item was removed:
- (PackageInfo named: 'EToys') preamble: '"below, add code to be run before the loading of this package"'!
Item was added:
+ ----- Method: GeeMailMorph class>>initialize (in category '*etoys-customevents-user events') -----
+ initialize
+ "AlansTextPlusMorph initialize"
+ ScriptingSystem addCustomEventFor: self named: #scrolledIntoView help: 'when I am scrolled into view in a GeeMailMorph' targetMorphClass: Morph.
+ ScriptingSystem addCustomEventFor: self named: #scrolledOutOfView help: 'when I am scrolled out of view in a GeeMailMorph' targetMorphClass: Morph.
+ !
Item was added:
+ ----- Method: GeeMailMorph class>>unload (in category '*etoys-customevents-user events') -----
+ unload
+ ScriptingSystem removeCustomEventNamed: #scrolledIntoView for: self.
+ ScriptingSystem removeCustomEventNamed: #scrolledOutOfView for: self.!
Item was removed:
- ----- Method: UndefinedObject>>initialize (in category '*Etoys-*Morphic-customevents-class initialization') -----
- initialize
- "AlansTextPlusMorph initialize"
- ScriptingSystem addCustomEventFor: self named: #scrolledIntoView help: 'when I am scrolled into view in a GeeMailMorph' targetMorphClass: Morph.
- ScriptingSystem addCustomEventFor: self named: #scrolledOutOfView help: 'when I am scrolled out of view in a GeeMailMorph' targetMorphClass: Morph.
- !
Item was removed:
- (PackageInfo named: 'EToys') preambleOfRemoval: '"below, add code to prepare for the unloading of this package"'!
Item was removed:
- (PackageInfo named: 'EToys') postscript: '"below, add code to be run after the loading of this package"'!