Skip to content

Commit 18b9e5b

Browse files
committed
Cleanup: do not use #notNil, use #isNotNil instead
Fix pharo-spec#95
1 parent d0304a2 commit 18b9e5b

26 files changed

+210
-189
lines changed

src/Sindarin-Tests/SindarinDebugSessionTest.class.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ SindarinDebugSessionTest >> testSindarinSessionInstantiation [
4242
sindarinSession := SindarinDebugSession
4343
newWithName: sessionName
4444
forProcess: process.
45-
self assert: sindarinSession debugSession notNil.
45+
self assert: sindarinSession debugSession isNotNil.
4646
self assert: sindarinSession debugSession name equals: sessionName.
4747
self
4848
assert: sindarinSession debugSession process

src/Sindarin-Tests/SindarinDebuggerTest.class.st

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ SindarinDebuggerTest >> methodWithNotEvaluatedBlockWhoseCreationIsFirstBytecodeI
136136
^ a * 42
137137
]
138138

139-
140139
{ #category : 'helpers' }
141140
SindarinDebuggerTest >> methodWithOneAssignment [
142141

@@ -1399,7 +1398,7 @@ SindarinDebuggerTest >> testSkipCanSkipReturnIfItIsNotTheLastReturn [
13991398
self assert: scdbg node value value equals: 2
14001399
]
14011400

1402-
{ #category : #tests }
1401+
{ #category : 'tests' }
14031402
SindarinDebuggerTest >> testSkipCannotSkipReturnIfItIsTheLastReturn [
14041403

14051404
| scdbg nodeWithImplicitReturn |
@@ -2041,8 +2040,8 @@ SindarinDebuggerTest >> testTemporaryNamed [
20412040
SindarinDebuggerTest >> testTerminate [
20422041
| dbg |
20432042
dbg := SindarinDebugger debug: [ self helperMethod13 ].
2044-
self assert: dbg debugSession interruptedContext notNil.
2045-
self assert: dbg debugSession interruptedProcess notNil.
2043+
self assert: dbg debugSession interruptedContext isNotNil.
2044+
self assert: dbg debugSession interruptedProcess isNotNil.
20462045
dbg terminate.
20472046
self assert: dbg debugSession interruptedContext isNil.
20482047
self assert: dbg debugSession interruptedProcess isNil.

src/Sindarin/Context.extension.st

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
Extension { #name : #Context }
1+
Extension { #name : 'Context' }
22

3-
{ #category : #'*Sindarin' }
3+
{ #category : '*Sindarin' }
44
Context >> stepToSendOrReturnOrJump [
55

66
"Simulate the execution of bytecodes until either sending a message or

src/Sindarin/DebugSession.extension.st

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
Extension { #name : #DebugSession }
1+
Extension { #name : 'DebugSession' }
22

3-
{ #category : #'*Sindarin' }
3+
{ #category : '*Sindarin' }
44
DebugSession >> asSindarinDebugSession [
55
^ SindarinDebugSession new debugSession: self
66
]
77

8-
{ #category : #'*Sindarin' }
8+
{ #category : '*Sindarin' }
99
DebugSession >> stepToFirstInterestingBytecodeWithJumpIn: aProcess [
1010
"After a restart of a method activation step to the first
1111
bytecode instruction that is of interest for the debugger.
@@ -24,7 +24,7 @@ DebugSession >> stepToFirstInterestingBytecodeWithJumpIn: aProcess [
2424
^ aProcess stepToSendOrReturnOrJump
2525
]
2626

27-
{ #category : #'*Sindarin' }
27+
{ #category : '*Sindarin' }
2828
DebugSession >> suspendedContext: aContext [
2929

3030
interruptedContext := aContext
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
Class {
2-
#name : #DebuggedExecutionException,
3-
#superclass : #Error,
4-
#category : #'Sindarin-Exceptions'
2+
#name : 'DebuggedExecutionException',
3+
#superclass : 'Error',
4+
#category : 'Sindarin-Exceptions',
5+
#package : 'Sindarin',
6+
#tag : 'Exceptions'
57
}
68

7-
{ #category : #testing }
9+
{ #category : 'testing' }
810
DebuggedExecutionException >> isExceptionSignalledForDebuggedExecution [
911
^ true
1012
]
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
Class {
2-
#name : #DebuggedExecutionIsFinished,
3-
#superclass : #DebuggedExecutionException,
4-
#category : #'Sindarin-Exceptions'
2+
#name : 'DebuggedExecutionIsFinished',
3+
#superclass : 'DebuggedExecutionException',
4+
#category : 'Sindarin-Exceptions',
5+
#package : 'Sindarin',
6+
#tag : 'Exceptions'
57
}

src/Sindarin/InstructionStream.extension.st

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
Extension { #name : #InstructionStream }
1+
Extension { #name : 'InstructionStream' }
22

3-
{ #category : #'*Sindarin' }
3+
{ #category : '*Sindarin' }
44
InstructionStream >> willJump [
55
"Answer whether the next bytecode will jump."
66

77
^ self willJumpIfFalse or:[ self willJumpIfTrue or: [ self willJumpTo ] ]
88
]
99

10-
{ #category : #'*Sindarin' }
10+
{ #category : '*Sindarin' }
1111
InstructionStream >> willJumpIfTrue [
1212
"Answer whether the next bytecode is a jump-if-false."
1313

1414
^ self method encoderClass isBranchIfTrueAt: pc in: self method
1515
]
1616

17-
{ #category : #'*Sindarin' }
17+
{ #category : '*Sindarin' }
1818
InstructionStream >> willJumpTo [
1919
"Answer whether the next bytecode is a jump-if-false."
2020

2121
^ self method encoderClass isJumpAt: pc in: self method
2222
]
2323

24-
{ #category : #'*Sindarin' }
24+
{ #category : '*Sindarin' }
2525
InstructionStream >> willSendOrReturnOrStoreOrCreateBlock [
2626

2727
"Answer whether the next bytecode will be interesting for the debugger to stop."
@@ -30,7 +30,7 @@ InstructionStream >> willSendOrReturnOrStoreOrCreateBlock [
3030
self willReturn or: [ self willStore or: [ self willCreateBlock ] ] ]
3131
]
3232

33-
{ #category : #'*Sindarin' }
33+
{ #category : '*Sindarin' }
3434
InstructionStream >> willStoreButNotPop [
3535
"Answer whether the next bytecode is a store that are not store-pop"
3636

src/Sindarin/NodeNotInASTError.class.st

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
I am signaled when we try to move the execution to a node that is not in the home context's method ast.
33
"
44
Class {
5-
#name : #NodeNotInASTError,
6-
#superclass : #Error,
7-
#category : #'Sindarin-Exceptions'
5+
#name : 'NodeNotInASTError',
6+
#superclass : 'Error',
7+
#category : 'Sindarin-Exceptions',
8+
#package : 'Sindarin',
9+
#tag : 'Exceptions'
810
}

src/Sindarin/NotValidPcError.class.st

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
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)
33
"
44
Class {
5-
#name : #NotValidPcError,
6-
#superclass : #Error,
7-
#category : #'Sindarin-Exceptions'
5+
#name : 'NotValidPcError',
6+
#superclass : 'Error',
7+
#category : 'Sindarin-Exceptions',
8+
#package : 'Sindarin',
9+
#tag : 'Exceptions'
810
}

src/Sindarin/OCBytecodeToASTCache.extension.st

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
Extension { #name : #OCBytecodeToASTCache }
1+
Extension { #name : 'OCBytecodeToASTCache' }
22

3-
{ #category : #'*Sindarin' }
3+
{ #category : '*Sindarin' }
44
OCBytecodeToASTCache >> firstRecursiveBcOffsetForStatementNode: aStatementNode [
55

66
^ self methodOrBlockNode bcToASTCache bcToASTMap keys sorted detect: [

0 commit comments

Comments
 (0)