ayld / multiverse

Automatically exported from code.google.com/p/multiverse
Other
0 stars 0 forks source link

Instrumentation: Constructors with this calls and Handle #81

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
If there are constructors with this calls:

class Foo{

    Foo(){
        this(0);
    }

    Foo(int x){
        ...
    }
}

the handle is created and assigned twice. Because the transformed code will
look like this:

class Foo{
    private Handle handle;

    Foo(){
        this(0);
        handle = new DefaultXXXHandle();
    }

    Foo(int x){
        ...
        handle = new DefaultXXXHandle();
    }
}

So the handle only needs to be created and assigned once and not multiple
times.

Original issue reported on code.google.com by alarmnum...@gmail.com on 19 May 2009 at 4:47

GoogleCodeExporter commented 8 years ago

Original comment by alarmnum...@gmail.com on 19 May 2009 at 5:16

GoogleCodeExporter commented 8 years ago

Original comment by alarmnum...@gmail.com on 5 Sep 2009 at 2:23

GoogleCodeExporter commented 8 years ago

Original comment by alarmnum...@gmail.com on 14 Nov 2009 at 12:05