Re: general inlining

2010-02-17 Thread Christian Thalinger
On 02/16/10 07:04 PM, Raffaello Giulietti wrote: > I asked because this kind of inlining seems quite clever to my > uneducated eyes. Inlining, in m() or at other call sites, only a part of > ensureSomething() while skipping the other heavier part and morphing it > to another callable method appears

Re: general inlining

2010-02-16 Thread Raffaello Giulietti
On 2010-02-16 17:09, Christian Thalinger wrote: > On 02/16/10 03:07 PM, Raffaello Giulietti wrote: >> A general question about inlining. Take the following code: >> >> void m() { >> ensureSomething(); >> ... >> } >> >> void ensureSomething() { >> if (someTest()) return; >> doSomethi

Re: general inlining

2010-02-16 Thread Christian Thalinger
On 02/16/10 03:07 PM, Raffaello Giulietti wrote: > A general question about inlining. Take the following code: > > void m() { > ensureSomething(); > ... > } > > void ensureSomething() { > if (someTest()) return; > doSomething(); > } > > boolean someTest() { > return ... // a

general inlining

2010-02-16 Thread Raffaello Giulietti
A general question about inlining. Take the following code: void m() { ensureSomething(); ... } void ensureSomething() { if (someTest()) return; doSomething(); } boolean someTest() { return ... // a simple boolean expression; } void doSomething() { // heavy and long code