Chris Muller uploaded a new version of Environments to project Squeak 4.5:
http://source.squeak.org/squeak45/Environments-cwp.47.mcz ==================== Summary ==================== Name: Environments-cwp.47 Author: cwp Time: 22 March 2014, 7:53:17.666 pm UUID: 12e68b45-ec35-4eff-985b-8008d6f03339 Ancestors: Environments-ul.46 Rename EnvironmentRequest to CurrentEnvironment and use it to implement Environment class>>current. =============== Diff against Environments-ul.46 =============== Item was added: + Notification subclass: #CurrentEnvironment + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'Environments-Loading'! Item was added: + ----- Method: Environment class>>current (in category 'accessing') ----- + current + ^ CurrentEnvironment signal ifNil: [self default]! Item was changed: ----- Method: EnvironmentLoader>>evaluate: (in category 'as yet unclassified') ----- evaluate: chunk ^ [Compiler evaluate: chunk environment: environment] + on: CurrentEnvironment - on: EnvironmentRequest do: [:req | req resume: environment]! Item was changed: ----- Method: EnvironmentLoader>>evaluate:logged: (in category 'as yet unclassified') ----- evaluate: chunk logged: aBoolean ^ [Compiler evaluate: chunk environment: environment logged: aBoolean] + on: CurrentEnvironment - on: EnvironmentRequest do: [:req | req resume: environment]! Item was removed: - Notification subclass: #EnvironmentRequest - instanceVariableNames: '' - classVariableNames: '' - poolDictionaries: '' - category: 'Environments-Loading'! |
Woulnd't it be better to make that a
dynamic variable? Because it is used as such? I think this would save some stackwalking. (why do I think so? I looks too similar to Seaside’s use of Dynamic variables) Best -Tobias On 06.05.2014, at 17:54, [hidden email] wrote: > Chris Muller uploaded a new version of Environments to project Squeak 4.5: > http://source.squeak.org/squeak45/Environments-cwp.47.mcz > > ==================== Summary ==================== > > Name: Environments-cwp.47 > Author: cwp > Time: 22 March 2014, 7:53:17.666 pm > UUID: 12e68b45-ec35-4eff-985b-8008d6f03339 > Ancestors: Environments-ul.46 > > Rename EnvironmentRequest to CurrentEnvironment and use it to implement Environment class>>current. > > =============== Diff against Environments-ul.46 =============== > > Item was added: > + Notification subclass: #CurrentEnvironment > + instanceVariableNames: '' > + classVariableNames: '' > + poolDictionaries: '' > + category: 'Environments-Loading'! > > Item was added: > + ----- Method: Environment class>>current (in category 'accessing') ----- > + current > + ^ CurrentEnvironment signal ifNil: [self default]! > > Item was changed: > ----- Method: EnvironmentLoader>>evaluate: (in category 'as yet unclassified') ----- > evaluate: chunk > ^ [Compiler evaluate: chunk environment: environment] > + on: CurrentEnvironment > - on: EnvironmentRequest > do: [:req | req resume: environment]! > > Item was changed: > ----- Method: EnvironmentLoader>>evaluate:logged: (in category 'as yet unclassified') ----- > evaluate: chunk logged: aBoolean > ^ [Compiler evaluate: chunk environment: environment logged: aBoolean] > + on: CurrentEnvironment > - on: EnvironmentRequest > do: [:req | req resume: environment]! > > Item was removed: > - Notification subclass: #EnvironmentRequest > - instanceVariableNames: '' > - classVariableNames: '' > - poolDictionaries: '' > - category: 'Environments-Loading'! > > signature.asc (1K) Download Attachment |
On 6 May 2014 19:40, Tobias Pape <[hidden email]> wrote:
> Woulnd't it be better to make that a > dynamic variable? Because it is used as such? > I think this would save some stackwalking. > > (why do I think so? I looks too similar to Seaside’s > use of Dynamic variables) It is indeed a dynamic variable. It's a _delimited_ dynamic variable, if you want to get super picky. Last time I checked Seaside used an on:do: to cut the WaPartialContinuation out of the stack. (I'm running on memory that's possibly 5 years old. Things might have changed.) Either way, this is exactly the right kind of dynamic variable. The DynamicVariable/process-local variable is the wrong kind of dynamic variable, the undelimited kind. It catches the _entire_ dynamic scope of a variable and thus is incompatible with continuations and stack slicing. Which we happen to do a lot, in Smalltalk. Now there is definitely scope to talk about whether we can improve the stack-walking. It's what Henry Baker would call "deep binding" [1], and if I understand correctly, we'd need to make some seriously deep interventions to implement shallow binding (which has a much lower read cost). frank [1] http://home.pipeline.com/~hbaker1/ShallowBinding.html > Best > -Tobias > > On 06.05.2014, at 17:54, [hidden email] wrote: > >> Chris Muller uploaded a new version of Environments to project Squeak 4.5: >> http://source.squeak.org/squeak45/Environments-cwp.47.mcz >> >> ==================== Summary ==================== >> >> Name: Environments-cwp.47 >> Author: cwp >> Time: 22 March 2014, 7:53:17.666 pm >> UUID: 12e68b45-ec35-4eff-985b-8008d6f03339 >> Ancestors: Environments-ul.46 >> >> Rename EnvironmentRequest to CurrentEnvironment and use it to implement Environment class>>current. >> >> =============== Diff against Environments-ul.46 =============== >> >> Item was added: >> + Notification subclass: #CurrentEnvironment >> + instanceVariableNames: '' >> + classVariableNames: '' >> + poolDictionaries: '' >> + category: 'Environments-Loading'! >> >> Item was added: >> + ----- Method: Environment class>>current (in category 'accessing') ----- >> + current >> + ^ CurrentEnvironment signal ifNil: [self default]! >> >> Item was changed: >> ----- Method: EnvironmentLoader>>evaluate: (in category 'as yet unclassified') ----- >> evaluate: chunk >> ^ [Compiler evaluate: chunk environment: environment] >> + on: CurrentEnvironment >> - on: EnvironmentRequest >> do: [:req | req resume: environment]! >> >> Item was changed: >> ----- Method: EnvironmentLoader>>evaluate:logged: (in category 'as yet unclassified') ----- >> evaluate: chunk logged: aBoolean >> ^ [Compiler evaluate: chunk environment: environment logged: aBoolean] >> + on: CurrentEnvironment >> - on: EnvironmentRequest >> do: [:req | req resume: environment]! >> >> Item was removed: >> - Notification subclass: #EnvironmentRequest >> - instanceVariableNames: '' >> - classVariableNames: '' >> - poolDictionaries: '' >> - category: 'Environments-Loading'! >> >> > > > > |
On 06.05.2014, at 22:33, Frank Shearar <[hidden email]> wrote: > On 6 May 2014 19:40, Tobias Pape <[hidden email]> wrote: >> Woulnd't it be better to make that a >> dynamic variable? Because it is used as such? >> I think this would save some stackwalking. >> >> (why do I think so? I looks too similar to Seaside’s >> use of Dynamic variables) > > It is indeed a dynamic variable. It's a _delimited_ dynamic variable, > if you want to get super picky. Last time I checked Seaside used an > on:do: to cut the WaPartialContinuation out of the stack. (I'm running > on memory that's possibly 5 years old. Things might have changed.) > > Either way, this is exactly the right kind of dynamic variable. The > DynamicVariable/process-local variable is the wrong kind of dynamic > variable, the undelimited kind. It catches the _entire_ dynamic scope > of a variable and thus is incompatible with continuations and stack > slicing. Which we happen to do a lot, in Smalltalk. > > Now there is definitely scope to talk about whether we can improve the > stack-walking. It's what Henry Baker would call "deep binding" [1], > and if I understand correctly, we'd need to make some seriously deep > interventions to implement shallow binding (which has a much lower > read cost). > > frank > > [1] http://home.pipeline.com/~hbaker1/ShallowBinding.html Best -Tobias signature.asc (1K) Download Attachment |
Free forum by Nabble | Edit this page |