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
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
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
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