Soo... even if (compiler visitNode: methodNode) defined the category
correctly, it would get overwritten by the non-set curCategory ivar
value passed in from STEvaluationDriver.
Now, the question to the experts: Where and how should that be fixed?
The fix is so easy that missing it is also easy:
--- a/packages/stinst/parser/STCompiler.st
+++ b/packages/stinst/parser/STCompiler.st
@@ -154,13 +154,13 @@ indexed'' bytecode. The resulting stream is
STCompiler class >> compile: methodNode asMethodOf: aBehavior
classified: aString parser: aParser environment: aNamespace [
<category: 'compilation'>
- | compiler |
+ | compiler method |
compiler := self new.
compiler class: aBehavior parser: aParser.
aNamespace isNil ifFalse: [compiler addPool: aNamespace].
- ^(compiler visitNode: methodNode)
- methodCategory: aString;
- yourself
+ method := compiler visitNode: methodNode.
+ aString isNil ifFalse: [ method methodCategory: aString ].
+ ^method
]
class: aBehavior parser: aParser [
Paolo
_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk