瀏覽代碼

clean up some metas

Simon Krajewski 5 月之前
父節點
當前提交
7cd566fe06
共有 5 個文件被更改,包括 2 次插入9 次删除
  1. 0 5
      src-json/meta.json
  2. 1 1
      src/optimization/inline.ml
  3. 1 1
      src/typing/matcher.ml
  4. 0 1
      src/typing/typeloadFields.ml
  5. 0 1
      src/typing/typeloadModule.ml

+ 0 - 5
src-json/meta.json

@@ -602,11 +602,6 @@
 		"doc": "Internally used to mark a class field as being the metadata field.",
 		"internal": true
 	},
-	{
-		"name": "Macro",
-		"metadata": ":macro",
-		"doc": "(deprecated)"
-	},
 	{
 		"name": "MergeBlock",
 		"metadata": ":mergeBlock",

+ 1 - 1
src/optimization/inline.ml

@@ -873,7 +873,7 @@ let rec type_inline (ictx : inline_context) cf f ethis params tret config p ?(se
 	let tl = arg_types params f.tf_args in
 	let e = state#finalize e tl tret has_params map_type p in
 	begin match ictx.typer with
-		| Some ctx when Meta.has (Meta.Custom ":inlineDebug") ctx.f.meta ->
+		| Some ctx when Meta.has (Meta.Custom ":debug.inline") ctx.f.meta ->
 			let se t = s_expr_ast true t (s_type (print_context())) in
 			print_endline (Printf.sprintf "Inline %s:\n\tArgs: %s\n\tExpr: %s\n\tResult: %s"
 				cf.cf_name

+ 1 - 1
src/typing/matcher.ml

@@ -26,7 +26,7 @@ module Match = struct
 	open Typecore
 
 	let match_expr ctx e cases def with_type postfix_match p =
-		let match_debug = Meta.has (Meta.Custom ":matchDebug") ctx.f.curfield.cf_meta in
+		let match_debug = Meta.has (Meta.Custom ":debug.match") ctx.f.curfield.cf_meta in
 		let rec loop e = match fst e with
 			| EArrayDecl el when (match el with [(EFor _ | EWhile _),_] -> false | _ -> true) ->
 				let el = List.map (fun e -> type_expr ctx e WithType.value) el in

+ 0 - 1
src/typing/typeloadFields.ml

@@ -478,7 +478,6 @@ let create_typer_context_for_class ctx cctx p =
 	incr stats.s_classes_built;
 	let c = cctx.tclass in
 	if cctx.is_lib && not (has_class_flag c CExtern) then ctx.com.error "@:libType can only be used in extern classes" c.cl_pos;
-	if Meta.has Meta.Macro c.cl_meta then display_error ctx.com "Macro classes are no longer allowed in haxe 3" c.cl_pos;
 	TyperManager.clone_for_class ctx c
 
 let create_field_context ctx cctx cff is_display_file display_modifier =

+ 0 - 1
src/typing/typeloadModule.ml

@@ -141,7 +141,6 @@ module ModuleLevel = struct
 					has_declaration := true;
 					let priv = List.mem EPrivate d.d_flags in
 					let path = make_path name priv d.d_meta p in
-					if Meta.has (Meta.Custom ":fakeEnum") d.d_meta then raise_typing_error "@:fakeEnum enums is no longer supported in Haxe 4, use extern enum abstract instead" p;
 					let e = {
 						(mk_enum m path p (pos d.d_name)) with
 						e_doc = d.d_doc;