[Vm-dev] VM Maker: VMMaker.oscog-eem.3067.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Sep 10 02:39:24 UTC 2021
Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.3067.mcz
==================== Summary ====================
Name: VMMaker.oscog-eem.3067
Author: eem
Time: 9 September 2021, 7:39:12.100472 pm
UUID: f1bd765d-1c8e-4736-9c82-313008cd0c2a
Ancestors: VMMaker.oscog-eem.3066
Cogit: print full block cog methods appropriately, avoiding "bad class" printing.
=============== Diff against VMMaker.oscog-eem.3066 ===============
Item was changed:
----- Method: CoInterpreter>>printCogMethod: (in category 'debug printing') -----
printCogMethod: cogMethod
<export: true> "useful for VM debugging; use export: so it will be accessible on win32"
<api>
<var: #cogMethod type: #'CogMethod *'>
| address primitive |
self cCode: ''
inSmalltalk:
[self transcript ensureCr.
cogMethod isInteger ifTrue:
[^self printCogMethod: (self cCoerceSimple: cogMethod to: #'CogMethod *')]].
address := cogMethod asInteger.
self printHex: address;
print: ' <-> ';
printHex: address + cogMethod blockSize.
cogMethod cmType = CMMethod ifTrue:
[self print: ': method: ';
printHex: cogMethod methodObject.
primitive := self primitiveIndexOfMethod: cogMethod methodObject
header: cogMethod methodHeader.
primitive ~= 0 ifTrue:
[self print: ' prim '; printNum: primitive].
+ (objectMemory addressCouldBeObj: cogMethod methodObject) ifTrue:
+ [cogMethod cmIsFullBlock
+ ifTrue: [self print: ' [full]']
+ ifFalse:
+ [(objectMemory addressCouldBeObj: (self methodClassOf: cogMethod methodObject)) ifTrue:
+ [self space; printNameOfClass: (self methodClassOf: cogMethod methodObject) count: 2]]]].
- ((objectMemory addressCouldBeObj: cogMethod methodObject)
- and: [objectMemory addressCouldBeObj: (self methodClassOf: cogMethod methodObject)]) ifTrue:
- [self space; printNameOfClass: (self methodClassOf: cogMethod methodObject) count: 2]].
cogMethod cmType = CMBlock ifTrue:
[self print: ': block home: ';
printHex: (self cCoerceSimple: cogMethod to: #'CogBlockMethod *') cmHomeMethod asUnsignedInteger].
cogMethod cmType = CMClosedPIC ifTrue:
[self print: ': Closed PIC N: ';
printHex: cogMethod cPICNumCases].
cogMethod cmType = CMOpenPIC ifTrue:
[self print: ': Open PIC '].
self print: ' selector: '; printHex: cogMethod selector.
cogMethod selector = objectMemory nilObject
ifTrue: [| s |
(cogMethod cmType = CMMethod
and: [(s := self maybeSelectorOfMethod: cogMethod methodObject) notNil])
ifTrue: [self print: ' (nil: '; printStringOf: s; print: ')']
ifFalse: [self print: ' (nil)']]
ifFalse: [self space; printStringOf: cogMethod selector].
self cr!
Item was changed:
----- Method: CogMethodSurrogate>>cmIsFullBlock (in category 'accessing') -----
cmIsFullBlock
"Answer the value of cpicHasMNUCaseOrCMIsFullBlock"
+ self assert: (self cmType = CMMethod or: [self cmType = CMBlock]).
-
^SistaV1BytecodeSet
ifTrue: [self cpicHasMNUCaseOrCMIsFullBlock]
ifFalse: [false]!
More information about the Vm-dev
mailing list