[squeak-dev] The Trunk: Kernel-mt.1119.mcz
Nicolas Cellier
nicolas.cellier.aka.nice at gmail.com
Tue Nov 21 15:23:55 UTC 2017
2017-11-09 11:13 GMT+01:00 <commits at source.squeak.org>:
> Marcel Taeumel uploaded a new version of Kernel to project The Trunk:
> http://source.squeak.org/trunk/Kernel-mt.1119.mcz
>
> ==================== Summary ====================
>
> Name: Kernel-mt.1119
> Author: mt
> Time: 9 November 2017, 11:13:37.82048 am
> UUID: a210d4c7-b8eb-e544-a857-2b0bbade9668
> Ancestors: Kernel-mt.1118
>
> Improves support for having custom compiler classes for class-side
> methods. No need to use #respondsTo:. Just provide default implementation
> of #meta*Class methods in Class. The "super" is important here because the
> old behavior has been to use a custom compiler for the instance-side only.
>
> =============== Diff against Kernel-mt.1118 ===============
>
> Item was added:
> + ----- Method: Class>>metaCompilerClass (in category 'compiling') -----
> + metaCompilerClass
> + "BE CAREFUL!! If you provide your own class to treat class-side
> (resp. meta) methods, you MUST account for the #meta*Class selector to use
> the default implementation in that case. That is, the methods behind
> #meta*Class MUST always get the default Smalltalk treatment."
> +
> + ^ super compilerClass!
>
>
in that case:
Object subclass: #Foo. Foo class >> compilerClass ^FooCompiler.
Foo subclass: #Bar. Bar class >> compilerClass ^FooBarCompiler.
Won't the FooCompiler be used for compiling Bar class side methods?
(though I have never overriden any metaCompilerClass)
Item was added:
> + ----- Method: Class>>metaDecompilerClass (in category 'compiling') -----
> + metaDecompilerClass
> + "BE CAREFUL!! If you provide your own class to treat class-side
> (resp. meta) methods, you MUST account for the #meta*Class selector to use
> the default implementation in that case. That is, the methods behind
> #meta*Class MUST always get the default Smalltalk treatment."
> +
> + ^ super decompilerClass!
>
> Item was added:
> + ----- Method: Class>>metaEvaluatorClass (in category 'compiling') -----
> + metaEvaluatorClass
> + "BE CAREFUL!! If you provide your own class to treat class-side
> (resp. meta) methods, you MUST account for the #meta*Class selector to use
> the default implementation in that case. That is, the methods behind
> #meta*Class MUST always get the default Smalltalk treatment."
> +
> + ^ super evaluatorClass!
>
> Item was added:
> + ----- Method: Class>>metaFormatterClass (in category 'printing') -----
> + metaFormatterClass
> + "BE CAREFUL!! If you provide your own class to treat class-side
> (resp. meta) methods, you MUST account for the #meta*Class selector to use
> the default implementation in that case. That is, the methods behind
> #meta*Class MUST always get the default Smalltalk treatment."
> +
> + ^ super formatterClass!
>
> Item was added:
> + ----- Method: Class>>metaParserClass (in category 'compiling') -----
> + metaParserClass
> + "BE CAREFUL!! If you provide your own class to treat class-side
> (resp. meta) methods, you MUST account for the #meta*Class selector to use
> the default implementation in that case. That is, the methods behind
> #meta*Class MUST always get the default Smalltalk treatment."
> +
> + ^ super parserClass!
>
> Item was added:
> + ----- Method: Class>>metaPrettyPrinterClass (in category 'printing')
> -----
> + metaPrettyPrinterClass
> + "BE CAREFUL!! If you provide your own class to treat class-side
> (resp. meta) methods, you MUST account for the #meta*Class selector to use
> the default implementation in that case. That is, the methods behind
> #meta*Class MUST always get the default Smalltalk treatment."
> +
> + ^ super prettyPrinterClass!
>
> Item was changed:
> ----- Method: Metaclass>>compilerClass (in category 'compiling') -----
> compilerClass
> +
> + ^ self theNonMetaClass metaCompilerClass!
> - "BE CAREFUL!! If you provide your own class to treat class-side
> (resp. meta) methods, you MUST account for the #meta*Class selector to use
> the default implementation in that case. That is, the methods behind
> #meta*Class MUST always get the default Smalltalk treatment."
> -
> - ^ (self theNonMetaClass respondsTo: #metaCompilerClass)
> - ifTrue: [self theNonMetaClass metaCompilerClass]
> - ifFalse: [super compilerClass]!
>
> Item was changed:
> ----- Method: Metaclass>>decompilerClass (in category 'compiling') -----
> decompilerClass
> +
> + ^ self theNonMetaClass metaDecompilerClass!
> - "BE CAREFUL!! If you provide your own class to treat class-side
> (resp. meta) methods, you MUST account for the #meta*Class selector to use
> the default implementation in that case. That is, the methods behind
> #meta*Class MUST always get the default Smalltalk treatment."
> -
> - ^ (self theNonMetaClass respondsTo: #metaDecompilerClass)
> - ifTrue: [self theNonMetaClass metaDecompilerClass]
> - ifFalse: [super decompilerClass]!
>
> Item was changed:
> ----- Method: Metaclass>>evaluatorClass (in category 'compiling') -----
> evaluatorClass
> +
> + ^ self theNonMetaClass metaEvaluatorClass!
> - "BE CAREFUL!! If you provide your own class to treat class-side
> (resp. meta) methods, you MUST account for the #meta*Class selector to use
> the default implementation in that case. That is, the methods behind
> #meta*Class MUST always get the default Smalltalk treatment."
> -
> - ^ (self theNonMetaClass respondsTo: #metaEvaluatorClass)
> - ifTrue: [self theNonMetaClass metaEvaluatorClass]
> - ifFalse: [super evaluatorClass]!
>
> Item was changed:
> ----- Method: Metaclass>>formatterClass (in category 'printing') -----
> formatterClass
> +
> + ^ self theNonMetaClass metaFormatterClass!
> - "BE CAREFUL!! If you provide your own class to treat class-side
> (resp. meta) methods, you MUST account for the #meta*Class selector to use
> the default implementation in that case. That is, the methods behind
> #meta*Class MUST always get the default Smalltalk treatment."
> -
> - ^ (self theNonMetaClass respondsTo: #metaFormatterClass)
> - ifTrue: [self theNonMetaClass metaFormatterClass]
> - ifFalse: [super formatterClass]!
>
> Item was changed:
> ----- Method: Metaclass>>parserClass (in category 'compiling') -----
> parserClass
> +
> + ^ self theNonMetaClass metaParserClass!
> - "BE CAREFUL!! If you provide your own class to treat class-side
> (resp. meta) methods, you MUST account for the #meta*Class selector to use
> the default implementation in that case. That is, the methods behind
> #meta*Class MUST always get the default Smalltalk treatment."
> -
> - ^ (self theNonMetaClass respondsTo: #metaParserClass)
> - ifTrue: [self theNonMetaClass metaParserClass]
> - ifFalse: [super parserClass]!
>
> Item was changed:
> ----- Method: Metaclass>>prettyPrinterClass (in category 'printing')
> -----
> prettyPrinterClass
> +
> + ^ self theNonMetaClass metaPrettyPrinterClass!
> - "BE CAREFUL!! If you provide your own class to treat class-side
> (resp. meta) methods, you MUST account for the #meta*Class selector to use
> the default implementation in that case. That is, the methods behind
> #meta*Class MUST always get the default Smalltalk treatment."
> -
> - ^ (self theNonMetaClass respondsTo: #metaPrettyPrinterClass)
> - ifTrue: [self theNonMetaClass metaPrettyPrinterClass]
> - ifFalse: [super prettyPrinterClass]!
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20171121/e5f93c47/attachment.html>
More information about the Squeak-dev
mailing list
|