-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for issue 1198: Restore of partial continuations does not preserv…
…e GsProcess environment, breaking dynamic variables (#1201) * Preserve GSProcess.environment across restore of partial continuation (fixes issue #1198) * Fix for workaround in GRGemStonePlatform>>seasideSupendFlowDo: such that we only try to overwrite the environment when control is returned here as the result of restoring the partial continuation. * Fix functional tests for running in Gemstone + add workaround fix to the partial continuation tests * Converted use of Dictionary instance to use of a proper class (WAGemStoneProcessEnvironmentWrapper) in the implementation for the workaround for github issue 1198. Added a test for the specific case. * do not use latestMetacello setting for gemstone builds
- Loading branch information
Showing
205 changed files
with
1,902 additions
and
893 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
repository/Seaside-GemStone-Continuation.package/GRPackage.extension/methodProperties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"class" : { | ||
"seasideGemStoneContinuation" : "JohanBrichau 05/24/2020 08:27:30" }, | ||
"instance" : { | ||
} } |
5 changes: 5 additions & 0 deletions
5
repository/Seaside-GemStone-Continuation.package/GsProcess.extension/methodProperties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"class" : { | ||
}, | ||
"instance" : { | ||
"valueWithPossibleArguments:" : "JohanBrichau 05/24/2020 08:27:30" } } |
3 changes: 3 additions & 0 deletions
3
...de-GemStone-Continuation.package/Object.extension/instance/isProcessEnvironmentWrapper.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*seaside-gemstone-continuation | ||
isProcessEnvironmentWrapper | ||
^ false |
5 changes: 5 additions & 0 deletions
5
repository/Seaside-GemStone-Continuation.package/Object.extension/methodProperties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"class" : { | ||
}, | ||
"instance" : { | ||
"isProcessEnvironmentWrapper" : "JohanBrichau 06/27/2020 04:11" } } |
2 changes: 2 additions & 0 deletions
2
repository/Seaside-GemStone-Continuation.package/Object.extension/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{ | ||
"name" : "Object" } |
11 changes: 11 additions & 0 deletions
11
repository/Seaside-GemStone-Continuation.package/WAContinuation.class/methodProperties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"class" : { | ||
"current" : "JohanBrichau 05/24/2020 08:27:30", | ||
"currentDo:" : "JohanBrichau 05/24/2020 08:27:30", | ||
"fromContinuation:" : "JohanBrichau 05/24/2020 08:27:30" }, | ||
"instance" : { | ||
"initializeFromContinuation:" : "JohanBrichau 05/24/2020 08:27:30", | ||
"numArgs" : "JohanBrichau 05/24/2020 08:27:30", | ||
"value" : "JohanBrichau 05/24/2020 08:27:30", | ||
"value:" : "JohanBrichau 05/24/2020 08:27:30", | ||
"valueWithArguments:" : "JohanBrichau 05/24/2020 08:27:30" } } |
1 change: 1 addition & 0 deletions
1
...mStone-Continuation.package/WAGemStoneProcessEnvironmentWrapper.class/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
I am a helper to implement a workaround to pass the environment of the GsProcess where a partial continuation is restored, such that GRDynamicVariable works as expected in the presence of partial continuations. See https://github.com/SeasideSt/Seaside/issues/1198 |
3 changes: 3 additions & 0 deletions
3
...nuation.package/WAGemStoneProcessEnvironmentWrapper.class/class/withEnvironment.value..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
instance creation | ||
withEnvironment: aProcessEnvironment value: anObject | ||
^ self basicNew environment: aProcessEnvironment value: anObject |
4 changes: 4 additions & 0 deletions
4
...inuation.package/WAGemStoneProcessEnvironmentWrapper.class/instance/environment.value..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
initialization | ||
environment: aProcessEnvironment value: anObject | ||
environment := aProcessEnvironment. | ||
value := anObject |
3 changes: 3 additions & 0 deletions
3
...package/WAGemStoneProcessEnvironmentWrapper.class/instance/isProcessEnvironmentWrapper.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
testing | ||
isProcessEnvironmentWrapper | ||
^ true |
4 changes: 4 additions & 0 deletions
4
...ge/WAGemStoneProcessEnvironmentWrapper.class/instance/restoreEnvironmentAndReturnValue.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
accessing | ||
restoreEnvironmentAndReturnValue | ||
Processor activeProcess environment: environment. | ||
^ value |
7 changes: 7 additions & 0 deletions
7
...tone-Continuation.package/WAGemStoneProcessEnvironmentWrapper.class/methodProperties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"class" : { | ||
"withEnvironment:value:" : "JohanBrichau 06/27/2020 04:04" }, | ||
"instance" : { | ||
"environment:value:" : "JohanBrichau 06/27/2020 04:03", | ||
"isProcessEnvironmentWrapper" : "JohanBrichau 06/27/2020 04:10", | ||
"restoreEnvironmentAndReturnValue" : "JohanBrichau 06/27/2020 04:12" } } |
15 changes: 15 additions & 0 deletions
15
...e-GemStone-Continuation.package/WAGemStoneProcessEnvironmentWrapper.class/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"category" : "Seaside-GemStone-Continuation", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "JohanBrichau 06/27/2020 04:14", | ||
"instvars" : [ | ||
"environment", | ||
"value" ], | ||
"name" : "WAGemStoneProcessEnvironmentWrapper", | ||
"pools" : [ | ||
], | ||
"super" : "Object", | ||
"type" : "normal" } |
5 changes: 5 additions & 0 deletions
5
...sitory/Seaside-GemStone-Continuation.package/WAMarkerNotFound.class/methodProperties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"class" : { | ||
}, | ||
"instance" : { | ||
} } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 15 additions & 13 deletions
28
...tory/Seaside-GemStone-Continuation.package/WAPartialContinuation.class/instance/value..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
evaluating | ||
value: anObject | ||
|
||
| marker frameIndex | | ||
marker := self markerBlock value. | ||
marker isNil | ||
ifTrue: [ | ||
marker := ((GsProcess _frameContentsAt: 2) at: 1). | ||
frameIndex := 2 ] | ||
ifFalse: [ frameIndex := self class findFrameIndexFor: marker ]. | ||
^GsProcess | ||
installPartialContinuation: partial | ||
atLevel: frameIndex | ||
value: anObject | ||
value: anObject | ||
| marker frameIndex | | ||
marker := self markerBlock value. | ||
marker isNil | ||
ifTrue: [ | ||
marker := (GsProcess _frameContentsAt: 2) at: 1. | ||
frameIndex := 2 ] | ||
ifFalse: [ frameIndex := self class findFrameIndexFor: marker ]. "We not only pass through the result value when restoring the continuation, but also the current process environment as a workaround to restore the environment once the partial continuation is restored. This is needed to keep GRDynamicVariable working." | ||
^ GsProcess | ||
installPartialContinuation: partial | ||
atLevel: frameIndex | ||
value: | ||
(WAGemStoneProcessEnvironmentWrapper | ||
withEnvironment: Processor activeProcess environment | ||
value: anObject) |
13 changes: 13 additions & 0 deletions
13
...y/Seaside-GemStone-Continuation.package/WAPartialContinuation.class/methodProperties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"class" : { | ||
"currentDo:markerBlock:" : "JohanBrichau 05/24/2020 08:27:30", | ||
"findFrameIndexFor:" : "JohanBrichau 05/24/2020 08:27:30", | ||
"to:offset:markerBlock:" : "JohanBrichau 05/24/2020 08:27:30" }, | ||
"instance" : { | ||
"markerBlock" : "JohanBrichau 05/24/2020 08:27:30", | ||
"markerBlock:" : "JohanBrichau 05/24/2020 08:27:30", | ||
"value" : "JohanBrichau 05/24/2020 08:27:30", | ||
"value:" : "JohanBrichau 06/27/2020 04:07", | ||
"valueWithArguments:" : "JohanBrichau 05/24/2020 08:27:30", | ||
"valueWithPossibleArguments:" : "JohanBrichau 05/24/2020 08:27:30", | ||
"with:" : "JohanBrichau 05/24/2020 08:27:30" } } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.