jpeg plugin problems
Tim Rowledge
tim at sumeru.stanford.edu
Thu Jun 8 18:43:05 UTC 2000
> >primJPEGReadWriterIdctBlockIntcomponent": anArray component: aColorComponent"
> >
> >| qt, ws, "bunch of local integers" |
> >
> >"declarations of non small integer types"
> > self var: #rcvr declareC: 'int *rcvr'.
> > self var: #qTable declareC: 'int **qTable'.
> > self var: #ws declareC: 'int *ws'.
> > self var: #qt declareC: 'int *qt'.
> > self var: #anArray declareC: 'int *anArray'.
> >
> >"the qTable is the instance variable of the JPEG and ws and qt are local
> >to this method"
> >
> > rcvrOop := interpreterProxy stackObjectValue: 2.
> > aColorComponent := interpreterProxy stackObjectValue: 0.
> > anArrayObj := interpreterProxy stackObjectValue: 1.
> > anArray := self cCoerce: (interpreterProxy
> > arrayValueOf: anArrayObj) to: 'int *'.
> > rcvr := self cCoerce: (interpreterProxy
> > firstIndexableField: rcvrOop) to: 'int *'.
> >
> > qTable := self fetchArray: 4 ofObject: rcvr.
At first (very quick) glance, I can't help thinking that this last line
ought to be
qTable _ self fetchArray: 4 ofObject: rcvrOop
since you've just carefully made 'rcvr' be the int* to the first
indexable field. Since rvcr isn't actaully an oop, the
fetchArray:ofObject: is quite likely to have some trouble.
I would recommend you consider a minor rewrite to make your plugin a
subclass of TestInterpreterPlugin and then you can use a slightly
'cleaner' style to get your arguments sorted out that would probably
help a little. Look at the subclasses of TestInterpreterPlugin for
examples.
tim
--
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
The number of UNIX installations has grown to 10, with more expected. (6/72)
More information about the Squeak-dev
mailing list
|