Skip to content

Commit a1954f8

Browse files
authored
sourcecodestring retrieval across dialects (#189)
1 parent c5d7068 commit a1954f8

File tree

11 files changed

+45
-4
lines changed

11 files changed

+45
-4
lines changed

repository/Grease-Core.package/GRPlatform.class/instance/compile.into.classified..st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
file library
1+
meta-object-protocol
22
compile: aString into: aClass classified: aSymbol
33
"The trick here is to be as silently a possible so that the package is not marked dirty when running WAFileLibrary test.
44
This also makes running tests much faster."
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
file library
1+
meta-object-protocol
22
removeSelector: aSymbol from: aClass
33
self subclassResponsibility
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
meta-object-protocol
2+
sourceCodeStringOf: aCompiledMethod
3+
"Return a String with the source code for a compiled method."
4+
5+
self subclassResponsibility
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
meta-object-protocol
2+
sourceCodeStringOf: aCompiledMethod
3+
"Return a String with the source code for a compiled method."
4+
5+
^ self convertToSmalltalkNewlines: aCompiledMethod _sourceString
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
meta-object-protocol
2+
sourceCodeStringOf: aCompiledMethod
3+
"Return a String with the source code for a compiled method."
4+
5+
^ self convertToSmalltalkNewlines: aCompiledMethod sourceCode
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
meta-object-protocol
2+
sourceCodeStringOf: aCompiledMethod
3+
"Return a String with the source code for a compiled method."
4+
5+
^ self convertToSmalltalkNewlines: aCompiledMethod sourceCode
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
meta-object-protocol
2+
sourceCodeStringOf: aCompiledMethod
3+
"Return a String with the source code for a compiled method."
4+
5+
^ self convertToSmalltalkNewlines: aCompiledMethod sourceCode
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
meta-object-protocol
2+
sourceCodeStringOf: aCompiledMethod
3+
"Return a String with the source code for a compiled method."
4+
5+
^ self convertToSmalltalkNewlines: aCompiledMethod getSourceFromFile

repository/Grease-Tests-Core.package/GRPlatformTest.class/instance/testCompileAsciiString.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests-file library
1+
tests-mop
22
testCompileAsciiString
33
| selector expected source |
44

repository/Grease-Tests-Core.package/GRPlatformTest.class/instance/testCompileUnicodeString.st

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests-file library
1+
tests-mop
22
testCompileUnicodeString
33
| selector expected source |
44
selector := #stringMethod.

0 commit comments

Comments
 (0)