瀏覽代碼

fixed pass debug

Simon Krajewski 13 年之前
父節點
當前提交
70370ee1b3
共有 1 個文件被更改,包括 4 次插入4 次删除
  1. 4 4
      typecore.ml

+ 4 - 4
typecore.ml

@@ -296,15 +296,15 @@ let create_fake_module ctx file =
 let delay_tabs = ref ""
 let delay_tabs = ref ""
 
 
 let context_ident ctx =
 let context_ident ctx =
-	if Common.defined ctx.com "core_api" then
+	if Common.defined ctx.com Common.Define.CoreApi then
 		" core "
 		" core "
-	else if Common.defined ctx.com "macro" then
+	else if Common.defined ctx.com Common.Define.Macro then
 		"macro "
 		"macro "
 	else
 	else
 		"  out "
 		"  out "
 
 
 let debug ctx str =
 let debug ctx str =
-	if Common.defined ctx.com "cdebug" then prerr_endline (context_ident ctx ^ !delay_tabs ^ str)
+	if Common.raw_defined ctx.com "cdebug" then prerr_endline (context_ident ctx ^ !delay_tabs ^ str)
 
 
 let ctx_pos ctx =
 let ctx_pos ctx =
 	let inf = Ast.s_type_path ctx.m.curmod.m_path in
 	let inf = Ast.s_type_path ctx.m.curmod.m_path in
@@ -357,7 +357,7 @@ let make_pass ?inf ctx f =
 			| Fatal_error ->
 			| Fatal_error ->
 				delay_tabs := old;
 				delay_tabs := old;
 				raise Fatal_error
 				raise Fatal_error
-			| exc when not (Common.defined ctx.com "stack") ->
+			| exc when not (Common.raw_defined ctx.com "stack") ->
 				debug ctx ("FATAL " ^ Printexc.to_string exc);
 				debug ctx ("FATAL " ^ Printexc.to_string exc);
 				delay_tabs := old;
 				delay_tabs := old;
 				raise exc
 				raise exc