inlining in js

24 views
Skip to first unread message

Dima Granetchi

unread,
Dec 24, 2012, 8:22:06 AM12/24/12
to haxe...@googlegroups.com
Hi.

I have one question about inlining in js.

Many times I saw what methods aren't inlined in js generated code (very simple methods, without local vars, one line methods). Today I added for inline method meta data @:extern and yahoo, method inlined now!


This is my method

@:extern private inline function ensureWrite (lengthToEnsure:Int):Void {
       
        if (this.length < lengthToEnsure) this.length = lengthToEnsure;
    }

without @:extern inline doesn't work. Why is this happening?
Reply all
Reply to author
Forward
0 new messages