[Vm-dev] Eliminating cCode:inSmalltalk:'s
Ben Coman
btc at openinworld.com
Tue Oct 30 11:57:50 UTC 2018
I'm sure this was explained somewhere before (even recently),
but I forget, and can't find anything in my usual search places.
On Tue, 30 Oct 2018 at 09:02, <commits at source.squeak.org> wrote:
>
> Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
> http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2479.mcz
>
> ==================== Summary ====================
>
> Name: VMMaker.oscog-eem.2479
> Author: eem
> Time: 29 October 2018, 6:00:57.748695 pm
> UUID: b191888c-6777-483b-82b4-121103743ebf
> Ancestors: VMMaker.oscog-eem.2478
>
> Plugins:
> Fix slip in primitiveDirectoryDelimitor.
> Eliminate cCode:inSmalltalk:'s from the B3DAcceleratorPlugin
>
> =============== Diff against VMMaker.oscog-eem.2478 ===============
> <snip>
> Item was changed:
> ----- Method: B3DAcceleratorPlugin>>primitiveAllocateTexture (in
> category 'primitives-textures') -----
> primitiveAllocateTexture
> | h w d result renderer |
> <export: true>
> interpreterProxy methodArgumentCount = 4
> ifFalse:[^interpreterProxy primitiveFail].
> h := interpreterProxy stackIntegerValue: 0.
> w := interpreterProxy stackIntegerValue: 1.
> d := interpreterProxy stackIntegerValue: 2.
> renderer := interpreterProxy stackIntegerValue: 3.
> interpreterProxy failed ifTrue:[^nil].
> + result := self b3dxAllocateTexture: renderer _: w _: h _: d.
> - result := self cCode:'b3dxAllocateTexture(renderer, w, h, d)'
> inSmalltalk:[-1].
> result = -1 ifTrue:[^interpreterProxy primitiveFail].
> interpreterProxy pop: 5. "args+rcvr"
> ^interpreterProxy pushInteger: result.!
>
What is the mechanism that allows cCode:inSmalltalk:'s to be replaced like
above?
I half expected "b3dxAllocateTexture:_:_:_:"
to be newly defined somewhere else in that commit.
cheers -ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20181030/937a1a6d/attachment-0001.html>
More information about the Vm-dev
mailing list