-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds global dict to keep track of probes
- Loading branch information
Showing
44 changed files
with
268 additions
and
33 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
...ge/BPCompiler.class/instance/backgroundCompileInstrumentedVersionOf.basedOn.noPattern..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,18 @@ | ||
private | ||
backgroundCompileInstrumentedVersionOf: aCue basedOn: parseResult noPattern: aBoolean | ||
|
||
| instrumentedResult newCode | | ||
self halt. | ||
newCode := self rewriteToSource: parseResult. | ||
SystemChangeNotifier uniqueInstance doSilently: [ | ||
"Wann ist aCue getClass compile nicht mit BPCompiler?" | ||
instrumentedResult := | ||
aCue getClass newCompiler compileCue: (CompilationCue | ||
source: newCode | ||
class: aCue getClass | ||
environment: aCue environment | ||
requestor: nil) | ||
noPattern: aBoolean | ||
ifFail: [^nil] ]. | ||
"instrumentedResult := aCue getClass compile: newCode]." | ||
|
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
27 changes: 27 additions & 0 deletions
27
...ian-Compiler.package/BPCompiler.class/instance/compileInstrumentedVersionOf.noPattern..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,27 @@ | ||
private | ||
compileInstrumentedVersionOf: aCue noPattern: aBoolean | ||
|
||
| originalCode parseResult startingFrom | | ||
"We do not serialize the examples into the instrumented method as | ||
they only 'live' in the base method." | ||
originalCode := aCue sourceStream contents asBPSourceWithoutExamples. | ||
startingFrom := aBoolean | ||
ifFalse: [#MethodDeclaration] | ||
ifTrue: [#KeywordMessageSend]. | ||
|
||
parseResult := PEGParserBPSmalltalk new | ||
match: originalCode | ||
startingFrom: startingFrom. | ||
|
||
parseResult succeeded | ||
ifTrue: [ | ||
self | ||
backgroundCompileInstrumentedVersionOf: aCue | ||
basedOn: parseResult | ||
noPattern: aBoolean. | ||
^ true] | ||
ifFalse: [^false]. | ||
|
||
|
||
|
||
|
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
...urceRewriter.class/instance/AnnotatedKeywordMessageSend.startTag.actualMessage.endTag..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 @@ | ||
grammar rules | ||
AnnotatedKeywordMessageSend: aNode startTag: startTag actualMessage: message endTag: endTag | ||
|
||
^ self rewriteNode: message withTag: startTag | ||
^ self rewriteNode: message withTag: startTag |
2 changes: 1 addition & 1 deletion
2
...ges/Babylonian-Compiler.package/BPSourceRewriter.class/instance/bpTemporaryProbe.with..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 @@ | ||
as yet unclassified | ||
rewrite rules | ||
bpTemporaryProbe: annotation with: originalExpressionSourceNode | ||
|
||
^ annotation instrumentationCallFor: (self value: originalExpressionSourceNode) |
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
packages/Babylonian-Core.package/BPClassNameToInstanceProbes.class/class/clear.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 @@ | ||
class initialization | ||
clear | ||
|
||
DefaultValue := nil |
4 changes: 4 additions & 0 deletions
4
packages/Babylonian-Core.package/BPClassNameToInstanceProbes.class/class/default.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 | ||
default | ||
|
||
^ DefaultValue ifNil: [DefaultValue := self new] |
9 changes: 9 additions & 0 deletions
9
packages/Babylonian-Core.package/BPClassNameToInstanceProbes.class/instance/addProbe..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,9 @@ | ||
as yet unclassified | ||
addProbe: aProbe | ||
|
||
nameToProbesDict at: aProbe className | ||
ifPresent: [:registeredProbes | registeredProbes add: aProbe] | ||
ifAbsent: [ | k | | ||
k := KeyedSet keyBlock: [ :each | each variableName ]. | ||
nameToProbesDict at: aProbe className put: k] | ||
|
5 changes: 5 additions & 0 deletions
5
packages/Babylonian-Core.package/BPClassNameToInstanceProbes.class/instance/initialize.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,5 @@ | ||
initialize-release | ||
initialize | ||
|
||
super initialize. | ||
nameToProbesDict := Dictionary new. |
4 changes: 4 additions & 0 deletions
4
...es/Babylonian-Core.package/BPClassNameToInstanceProbes.class/instance/nameToProbesDict.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 | ||
nameToProbesDict | ||
|
||
^ nameToProbesDict |
6 changes: 6 additions & 0 deletions
6
packages/Babylonian-Core.package/BPClassNameToInstanceProbes.class/instance/removeProbe..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,6 @@ | ||
as yet unclassified | ||
removeProbe: aProbe | ||
|
||
nameToProbesDict at: aProbe className | ||
ifPresent: [:registeredProbes | registeredProbes remove: aProbe] | ||
|
9 changes: 9 additions & 0 deletions
9
packages/Babylonian-Core.package/BPClassNameToInstanceProbes.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,9 @@ | ||
{ | ||
"class" : { | ||
"clear" : "joabe 9/28/2023 12:59", | ||
"default" : "joabe 9/28/2023 12:57" }, | ||
"instance" : { | ||
"addProbe:" : "joabe 9/28/2023 13:05", | ||
"initialize" : "joabe 9/27/2023 16:33", | ||
"nameToProbesDict" : "joabe 9/28/2023 12:59", | ||
"removeProbe:" : "joabe 9/27/2023 17:19" } } |
14 changes: 14 additions & 0 deletions
14
packages/Babylonian-Core.package/BPClassNameToInstanceProbes.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" : "Babylonian-Core-Tracing", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
"DefaultValue" ], | ||
"commentStamp" : "", | ||
"instvars" : [ | ||
"nameToProbesDict" ], | ||
"name" : "BPClassNameToInstanceProbes", | ||
"pools" : [ | ||
], | ||
"super" : "DynamicVariable", | ||
"type" : "normal" } |
4 changes: 4 additions & 0 deletions
4
packages/Babylonian-Core.package/BPInstanceVariableProbe.class/class/annotationTag.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 @@ | ||
constants | ||
annotationTag | ||
|
||
^ 'bpInstanceProbe' |
9 changes: 9 additions & 0 deletions
9
packages/Babylonian-Core.package/BPInstanceVariableProbe.class/instance/asMorph.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,9 @@ | ||
morphic | ||
asMorph | ||
|
||
| newMorph | | ||
newMorph := BPInstanceVariableProbeMorph new | ||
annotation: self; | ||
yourself. | ||
self updateTextAnchorPropertiesOf: newMorph. | ||
^ newMorph |
3 changes: 3 additions & 0 deletions
3
packages/Babylonian-Core.package/BPInstanceVariableProbe.class/instance/className..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 @@ | ||
accessing | ||
className: aString | ||
className := aString |
3 changes: 3 additions & 0 deletions
3
packages/Babylonian-Core.package/BPInstanceVariableProbe.class/instance/className.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 @@ | ||
accessing | ||
className | ||
^ className |
5 changes: 5 additions & 0 deletions
5
...Babylonian-Core.package/BPInstanceVariableProbe.class/instance/instrumentationCallFor..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,5 @@ | ||
as yet unclassified | ||
instrumentationCallFor: actualEnclosedExpressionSource | ||
|
||
^ '(self bpTraceVariable: [{1}] forProbe: {2} inContext: thisContext)' | ||
format: {actualEnclosedExpressionSource . self id} |
4 changes: 4 additions & 0 deletions
4
packages/Babylonian-Core.package/BPInstanceVariableProbe.class/instance/probeTypeTag.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 @@ | ||
as yet unclassified | ||
probeTypeTag | ||
|
||
^ 'bpInstanceProbe' |
4 changes: 4 additions & 0 deletions
4
packages/Babylonian-Core.package/BPInstanceVariableProbe.class/instance/removeFromMethod..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 @@ | ||
as yet unclassified | ||
removeFromMethod: aCompiledMethod | ||
|
||
"do nothing" |
4 changes: 4 additions & 0 deletions
4
packages/Babylonian-Core.package/BPInstanceVariableProbe.class/instance/variableName..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 | ||
variableName: aString | ||
|
||
variableName := aString |
4 changes: 4 additions & 0 deletions
4
packages/Babylonian-Core.package/BPInstanceVariableProbe.class/instance/variableName.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 | ||
variableName | ||
|
||
^ variableName |
10 changes: 9 additions & 1 deletion
10
packages/Babylonian-Core.package/BPInstanceVariableProbe.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 |
---|---|---|
@@ -1,7 +1,15 @@ | ||
{ | ||
"class" : { | ||
}, | ||
"annotationTag" : "joabe 9/25/2023 17:30" }, | ||
"instance" : { | ||
"asMorph" : "joabe 9/21/2023 22:32", | ||
"canBeAnnotatedTo" : "joabe 9/21/2023 21:08", | ||
"className" : "joabe 9/27/2023 17:16", | ||
"className:" : "joabe 9/27/2023 17:16", | ||
"instrumentationCallFor:" : "joabe 9/25/2023 18:43", | ||
"isInstanceVariableProbe" : "joabe 9/21/2023 21:18", | ||
"probeTypeTag" : "joabe 9/25/2023 17:30", | ||
"removeFromMethod:" : "joabe 9/27/2023 16:43", | ||
"variableName" : "joabe 9/27/2023 16:52", | ||
"variableName:" : "joabe 9/27/2023 16:52", | ||
"wantsMetaClassIndication" : "joabe 9/21/2023 21:08" } } |
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
12 changes: 12 additions & 0 deletions
12
.../Babylonian-Core.package/Object.extension/instance/bpTraceVariable.forProbe.inContext..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,12 @@ | ||
*Babylonian-Core | ||
bpTraceVariable: aVariableName forProbe: probeId inContext: aContext | ||
|
||
<bpRelevantMethod> | ||
self halt. | ||
^ aVariableName value, ' ' | ||
"^ #bpInstrumented withoutLayerDo: [ | ||
BPActiveTracer value | ||
trace: anObject | ||
through: [:r | r] | ||
forProbe: probeId | ||
inContext: aContext]" |
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.
6 changes: 6 additions & 0 deletions
6
.../Babylonian-UI.package/BPInstanceVariableProbeMorph.class/instance/removeButtonClicked.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,6 @@ | ||
as yet unclassified | ||
removeButtonClicked | ||
|
||
super removeButtonClicked. | ||
BPClassNameToInstanceProbes value removeProbe: self. | ||
|
17 changes: 17 additions & 0 deletions
17
packages/Babylonian-UI.package/BPInstanceVariableProbeMorph.class/instance/step.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,17 @@ | ||
as yet unclassified | ||
step | ||
|
||
| newTraces tracesChanged | | ||
self resetHeight. | ||
|
||
"newTraces := self getTraces asIdentitySet. | ||
tracesChanged := newTraces ~= displayedTraces. | ||
(allTracesCompleted not or: [tracesChanged]) ifTrue: [ | ||
allTracesCompleted := newTraces | ||
ifEmpty: [true] | ||
ifNotEmpty: [:ts | ts allSatisfy: [:t | t hasTraceCompleted]]. | ||
self updateFrom: (newTraces ifEmpty: [self emptyTraces]). | ||
displayedTraces := newTraces]." | ||
|
||
"tracesChanged ifTrue: [self refreshTextComposition]." |
6 changes: 6 additions & 0 deletions
6
packages/Babylonian-UI.package/BPInstanceVariableProbeMorph.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,6 @@ | ||
{ | ||
"class" : { | ||
}, | ||
"instance" : { | ||
"removeButtonClicked" : "joabe 9/27/2023 17:19", | ||
"step" : "joabe 9/25/2023 18:34" } } |
14 changes: 14 additions & 0 deletions
14
packages/Babylonian-UI.package/BPInstanceVariableProbeMorph.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" : "Babylonian-UI-Morphs", | ||
"classinstvars" : [ | ||
], | ||
"classvars" : [ | ||
], | ||
"commentStamp" : "", | ||
"instvars" : [ | ||
], | ||
"name" : "BPInstanceVariableProbeMorph", | ||
"pools" : [ | ||
], | ||
"super" : "BPProbeMorph", | ||
"type" : "normal" } |
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
Oops, something went wrong.