From 72c737fa93b2523bb39e05c8f5abc9a35a0e0296 Mon Sep 17 00:00:00 2001 From: CyrilFerlicot Date: Tue, 21 May 2024 17:15:13 +0200 Subject: [PATCH] Migrate to Tonel V3 --- .../BaselineOfSindarin.class.st | 11 +- src/BaselineOfSindarin/package.st | 2 +- src/Sindarin-Demo/SindarinDemo.class.st | 17 +-- .../SindarinDemo_GoldDigger.class.st | 27 ++--- .../SindarinDemo_SkipNextException.class.st | 23 ++-- .../SindarinDemo_StepToNextIteration.class.st | 11 +- src/Sindarin-Demo/package.st | 2 +- ...nAloneButFailsWhenRanFromTheClass.class.st | 17 +-- .../ExampleExecutionStackTransform1.class.st | 13 ++- .../ExampleExecutionStackTransform2.class.st | 9 +- ...nAGivenFieldIsAssignedAGivenValue.class.st | 15 +-- ...lingAGivenMethoWithAGivenArgument.class.st | 17 +-- src/Sindarin-Experiments/package.st | 2 +- .../SindarinCommandBuilderTest.class.st | 14 ++- .../SindarinScriptBuilderTest.class.st | 16 +-- .../SindarinScriptTest.class.st | 20 ++-- .../SindarinTDebuggerTest.class.st | 26 +++-- .../SindarinTestDebugger.class.st | 20 ++-- .../SindarinTestDebuggerScript.class.st | 16 +-- src/Sindarin-Scripts-Tests/package.st | 2 +- .../SindarinDebugger.extension.st | 4 +- .../SindarinPointcut.class.st | 24 ++-- .../SindarinPointcutException.class.st | 18 +-- src/Sindarin-Scripts/SindarinScript.class.st | 22 ++-- .../SindarinScriptBuilder.class.st | 8 +- .../SindarinScriptPointcutsExamples.class.st | 16 +-- .../StepToNextDoIterationDbgScript.class.st | 24 ++-- ...ilAboutToSignalExceptionDbgScript.class.st | 16 +-- src/Sindarin-Scripts/TDebuggerScript.trait.st | 24 ++-- src/Sindarin-Scripts/TSindarin.extension.st | 4 +- .../TSindarinScriptInterpreter.trait.st | 6 +- src/Sindarin-Scripts/package.st | 2 +- .../SindarinDebuggerTest.class.st | 3 +- src/Sindarin/Context.extension.st | 4 +- src/Sindarin/DebugSession.extension.st | 8 +- .../DebuggedExecutionException.class.st | 10 +- .../DebuggedExecutionIsFinished.class.st | 8 +- src/Sindarin/InstructionStream.extension.st | 12 +- src/Sindarin/NodeNotInASTError.class.st | 8 +- src/Sindarin/NotValidPcError.class.st | 8 +- .../OCBytecodeToASTCache.extension.st | 4 +- src/Sindarin/Object.extension.st | 4 +- src/Sindarin/Process.extension.st | 4 +- src/Sindarin/RBAssignmentNode.extension.st | 4 +- ...RBBlockDefinitionSearchingVisitor.class.st | 18 +-- src/Sindarin/RBBlockNode.extension.st | 12 +- src/Sindarin/RBMessageNode.extension.st | 4 +- src/Sindarin/RBMethodNode.extension.st | 12 +- src/Sindarin/RBProgramNode.extension.st | 6 +- src/Sindarin/RBReturnNode.extension.st | 4 +- src/Sindarin/SindarinDebugSession.class.st | 38 +++--- src/Sindarin/SindarinDebugger.class.st | 108 +++++++++--------- .../SindarinSkippingReturnWarning.class.st | 8 +- .../SteppingATerminatingProcess.class.st | 8 +- src/Sindarin/TSindarin.trait.st | 80 ++++++------- ...tionSignalledByADebuggedExecution.class.st | 14 ++- src/Sindarin/package.st | 2 +- 57 files changed, 450 insertions(+), 389 deletions(-) diff --git a/src/BaselineOfSindarin/BaselineOfSindarin.class.st b/src/BaselineOfSindarin/BaselineOfSindarin.class.st index 733ba0c..3b412f1 100644 --- a/src/BaselineOfSindarin/BaselineOfSindarin.class.st +++ b/src/BaselineOfSindarin/BaselineOfSindarin.class.st @@ -1,10 +1,11 @@ Class { - #name : #BaselineOfSindarin, - #superclass : #BaselineOf, - #category : #BaselineOfSindarin + #name : 'BaselineOfSindarin', + #superclass : 'BaselineOf', + #category : 'BaselineOfSindarin', + #package : 'BaselineOfSindarin' } -{ #category : #baselines } +{ #category : 'baselines' } BaselineOfSindarin >> baseline: spec [ @@ -21,7 +22,7 @@ BaselineOfSindarin >> baseline: spec [ group: 'experiments' with: #( 'default' 'Sindarin-Experiments' ) ] -{ #category : #baselines } +{ #category : 'baselines' } BaselineOfSindarin >> postloadWithLoader: loader withPackageSpec: spec [ InstructionStream compiledMethodAt: #willJumpIfFalse ifAbsent: [ diff --git a/src/BaselineOfSindarin/package.st b/src/BaselineOfSindarin/package.st index 3a94284..73eb2f9 100644 --- a/src/BaselineOfSindarin/package.st +++ b/src/BaselineOfSindarin/package.st @@ -1 +1 @@ -Package { #name : #BaselineOfSindarin } +Package { #name : 'BaselineOfSindarin' } diff --git a/src/Sindarin-Demo/SindarinDemo.class.st b/src/Sindarin-Demo/SindarinDemo.class.st index a1795bc..d6a971f 100644 --- a/src/Sindarin-Demo/SindarinDemo.class.st +++ b/src/Sindarin-Demo/SindarinDemo.class.st @@ -1,39 +1,40 @@ Class { - #name : #SindarinDemo, - #superclass : #Object, + #name : 'SindarinDemo', + #superclass : 'Object', #instVars : [ 'count' ], - #category : #'Sindarin-Demo' + #category : 'Sindarin-Demo', + #package : 'Sindarin-Demo' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } SindarinDemo >> doThings1 [ 1+1. ZeroDivide signal. ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } SindarinDemo >> doThings2 [ Point x: 2 y: 2. SubscriptOutOfBounds signal. ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } SindarinDemo >> doThingsAndSignalExceptions [ self doThings1. Error signal. self doThings2. ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } SindarinDemo >> primeCount [ count := 0. { 2. 3. 5. 7. 10. 11. 13. 17. 19. 23 } do: [:int | count := count + int ] ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } SindarinDemo >> primeCountHalt [. count := 0. self halt. diff --git a/src/Sindarin-Demo/SindarinDemo_GoldDigger.class.st b/src/Sindarin-Demo/SindarinDemo_GoldDigger.class.st index 0108617..ac79f3f 100644 --- a/src/Sindarin-Demo/SindarinDemo_GoldDigger.class.st +++ b/src/Sindarin-Demo/SindarinDemo_GoldDigger.class.st @@ -7,61 +7,62 @@ dbg step: 3; stepOver: 2; step: 3. " Class { - #name : #'SindarinDemo_GoldDigger', - #superclass : #Object, - #category : #'Sindarin-Demo' + #name : 'SindarinDemo_GoldDigger', + #superclass : 'Object', + #category : 'Sindarin-Demo', + #package : 'Sindarin-Demo' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } SindarinDemo_GoldDigger >> gold [ ^ 42 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } SindarinDemo_GoldDigger >> moreRock [ ^self ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } SindarinDemo_GoldDigger >> rock [ self halt. self rock1 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } SindarinDemo_GoldDigger >> rock1 [ self rock2 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } SindarinDemo_GoldDigger >> rock2 [ self rock3 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } SindarinDemo_GoldDigger >> rock3 [ self moreRock. self moreRock. self rock4. ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } SindarinDemo_GoldDigger >> rock4 [ self rock5. ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } SindarinDemo_GoldDigger >> rock5 [ self rock6. ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } SindarinDemo_GoldDigger >> rock6 [ "Relevant point for the bug you are tracking" self gold. ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } SindarinDemo_GoldDigger >> start [ self rock ] diff --git a/src/Sindarin-Demo/SindarinDemo_SkipNextException.class.st b/src/Sindarin-Demo/SindarinDemo_SkipNextException.class.st index 6417bf6..5d8e7e1 100644 --- a/src/Sindarin-Demo/SindarinDemo_SkipNextException.class.st +++ b/src/Sindarin-Demo/SindarinDemo_SkipNextException.class.st @@ -10,49 +10,50 @@ dbg := SindarinDebugger debug: [ SindarinDemo_SkipNextException new start ]. dbg skip. " Class { - #name : #'SindarinDemo_SkipNextException', - #superclass : #Object, - #category : #'Sindarin-Demo' + #name : 'SindarinDemo_SkipNextException', + #superclass : 'Object', + #category : 'Sindarin-Demo', + #package : 'Sindarin-Demo' } -{ #category : #accessing } +{ #category : 'accessing' } SindarinDemo_SkipNextException >> method1 [ self halt. self method2. ] -{ #category : #accessing } +{ #category : 'accessing' } SindarinDemo_SkipNextException >> method2 [ self method3. ] -{ #category : #accessing } +{ #category : 'accessing' } SindarinDemo_SkipNextException >> method3 [ self method4. ] -{ #category : #accessing } +{ #category : 'accessing' } SindarinDemo_SkipNextException >> method4 [ self method5. ] -{ #category : #accessing } +{ #category : 'accessing' } SindarinDemo_SkipNextException >> method5 [ Error signal: 'Something truly unexpected happened :)'. self method6. ] -{ #category : #accessing } +{ #category : 'accessing' } SindarinDemo_SkipNextException >> method6 [ self method7. ] -{ #category : #accessing } +{ #category : 'accessing' } SindarinDemo_SkipNextException >> method7 [ ^ 42 ] -{ #category : #accessing } +{ #category : 'accessing' } SindarinDemo_SkipNextException >> start [ self method1 ] diff --git a/src/Sindarin-Demo/SindarinDemo_StepToNextIteration.class.st b/src/Sindarin-Demo/SindarinDemo_StepToNextIteration.class.st index 19946a9..b0aac3c 100644 --- a/src/Sindarin-Demo/SindarinDemo_StepToNextIteration.class.st +++ b/src/Sindarin-Demo/SindarinDemo_StepToNextIteration.class.st @@ -1,15 +1,16 @@ Class { - #name : #'SindarinDemo_StepToNextIteration', - #superclass : #Object, - #category : #'Sindarin-Demo' + #name : 'SindarinDemo_StepToNextIteration', + #superclass : 'Object', + #category : 'Sindarin-Demo', + #package : 'Sindarin-Demo' } -{ #category : #accessing } +{ #category : 'accessing' } SindarinDemo_StepToNextIteration >> start [ self sum ] -{ #category : #accessing } +{ #category : 'accessing' } SindarinDemo_StepToNextIteration >> sum [ | count | self halt. diff --git a/src/Sindarin-Demo/package.st b/src/Sindarin-Demo/package.st index eb9e30c..cfa234a 100644 --- a/src/Sindarin-Demo/package.st +++ b/src/Sindarin-Demo/package.st @@ -1 +1 @@ -Package { #name : #'Sindarin-Demo' } +Package { #name : 'Sindarin-Demo' } diff --git a/src/Sindarin-Experiments/Bug_TestPassesWhenRanAloneButFailsWhenRanFromTheClass.class.st b/src/Sindarin-Experiments/Bug_TestPassesWhenRanAloneButFailsWhenRanFromTheClass.class.st index f18be7f..9495c5b 100644 --- a/src/Sindarin-Experiments/Bug_TestPassesWhenRanAloneButFailsWhenRanFromTheClass.class.st +++ b/src/Sindarin-Experiments/Bug_TestPassesWhenRanAloneButFailsWhenRanFromTheClass.class.st @@ -1,20 +1,21 @@ Class { - #name : #'Bug_TestPassesWhenRanAloneButFailsWhenRanFromTheClass', - #superclass : #TestCase, + #name : 'Bug_TestPassesWhenRanAloneButFailsWhenRanFromTheClass', + #superclass : 'TestCase', #instVars : [ 'breakpointsBeforeTest' ], - #category : #'Sindarin-Experiments' + #category : 'Sindarin-Experiments', + #package : 'Sindarin-Experiments' } -{ #category : #tests } +{ #category : 'tests' } Bug_TestPassesWhenRanAloneButFailsWhenRanFromTheClass >> helperMethod13 [ | a | a := 5. ^ Point x: 5 y: '3' asInteger. ] -{ #category : #running } +{ #category : 'running' } Bug_TestPassesWhenRanAloneButFailsWhenRanFromTheClass >> runCaseManaged [ "This prevents the TestExecutionEnvironment from trying to kill processes created during the test. Without it, it adds on:do: contexts on the process, and this somehow makes the process answers true to isTerminating, triggering the protection against stepping terminating processes from DebugSessionPlus>>stepInto: It is not necessary to terminate processes created by ScriptableDebugger because these processes are not scheduled." @@ -23,20 +24,20 @@ Bug_TestPassesWhenRanAloneButFailsWhenRanFromTheClass >> runCaseManaged [ ^ self runCase. ] -{ #category : #running } +{ #category : 'running' } Bug_TestPassesWhenRanAloneButFailsWhenRanFromTheClass >> setUp [ "Hooks that subclasses may override to define the fixture of test." breakpointsBeforeTest := VirtualBreakpoint all. VirtualBreakpoint all removeAll. ] -{ #category : #running } +{ #category : 'running' } Bug_TestPassesWhenRanAloneButFailsWhenRanFromTheClass >> tearDown [ VirtualBreakpoint all removeAll. breakpointsBeforeTest do: [ :brkpt | VirtualBreakpoint all add: brkpt ]. ] -{ #category : #tests } +{ #category : 'tests' } Bug_TestPassesWhenRanAloneButFailsWhenRanFromTheClass >> testStep [ | node scdbg | diff --git a/src/Sindarin-Experiments/ExampleExecutionStackTransform1.class.st b/src/Sindarin-Experiments/ExampleExecutionStackTransform1.class.st index 6515422..fb15f3f 100644 --- a/src/Sindarin-Experiments/ExampleExecutionStackTransform1.class.st +++ b/src/Sindarin-Experiments/ExampleExecutionStackTransform1.class.st @@ -12,16 +12,17 @@ scdbg1 activateAutoRefreshOfAttachedGraphicalDebugger. scdbg2 activateAutoRefres scdbg2 refreshAttachedGraphicalDebugger " Class { - #name : #ExampleExecutionStackTransform1, - #superclass : #TestCase, + #name : 'ExampleExecutionStackTransform1', + #superclass : 'TestCase', #instVars : [ 'stack', 'expected' ], - #category : #'Sindarin-Experiments' + #category : 'Sindarin-Experiments', + #package : 'Sindarin-Experiments' } -{ #category : #running } +{ #category : 'running' } ExampleExecutionStackTransform1 >> setUp [ stack := Stack new. stack push: $3; push: 'b'; push: $a. @@ -29,12 +30,12 @@ ExampleExecutionStackTransform1 >> setUp [ expected push: '3'; push: 'b'; push: 'a'. ] -{ #category : #tests } +{ #category : 'tests' } ExampleExecutionStackTransform1 >> testTransformStack [ [expected isEmpty] whileFalse: [ self transformTopStack. self assert: (stack pop) equals: (expected pop) ]. ] -{ #category : #tests } +{ #category : 'tests' } ExampleExecutionStackTransform1 >> transformTopStack [ (stack top isInteger) ifTrue: [ stack push: (stack pop asCharacterDigit) ]. (stack top isCharacter) ifTrue: [ stack push: (stack pop asString) ]. diff --git a/src/Sindarin-Experiments/ExampleExecutionStackTransform2.class.st b/src/Sindarin-Experiments/ExampleExecutionStackTransform2.class.st index a251e08..b508a4b 100644 --- a/src/Sindarin-Experiments/ExampleExecutionStackTransform2.class.st +++ b/src/Sindarin-Experiments/ExampleExecutionStackTransform2.class.st @@ -1,10 +1,11 @@ Class { - #name : #ExampleExecutionStackTransform2, - #superclass : #ExampleExecutionStackTransform1, - #category : #'Sindarin-Experiments' + #name : 'ExampleExecutionStackTransform2', + #superclass : 'ExampleExecutionStackTransform1', + #category : 'Sindarin-Experiments', + #package : 'Sindarin-Experiments' } -{ #category : #running } +{ #category : 'running' } ExampleExecutionStackTransform2 >> setUp [ stack := Stack new. stack push: 3; push: 'b'; push: $a. diff --git a/src/Sindarin-Experiments/Scenario1SetBreakpointWhenAGivenFieldIsAssignedAGivenValue.class.st b/src/Sindarin-Experiments/Scenario1SetBreakpointWhenAGivenFieldIsAssignedAGivenValue.class.st index c995322..1fc0e2e 100644 --- a/src/Sindarin-Experiments/Scenario1SetBreakpointWhenAGivenFieldIsAssignedAGivenValue.class.st +++ b/src/Sindarin-Experiments/Scenario1SetBreakpointWhenAGivenFieldIsAssignedAGivenValue.class.st @@ -1,19 +1,20 @@ Class { - #name : #Scenario1SetBreakpointWhenAGivenFieldIsAssignedAGivenValue, - #superclass : #Object, + #name : 'Scenario1SetBreakpointWhenAGivenFieldIsAssignedAGivenValue', + #superclass : 'Object', #instVars : [ 'var' ], - #category : #'Sindarin-Experiments' + #category : 'Sindarin-Experiments', + #package : 'Sindarin-Experiments' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } Scenario1SetBreakpointWhenAGivenFieldIsAssignedAGivenValue >> doNothing [ ^ 1 ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } Scenario1SetBreakpointWhenAGivenFieldIsAssignedAGivenValue >> helper1 [ self doNothing. self helper2. @@ -21,7 +22,7 @@ Scenario1SetBreakpointWhenAGivenFieldIsAssignedAGivenValue >> helper1 [ self doNothing. ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } Scenario1SetBreakpointWhenAGivenFieldIsAssignedAGivenValue >> helper2 [ var := 2. self doNothing. @@ -29,7 +30,7 @@ Scenario1SetBreakpointWhenAGivenFieldIsAssignedAGivenValue >> helper2 [ ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } Scenario1SetBreakpointWhenAGivenFieldIsAssignedAGivenValue >> helper3 [ var := nil. diff --git a/src/Sindarin-Experiments/Scenario2SetBreakpointsOnMethodsCallingAGivenMethoWithAGivenArgument.class.st b/src/Sindarin-Experiments/Scenario2SetBreakpointsOnMethodsCallingAGivenMethoWithAGivenArgument.class.st index efe63ac..8689068 100644 --- a/src/Sindarin-Experiments/Scenario2SetBreakpointsOnMethodsCallingAGivenMethoWithAGivenArgument.class.st +++ b/src/Sindarin-Experiments/Scenario2SetBreakpointsOnMethodsCallingAGivenMethoWithAGivenArgument.class.st @@ -1,15 +1,16 @@ Class { - #name : #Scenario2SetBreakpointsOnMethodsCallingAGivenMethoWithAGivenArgument, - #superclass : #Object, - #category : #'Sindarin-Experiments' + #name : 'Scenario2SetBreakpointsOnMethodsCallingAGivenMethoWithAGivenArgument', + #superclass : 'Object', + #category : 'Sindarin-Experiments', + #package : 'Sindarin-Experiments' } -{ #category : #'file support' } +{ #category : 'file support' } Scenario2SetBreakpointsOnMethodsCallingAGivenMethoWithAGivenArgument >> openFile: aString [ ^ self ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } Scenario2SetBreakpointsOnMethodsCallingAGivenMethoWithAGivenArgument >> stepA [ self stepB: 'myFile.txt'. self stepB: 'hello.txt'. @@ -17,17 +18,17 @@ Scenario2SetBreakpointsOnMethodsCallingAGivenMethoWithAGivenArgument >> stepA [ self stepD. ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } Scenario2SetBreakpointsOnMethodsCallingAGivenMethoWithAGivenArgument >> stepB: aString [ self openFile: aString ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } Scenario2SetBreakpointsOnMethodsCallingAGivenMethoWithAGivenArgument >> stepC [ ^ self ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } Scenario2SetBreakpointsOnMethodsCallingAGivenMethoWithAGivenArgument >> stepD [ self openFile: 'myFile.txt' ] diff --git a/src/Sindarin-Experiments/package.st b/src/Sindarin-Experiments/package.st index da536d3..6bb7724 100644 --- a/src/Sindarin-Experiments/package.st +++ b/src/Sindarin-Experiments/package.st @@ -1 +1 @@ -Package { #name : #'Sindarin-Experiments' } +Package { #name : 'Sindarin-Experiments' } diff --git a/src/Sindarin-Scripts-Tests/SindarinCommandBuilderTest.class.st b/src/Sindarin-Scripts-Tests/SindarinCommandBuilderTest.class.st index 41cb299..0bb5a56 100644 --- a/src/Sindarin-Scripts-Tests/SindarinCommandBuilderTest.class.st +++ b/src/Sindarin-Scripts-Tests/SindarinCommandBuilderTest.class.st @@ -1,17 +1,19 @@ Class { - #name : #SindarinCommandBuilderTest, - #superclass : #TestCase, - #category : #'Sindarin-Scripts-Tests-tests' + #name : 'SindarinCommandBuilderTest', + #superclass : 'TestCase', + #category : 'Sindarin-Scripts-Tests-tests', + #package : 'Sindarin-Scripts-Tests', + #tag : 'tests' } -{ #category : #tests } +{ #category : 'tests' } SindarinCommandBuilderTest >> testAnonymousCommand [ ] -{ #category : #tests } +{ #category : 'tests' } SindarinCommandBuilderTest >> testBuildCommandFromScript [ ] -{ #category : #tests } +{ #category : 'tests' } SindarinCommandBuilderTest >> testNamedCommand [ ] diff --git a/src/Sindarin-Scripts-Tests/SindarinScriptBuilderTest.class.st b/src/Sindarin-Scripts-Tests/SindarinScriptBuilderTest.class.st index b59ce7f..e0ee96a 100644 --- a/src/Sindarin-Scripts-Tests/SindarinScriptBuilderTest.class.st +++ b/src/Sindarin-Scripts-Tests/SindarinScriptBuilderTest.class.st @@ -1,21 +1,23 @@ Class { - #name : #SindarinScriptBuilderTest, - #superclass : #TestCase, - #category : #'Sindarin-Scripts-Tests-tests' + #name : 'SindarinScriptBuilderTest', + #superclass : 'TestCase', + #category : 'Sindarin-Scripts-Tests-tests', + #package : 'Sindarin-Scripts-Tests', + #tag : 'tests' } -{ #category : #tests } +{ #category : 'tests' } SindarinScriptBuilderTest >> testBuildScript [ ] -{ #category : #tests } +{ #category : 'tests' } SindarinScriptBuilderTest >> testReadFromDisk [ ] -{ #category : #tests } +{ #category : 'tests' } SindarinScriptBuilderTest >> testSaveOnDisk [ ] -{ #category : #tests } +{ #category : 'tests' } SindarinScriptBuilderTest >> testScriptDirectory [ ] diff --git a/src/Sindarin-Scripts-Tests/SindarinScriptTest.class.st b/src/Sindarin-Scripts-Tests/SindarinScriptTest.class.st index 3511832..06ef307 100644 --- a/src/Sindarin-Scripts-Tests/SindarinScriptTest.class.st +++ b/src/Sindarin-Scripts-Tests/SindarinScriptTest.class.st @@ -1,22 +1,24 @@ Class { - #name : #SindarinScriptTest, - #superclass : #TestCase, - #category : #'Sindarin-Scripts-Tests-tests' + #name : 'SindarinScriptTest', + #superclass : 'TestCase', + #category : 'Sindarin-Scripts-Tests-tests', + #package : 'Sindarin-Scripts-Tests', + #tag : 'tests' } -{ #category : #tests } +{ #category : 'tests' } SindarinScriptTest >> testAnonymousScript [ ] -{ #category : #tests } +{ #category : 'tests' } SindarinScriptTest >> testAsAnonymousCommand [ ] -{ #category : #tests } +{ #category : 'tests' } SindarinScriptTest >> testAsCommand [ ] -{ #category : #tests } +{ #category : 'tests' } SindarinScriptTest >> testDebuggerForScript [ |debugger script| debugger := SindarinDebugger new. @@ -26,10 +28,10 @@ SindarinScriptTest >> testDebuggerForScript [ ] -{ #category : #tests } +{ #category : 'tests' } SindarinScriptTest >> testExecute [ ] -{ #category : #tests } +{ #category : 'tests' } SindarinScriptTest >> testExecuteWithArguments [ ] diff --git a/src/Sindarin-Scripts-Tests/SindarinTDebuggerTest.class.st b/src/Sindarin-Scripts-Tests/SindarinTDebuggerTest.class.st index ed80831..4256d90 100644 --- a/src/Sindarin-Scripts-Tests/SindarinTDebuggerTest.class.st +++ b/src/Sindarin-Scripts-Tests/SindarinTDebuggerTest.class.st @@ -1,49 +1,51 @@ Class { - #name : #SindarinTDebuggerTest, - #superclass : #TestCase, + #name : 'SindarinTDebuggerTest', + #superclass : 'TestCase', #instVars : [ 'script' ], - #category : #'Sindarin-Scripts-Tests-tests' + #category : 'Sindarin-Scripts-Tests-tests', + #package : 'Sindarin-Scripts-Tests', + #tag : 'tests' } -{ #category : #running } +{ #category : 'running' } SindarinTDebuggerTest >> setUp [ super setUp. script := SindarinTestDebuggerScript new ] -{ #category : #tests } +{ #category : 'tests' } SindarinTDebuggerTest >> testDefaultArguments [ self assertEmpty: script class defaultArguments. self assertEmpty: script arguments ] -{ #category : #tests } +{ #category : 'tests' } SindarinTDebuggerTest >> testDefaultHooks [ self assertEmpty: script class defaultHooks. self assertEmpty: script hooks ] -{ #category : #tests } +{ #category : 'tests' } SindarinTDebuggerTest >> testDefaultPredicates [ self assertEmpty: script class defaultPredicates. self assertEmpty: script predicates ] -{ #category : #tests } +{ #category : 'tests' } SindarinTDebuggerTest >> testDefaultShouldExecute [ self assert: script shouldExecute ] -{ #category : #tests } +{ #category : 'tests' } SindarinTDebuggerTest >> testEmptyScriptExecution [ self assert: (script executeWith: SindarinTestDebugger new) identicalTo: script ] -{ #category : #tests } +{ #category : 'tests' } SindarinTDebuggerTest >> testExecuteRaiseScriptingException [ self should: [ script execute ] raise: SindarinPointcutException. @@ -52,7 +54,7 @@ SindarinTDebuggerTest >> testExecuteRaiseScriptingException [ do: [ :e | self assert: e script identicalTo: script ] ] -{ #category : #tests } +{ #category : 'tests' } SindarinTDebuggerTest >> testMultipleScriptExecution [ | example | @@ -64,7 +66,7 @@ SindarinTDebuggerTest >> testMultipleScriptExecution [ self assert: example result equals: 16 ] -{ #category : #tests } +{ #category : 'tests' } SindarinTDebuggerTest >> testScriptExecution [ | example | diff --git a/src/Sindarin-Scripts-Tests/SindarinTestDebugger.class.st b/src/Sindarin-Scripts-Tests/SindarinTestDebugger.class.st index f1b3aeb..8b77c91 100644 --- a/src/Sindarin-Scripts-Tests/SindarinTestDebugger.class.st +++ b/src/Sindarin-Scripts-Tests/SindarinTestDebugger.class.st @@ -2,40 +2,42 @@ A Sindarin test debugger to control debugging during tests " Class { - #name : #SindarinTestDebugger, - #superclass : #Object, - #category : #'Sindarin-Scripts-Tests-utils' + #name : 'SindarinTestDebugger', + #superclass : 'Object', + #category : 'Sindarin-Scripts-Tests-utils', + #package : 'Sindarin-Scripts-Tests', + #tag : 'utils' } -{ #category : #accessing } +{ #category : 'accessing' } SindarinTestDebugger >> context [ ^self ] -{ #category : #actions } +{ #category : 'actions' } SindarinTestDebugger >> continue [ ^self ] -{ #category : #accessing } +{ #category : 'accessing' } SindarinTestDebugger >> debugSession [ ^ self ] -{ #category : #accessing } +{ #category : 'accessing' } SindarinTestDebugger >> node [ ^ self ] -{ #category : #actions } +{ #category : 'actions' } SindarinTestDebugger >> resume [ ^ self ] -{ #category : #accessing } +{ #category : 'accessing' } SindarinTestDebugger >> sourceNodeExecuted [ ^self ] diff --git a/src/Sindarin-Scripts-Tests/SindarinTestDebuggerScript.class.st b/src/Sindarin-Scripts-Tests/SindarinTestDebuggerScript.class.st index 6a80dd5..d96635f 100644 --- a/src/Sindarin-Scripts-Tests/SindarinTestDebuggerScript.class.st +++ b/src/Sindarin-Scripts-Tests/SindarinTestDebuggerScript.class.st @@ -2,36 +2,38 @@ I am a dummy sindaring debugging script for test purposes " Class { - #name : #SindarinTestDebuggerScript, - #superclass : #Object, + #name : 'SindarinTestDebuggerScript', + #superclass : 'Object', #traits : 'TDebuggerScript', #classTraits : 'TDebuggerScript classTrait', #instVars : [ 'node', 'counter' ], - #category : #'Sindarin-Scripts-Tests-utils' + #category : 'Sindarin-Scripts-Tests-utils', + #package : 'Sindarin-Scripts-Tests', + #tag : 'utils' } -{ #category : #accessing } +{ #category : 'accessing' } SindarinTestDebuggerScript >> counter [ ^ counter ] -{ #category : #executing } +{ #category : 'executing' } SindarinTestDebuggerScript >> executeWith: aDebugger [ node := aDebugger node. counter := counter + 1 ] -{ #category : #executing } +{ #category : 'executing' } SindarinTestDebuggerScript >> initialize [ counter := 0 ] -{ #category : #accessing } +{ #category : 'accessing' } SindarinTestDebuggerScript >> node [ ^ node diff --git a/src/Sindarin-Scripts-Tests/package.st b/src/Sindarin-Scripts-Tests/package.st index a36d441..d085b42 100644 --- a/src/Sindarin-Scripts-Tests/package.st +++ b/src/Sindarin-Scripts-Tests/package.st @@ -1 +1 @@ -Package { #name : #'Sindarin-Scripts-Tests' } +Package { #name : 'Sindarin-Scripts-Tests' } diff --git a/src/Sindarin-Scripts/SindarinDebugger.extension.st b/src/Sindarin-Scripts/SindarinDebugger.extension.st index de4a9bc..652289a 100644 --- a/src/Sindarin-Scripts/SindarinDebugger.extension.st +++ b/src/Sindarin-Scripts/SindarinDebugger.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #SindarinDebugger } +Extension { #name : 'SindarinDebugger' } -{ #category : #'*Sindarin-Scripts' } +{ #category : '*Sindarin-Scripts' } SindarinDebugger >> run: aSindarinScript [ aSindarinScript executeWith: self diff --git a/src/Sindarin-Scripts/SindarinPointcut.class.st b/src/Sindarin-Scripts/SindarinPointcut.class.st index bf46b58..821cc62 100644 --- a/src/Sindarin-Scripts/SindarinPointcut.class.st +++ b/src/Sindarin-Scripts/SindarinPointcut.class.st @@ -1,6 +1,6 @@ Class { - #name : #SindarinPointcut, - #superclass : #Object, + #name : 'SindarinPointcut', + #superclass : 'Object', #instVars : [ 'ast', 'metalink' @@ -8,27 +8,29 @@ Class { #classVars : [ 'Pointcuts' ], - #category : #'Sindarin-Scripts-core' + #category : 'Sindarin-Scripts-core', + #package : 'Sindarin-Scripts', + #tag : 'core' } -{ #category : #adding } +{ #category : 'adding' } SindarinPointcut class >> addPointcut: aSindarinPointcut [ self pointcuts add: aSindarinPointcut ] -{ #category : #accessing } +{ #category : 'accessing' } SindarinPointcut class >> pointcuts [ ^ Pointcuts ifNil: [ Pointcuts := Set new ] ] -{ #category : #adding } +{ #category : 'adding' } SindarinPointcut class >> removePointcut: aSindarinPointcut [ aSindarinPointcut uninstall. self pointcuts remove: aSindarinPointcut ] -{ #category : #accessing } +{ #category : 'accessing' } SindarinPointcut class >> target: anAst [ ^ self new @@ -36,18 +38,18 @@ SindarinPointcut class >> target: anAst [ install ] -{ #category : #accessing } +{ #category : 'accessing' } SindarinPointcut >> ast: anObject [ ast := anObject ] -{ #category : #actions } +{ #category : 'actions' } SindarinPointcut >> install [ self class addPointcut: self. ast link: self link ] -{ #category : #building } +{ #category : 'building' } SindarinPointcut >> link [ metalink ifNotNil: [ metalink uninstall ]. metalink := MetaLink new. @@ -57,7 +59,7 @@ SindarinPointcut >> link [ ^metalink ] -{ #category : #installing } +{ #category : 'installing' } SindarinPointcut >> uninstall [ metalink uninstall ] diff --git a/src/Sindarin-Scripts/SindarinPointcutException.class.st b/src/Sindarin-Scripts/SindarinPointcutException.class.st index 7d530df..7b899b5 100644 --- a/src/Sindarin-Scripts/SindarinPointcutException.class.st +++ b/src/Sindarin-Scripts/SindarinPointcutException.class.st @@ -6,15 +6,17 @@ When Sindarin debugs me, it executes the debugging script that I reference. " Class { - #name : #SindarinPointcutException, - #superclass : #Halt, + #name : 'SindarinPointcutException', + #superclass : 'Halt', #instVars : [ 'script' ], - #category : #'Sindarin-Scripts-core' + #category : 'Sindarin-Scripts-core', + #package : 'Sindarin-Scripts', + #tag : 'core' } -{ #category : #debugging } +{ #category : 'debugging' } SindarinPointcutException class >> signalWith: aSindarinScript [ @@ -24,26 +26,26 @@ SindarinPointcutException class >> signalWith: aSindarinScript [ scriptingException debug ] -{ #category : #handling } +{ #category : 'handling' } SindarinPointcutException >> debug [ signalContext := thisContext contextTag. signaler ifNil: [ signaler := self receiver ]. super debug ] -{ #category : #testing } +{ #category : 'testing' } SindarinPointcutException >> isHandleableBy: aDebugger [ ^ aDebugger == SindarinDebugger ] -{ #category : #accessing } +{ #category : 'accessing' } SindarinPointcutException >> script [ ^ script ] -{ #category : #accessing } +{ #category : 'accessing' } SindarinPointcutException >> script: anObject [ script := anObject diff --git a/src/Sindarin-Scripts/SindarinScript.class.st b/src/Sindarin-Scripts/SindarinScript.class.st index 85e284b..6ab3228 100644 --- a/src/Sindarin-Scripts/SindarinScript.class.st +++ b/src/Sindarin-Scripts/SindarinScript.class.st @@ -6,46 +6,48 @@ Has an automatic mechanism to register its script on the ScriptableDebugger clas - `dbg`: the SindarinDebugger instance that will control the interrupted execution " Class { - #name : #SindarinScript, - #superclass : #Object, + #name : 'SindarinScript', + #superclass : 'Object', #instVars : [ 'dbg', 'args' ], - #category : #'Sindarin-Scripts-core' + #category : 'Sindarin-Scripts-core', + #package : 'Sindarin-Scripts', + #tag : 'core' } -{ #category : #accessing } +{ #category : 'accessing' } SindarinScript >> arguments: anArray [ args := anArray ] -{ #category : #accessing } +{ #category : 'accessing' } SindarinScript >> debugger [ ^dbg ] -{ #category : #accessing } +{ #category : 'accessing' } SindarinScript >> debugger: aSindarinDebugger [ dbg := aSindarinDebugger ] -{ #category : #running } +{ #category : 'running' } SindarinScript >> execute [ "By default: does nothing" ] -{ #category : #deprecated } +{ #category : 'deprecated' } SindarinScript >> execute: aScriptableDebugger [ self subclassResponsibility ] -{ #category : #deprecated } +{ #category : 'deprecated' } SindarinScript >> execute: aScriptableDebugger withArgs: anOrderedCollection [ self subclassResponsibility. ] -{ #category : #running } +{ #category : 'running' } SindarinScript >> executeWith: aSindarinDebugger [ dbg := aSindarinDebugger. self execute diff --git a/src/Sindarin-Scripts/SindarinScriptBuilder.class.st b/src/Sindarin-Scripts/SindarinScriptBuilder.class.st index 2041408..e8239f2 100644 --- a/src/Sindarin-Scripts/SindarinScriptBuilder.class.st +++ b/src/Sindarin-Scripts/SindarinScriptBuilder.class.st @@ -2,7 +2,9 @@ I create `SindarinScript` objects " Class { - #name : #SindarinScriptBuilder, - #superclass : #Object, - #category : #'Sindarin-Scripts-core' + #name : 'SindarinScriptBuilder', + #superclass : 'Object', + #category : 'Sindarin-Scripts-core', + #package : 'Sindarin-Scripts', + #tag : 'core' } diff --git a/src/Sindarin-Scripts/SindarinScriptPointcutsExamples.class.st b/src/Sindarin-Scripts/SindarinScriptPointcutsExamples.class.st index a26b41e..7108976 100644 --- a/src/Sindarin-Scripts/SindarinScriptPointcutsExamples.class.st +++ b/src/Sindarin-Scripts/SindarinScriptPointcutsExamples.class.st @@ -2,16 +2,18 @@ I provide examples of code to instrument for testing Sindarin scripts pointcuts " Class { - #name : #SindarinScriptPointcutsExamples, - #superclass : #Object, + #name : 'SindarinScriptPointcutsExamples', + #superclass : 'Object', #instVars : [ 'script', 'result' ], - #category : #'Sindarin-Scripts-examples' + #category : 'Sindarin-Scripts-examples', + #package : 'Sindarin-Scripts', + #tag : 'examples' } -{ #category : #examples } +{ #category : 'examples' } SindarinScriptPointcutsExamples >> exampleSquared [ |init square| init := 2. @@ -22,19 +24,19 @@ SindarinScriptPointcutsExamples >> exampleSquared [ ] -{ #category : #accessing } +{ #category : 'accessing' } SindarinScriptPointcutsExamples >> result [ ^ result ] -{ #category : #accessing } +{ #category : 'accessing' } SindarinScriptPointcutsExamples >> script [ ^ script ] -{ #category : #accessing } +{ #category : 'accessing' } SindarinScriptPointcutsExamples >> script: anObject [ script := anObject diff --git a/src/Sindarin-Scripts/StepToNextDoIterationDbgScript.class.st b/src/Sindarin-Scripts/StepToNextDoIterationDbgScript.class.st index 82e1756..8d4e8f2 100644 --- a/src/Sindarin-Scripts/StepToNextDoIterationDbgScript.class.st +++ b/src/Sindarin-Scripts/StepToNextDoIterationDbgScript.class.st @@ -2,42 +2,44 @@ If aContext has among its senders a context for the #do: method of an instance of Collection (or subclasses), step until the next time the argument block of #do: is executed (or until the #do: context is popped if it happens first) " Class { - #name : #StepToNextDoIterationDbgScript, - #superclass : #SindarinScript, + #name : 'StepToNextDoIterationDbgScript', + #superclass : 'SindarinScript', #instVars : [ 'startContext', 'doContext', 'doArgumentBlock' ], - #category : #'Sindarin-Scripts-examples' + #category : 'Sindarin-Scripts-examples', + #package : 'Sindarin-Scripts', + #tag : 'examples' } -{ #category : #example } +{ #category : 'example' } StepToNextDoIterationDbgScript class >> doCollectionExample [ |a| a := OrderedCollection new. { 1 . 2 . 3 } do: [ :int | a add: int. a add: int ]. ] -{ #category : #accessing } +{ #category : 'accessing' } StepToNextDoIterationDbgScript class >> scriptName [ ^ 'StepToNextDoIteration' ] -{ #category : #helper } +{ #category : 'helper' } StepToNextDoIterationDbgScript >> context: aContext isForBlock: aBlock [ "Returns whether aContext is a block context for aBlock" aContext isBlockContext ifFalse: [ ^ false ]. ^ aContext closure sourceNode == aBlock sourceNode. ] -{ #category : #helper } +{ #category : 'helper' } StepToNextDoIterationDbgScript >> contextIsOnStack: aContext [ "Returns whether aContext is somewhere on the stack" ^ (dbg context findContextSuchThat: [ :aContexta| aContexta == aContext ]) isNotNil. ] -{ #category : #running } +{ #category : 'running' } StepToNextDoIterationDbgScript >> execute: aScriptableDebugger [ | stepHook | dbg := aScriptableDebugger. @@ -68,18 +70,18 @@ StepToNextDoIterationDbgScript >> execute: aScriptableDebugger [ ]. ] -{ #category : #running } +{ #category : 'running' } StepToNextDoIterationDbgScript >> execute: aScriptableDebugger withArgs: anOrderedCollection [ self execute: aScriptableDebugger. ] -{ #category : #helper } +{ #category : 'helper' } StepToNextDoIterationDbgScript >> findContextForSelector: aSymbol andClassOrSubclassOf: aClass [ "Run through the context stack from top to bottom to find a context whose selector is aSymbol and for which the class of its receiver is equal to or a subclass of aClass" ^ dbg context findContextSuchThat: [ :ctxt | (ctxt method selector = aSymbol) and: [ ctxt receiver isKindOf: aClass ] ] ] -{ #category : #helper } +{ #category : 'helper' } StepToNextDoIterationDbgScript >> stepToContextForBlock: aBlock [ "Runs the execution until the current context is a block context for aBlock" [ self context: (dbg context) isForBlock: aBlock ] whileFalse: [dbg step]. diff --git a/src/Sindarin-Scripts/StepUntilAboutToSignalExceptionDbgScript.class.st b/src/Sindarin-Scripts/StepUntilAboutToSignalExceptionDbgScript.class.st index 40a8466..2718e5f 100644 --- a/src/Sindarin-Scripts/StepUntilAboutToSignalExceptionDbgScript.class.st +++ b/src/Sindarin-Scripts/StepUntilAboutToSignalExceptionDbgScript.class.st @@ -2,17 +2,19 @@ When executed, this script steps the execution until it is about to signal an exception. " Class { - #name : #StepUntilAboutToSignalExceptionDbgScript, - #superclass : #SindarinScript, - #category : #'Sindarin-Scripts-examples' + #name : 'StepUntilAboutToSignalExceptionDbgScript', + #superclass : 'SindarinScript', + #category : 'Sindarin-Scripts-examples', + #package : 'Sindarin-Scripts', + #tag : 'examples' } -{ #category : #accessing } +{ #category : 'accessing' } StepUntilAboutToSignalExceptionDbgScript class >> scriptName [ ^ 'StepUntilAboutToSignalException' ] -{ #category : #running } +{ #category : 'running' } StepUntilAboutToSignalExceptionDbgScript >> contextIsAboutToSignalException: aContext [ "Returns whether aContext is about to execute a message-send of selector #signal to an instance of the Exception class (or one of its subclasses)" | node | @@ -26,13 +28,13 @@ StepUntilAboutToSignalExceptionDbgScript >> contextIsAboutToSignalException: aCo ] -{ #category : #running } +{ #category : 'running' } StepUntilAboutToSignalExceptionDbgScript >> execute: aScriptableDebugger [ dbg := aScriptableDebugger. [ self contextIsAboutToSignalException: dbg context ] whileFalse: [ dbg step ]. ] -{ #category : #running } +{ #category : 'running' } StepUntilAboutToSignalExceptionDbgScript >> execute: aScriptableDebugger withArgs: anOrderedCollection [ self execute: aScriptableDebugger ] diff --git a/src/Sindarin-Scripts/TDebuggerScript.trait.st b/src/Sindarin-Scripts/TDebuggerScript.trait.st index 8c41c0a..ea7505f 100644 --- a/src/Sindarin-Scripts/TDebuggerScript.trait.st +++ b/src/Sindarin-Scripts/TDebuggerScript.trait.st @@ -1,51 +1,53 @@ Trait { - #name : #TDebuggerScript, - #category : #'Sindarin-Scripts-core' + #name : 'TDebuggerScript', + #category : 'Sindarin-Scripts-core', + #package : 'Sindarin-Scripts', + #tag : 'core' } -{ #category : #executing } +{ #category : 'executing' } TDebuggerScript classSide >> defaultArguments [ ^OrderedCollection new ] -{ #category : #executing } +{ #category : 'executing' } TDebuggerScript classSide >> defaultHooks [ ^OrderedCollection new ] -{ #category : #executing } +{ #category : 'executing' } TDebuggerScript classSide >> defaultPredicates [ ^OrderedCollection new ] -{ #category : #executing } +{ #category : 'executing' } TDebuggerScript >> arguments [ ^self class defaultArguments ] -{ #category : #executing } +{ #category : 'executing' } TDebuggerScript >> execute [ ^ SindarinPointcutException signalWith: self ] -{ #category : #executing } +{ #category : 'executing' } TDebuggerScript >> executeWith: aDebugger [ ^self ] -{ #category : #executing } +{ #category : 'executing' } TDebuggerScript >> hooks [ ^self class defaultHooks ] -{ #category : #executing } +{ #category : 'executing' } TDebuggerScript >> predicates [ ^self class defaultPredicates ] -{ #category : #executing } +{ #category : 'executing' } TDebuggerScript >> shouldExecute [ ^self predicates allSatisfy: [ :p| p evaluate ] ] diff --git a/src/Sindarin-Scripts/TSindarin.extension.st b/src/Sindarin-Scripts/TSindarin.extension.st index e1a088c..d5ca972 100644 --- a/src/Sindarin-Scripts/TSindarin.extension.st +++ b/src/Sindarin-Scripts/TSindarin.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #TSindarin } +Extension { #name : 'TSindarin' } -{ #category : #'*Sindarin-Scripts' } +{ #category : '*Sindarin-Scripts' } TSindarin classSide >> debugSessionWithScript: aDebugSession [ | debugger exception sindarinPointCutExceptionClass | diff --git a/src/Sindarin-Scripts/TSindarinScriptInterpreter.trait.st b/src/Sindarin-Scripts/TSindarinScriptInterpreter.trait.st index 677eb45..3245957 100644 --- a/src/Sindarin-Scripts/TSindarinScriptInterpreter.trait.st +++ b/src/Sindarin-Scripts/TSindarinScriptInterpreter.trait.st @@ -1,4 +1,6 @@ Trait { - #name : #TSindarinScriptInterpreter, - #category : #'Sindarin-Scripts-core' + #name : 'TSindarinScriptInterpreter', + #category : 'Sindarin-Scripts-core', + #package : 'Sindarin-Scripts', + #tag : 'core' } diff --git a/src/Sindarin-Scripts/package.st b/src/Sindarin-Scripts/package.st index 6f97b36..0bb2cbc 100644 --- a/src/Sindarin-Scripts/package.st +++ b/src/Sindarin-Scripts/package.st @@ -1 +1 @@ -Package { #name : #'Sindarin-Scripts' } +Package { #name : 'Sindarin-Scripts' } diff --git a/src/Sindarin-Tests/SindarinDebuggerTest.class.st b/src/Sindarin-Tests/SindarinDebuggerTest.class.st index 1f08e6e..430eb4c 100644 --- a/src/Sindarin-Tests/SindarinDebuggerTest.class.st +++ b/src/Sindarin-Tests/SindarinDebuggerTest.class.st @@ -136,7 +136,6 @@ SindarinDebuggerTest >> methodWithNotEvaluatedBlockWhoseCreationIsFirstBytecodeI ^ a * 42 ] - { #category : 'helpers' } SindarinDebuggerTest >> methodWithOneAssignment [ @@ -1399,7 +1398,7 @@ SindarinDebuggerTest >> testSkipCanSkipReturnIfItIsNotTheLastReturn [ self assert: scdbg node value value equals: 2 ] -{ #category : #tests } +{ #category : 'tests' } SindarinDebuggerTest >> testSkipCannotSkipReturnIfItIsTheLastReturn [ | scdbg nodeWithImplicitReturn | diff --git a/src/Sindarin/Context.extension.st b/src/Sindarin/Context.extension.st index 5621831..90235f2 100644 --- a/src/Sindarin/Context.extension.st +++ b/src/Sindarin/Context.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #Context } +Extension { #name : 'Context' } -{ #category : #'*Sindarin' } +{ #category : '*Sindarin' } Context >> stepToSendOrReturnOrJump [ "Simulate the execution of bytecodes until either sending a message or diff --git a/src/Sindarin/DebugSession.extension.st b/src/Sindarin/DebugSession.extension.st index 31496ee..53cfe74 100644 --- a/src/Sindarin/DebugSession.extension.st +++ b/src/Sindarin/DebugSession.extension.st @@ -1,11 +1,11 @@ -Extension { #name : #DebugSession } +Extension { #name : 'DebugSession' } -{ #category : #'*Sindarin' } +{ #category : '*Sindarin' } DebugSession >> asSindarinDebugSession [ ^ SindarinDebugSession new debugSession: self ] -{ #category : #'*Sindarin' } +{ #category : '*Sindarin' } DebugSession >> stepToFirstInterestingBytecodeWithJumpIn: aProcess [ "After a restart of a method activation step to the first bytecode instruction that is of interest for the debugger. @@ -24,7 +24,7 @@ DebugSession >> stepToFirstInterestingBytecodeWithJumpIn: aProcess [ ^ aProcess stepToSendOrReturnOrJump ] -{ #category : #'*Sindarin' } +{ #category : '*Sindarin' } DebugSession >> suspendedContext: aContext [ interruptedContext := aContext diff --git a/src/Sindarin/DebuggedExecutionException.class.st b/src/Sindarin/DebuggedExecutionException.class.st index b16d5a8..2549680 100644 --- a/src/Sindarin/DebuggedExecutionException.class.st +++ b/src/Sindarin/DebuggedExecutionException.class.st @@ -1,10 +1,12 @@ Class { - #name : #DebuggedExecutionException, - #superclass : #Error, - #category : #'Sindarin-Exceptions' + #name : 'DebuggedExecutionException', + #superclass : 'Error', + #category : 'Sindarin-Exceptions', + #package : 'Sindarin', + #tag : 'Exceptions' } -{ #category : #testing } +{ #category : 'testing' } DebuggedExecutionException >> isExceptionSignalledForDebuggedExecution [ ^ true ] diff --git a/src/Sindarin/DebuggedExecutionIsFinished.class.st b/src/Sindarin/DebuggedExecutionIsFinished.class.st index 41e4090..b652f67 100644 --- a/src/Sindarin/DebuggedExecutionIsFinished.class.st +++ b/src/Sindarin/DebuggedExecutionIsFinished.class.st @@ -1,5 +1,7 @@ Class { - #name : #DebuggedExecutionIsFinished, - #superclass : #DebuggedExecutionException, - #category : #'Sindarin-Exceptions' + #name : 'DebuggedExecutionIsFinished', + #superclass : 'DebuggedExecutionException', + #category : 'Sindarin-Exceptions', + #package : 'Sindarin', + #tag : 'Exceptions' } diff --git a/src/Sindarin/InstructionStream.extension.st b/src/Sindarin/InstructionStream.extension.st index 6639356..5e8b26f 100644 --- a/src/Sindarin/InstructionStream.extension.st +++ b/src/Sindarin/InstructionStream.extension.st @@ -1,27 +1,27 @@ -Extension { #name : #InstructionStream } +Extension { #name : 'InstructionStream' } -{ #category : #'*Sindarin' } +{ #category : '*Sindarin' } InstructionStream >> willJump [ "Answer whether the next bytecode will jump." ^ self willJumpIfFalse or:[ self willJumpIfTrue or: [ self willJumpTo ] ] ] -{ #category : #'*Sindarin' } +{ #category : '*Sindarin' } InstructionStream >> willJumpIfTrue [ "Answer whether the next bytecode is a jump-if-false." ^ self method encoderClass isBranchIfTrueAt: pc in: self method ] -{ #category : #'*Sindarin' } +{ #category : '*Sindarin' } InstructionStream >> willJumpTo [ "Answer whether the next bytecode is a jump-if-false." ^ self method encoderClass isJumpAt: pc in: self method ] -{ #category : #'*Sindarin' } +{ #category : '*Sindarin' } InstructionStream >> willSendOrReturnOrStoreOrCreateBlock [ "Answer whether the next bytecode will be interesting for the debugger to stop." @@ -30,7 +30,7 @@ InstructionStream >> willSendOrReturnOrStoreOrCreateBlock [ self willReturn or: [ self willStore or: [ self willCreateBlock ] ] ] ] -{ #category : #'*Sindarin' } +{ #category : '*Sindarin' } InstructionStream >> willStoreButNotPop [ "Answer whether the next bytecode is a store that are not store-pop" diff --git a/src/Sindarin/NodeNotInASTError.class.st b/src/Sindarin/NodeNotInASTError.class.st index e10cd45..bddf0c8 100644 --- a/src/Sindarin/NodeNotInASTError.class.st +++ b/src/Sindarin/NodeNotInASTError.class.st @@ -2,7 +2,9 @@ I am signaled when we try to move the execution to a node that is not in the home context's method ast. " Class { - #name : #NodeNotInASTError, - #superclass : #Error, - #category : #'Sindarin-Exceptions' + #name : 'NodeNotInASTError', + #superclass : 'Error', + #category : 'Sindarin-Exceptions', + #package : 'Sindarin', + #tag : 'Exceptions' } diff --git a/src/Sindarin/NotValidPcError.class.st b/src/Sindarin/NotValidPcError.class.st index 643a4f6..8652c16 100644 --- a/src/Sindarin/NotValidPcError.class.st +++ b/src/Sindarin/NotValidPcError.class.st @@ -2,7 +2,9 @@ I am signaled when I try to modify the execution of a context to get to an invalid PC (lower than the method initalPC or greater than the method endPC) " Class { - #name : #NotValidPcError, - #superclass : #Error, - #category : #'Sindarin-Exceptions' + #name : 'NotValidPcError', + #superclass : 'Error', + #category : 'Sindarin-Exceptions', + #package : 'Sindarin', + #tag : 'Exceptions' } diff --git a/src/Sindarin/OCBytecodeToASTCache.extension.st b/src/Sindarin/OCBytecodeToASTCache.extension.st index 534915d..7257bab 100644 --- a/src/Sindarin/OCBytecodeToASTCache.extension.st +++ b/src/Sindarin/OCBytecodeToASTCache.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #OCBytecodeToASTCache } +Extension { #name : 'OCBytecodeToASTCache' } -{ #category : #'*Sindarin' } +{ #category : '*Sindarin' } OCBytecodeToASTCache >> firstRecursiveBcOffsetForStatementNode: aStatementNode [ ^ self methodOrBlockNode bcToASTCache bcToASTMap keys sorted detect: [ diff --git a/src/Sindarin/Object.extension.st b/src/Sindarin/Object.extension.st index 6ca8095..d0b1b50 100644 --- a/src/Sindarin/Object.extension.st +++ b/src/Sindarin/Object.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #Object } +Extension { #name : 'Object' } -{ #category : #'*Sindarin' } +{ #category : '*Sindarin' } Object >> isExceptionSignalledForDebuggedExecution [ ^ false ] diff --git a/src/Sindarin/Process.extension.st b/src/Sindarin/Process.extension.st index eb3b21f..b52c6e4 100644 --- a/src/Sindarin/Process.extension.st +++ b/src/Sindarin/Process.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #Process } +Extension { #name : 'Process' } -{ #category : #'*Sindarin' } +{ #category : '*Sindarin' } Process >> stepToSendOrReturnOrJump [ ^Processor activeProcess diff --git a/src/Sindarin/RBAssignmentNode.extension.st b/src/Sindarin/RBAssignmentNode.extension.st index 6878bcd..faa0dc9 100644 --- a/src/Sindarin/RBAssignmentNode.extension.st +++ b/src/Sindarin/RBAssignmentNode.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RBAssignmentNode } +Extension { #name : 'RBAssignmentNode' } -{ #category : #'*Sindarin' } +{ #category : '*Sindarin' } RBAssignmentNode >> skipWithDebugger: aSindarinDebugger [ aSindarinDebugger skipAssignmentNodeCompletely diff --git a/src/Sindarin/RBBlockDefinitionSearchingVisitor.class.st b/src/Sindarin/RBBlockDefinitionSearchingVisitor.class.st index 7ae0a94..e94aa95 100644 --- a/src/Sindarin/RBBlockDefinitionSearchingVisitor.class.st +++ b/src/Sindarin/RBBlockDefinitionSearchingVisitor.class.st @@ -1,14 +1,16 @@ Class { - #name : #RBBlockDefinitionSearchingVisitor, - #superclass : #RBProgramNodeVisitor, + #name : 'RBBlockDefinitionSearchingVisitor', + #superclass : 'RBProgramNodeVisitor', #instVars : [ 'blockToSearch', 'isBlockFound' ], - #category : #'Sindarin-Base' + #category : 'Sindarin-Base', + #package : 'Sindarin', + #tag : 'Base' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } RBBlockDefinitionSearchingVisitor class >> newToSearch: aBlockNode [ ^ self new @@ -16,26 +18,26 @@ RBBlockDefinitionSearchingVisitor class >> newToSearch: aBlockNode [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } RBBlockDefinitionSearchingVisitor >> blockToSearch: aBlockNode [ blockToSearch := aBlockNode. isBlockFound := false ] -{ #category : #initialization } +{ #category : 'initialization' } RBBlockDefinitionSearchingVisitor >> initialize [ isBlockFound := false ] -{ #category : #accessing } +{ #category : 'accessing' } RBBlockDefinitionSearchingVisitor >> isBlockFound [ ^ isBlockFound ] -{ #category : #visiting } +{ #category : 'visiting' } RBBlockDefinitionSearchingVisitor >> visitNode: aNode [ super visitNode: aNode. diff --git a/src/Sindarin/RBBlockNode.extension.st b/src/Sindarin/RBBlockNode.extension.st index fdd3133..c386df0 100644 --- a/src/Sindarin/RBBlockNode.extension.st +++ b/src/Sindarin/RBBlockNode.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RBBlockNode } +Extension { #name : 'RBBlockNode' } -{ #category : #'*Sindarin' } +{ #category : '*Sindarin' } RBBlockNode >> executedNodesAfter: aNode [ "Gives all nodes that are executed after aNode. Assuming that aNode is a recursive child, then all nodes executed after it are all nodes after it in allChildrenPostOrder" @@ -13,13 +13,13 @@ RBBlockNode >> executedNodesAfter: aNode [ ^ nodesAfter ] -{ #category : #'*Sindarin' } +{ #category : '*Sindarin' } RBBlockNode >> firstPCOfStatement: aStatementNode [ ^ self bcToASTCache firstRecursiveBcOffsetForStatementNode: aStatementNode ] -{ #category : #'*Sindarin' } +{ #category : '*Sindarin' } RBBlockNode >> nextExecutedNodeAfter: aNode [ "Find first node that is after aNode that has an associated pc in method node all children (post-order)" @@ -31,7 +31,7 @@ RBBlockNode >> nextExecutedNodeAfter: aNode [ ^ nodesAfter at: indexOfNextNode ] -{ #category : #'*Sindarin' } +{ #category : '*Sindarin' } RBBlockNode >> parentOfIdenticalSubtree: subtree [ ^ self allChildren reversed @@ -40,7 +40,7 @@ RBBlockNode >> parentOfIdenticalSubtree: subtree [ ifNone: [ nil ] ] -{ #category : #'*Sindarin' } +{ #category : '*Sindarin' } RBBlockNode >> skipWithDebugger: aSindarinDebugger [ aSindarinDebugger skipBlockNode diff --git a/src/Sindarin/RBMessageNode.extension.st b/src/Sindarin/RBMessageNode.extension.st index 20711a9..85adff8 100644 --- a/src/Sindarin/RBMessageNode.extension.st +++ b/src/Sindarin/RBMessageNode.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RBMessageNode } +Extension { #name : 'RBMessageNode' } -{ #category : #'*Sindarin' } +{ #category : '*Sindarin' } RBMessageNode >> skipWithDebugger: aSindarinDebugger [ aSindarinDebugger skipMessageNode diff --git a/src/Sindarin/RBMethodNode.extension.st b/src/Sindarin/RBMethodNode.extension.st index 789a1d9..ab20951 100644 --- a/src/Sindarin/RBMethodNode.extension.st +++ b/src/Sindarin/RBMethodNode.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RBMethodNode } +Extension { #name : 'RBMethodNode' } -{ #category : #'*Sindarin' } +{ #category : '*Sindarin' } RBMethodNode >> executedNodesAfter: aNode [ "Gives all nodes that are executed after aNode. Assuming that aNode is a recursive child, then all nodes executed after it are all nodes after it in allChildrenPostOrder" @@ -13,13 +13,13 @@ RBMethodNode >> executedNodesAfter: aNode [ ^ nodesAfter ] -{ #category : #'*Sindarin' } +{ #category : '*Sindarin' } RBMethodNode >> firstPCOfStatement: aStatementNode [ ^ self bcToASTCache firstRecursiveBcOffsetForStatementNode: aStatementNode ] -{ #category : #'*Sindarin' } +{ #category : '*Sindarin' } RBMethodNode >> nextExecutedNodeAfter: aNode [ "Find first node that is after aNode that has an associated pc in method node all children (post-order)" @@ -31,7 +31,7 @@ RBMethodNode >> nextExecutedNodeAfter: aNode [ ^ nodesAfter at: indexOfNextNode ] -{ #category : #'*Sindarin' } +{ #category : '*Sindarin' } RBMethodNode >> parentOfIdenticalSubtree: subtree [ ^ self allChildren reversed @@ -40,7 +40,7 @@ RBMethodNode >> parentOfIdenticalSubtree: subtree [ ifNone: [ nil ] ] -{ #category : #'*Sindarin' } +{ #category : '*Sindarin' } RBMethodNode >> statementNodeContaining: aNode [ | statementNode parentOfStatementNode | diff --git a/src/Sindarin/RBProgramNode.extension.st b/src/Sindarin/RBProgramNode.extension.st index 2887116..719379d 100644 --- a/src/Sindarin/RBProgramNode.extension.st +++ b/src/Sindarin/RBProgramNode.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RBProgramNode } +Extension { #name : 'RBProgramNode' } -{ #category : #'*Sindarin' } +{ #category : '*Sindarin' } RBProgramNode >> allChildrenPostOrder [ | children | @@ -11,7 +11,7 @@ RBProgramNode >> allChildrenPostOrder [ ^ children ] -{ #category : #'*Sindarin' } +{ #category : '*Sindarin' } RBProgramNode >> skipWithDebugger: aSindarinDebugger [ aSindarinDebugger step diff --git a/src/Sindarin/RBReturnNode.extension.st b/src/Sindarin/RBReturnNode.extension.st index e9ffb01..f5f04c1 100644 --- a/src/Sindarin/RBReturnNode.extension.st +++ b/src/Sindarin/RBReturnNode.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RBReturnNode } +Extension { #name : 'RBReturnNode' } -{ #category : #'*Sindarin' } +{ #category : '*Sindarin' } RBReturnNode >> skipWithDebugger: aSindarinDebugger [ aSindarinDebugger skipReturnNode diff --git a/src/Sindarin/SindarinDebugSession.class.st b/src/Sindarin/SindarinDebugSession.class.st index a585445..15851d9 100644 --- a/src/Sindarin/SindarinDebugSession.class.st +++ b/src/Sindarin/SindarinDebugSession.class.st @@ -4,17 +4,19 @@ stepRecord: StepRecord StepRecords: LinkedList[StepRecord] " Class { - #name : #SindarinDebugSession, - #superclass : #Object, + #name : 'SindarinDebugSession', + #superclass : 'Object', #instVars : [ 'triggerEventOn', 'canBeTerminated', 'debugSession' ], - #category : #'Sindarin-Core' + #category : 'Sindarin-Core', + #package : 'Sindarin', + #tag : 'Core' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } SindarinDebugSession class >> newWithName: aString forProcess: aProcess [ ^ DebugSession new @@ -23,50 +25,50 @@ SindarinDebugSession class >> newWithName: aString forProcess: aProcess [ asSindarinDebugSession ] -{ #category : #initialization } +{ #category : 'initialization' } SindarinDebugSession >> activateEventTriggering [ triggerEventOn := true. self flag: 'Why not refreshing?'. "self refreshAttachedDebugger." ] -{ #category : #converting } +{ #category : 'converting' } SindarinDebugSession >> asSindarinDebugSession [ ^ self ] -{ #category : #accessing } +{ #category : 'accessing' } SindarinDebugSession >> canBeTerminated [ ^ canBeTerminated ] -{ #category : #accessing } +{ #category : 'accessing' } SindarinDebugSession >> canBeTerminated: anObject [ canBeTerminated := anObject ] -{ #category : #initialization } +{ #category : 'initialization' } SindarinDebugSession >> deactivateEventTriggering [ triggerEventOn := false ] -{ #category : #accessing } +{ #category : 'accessing' } SindarinDebugSession >> debugSession [ ^ debugSession ] -{ #category : #accessing } +{ #category : 'accessing' } SindarinDebugSession >> debugSession: anObject [ debugSession := anObject ] -{ #category : #initialization } +{ #category : 'initialization' } SindarinDebugSession >> initialize [ super initialize. @@ -74,14 +76,14 @@ SindarinDebugSession >> initialize [ canBeTerminated := true ] -{ #category : #initialization } +{ #category : 'initialization' } SindarinDebugSession >> refreshAttachedDebugger [ "The following lines are to force possible debuggers observing the same debug session to update themselves based" self debugSession triggerEvent: #contextChanged ] -{ #category : #'debugging actions' } +{ #category : 'debugging actions' } SindarinDebugSession >> resumeAndClear [ self debugSession @@ -89,7 +91,7 @@ SindarinDebugSession >> resumeAndClear [ clear ] -{ #category : #'debugging actions' } +{ #category : 'debugging actions' } SindarinDebugSession >> stepInto: aContext [ "Should not step more a process that is terminating, otherwise the image will get locked." self flag: 'Why the image gets locked? Please investigate.'. @@ -99,7 +101,7 @@ SindarinDebugSession >> stepInto: aContext [ ^ self debugSession stepInto: aContext ] -{ #category : #'debugging actions' } +{ #category : 'debugging actions' } SindarinDebugSession >> stepOver: aContext [ "Should not step more a process that is terminating, otherwise the image will get locked." self flag: 'Why the image gets locked? Please investigate.'. @@ -109,13 +111,13 @@ SindarinDebugSession >> stepOver: aContext [ ^ self debugSession stepOver: aContext ] -{ #category : #'debugging actions' } +{ #category : 'debugging actions' } SindarinDebugSession >> terminate [ canBeTerminated ifTrue: [ ^ self debugSession terminate ] ] -{ #category : #'debugging actions' } +{ #category : 'debugging actions' } SindarinDebugSession >> triggerEvent: anEventSelector [ triggerEventOn ifTrue: [ diff --git a/src/Sindarin/SindarinDebugger.class.st b/src/Sindarin/SindarinDebugger.class.st index 1468921..30bdec0 100644 --- a/src/Sindarin/SindarinDebugger.class.st +++ b/src/Sindarin/SindarinDebugger.class.st @@ -15,14 +15,16 @@ Virtual breakpoints were introduced because due to technical limitations, normal - stepHooks: OrderedCollection. A list of blocks to be evaluated after each step of the debugged execution " Class { - #name : #SindarinDebugger, - #superclass : #Object, + #name : 'SindarinDebugger', + #superclass : 'Object', #traits : 'TDebugger + TSindarin', #classTraits : 'TDebugger classTrait + TSindarin classTrait', - #category : #'Sindarin-Base' + #category : 'Sindarin-Base', + #package : 'Sindarin', + #tag : 'Base' } -{ #category : #stackAccessHelpers } +{ #category : 'stackAccessHelpers' } SindarinDebugger >> assignmentValue [ "Returns the value about to be assigned, if the current node is an assignment node. Otherwise, returns nil" self flag: 'Why there is no error raised here, while for the case of message sends there is an error?'. @@ -31,7 +33,7 @@ SindarinDebugger >> assignmentValue [ ^ self context at: self currentContextStackSize ] -{ #category : #stackAccessHelpers } +{ #category : 'stackAccessHelpers' } SindarinDebugger >> assignmentVariableName [ "Returns the variable name about to be assigned to, if the current node is an assignment node. Otherwise, returns nil" self flag: 'Why there is no error raised in the case of assignemnts, while there is one for message sends?'. @@ -40,13 +42,13 @@ SindarinDebugger >> assignmentVariableName [ ^ self node variable name ] -{ #category : #astAndAstMapping } +{ #category : 'astAndAstMapping' } SindarinDebugger >> bestNodeFor: anInterval [ ^ self node methodNode bestNodeFor: anInterval ] -{ #category : #'ast manipulation' } +{ #category : 'ast manipulation' } SindarinDebugger >> canStillExecute: aProgramNode [ "returns true if the last pc mapped to aProgramNode is greater than `self pc` in the right context " @@ -64,7 +66,7 @@ SindarinDebugger >> canStillExecute: aProgramNode [ ^ rightContext pc < lastPcForNode ] -{ #category : #'execution predicates' } +{ #category : 'execution predicates' } SindarinDebugger >> contextIsAboutToSignalException: aContext [ "Returns whether aContext is about to execute a message-send of selector #signal to an instance of the Exception class (or one of its subclasses)" @@ -79,7 +81,7 @@ SindarinDebugger >> contextIsAboutToSignalException: aContext [ ] -{ #category : #'stepping - auto' } +{ #category : 'stepping - auto' } SindarinDebugger >> continue [ "Steps the execution until it: - is about to signal an exception. @@ -89,13 +91,13 @@ SindarinDebugger >> continue [ whileFalse: [ self step ] ] -{ #category : #accessing } +{ #category : 'accessing' } SindarinDebugger >> firstPCOfStatement: aStatementNode [ ^ self methodNode firstPCOfStatement: aStatementNode ] -{ #category : #'execution predicates' } +{ #category : 'execution predicates' } SindarinDebugger >> hasSignalledUnhandledException [ "Returns true if the debugged execution has signalled an exception that has not been handled by any on:do: (i.e. the #defaultAction of the exception is about to be executed. This default action typically leads to opening a debugger on the process that signalled the exception)" @@ -103,7 +105,7 @@ SindarinDebugger >> hasSignalledUnhandledException [ self receiver isKindOf: Exception ] ] -{ #category : #'execution predicates' } +{ #category : 'execution predicates' } SindarinDebugger >> isAboutToInstantiateClass [ | methodAboutToExecute | @@ -115,13 +117,13 @@ SindarinDebugger >> isAboutToInstantiateClass [ methodAboutToExecute primitive ] ] -{ #category : #'execution predicates' } +{ #category : 'execution predicates' } SindarinDebugger >> isAboutToSignalException [ ^ self contextIsAboutToSignalException: self context ] -{ #category : #'API - changes' } +{ #category : 'API - changes' } SindarinDebugger >> jumpIntoBlock: aBlockNode toNode: targetNode [ "Moves to targetNode that must be in aBlockNode, which should be a recursive child" @@ -139,21 +141,21 @@ SindarinDebugger >> jumpIntoBlock: aBlockNode toNode: targetNode [ ^ self moveToNode: targetNode ] -{ #category : #stackAccessHelpers } +{ #category : 'stackAccessHelpers' } SindarinDebugger >> message: aSelector [ "Returns whether the execution is about to send a message of selector @aSelector to any object" ^ self isMessageSend and: [ self messageSelector = aSelector ] ] -{ #category : #stackAccessHelpers } +{ #category : 'stackAccessHelpers' } SindarinDebugger >> message: aSelector to: anObject [ "Returns whether the execution is about to send a message of selector @aSelector to @anObject" ^ (self message: aSelector) and: [ self messageReceiver == anObject ] ] -{ #category : #stackAccessHelpers } +{ #category : 'stackAccessHelpers' } SindarinDebugger >> message: aSelector toInstanceOf: aClass [ "Returns whether the execution is about to send a message of selector @aSelector to an instance of class @aClass" @@ -164,7 +166,7 @@ SindarinDebugger >> message: aSelector toInstanceOf: aClass [ ^ self messageReceiver isKindOf: aClass ] -{ #category : #stackAccessHelpers } +{ #category : 'stackAccessHelpers' } SindarinDebugger >> messageArguments [ "Returns the arguments of the message about to be sent, if the current node is a message node." @@ -181,7 +183,7 @@ SindarinDebugger >> messageArguments [ ^ arguments ] -{ #category : #stackAccessHelpers } +{ #category : 'stackAccessHelpers' } SindarinDebugger >> messageReceiver [ "Returns the receiver of the message about to be sent, if the current node is a message node." @@ -191,7 +193,7 @@ SindarinDebugger >> messageReceiver [ at: self currentContextStackSize - self node arguments size ] -{ #category : #stackAccessHelpers } +{ #category : 'stackAccessHelpers' } SindarinDebugger >> messageSelector [ "Returns the selector of the message about to be sent, if the current node is a message node." @@ -200,7 +202,7 @@ SindarinDebugger >> messageSelector [ ^ self node selector ] -{ #category : #'API - changes' } +{ #category : 'API - changes' } SindarinDebugger >> moveToNode: aNode [ "Allows to jump to the first bytecode offset associated to aNode, as long as aNode is in the same lexical context as the suspended context" @@ -228,20 +230,20 @@ SindarinDebugger >> moveToNode: aNode [ self pc: firstPCForNode ] -{ #category : #'accessing - bytes' } +{ #category : 'accessing - bytes' } SindarinDebugger >> nextBytecode [ ^ self symbolicBytecodesForCurrent detect: [ :each | each offset = self pc ] ] -{ #category : #'API - changes' } +{ #category : 'API - changes' } SindarinDebugger >> nextExecutedNodeAfter: aNode [ ^ self methodNode nextExecutedNodeAfter: aNode ] -{ #category : #'API - changes' } +{ #category : 'API - changes' } SindarinDebugger >> pc: anInteger [ "Allows to move to the first PC associated to the node to which anInteger is associated. anInteger must be a valid pc in the suspended context" @@ -271,14 +273,14 @@ SindarinDebugger >> pc: anInteger [ self skipUpToNode: nextNode ] -{ #category : #'stepping - auto' } +{ #category : 'stepping - auto' } SindarinDebugger >> proceed [ "alias of #continue" ^ self continue ] -{ #category : #asserting } +{ #category : 'asserting' } SindarinDebugger >> shouldStepIntoInMethod: aRBMethodNode [ "used by #stpeToReturn to know if it should stepInto or stepOver. It should stepInto to get to non-local returns" @@ -301,7 +303,7 @@ SindarinDebugger >> shouldStepIntoInMethod: aRBMethodNode [ aRBMethodNode ] ] -{ #category : #private } +{ #category : 'private' } SindarinDebugger >> signalExceptionIfDebuggedExecutionHasSignalledUnhandledException [ | unhandledException | @@ -321,7 +323,7 @@ SindarinDebugger >> signalExceptionIfDebuggedExecutionHasSignalledUnhandledExcep signalWithException: unhandledException ]" ] -{ #category : #private } +{ #category : 'private' } SindarinDebugger >> signalExceptionIfDebuggedExecutionIsFinished [ "Signals an DebuggedExecutionIsFinished exception if the debugged execution is finished" @@ -329,7 +331,7 @@ SindarinDebugger >> signalExceptionIfDebuggedExecutionIsFinished [ DebuggedExecutionIsFinished signal ] ] -{ #category : #'stepping - skip' } +{ #category : 'stepping - skip' } SindarinDebugger >> skip [ | instructionStream | @@ -343,7 +345,7 @@ SindarinDebugger >> skip [ self node skipWithDebugger: self ] -{ #category : #'stepping - skip' } +{ #category : 'stepping - skip' } SindarinDebugger >> skipAssignmentNodeCompletely [ "Pop the value that will be assigned" @@ -361,7 +363,7 @@ SindarinDebugger >> skipAssignmentNodeCompletely [ self debugSession interruptedProcess ] -{ #category : #'stepping - skip' } +{ #category : 'stepping - skip' } SindarinDebugger >> skipAssignmentNodeWith: replacementValue [ "Pop the value to be assigned" @@ -375,7 +377,7 @@ SindarinDebugger >> skipAssignmentNodeWith: replacementValue [ self debugSession interruptedProcess ] -{ #category : #'stepping - skip' } +{ #category : 'stepping - skip' } SindarinDebugger >> skipBlockNode [ self skipPcToNextBytecode. @@ -386,7 +388,7 @@ SindarinDebugger >> skipBlockNode [ self debugSession interruptedProcess ] -{ #category : #'stepping - skip' } +{ #category : 'stepping - skip' } SindarinDebugger >> skipJump [ | instructionStream | @@ -399,7 +401,7 @@ SindarinDebugger >> skipJump [ self debugSession interruptedProcess ] -{ #category : #'stepping - skip' } +{ #category : 'stepping - skip' } SindarinDebugger >> skipMessageNode [ self node arguments do: [ :arg | self context pop ]. "Pop the arguments of the message send from the context's value stack" @@ -411,7 +413,7 @@ SindarinDebugger >> skipMessageNode [ self debugSession interruptedProcess ] -{ #category : #'stepping - skip' } +{ #category : 'stepping - skip' } SindarinDebugger >> skipMessageNodeWith: replacementValue [ self node arguments do: [ :arg | self context pop ]. "Pop the arguments of the message send from the context's value stack" @@ -426,7 +428,7 @@ SindarinDebugger >> skipMessageNodeWith: replacementValue [ self debugSession interruptedProcess ] -{ #category : #'stepping - skip' } +{ #category : 'stepping - skip' } SindarinDebugger >> skipReturnNode [ | node allReturnNodes | @@ -449,7 +451,7 @@ SindarinDebugger >> skipReturnNode [ self debugSession interruptedProcess ] -{ #category : #'stepping - skip' } +{ #category : 'stepping - skip' } SindarinDebugger >> skipThroughNode: aProgramNode [ "Skips execution until program counter reaches aProgramNode. Also skip the target node." @@ -457,7 +459,7 @@ SindarinDebugger >> skipThroughNode: aProgramNode [ self skipUpToNode: aProgramNode skipTargetNode: true ] -{ #category : #'stepping - skip' } +{ #category : 'stepping - skip' } SindarinDebugger >> skipToPC: aPC [ "Skips execution until program counter reaches aPC." @@ -467,7 +469,7 @@ SindarinDebugger >> skipToPC: aPC [ do: [ ^ self ] ] -{ #category : #'stepping - skip' } +{ #category : 'stepping - skip' } SindarinDebugger >> skipUpToNode: aProgramNode [ "Skips execution until program counter reaches aProgramNode. Does not skip the target node." @@ -475,7 +477,7 @@ SindarinDebugger >> skipUpToNode: aProgramNode [ self skipUpToNode: aProgramNode skipTargetNode: false ] -{ #category : #'stepping - skip' } +{ #category : 'stepping - skip' } SindarinDebugger >> skipUpToNode: aProgramNode skipTargetNode: skipTargetNode [ "Skips execution until program counter reaches aProgramNode." @@ -490,7 +492,7 @@ SindarinDebugger >> skipUpToNode: aProgramNode skipTargetNode: skipTargetNode [ skipTargetNode ifTrue: [ self skip ] ] -{ #category : #'stepping - skip' } +{ #category : 'stepping - skip' } SindarinDebugger >> skipWith: replacementValue [ "If it is a message-send or assignment, skips the execution of the current instruction, and puts the replacementValue on the execution stack." @@ -504,7 +506,7 @@ SindarinDebugger >> skipWith: replacementValue [ ^ self skipAssignmentNodeWith: replacementValue ] ] -{ #category : #'ast manipulation' } +{ #category : 'ast manipulation' } SindarinDebugger >> statementNodeContaining: aNode [ | method statementNode parentOfStatementNode | @@ -521,7 +523,7 @@ SindarinDebugger >> statementNodeContaining: aNode [ ^ statementNode ] -{ #category : #'stepping - steps' } +{ #category : 'stepping - steps' } SindarinDebugger >> step [ "Executes the next instruction. If the instruction is a message-send, step inside it." @@ -530,14 +532,14 @@ SindarinDebugger >> step [ self basicStep ] -{ #category : #'stepping - steps' } +{ #category : 'stepping - steps' } SindarinDebugger >> step: anInt [ "Call the #step method @anInt times" anInt timesRepeat: [ self step ] ] -{ #category : #'stepping - steps' } +{ #category : 'stepping - steps' } SindarinDebugger >> stepBytecode [ "Executes the next bytecode" @@ -547,7 +549,7 @@ SindarinDebugger >> stepBytecode [ self debugSession updateContextTo: process suspendedContext ] -{ #category : #'stepping - steps' } +{ #category : 'stepping - steps' } SindarinDebugger >> stepOver [ | startContext | self flag: 'Why don''t we use the stepOver from the debug session? Do we really need to use the #step that performs exception check and termination check every time?'. @@ -559,14 +561,14 @@ SindarinDebugger >> stepOver [ whileFalse: [ self step ] ] -{ #category : #'stepping - steps' } +{ #category : 'stepping - steps' } SindarinDebugger >> stepOver: anInt [ "Call the #stepOver method @anInt times" anInt timesRepeat: [ self stepOver ] ] -{ #category : #'stepping - steps' } +{ #category : 'stepping - steps' } SindarinDebugger >> stepThrough [ "Hacked for demonstration purposes to have a stepThrough" @@ -574,7 +576,7 @@ SindarinDebugger >> stepThrough [ self basicStepThrough ] -{ #category : #'stepping - steps' } +{ #category : 'stepping - steps' } SindarinDebugger >> stepToMethodEntry [ self flag: @@ -584,7 +586,7 @@ SindarinDebugger >> stepToMethodEntry [ self debugSession updateContextTo: process suspendedContext ] -{ #category : #'stepping - steps' } +{ #category : 'stepping - steps' } SindarinDebugger >> stepToReturn [ | oldContext methodAST | @@ -600,14 +602,14 @@ SindarinDebugger >> stepToReturn [ ifFalse: [ self basicStepOver ] ] ] -{ #category : #'stepping - steps' } +{ #category : 'stepping - steps' } SindarinDebugger >> stepUntil: aBlock [ "Steps the execution until aBlock evaluates to true" aBlock whileFalse: [ self step ] ] -{ #category : #'API - changes' } +{ #category : 'API - changes' } SindarinDebugger >> tryMoveToNodeInHomeContext: aNode [ "Moves to node aNode if aNode is in the lexical context. Otherwise, the program state goes back to how it was before trying and signals an error as the node is not in AST" @@ -623,7 +625,7 @@ SindarinDebugger >> tryMoveToNodeInHomeContext: aNode [ ^ NodeNotInASTError signal ] ] -{ #category : #'execution predicates' } +{ #category : 'execution predicates' } SindarinDebugger >> willStoreButNotPop [ ^ self instructionStream willStoreButNotPop diff --git a/src/Sindarin/SindarinSkippingReturnWarning.class.st b/src/Sindarin/SindarinSkippingReturnWarning.class.st index 08b4082..4298f5c 100644 --- a/src/Sindarin/SindarinSkippingReturnWarning.class.st +++ b/src/Sindarin/SindarinSkippingReturnWarning.class.st @@ -1,5 +1,7 @@ Class { - #name : #SindarinSkippingReturnWarning, - #superclass : #Warning, - #category : #'Sindarin-Exceptions' + #name : 'SindarinSkippingReturnWarning', + #superclass : 'Warning', + #category : 'Sindarin-Exceptions', + #package : 'Sindarin', + #tag : 'Exceptions' } diff --git a/src/Sindarin/SteppingATerminatingProcess.class.st b/src/Sindarin/SteppingATerminatingProcess.class.st index 699f312..c321cfb 100644 --- a/src/Sindarin/SteppingATerminatingProcess.class.st +++ b/src/Sindarin/SteppingATerminatingProcess.class.st @@ -1,5 +1,7 @@ Class { - #name : #SteppingATerminatingProcess, - #superclass : #Error, - #category : #'Sindarin-Exceptions' + #name : 'SteppingATerminatingProcess', + #superclass : 'Error', + #category : 'Sindarin-Exceptions', + #package : 'Sindarin', + #tag : 'Exceptions' } diff --git a/src/Sindarin/TSindarin.trait.st b/src/Sindarin/TSindarin.trait.st index a834351..3569e25 100644 --- a/src/Sindarin/TSindarin.trait.st +++ b/src/Sindarin/TSindarin.trait.st @@ -2,50 +2,52 @@ I am a trait that contains the core API that a scriptable debugger should use " Trait { - #name : #TSindarin, + #name : 'TSindarin', #instVars : [ 'process', 'sindarinSession', 'blockToDebug' ], - #category : #'Sindarin-Core' + #category : 'Sindarin-Core', + #package : 'Sindarin', + #tag : 'Core' } -{ #category : #start } +{ #category : 'start' } TSindarin classSide >> attachTo: aDebugSession [ "Returns a new instance of ScriptableDebugger attached to aDebugSession" ^ self new attachTo: aDebugSession ] -{ #category : #actions } +{ #category : 'actions' } TSindarin classSide >> closeAllDebuggers [