[Vm-dev] VM Maker: VMMaker.oscog-mt.3082.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Oct 1 07:56:18 UTC 2021
Marcel Taeumel uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-mt.3082.mcz
==================== Summary ====================
Name: VMMaker.oscog-mt.3082
Author: mt
Time: 1 October 2021, 9:55:59.824336 am
UUID: 97721c27-8230-1e41-81fb-11b5180cef10
Ancestors: VMMaker.oscog-eem.3081
Fixes generated code for v3.stack and v3.cog by adding missing type info to new method #printStringDataOf:on:.
=============== Diff against VMMaker.oscog-eem.3081 ===============
Item was changed:
----- Method: ObjectMemory>>printStringDataOf:on: (in category 'debug printing interpreter support') -----
printStringDataOf: oop on: aStream
<var: 'aStream' type: #'FILE *'>
| i limit n |
+ <var: 'buffer' type: #'char *'>
+ <var: 'wideBuffer' type: #'unsigned int *'>
(self isBytesNonImm: oop)
ifTrue:
[| buffer byte |
buffer := self alloca: 256 * 4.
n := i := 0.
limit := (self numBytesOfBytes: oop) min: 256.
[i < limit] whileTrue:
[byte := self fetchByte: i ofObject: oop.
(byte < 32 "space" and: [byte ~= 9 "tab"])
ifTrue:
[buffer at: n put: $<. n := n + 1.
(byte = 10 or: [byte = 13])
ifTrue:
[byte = 10
ifTrue: [buffer at: n put: $L; at: n + 1 put: $F]
ifFalse: [buffer at: n put: $C; at: n + 1 put: $R].
n := n + 2]
ifFalse:
[byte >= 10 ifTrue:
[buffer at: n put: byte // 10 + $0 asInteger. n := n + 1].
buffer at: n put: byte \\ 10 + $0 asInteger. n := n + 1].
buffer at: n put: $>. n := n + 1]
ifFalse: [buffer at: n put: byte. n := n + 1]].
'%.*s%s\n' f: aStream printf: { n. buffer. (self numBytesOfBytes: oop) > limit ifTrue: ['...'] ifFalse: [''] }]
ifFalse:
[| wideBuffer word |
self assert: (self isWordsNonImm: oop).
wideBuffer := self cCoerce: (self alloca: 1024 * 4) to: 'int *'.
n := i := 0.
limit := (self lengthOf: oop) min: 256.
[i < limit] whileTrue:
[word := self fetchLong32: i ofObject: oop.
(word < 32 "space" and: [word ~= 9 "tab"])
ifTrue:
[wideBuffer at: n put: $<. n := n + 1.
(word = 10 or: [word = 13])
ifTrue:
[word = 10
ifTrue: [wideBuffer at: n put: $L; at: n + 1 put: $F]
ifFalse: [wideBuffer at: n put: $C; at: n + 1 put: $R].
n := n + 2]
ifFalse:
[word >= 10 ifTrue:
[wideBuffer at: n put: word // 10 + $0 asInteger. n := n + 1].
wideBuffer at: n put: word \\ 10 + $0 asInteger. n := n + 1].
wideBuffer at: n put: $>. n := n + 1]
ifFalse: [wideBuffer at: n put: word. n := n + 1]].
'%.*s%s\n' f: aStream wprintf: { n. wideBuffer. (self lengthOf: oop) > limit ifTrue: ['...'] ifFalse: [''] }]!
More information about the Vm-dev
mailing list