|
@@ -337,8 +337,10 @@ let rec gen_call ctx e el in_value =
|
|
| [] -> ()
|
|
| [] -> ()
|
|
| e :: _ -> gen_value ctx e)
|
|
| e :: _ -> gen_value ctx e)
|
|
| TLocal { v_name = "__resources__" }, [] ->
|
|
| TLocal { v_name = "__resources__" }, [] ->
|
|
- spr ctx "{";
|
|
|
|
|
|
+ spr ctx "lua.Boot.defArray({";
|
|
|
|
+ let count = ref 0 in
|
|
concat ctx "," (fun (name,data) ->
|
|
concat ctx "," (fun (name,data) ->
|
|
|
|
+ incr count;
|
|
spr ctx "{ ";
|
|
spr ctx "{ ";
|
|
spr ctx "name = ";
|
|
spr ctx "name = ";
|
|
gen_constant ctx e.epos (TString name);
|
|
gen_constant ctx e.epos (TString name);
|
|
@@ -346,7 +348,7 @@ let rec gen_call ctx e el in_value =
|
|
gen_constant ctx e.epos (TString (Codegen.bytes_serialize data));
|
|
gen_constant ctx e.epos (TString (Codegen.bytes_serialize data));
|
|
spr ctx "}"
|
|
spr ctx "}"
|
|
) (Hashtbl.fold (fun name data acc -> (name,data) :: acc) ctx.com.resources []);
|
|
) (Hashtbl.fold (fun name data acc -> (name,data) :: acc) ctx.com.resources []);
|
|
- spr ctx "}";
|
|
|
|
|
|
+ print ctx "}, %i)" !count;
|
|
| TLocal { v_name = "`trace" }, [e;infos] ->
|
|
| TLocal { v_name = "`trace" }, [e;infos] ->
|
|
if has_feature ctx "haxe.Log.trace" then begin
|
|
if has_feature ctx "haxe.Log.trace" then begin
|
|
let t = (try List.find (fun t -> t_path t = (["haxe"],"Log")) ctx.com.types with _ -> assert false) in
|
|
let t = (try List.find (fun t -> t_path t = (["haxe"],"Log")) ctx.com.types with _ -> assert false) in
|