Giter Club home page Giter Club logo

haxe's Issues

[analyzer_side_effect_rewrite] redundant temp var

class Main {
    static function main() {}

    static function f(o1:{m:haxe.ds.IntMap<{f:Int}>}, o2:{f:Int}) {

        inline function get(o) return if (o > 0) o else 0;

        o1.m.get(0).f = get(o2.f);
    }
}

this branch:

Main.f = function(o1,o2) {
    var tmp = o1.m.h[0];
    var o = o2.f;
    tmp.f = o > 0?o:0;
};

current development:

Main.f = function(o1,o2) {
    var o = o2.f;
    o1.m.h[0].f = o > 0?o:0;
};

C++ broken

After merging development I'm seeing this:

Error: ./src/unit/MyList.cpp: In member function ‘virtual unit::MyList unit::MyList_obj::flatMap(Dynamic)’:
./src/unit/MyList.cpp:115:30: error: ‘T’ is not a member of ‘unit::MyList {aka hx::ObjectPtr<unit::MyList_obj>}’
./src/unit/MyList.cpp:115:30: error: ‘T’ is not a member of ‘unit::MyList {aka hx::ObjectPtr<unit::MyList_obj>}’
./src/unit/MyList.cpp:115:46: error: template argument 1 is invalid
./src/unit/MyList.cpp:155:32: error: ‘virtual unit::MyList unit::MyList_obj::flatMap(Dynamic)’ cannot appear in a constant-expression
./src/unit/MyList.cpp:155:43: error: template argument 1 is invalid

This suggests a broken AST, but the weird part is that the Java target works just fine.

Flash broken

Test.hx:224: ABORTED : VerifyError: Error #1058: Illegal operand type: * must be int. in unit.TestTypeConstructor.testMonadTransformers
Test.hx:227: STACK :
Called from Function.http://adobe.com/AS3/2006/builtin::apply
Called from Function.<anonymous>
Called from unit.Test.main (/home/travis/build/Simn/haxe/tests/unit/src/unit/Test.hx line 333)
Test.hx:187: DONE [5311 tests]
Test.hx:354: SUCCESS: false

I've seen that error in Haxe before, so it may or may not be a core issue. We should still try to find out what the problem is.

C# failing due to weird unit.Either type

So I've merged development branch into higher_kinded_types_reloaded today, which went surprisingly smooth. The Java target is working now, but C# fails with a Not_found exception. I printed that to find that it looks for unit.Either in a list of interfaces, which is very strange because from what I can tell that type is actually an enum.

The relevant lookup can be found here: https://github.com/Simn/haxe/blob/higher_kinded_types_reloaded/gencommon.ml#L4653

This suggests that we have a TInst where the class argument is an enum?! I don't know how to interpret this error.

@frabbit: Any idea?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.