Tool or IDE for function inlining

Discussion in 'Java' started by Alex, Dec 8, 2004.

  1. Alex

    Alex Guest

    Dear All!

    I need to inline my functions bodys into caller functions. Please
    suggest me a good tool or IDE for refactoring. Currently I use Jbuilder
    2005, but unsatisfied with its dumb text substitution and hungs.
    Alex, Dec 8, 2004
    #1
    1. Advertising

  2. Alex wrote:
    > Dear All!
    >
    > I need to inline my functions bodys into caller functions. Please
    > suggest me a good tool or IDE for refactoring.


    Why do you need to do this? Most JIT compilers will do this
    automatically at run time where appropriate.

    Mark Thornton
    Mark Thornton, Dec 8, 2004
    #2
    1. Advertising

  3. Alex

    FunkyKarma Guest

    > > I need to inline my functions bodys into caller functions. Please
    > > suggest me a good tool or IDE for refactoring.

    >
    > Why do you need to do this? Most JIT compilers will do this
    > automatically at run time where appropriate.
    >


    While JIT compilers and Java source compilers should do this in some
    situations, it has been my experience that it doesn't (always) happen. I
    suppose sometimes method visibility and lack of being final may explain some
    of it, but still the bottom line is that I've experienced performance
    benefit by inlining by hand.

    I too would like to see an easy to use tool to make this happen. Or better
    yet the introduction of macros and/or language keywords to facilitate it.
    Although I know that's not at all likely to happen.

    I've heard of people using C precompilers to do some of this but that
    approach is cumbersome at best.
    FunkyKarma, Dec 9, 2004
    #3
  4. Alex wrote:
    > Dear All!
    >
    > I need to inline my functions bodys into caller functions. Please
    > suggest me a good tool or IDE for refactoring. Currently I use Jbuilder
    > 2005, but unsatisfied with its dumb text substitution and hungs.


    Eclipse.

    --
    Daniel Sjöblom
    Remove _NOSPAM to reply by mail
    =?ISO-8859-1?Q?Daniel_Sj=F6blom?=, Dec 9, 2004
    #4
  5. Alex

    Alex Guest

    I need this because I am programming J2ME with SUN KVM interpreter. The
    call is cost enormous cpu cycles (I bencmarked it). Also if function
    body is properly inlined, it gives more chances to javac optimize
    bytecode and shrinks .class size.
    Alex, Dec 9, 2004
    #5
  6. Alex

    FunkyKarma Guest

    > > Dear All!
    > >
    > > I need to inline my functions bodys into caller functions. Please
    > > suggest me a good tool or IDE for refactoring. Currently I use Jbuilder
    > > 2005, but unsatisfied with its dumb text substitution and hungs.

    >
    > Eclipse.


    Unless I'm missing something, the Eclipse Refactor->Inline feature is not
    the answer. Using that feature is a one time shot sort of thing. After the
    inlining is done, one can't undo it. That inhibits maintaining the inlined
    code. That is, a change to the inlined code means changing it everywhere in
    which it was inlined.
    FunkyKarma, Dec 9, 2004
    #6
  7. Alex

    Eli Guest

    A new software engineering technique called Binary Refactoring
    addresses this and other similar problems.

    "Inline Method" is one of the binary refactorings supported
    by BARBER, a reference implementation of
    a binary refactoring browser for Java: http://j-orchestra.org/barber/.

    Unfortunately, BARBER is a research prototype rather than
    a production-quality software tool.

    "Alex" <> wrote in message
    news:...
    > Dear All!
    >
    > I need to inline my functions bodys into caller functions. Please
    > suggest me a good tool or IDE for refactoring. Currently I use Jbuilder
    > 2005, but unsatisfied with its dumb text substitution and hungs.
    >
    Eli, Dec 9, 2004
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ronald Fischer
    Replies:
    3
    Views:
    572
    Roedy Green
    Jul 20, 2004
  2. Gianni Mariani

    inlining function objects

    Gianni Mariani, Feb 23, 2004, in forum: C++
    Replies:
    7
    Views:
    385
  3. Yakov
    Replies:
    8
    Views:
    316
    Mark McIntyre
    Jun 26, 2007
  4. Jack
    Replies:
    47
    Views:
    1,350
    Arne Vajhøj
    Feb 19, 2008
  5. Yakov
    Replies:
    2
    Views:
    90
    Michele Dondi
    Jun 17, 2007
Loading...

Share This Page