瀏覽代碼

bugfix mark+debug

Nicolas Cannasse 19 年之前
父節點
當前提交
d1780e0fd8
共有 2 個文件被更改,包括 4 次插入4 次删除
  1. 3 3
      genswf8.ml
  2. 1 1
      transform.ml

+ 3 - 3
genswf8.ml

@@ -198,7 +198,7 @@ let rec is_protected ctx t check_mt =
 		loop c
 	| TMono r ->
 		(match !r with
-		| None -> assert false
+		| None -> true (* in Transform.emk only *)
 		| Some t -> is_protected ctx t check_mt)
 	| TLazy f ->
 		is_protected ctx ((!f)()) check_mt
@@ -1351,10 +1351,10 @@ let generate_code file ver types hres =
 	if ctx.debug then begin
 		push ctx [VStr (Transform.stack_var,false); VInt 0];
 		write ctx AInitArray;
-		write ctx ALocalAssign;
+		write ctx ASet;
 		push ctx [VStr (Transform.exc_stack_var,false); VInt 0];
 		write ctx AInitArray;
-		write ctx ALocalAssign;
+		write ctx ASet;
 	end;
 	List.iter (fun t -> gen_type_def ctx t) types;
 	gen_boot ctx hres;

+ 1 - 1
transform.ml

@@ -195,7 +195,7 @@ let block_vars e =
 	in
 	out_loop e
 
-let emk e = mk e t_dynamic Ast.null_pos
+let emk e = mk e (mk_mono()) Ast.null_pos
 
 let block e =
 	match e.eexpr with