-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
138 additions
and
30 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
src/ActiveExpressions-Core.package/ActiveExpression.class/class/compilerClass.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 @@ | ||
instance creation | ||
compilerClass | ||
|
||
^ Compiler |
2 changes: 1 addition & 1 deletion
2
src/ActiveExpressions-Core.package/ActiveExpression.class/instance/callbacksEnabled.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,4 +1,4 @@ | ||
accessing | ||
callbacksEnabled | ||
|
||
^ callbacksEnabled ifNil: [callbacksEnabled := true] | ||
^ callbacksEnabled ifNil: [true] |
2 changes: 1 addition & 1 deletion
2
src/ActiveExpressions-Core.package/ActiveExpression.class/instance/updateLastValue.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,4 +1,4 @@ | ||
change | ||
updateLastValue | ||
|
||
self setLastValue: self currentValue | ||
self subclassResponsibility |
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
Empty file.
4 changes: 4 additions & 0 deletions
4
src/ActiveExpressions-Core.package/ManualActiveExpression.class/instance/updateLastValue.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 @@ | ||
change | ||
updateLastValue | ||
|
||
self setLastValue: self currentValue |
5 changes: 5 additions & 0 deletions
5
src/ActiveExpressions-Core.package/ManualActiveExpression.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" : { | ||
"updateLastValue" : "sl 2/25/2019 13:18" } } |
14 changes: 14 additions & 0 deletions
14
src/ActiveExpressions-Core.package/ManualActiveExpression.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,14 @@ | ||
{ | ||
"category" : "ActiveExpressions-Core", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "", | ||
"instvars" : [ | ||
], | ||
"name" : "ManualActiveExpression", | ||
"pools" : [ | ||
], | ||
"super" : "ActiveExpression", | ||
"type" : "normal" } |
8 changes: 7 additions & 1 deletion
8
src/ActiveExpressions-Core.package/VarTraActiveExpression.class/instance/updateLastValue.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,4 +1,10 @@ | ||
change detection | ||
updateLastValue | ||
|
||
self updateSubscriptionsAndLastValue | ||
| simulator | | ||
simulator := AxSimulator new. | ||
[simulator simulate: [monitoredBlock value]. | ||
self updateSubscriptions: simulator] | ||
on: Error | ||
do: [^ self]. | ||
self setLastValue: simulator result |
11 changes: 0 additions & 11 deletions
11
...ons-Core.package/VarTraActiveExpression.class/instance/updateSubscriptionsAndLastValue.st
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
(name 'ActiveExpressions-Core-sl.3' message 'empty log message' id '9aa1eb9e-e325-4bde-bc51-f7868a4fc4ad' date '11 October 2018' time '12:52:43.435234 pm' author 'sl' ancestors ((name 'ActiveExpressions-Core-sl.2' message 'empty log message' id '41ca1443-0aeb-4357-823d-106bb24155a2' date '10 October 2018' time '10:35:53.535738 pm' author 'sl' ancestors ((name 'ActiveExpressions-Core-cypress.1' message 'fabricated from a Cypress format repository' id '2cd42bda-65a2-4a1c-94fb-5a30b7e75183' date '10 October 2018' time '9:53:46.888779 am' author '' ancestors () stepChildren ())) stepChildren ())) stepChildren ()) | ||
(name 'ActiveExpressions-Core-stlu.4' message 'empty log message' id '34099b2e-56c9-4de8-854a-3865294d1fb1' date '25 February 2019' time '1:34:03.587085 pm' author 'stlu' ancestors ((name 'ActiveExpressions-Core-sl.3' message 'empty log message' id '9aa1eb9e-e325-4bde-bc51-f7868a4fc4ad' date '11 October 2018' time '12:52:43.435234 pm' author 'sl' ancestors ((name 'ActiveExpressions-Core-sl.2' message 'empty log message' id '41ca1443-0aeb-4357-823d-106bb24155a2' date '10 October 2018' time '10:35:53.535738 pm' author 'sl' ancestors ((name 'ActiveExpressions-Core-cypress.1' message 'fabricated from a Cypress format repository' id '2cd42bda-65a2-4a1c-94fb-5a30b7e75183' date '10 October 2018' time '9:53:46.888779 am' author '' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ()) |
4 changes: 2 additions & 2 deletions
4
src/ActiveExpressions-Simulation.package/AxSimulator.class/instance/instVarAccessed.of..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,6 +1,6 @@ | ||
accessing | ||
instVarAccessed: offset of: receiver | ||
|
||
(instVarAccesses | ||
"Remembers inst var accesses as offsets instead of variable names to avoid building the complete list of variable names each time." | ||
(self instVarAccesses | ||
at: receiver | ||
ifAbsentPut: [IdentitySet new]) add: offset. |
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
6 changes: 6 additions & 0 deletions
6
src/ActiveExpressions-Simulation.package/AxSimulator.class/instance/send.super.numArgs..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
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
Empty file.
14 changes: 14 additions & 0 deletions
14
...ctiveExpressions-Simulation.package/AxVerboseSimulator.class/instance/distanceFrom.to..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,14 @@ | ||
as yet unclassified | ||
distanceFrom: topContext to: bottomContext | ||
|
||
| c distance | | ||
distance := 0. | ||
c := bottomContext. | ||
[c ~~ nil] | ||
whileTrue: | ||
[c == topContext | ||
ifTrue: [^ distance] | ||
ifFalse: | ||
[distance := distance + 1. | ||
c := c sender]]. | ||
self error: 'topContext is not in the sender chain of bottomContext' |
8 changes: 8 additions & 0 deletions
8
src/ActiveExpressions-Simulation.package/AxVerboseSimulator.class/instance/logContext..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,8 @@ | ||
as yet unclassified | ||
logContext: aContext | ||
|
||
depth * 2 timesRepeat: [Transcript space]. | ||
aContext printOn: Transcript. | ||
Transcript | ||
cr; | ||
flush |
13 changes: 13 additions & 0 deletions
13
...veExpressions-Simulation.package/AxVerboseSimulator.class/instance/send.super.numArgs..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,13 @@ | ||
as yet unclassified | ||
send: selector super: supered numArgs: numberArguments | ||
|
||
| receiver nextMethod | | ||
receiver := currentContext at: (currentContext stackPtr - numberArguments). | ||
nextMethod := receiver class lookupSelector: selector. | ||
nextMethod primitive > 0 ifTrue: [ | ||
(depth + 1) * 2 timesRepeat: [Transcript space]. | ||
Transcript nextPutAll: receiver class name. | ||
nextMethod methodClass ~~ receiver class ifTrue: | ||
[Transcript nextPut: $(; nextPutAll: nextMethod methodClass name; nextPut: $)]. | ||
Transcript nextPutAll: '>>'; nextPutAll: nextMethod selector; cr]. | ||
^ super send: selector super: supered numArgs: numberArguments |
23 changes: 23 additions & 0 deletions
23
src/ActiveExpressions-Simulation.package/AxVerboseSimulator.class/instance/simulate..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,23 @@ | ||
as yet unclassified | ||
simulate: aBlock | ||
|
||
| topContext | | ||
aBlock hasMethodReturn | ||
ifTrue: [self error: 'simulation of blocks with ^ can run loose']. | ||
topContext := thisContext. | ||
depth := 0. | ||
currentContext := aBlock asContext. | ||
currentContext pushArgs: Array new from: topContext. | ||
Transcript nextPutAll: '#################################'; cr. | ||
self logContext: currentContext. | ||
[currentContext == topContext] | ||
whileFalse: | ||
[| previousContext previousDepth | | ||
previousContext := currentContext. | ||
previousDepth := depth. | ||
currentContext := currentContext interpretNextInstructionFor: self. | ||
depth := self distanceFrom: topContext to: currentContext. | ||
(previousContext ~~ currentContext and: [previousDepth < depth]) ifTrue: [ | ||
self logContext: currentContext]]. | ||
result := topContext pop. | ||
Transcript flush |
8 changes: 8 additions & 0 deletions
8
src/ActiveExpressions-Simulation.package/AxVerboseSimulator.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,8 @@ | ||
{ | ||
"class" : { | ||
}, | ||
"instance" : { | ||
"distanceFrom:to:" : "sl 10/12/2018 19:29", | ||
"logContext:" : "sl 10/12/2018 18:52", | ||
"send:super:numArgs:" : "sl 10/12/2018 19:25", | ||
"simulate:" : "sl 10/12/2018 18:55" } } |
14 changes: 14 additions & 0 deletions
14
src/ActiveExpressions-Simulation.package/AxVerboseSimulator.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,14 @@ | ||
{ | ||
"category" : "ActiveExpressions-Simulation", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "", | ||
"instvars" : [ | ||
"depth" ], | ||
"name" : "AxVerboseSimulator", | ||
"pools" : [ | ||
], | ||
"super" : "AxSimulator", | ||
"type" : "normal" } |
2 changes: 1 addition & 1 deletion
2
...ssions-Simulation.package/InstructionSimulator.class/instance/popIntoReceiverVariable..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,4 +1,4 @@ | ||
instruction decoding | ||
popIntoReceiverVariable: offset | ||
popIntoReceiverVariable: offset | ||
"Remove Top Of Stack And Store Into Instance Variable bytecode." | ||
^ currentContext popIntoReceiverVariable: offset |
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
2 changes: 1 addition & 1 deletion
2
src/ActiveExpressions-Simulation.package/monticello.meta/version
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 +1 @@ | ||
(name 'ActiveExpressions-Simulation-sl.2' message 'empty log message' id '5c5661d6-b402-4384-b4d6-af84df4d8f00' date '11 October 2018' time '12:52:33.137125 pm' author 'sl' ancestors ((name 'ActiveExpressions-Simulation-sl.1' message 'empty log message' id 'a3005c4b-ad41-4b8d-82b9-27cfe19c9ad4' date '10 October 2018' time '10:39:40.320292 pm' author 'sl' ancestors () stepChildren ())) stepChildren ()) | ||
(name 'ActiveExpressions-Simulation-stlu.3' message 'empty log message' id 'e18821e4-8753-4ca5-8775-260e2e448329' date '25 February 2019' time '1:34:49.78656 pm' author 'stlu' ancestors ((name 'ActiveExpressions-Simulation-sl.2' message 'empty log message' id '5c5661d6-b402-4384-b4d6-af84df4d8f00' date '11 October 2018' time '12:52:33.137125 pm' author 'sl' ancestors ((name 'ActiveExpressions-Simulation-sl.1' message 'empty log message' id 'a3005c4b-ad41-4b8d-82b9-27cfe19c9ad4' date '10 October 2018' time '10:39:40.320292 pm' author 'sl' ancestors () stepChildren ())) stepChildren ())) stepChildren ()) |