[Vm-dev] what about image reading?
Tobias Pape
Das.Linux at gmx.de
Thu Jan 13 19:57:40 UTC 2011
Am 2011-01-13 um 19:46 schrieb David T. Lewis:
>
> On Thu, Jan 13, 2011 at 06:20:28PM +0100, Tobias Pape wrote:
>>
>> Am 2011-01-13 um 17:52 schrieb David T. Lewis:
>>>
>>> On Thu, Jan 13, 2011 at 05:26:34PM +0100, Tobias Pape wrote:
>>>> [?]
>>>> In a previous discussion, the method
>>>> Interpreter>>readImageFromFile: f HeapSize: desiredHeapSize StartingAt: imageOffset
>>>> was mentioned that can read the image format using the given offset.
>>>> However, neither in the Smalltalk code nor in the generated C code I was able
>>>> to find any uses of this.
>>>>
>>>> SqueakVMMaker/src ??? grep -iR readImageFromFileHeapSizeStartingAt *
>>>> vm/interp.c:sqInt readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squeakFileOffsetType imageOffset);
>>>> vm/interp.c:sqInt readImageFromFileHeapSizeStartingAt(sqImageFile f, usqInt desiredHeapSize, squeakFileOffsetType imageOffset) {
>>>>
[…]
>>
>> The _purpose_ of the 512byte skip was clear to me.
>> I was just puzzled that there is no reference to the indicated method whatsoever.
>> Can you give me a hint, where that is used?
>
> I'm away from Squeak at the moment, but look in class Interpreter
> in package VMMaker. I think the method is #readImageFromFile:HeapSize:StartingAt:
> or similar. The colons get removed from the method/function name as
> part of the translation to C.
Yes, that is true. I've already found that, if you refer to my original post.
My point is, that
NEITHER the smalltalk method
Interpreter>>#readImageFromFile:HeapSize:StartingAt:
NOR the c function
is called at all:
No senders for the Smalltalk method, no reference when
searching all methods source code for readImageFrom, aside the actual implementation
and a mention in some ‘important methods’ collection.
For the C-function, refer to my grep inside the generated source tree. No call at all.
So, why are they existent, in the first place?
So Long
-Tobias
More information about the Vm-dev
mailing list