@@ -2,29 +2,21 @@ Extension { #name : #CompiledMethod }
2
2
3
3
{ #category : #' *Moose-SmalltalkImporter' }
4
4
CompiledMethod >> mooseName [
5
- ^ self mooseNameWithScope: false
6
- ]
7
-
8
- { #category : #' *Moose-SmalltalkImporter' }
9
- CompiledMethod >> mooseNameWithScope: aboolean [
10
5
11
- | string |
12
- string := String streamContents: [:str |
13
- str nextPutAll: self methodClass mooseName.
14
- str nextPut: $..
15
- str nextPutAll: self selector.
16
- self signatureFromSmalltalkSelectorOn: str].
17
- ^ string asSymbol
6
+ ^ String streamContents: [ :str |
7
+ str
8
+ nextPutAll: self methodClass mooseName;
9
+ nextPut: $.;
10
+ nextPutAll: self selector.
11
+ self signatureFromSmalltalkSelectorOn: str ]
18
12
]
19
13
20
14
{ #category : #' *Moose-SmalltalkImporter' }
21
15
CompiledMethod >> signature [
22
16
23
- | ws |
24
- ws := WriteStream on: (String new : 150 ).
25
- ws nextPutAll: self selector.
26
- self signatureFromSmalltalkSelectorOn: ws.
27
- ^ ws contents asSymbol
17
+ ^ (String streamContents: [ :aStream |
18
+ aStream nextPutAll: self selector.
19
+ self signatureFromSmalltalkSelectorOn: aStream ]) asSymbol
28
20
]
29
21
30
22
{ #category : #' *Moose-SmalltalkImporter' }
@@ -34,10 +26,7 @@ CompiledMethod >> signatureFromSmalltalkSelectorOn: aStream [
34
26
sym := self selector.
35
27
numArgs := sym numArgs.
36
28
aStream nextPut: $(.
37
- 1
38
- to: numArgs
39
- do: [:inx | aStream nextPutAll: ' Object,' ].
40
- numArgs > 0 ifTrue: [aStream skip: - 1 " remove last space" ].
41
- aStream nextPut: $).
42
-
29
+ 1 to: numArgs do: [ :inx | aStream nextPutAll: ' Object,' ].
30
+ numArgs > 0 ifTrue: [ aStream skip: - 1 " remove last space" ].
31
+ aStream nextPut: $)
43
32
]
0 commit comments