[Pkg] The Trunk: Kernel-eem.619.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Sep 15 23:40:44 UTC 2011
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.619.mcz
==================== Summary ====================
Name: Kernel-eem.619
Author: eem
Time: 15 September 2011, 4:40:07.103 pm
UUID: a213fef5-96b3-421c-a1ca-db9ec0ef8876
Ancestors: Kernel-nice.618
Kernel half of first part of changes to revive ability to
create subclasses of CompiledMethod. Other half is
Compiler-eem.213.
Bug fix to Compiledmethod class>new so that it creates a
dummy method that has a penultimateLiteral.
=============== Diff against Kernel-nice.618 ===============
Item was added:
+ ----- Method: CompiledMethod class>>methodPropertiesClass (in category 'accessing class hierarchy') -----
+ methodPropertiesClass
+ "Answer the class to use to create a method's properties, which can be a poor man's way
+ to add instance variables to subclassses of CompiledMethod. Subclasses of CompiledMethod
+ should define a corresponding subclass of AdditionalMethodState that adds any instance variables
+ required, and override this method to answer that class."
+ self flag: #notYetImplemented.
+ ^AdditionalMethodState!
Item was changed:
----- Method: CompiledMethod class>>new (in category 'instance creation') -----
new
"This will not make a meaningful method, but it could be used
to invoke some otherwise useful method in this class."
+ ^self newMethod: 2 header: 1024!
- ^ self newMethod: 0 header: 0!
Item was added:
+ ----- Method: CompiledMethodTrailer>>createMethod:class:header: (in category 'creating a method') -----
+ createMethod: numberOfBytesForAllButTrailer class: aCompiledMethodClass header: headerWord
+ | meth |
+ encodedData ifNil: [self encode].
+
+ meth := aCompiledMethodClass newMethod: numberOfBytesForAllButTrailer + size header: headerWord.
+ "copy the encoded trailer data"
+ 1 to: size do:
+ [:i | meth at: meth size - size + i put: (encodedData at: i)].
+
+ ^meth!
More information about the Packages
mailing list