[squeak-dev] working on hydra, issue with BitBltPlugin.c
John M McIntosh
johnmci at smalltalkconsulting.com
Thu May 1 19:28:27 UTC 2008
Well more progress at least it runs some bytecodes on osx before dying.
we get a primitive failure in primitiveRenderScanline, and it paints
the screen with the walkback and lets me invoke the emergency debugger.
However in looking it seems I"m missing a change to the bitblt plugin.
Given that the interpreter has
/* This entry point needs to be implemented for the interpreter proxy.
Since BitBlt is now a plugin we need to look up
BitBltPlugin:=loadBitBltFrom
and call it. This entire mechanism should eventually go away and be
replaced with a dynamic lookup from BitBltPlugin itself but for
backward
compatibility this stub is provided */
sqInt loadBitBltFrom(struct Interpreter *intr, sqInt bb) {
void * fn;
fn = ioLoadFunctionFrom("loadBitBltFrom", "BitBltPlugin");
if (fn == 0) {
/* begin primitiveFail */
intr->successFlag = 0;
return null;
}
return (((sqInt (*)(INTERPRETER_ARG_COMMA sqInt)) fn))
(INTERPRETER_PARAM_COMMA bb);
}
but
BitBltPlugin.c is wrong.
EXPORT(sqInt) loadBitBltFrom(sqInt bbObj) {
return loadBitBltFromwarping(bbObj, 0);
}
Isn't C fun, typed language, sure that makes life easier we hear, at
least smalltalk would have said oops no such method that requires TWO
parms, not let me call a method with two parms
hoping it would do the right thing. So we now passed in the pointer
to the interpreter and then pretend it's the bitblt object, which of
course is wrong because that does in this case cause
the primtive to fail as it pulls data from the wrong place.
--
=
=
=
========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
=
=
=
========================================================================
More information about the Squeak-dev
mailing list
|