Interpreter: how generate C for new method

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Interpreter: how generate C for new method

cdavidshaffer
I've added a *new* method to Interpreter but VMMaker seems to ignore
it.  How do I coax it into generating the C code for my method?  BTW,
I've verified that I'm doing things otherwise correctly by changing an
existing method and noting that the chages are reflected in the
generated C source.

Thanks,

David


Reply | Threaded
Open this post in threaded view
|

Re: Interpreter: how generate C for new method

johnmci
Well if you don't have any clear usage of it in the interpreter, then  
the optimization inlining step will
consider it not-callable and remove it from the list of methods to  
generate C code for.
Fortunately there is another method (the name escapes me) where you  
can add methods that
aren't explicitly called, yet must exist.

Interpreter(class)>>requiredMethodNames


On 15-Sep-05, at 6:23 AM, David Shaffer wrote:

> I've added a *new* method to Interpreter but VMMaker seems to ignore
> it.  How do I coax it into generating the C code for my method?  BTW,
> I've verified that I'm doing things otherwise correctly by changing an
> existing method and noting that the chages are reflected in the
> generated C source.
>
> Thanks,
>
> David
>
>
>

--
========================================================================
===
John M. McIntosh <[hidden email]> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
========================================================================
===


Reply | Threaded
Open this post in threaded view
|

Re: Interpreter: how generate C for new method

timrowledge
In message <79A94AF8-08BB-42E9-862C-7B74EC8ACB44@smalltalkconsulting.
com>
          John M McIntosh <[hidden email]> wrote:

> Well if you don't have any clear usage of it in the interpreter,
then  
> the optimization inlining step will
> consider it not-callable and remove it from the list of methods to  
> generate C code for.
> Fortunately there is another method (the name escapes me) where you  
> can add methods that
> aren't explicitly called, yet must exist.
>
> Interpreter(class)>>requiredMethodNames
There are several implementations of that method in classes like
ObjectMemory etc and you should stick your method selector in the
appropriate list. As John said, if it is 'disappearing' it's because
nobody sends it or it is only sent by another method that isn't sent
and so on.

tim
--
Tim Rowledge, [hidden email], http://www.rowledge.org/tim
It said, "Insert disk #3," but only two will fit!