My favorites | Sign in
Project Home Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 191: --dead-code-elimination bugs.
2 people starred this issue and may be notified of changes. Back to list
Status:  Done
Owner:  ----
Closed:  Dec 2012


 
Reported by lucadelt...@googlemail.com, Jul 21, 2012
There is another bug with --dead-code-elimination I'm attempting to produce a minimal example for, whilst searching I came across this bug:



package;

class Error {
    public var error2:ErrorChild;
    public function new() {
    }

    public var error(get_error, never):Array<Int>;
    inline function get_error():Array<Int> {
        return error2.arr;
    }
}

class ErrorChild extends Error {
    public var arr:Array<Int> = null;
    public function new() {
        super();
        error2 = this;
    }
}

class Test {
    static function main() {
        var child = new ErrorChild();
        trace(child.error);
    }
}

---------------

Error:

./src/Error.cpp: In member function ‘virtual Dynamic Error_obj::__Field(const String&, bool)’:
./src/Error.cpp:57:73: error: operands to ?: have different types ‘Dynamic {aka Dynamic}’ and ‘Array<int>’

Compiling without --dead-code-elimination it works fine.

Jul 21, 2012
#1 lucadelt...@googlemail.com
(The other error I'm still trying to produce a minimal example for has properties that are not removed by dead code elimination (rightly so, they 'are' used), but who's getter/setter's are removed in the generated c++ code.
Jul 21, 2012
#2 lucadelt...@googlemail.com
AHAH! Infact, the original bug can be found by simply changing the getter's name from get_error into  something like ggget_error
Dec 12, 2012
Project Member #3 si...@haxe.org
I cannot reproduce this anymore on current SVN.
Status: Done

Powered by Google Project Hosting