Docs on how to start a new target

65 views
Skip to first unread message

Adrian Veith

unread,
Feb 23, 2015, 12:24:49 PM2/23/15
to haxe...@googlegroups.com
Hi,

I try to find some docs on howto start a new target for Haxe. I looked through the source and found that common.ml and main.ml have to be patched and a gentaget.ml has to be created. So far so easy, but now I am puzzling what the right pf_<options> are:
{
pf_static = true;              -- guess: static typed - bool, int and floats can't be null
pf_sys = true;                 -- guess:  has access to system
pf_locals_scope = false;       ?
pf_captured_scope = true;      ?
pf_unique_locals = false;      -- guess: only one local with the same name can be declared
pf_capture_policy = CPWrapRef; ?
pf_pad_nulls = true;           ? 
pf_add_final_return = false;   ?
pf_overload = true;            ? 
pf_pattern_matching = false;   ?
pf_can_skip_non_nullable_argument = true; ?
}




Any directions are appreciated (I read this link http://old.haxe.org/doc/advanced/code_generators/needed already) - I don't want to spam the list with stupid questions.

Anyway, If someone is interested - I am planning to make a nim (former nimrod) target, which is a very efficient transpiler to C, CPP, OBJC with thread local GC (which might cause problems with existing threaded Haxe code).

cheers, Adrian.

Simon Krajewski

unread,
Feb 23, 2015, 12:29:22 PM2/23/15
to haxe...@googlegroups.com
Am 23.02.2015 um 18:24 schrieb Adrian Veith:
Hi,

I try to find some docs on howto start a new target for Haxe. I looked through the source and found that common.ml and main.ml have to be patched and a gentaget.ml has to be created. So far so easy, but now I am puzzling what the right pf_<options> are:
{
pf_static = true;              -- guess: static typed - bool, int and floats can't be null
pf_sys = true;                 -- guess:  has access to system
pf_locals_scope = false;       ?
pf_captured_scope = true;      ?
pf_unique_locals = false;      -- guess: only one local with the same name can be declared
pf_capture_policy = CPWrapRef; ?
pf_pad_nulls = true;           ? 
pf_add_final_return = false;   ?
pf_overload = true;            ? 
pf_pattern_matching = false;   ?
pf_can_skip_non_nullable_argument = true; ?
}




Any directions are appreciated (I read this link http://old.haxe.org/doc/advanced/code_generators/needed already) - I don't want to spam the list with stupid questions.

The platform_config type is documented in common.ml. Just check its definition.

Simon
Reply all
Reply to author
Forward
0 new messages