فهرست منبع

rename Statics to ClassStatics for consistency

Simon Krajewski 1 سال پیش
والد
کامیت
de296a05b9

+ 1 - 1
src/codegen/codegen.ml

@@ -415,7 +415,7 @@ end
 let default_cast ?(vtmp="$t") com e texpr t p =
 	let api = com.basic in
 	let mk_texpr = function
-		| TClassDecl c -> mk_anon (ref (Statics c))
+		| TClassDecl c -> mk_anon (ref (ClassStatics c))
 		| TEnumDecl e -> mk_anon (ref (EnumStatics e))
 		| TAbstractDecl a -> mk_anon (ref (AbstractStatics a))
 		| TTypeDecl _ -> die "" __LOC__

+ 1 - 1
src/codegen/gencommon/castDetect.ml

@@ -418,7 +418,7 @@ let rec handle_cast gen e real_to_t real_from_t =
 				mk_cast true to_t e
 		| _, TAnon(anon) -> (try
 			let p2 = match !(anon.a_status) with
-			| Statics c -> TInst(c,List.map (fun _ -> t_dynamic) c.cl_params)
+			| ClassStatics c -> TInst(c,List.map (fun _ -> t_dynamic) c.cl_params)
 			| EnumStatics e -> TEnum(e, List.map (fun _ -> t_dynamic) e.e_params)
 			| AbstractStatics a -> TAbstract(a, List.map (fun _ -> t_dynamic) a.a_params)
 			| _ -> raise Not_found

+ 1 - 1
src/codegen/gencommon/dynamicFieldAccess.ml

@@ -33,7 +33,7 @@ open Gencommon
 
 	(TODO: should it be separated?)
 	As a plus, the default implementation adds something that doesn't hurt anybody, it looks for
-	TAnon with Statics / EnumStatics field accesses and transforms them into real static calls.
+	TAnon with ClassStatics / EnumStatics field accesses and transforms them into real static calls.
 	This means it will take this
 
 	var m = Math;

+ 1 - 1
src/codegen/gencommon/filterClosures.ml

@@ -28,7 +28,7 @@ open Gencommon
 	not via reflection and not to be called instantly
 
 	dependencies:
-		must run after DynamicFieldAccess, so any TAnon { Statics / EnumStatics } will be changed to the corresponding TTypeExpr
+		must run after DynamicFieldAccess, so any TAnon { ClassStatics / EnumStatics } will be changed to the corresponding TTypeExpr
 *)
 let name = "filter_closures"
 let priority = solve_deps name [DAfter DynamicFieldAccess.priority]

+ 3 - 3
src/codegen/gencommon/gencommon.ml

@@ -146,7 +146,7 @@ let anon_class t =
 	match follow t with
 	| TAnon anon ->
 		(match !(anon.a_status) with
-		| Statics cl -> Some (TClassDecl cl)
+		| ClassStatics cl -> Some (TClassDecl cl)
 		| EnumStatics e -> Some (TEnumDecl e)
 		| AbstractStatics a -> Some (TAbstractDecl a)
 		| _ -> None)
@@ -160,7 +160,7 @@ let anon_class t =
 	| TAnon anon ->
 		(match !(anon.a_status) with
 			| EnumStatics e -> TEnumDecl e
-			| Statics cl -> TClassDecl cl
+			| ClassStatics cl -> TClassDecl cl
 			| AbstractStatics a -> TAbstractDecl a
 			| _ -> die "" __LOC__)
 	| TLazy f -> t_to_md (lazy_type f)
@@ -1274,7 +1274,7 @@ let rec field_access gen (t:t) (field:string) : (tfield_access) =
 				FNotFound)
 		| TAnon anon ->
 			(try match !(anon.a_status) with
-				| Statics cl ->
+				| ClassStatics cl ->
 					let cf = PMap.find field cl.cl_statics in
 					FClassField(cl, List.map (fun _ -> t_dynamic) cl.cl_params, cl, cf, true, cf.cf_type, cf.cf_type)
 				| EnumStatics e ->

+ 1 - 1
src/compiler/displayOutput.ml

@@ -209,7 +209,7 @@ let find_doc t =
 	let doc = match follow t with
 		| TAnon an ->
 			begin match !(an.a_status) with
-				| Statics c -> c.cl_doc
+				| ClassStatics c -> c.cl_doc
 				| EnumStatics en -> en.e_doc
 				| AbstractStatics a -> a.a_doc
 				| _ -> None

+ 4 - 4
src/context/display/displayFields.ml

@@ -228,7 +228,7 @@ let collect ctx e_ast e dk with_type p =
 		| TAnon an ->
 			(* @:forwardStatics *)
 			let items = match !(an.a_status) with
-				| Statics { cl_kind = KAbstractImpl { a_meta = meta; a_this}} when Meta.has Meta.ForwardStatics meta ->
+				| ClassStatics { cl_kind = KAbstractImpl { a_meta = meta; a_this}} when Meta.has Meta.ForwardStatics meta ->
 					begin match follow a_this with
 					| TInst (c,_) ->
 						let items = List.fold_left (fun acc cf ->
@@ -261,7 +261,7 @@ let collect ctx e_ast e dk with_type p =
 						PMap.add name (make_field (CompletionClassField.make cf CFSMember origin true) (cf.cf_type,ct)) acc
 					in
 					match !(an.a_status) with
-						| Statics ({cl_kind = KAbstractImpl a} as c) ->
+						| ClassStatics ({cl_kind = KAbstractImpl a} as c) ->
 							if allow_static_abstract_access c cf then
 								let make = if has_class_field_flag cf CfEnum then
 										(make_ci_enum_abstract_field a)
@@ -271,7 +271,7 @@ let collect ctx e_ast e dk with_type p =
 								add (Self (TAbstractDecl a)) make
 							else
 								acc;
-						| Statics c ->
+						| ClassStatics c ->
 							Display.merge_core_doc ctx (TClassDecl c);
 							if should_access c cf true then add (Self (TClassDecl c)) make_ci_class_field else acc;
 						| EnumStatics en ->
@@ -377,7 +377,7 @@ let handle_missing_field_raise ctx tthis i mode with_type pfield =
 		| TAbstract(a,_) -> TAbstractDecl a,CFSMember,true
 		| TAnon an ->
 			begin match !(an.a_status) with
-			| Statics c -> TClassDecl c,CFSStatic,not (can_access ctx c cf true)
+			| ClassStatics c -> TClassDecl c,CFSStatic,not (can_access ctx c cf true)
 			| EnumStatics en -> TEnumDecl en,CFSStatic,true
 			| AbstractStatics a -> TAbstractDecl a,CFSStatic,true
 			| _ -> raise Exit

+ 1 - 1
src/context/typecore.ml

@@ -248,7 +248,7 @@ let spawn_monomorph ctx p =
 	TMono (spawn_monomorph' ctx p)
 
 let make_static_this c p =
-	let ta = mk_anon ~fields:c.cl_statics (ref (Statics c)) in
+	let ta = mk_anon ~fields:c.cl_statics (ref (ClassStatics c)) in
 	mk (TTypeExpr (TClassDecl c)) ta p
 
 let make_static_field_access c cf t p =

+ 1 - 1
src/core/error.ml

@@ -210,7 +210,7 @@ module BetterErrors = struct
 		| TAnon a ->
 			begin
 				match !(a.a_status) with
-				| Statics c -> Printf.sprintf "{ Statics %s }" (s_type_path c.cl_path)
+				| ClassStatics c -> Printf.sprintf "{ ClassStatics %s }" (s_type_path c.cl_path)
 				| EnumStatics e -> Printf.sprintf "{ EnumStatics %s }" (s_type_path e.e_path)
 				| AbstractStatics a -> Printf.sprintf "{ AbstractStatics %s }" (s_type_path a.a_path)
 				| _ ->

+ 1 - 1
src/core/json/genjson.ml

@@ -236,7 +236,7 @@ and generate_anon_status ctx status =
 		| Closed -> "AClosed",None
 		| Const -> "AConst",None
 		| Extend tl -> "AExtend", Some (generate_types ctx tl)
-		| Statics c -> "AClassStatics",Some (class_ref ctx c)
+		| ClassStatics c -> "AClassStatics",Some (class_ref ctx c)
 		| EnumStatics en -> "AEnumStatics",Some (enum_ref ctx en)
 		| AbstractStatics a -> "AAbstractStatics", Some (abstract_ref ctx a)
 	in

+ 1 - 1
src/core/tFunctions.ml

@@ -790,7 +790,7 @@ let quick_field t n =
 		| EnumStatics e ->
 			let ef = PMap.find n e.e_constrs in
 			FEnum(e,ef)
-		| Statics c ->
+		| ClassStatics c ->
 			FStatic (c,PMap.find n c.cl_statics)
 		| AbstractStatics a ->
 			begin match a.a_impl with

+ 2 - 2
src/core/tOther.ml

@@ -42,7 +42,7 @@ module TExprToExpr = struct
 				) args, (convert_type' ret))
 		| TAnon a ->
 			begin match !(a.a_status) with
-			| Statics c -> tpath ([],"Class") ([],"Class") [TPType (tpath c.cl_path c.cl_path [],null_pos)]
+			| ClassStatics c -> tpath ([],"Class") ([],"Class") [TPType (tpath c.cl_path c.cl_path [],null_pos)]
 			| EnumStatics e -> tpath ([],"Enum") ([],"Enum") [TPType (tpath e.e_path e.e_path [],null_pos)]
 			| _ ->
 				CTAnonymous (PMap.foldi (fun _ f acc ->
@@ -265,7 +265,7 @@ let no_meta = []
 
 let class_module_type c =
 	let path = ([],"Class<" ^ (s_type_path c.cl_path) ^ ">") in
-	let t = mk_anon ~fields:c.cl_statics (ref (Statics c)) in
+	let t = mk_anon ~fields:c.cl_statics (ref (ClassStatics c)) in
 	{ (mk_typedef c.cl_module path c.cl_pos null_pos t) with t_private = true}
 
 let enum_module_type m path p  =

+ 2 - 2
src/core/tPrinting.ml

@@ -58,7 +58,7 @@ let rec s_type ctx t =
 		(match c.cl_kind with
 		| KExpr e -> Ast.Printer.s_expr e
 		| _ -> s_type_path c.cl_path ^ s_type_params ctx tl)
-	| TType ({ t_type = TAnon { a_status = { contents = Statics { cl_kind = KAbstractImpl a }}}}, _) ->
+	| TType ({ t_type = TAnon { a_status = { contents = ClassStatics { cl_kind = KAbstractImpl a }}}}, _) ->
 		"Abstract<" ^ (s_type_path a.a_path) ^ ">"
 	| TType (t,tl) ->
 		s_type_path t.t_path ^ s_type_params ctx tl
@@ -80,7 +80,7 @@ let rec s_type ctx t =
 	| TAnon a ->
 		begin
 			match !(a.a_status) with
-			| Statics c -> Printf.sprintf "{ Statics %s }" (s_type_path c.cl_path)
+			| ClassStatics c -> Printf.sprintf "{ ClassStatics %s }" (s_type_path c.cl_path)
 			| EnumStatics e -> Printf.sprintf "{ EnumStatics %s }" (s_type_path e.e_path)
 			| AbstractStatics a -> Printf.sprintf "{ AbstractStatics %s }" (s_type_path a.a_path)
 			| _ ->

+ 1 - 1
src/core/tType.ml

@@ -149,7 +149,7 @@ and anon_status =
 	| Closed
 	| Const
 	| Extend of t list
-	| Statics of tclass
+	| ClassStatics of tclass
 	| EnumStatics of tenum
 	| AbstractStatics of tabstract
 

+ 7 - 7
src/core/tUnification.ml

@@ -386,7 +386,7 @@ let rec shallow_eq a b =
 					loop (List.sort sort_compare fields1) (List.sort sort_compare fields2)
 				in
 				(match !(a2.a_status), !(a1.a_status) with
-				| Statics c, Statics c2 -> c == c2
+				| ClassStatics c, ClassStatics c2 -> c == c2
 				| EnumStatics e, EnumStatics e2 -> e == e2
 				| AbstractStatics a, AbstractStatics a2 -> a == a2
 				| Extend tl1, Extend tl2 -> fields_eq() && List.for_all2 shallow_eq tl1 tl2
@@ -560,7 +560,7 @@ let rec type_eq uctx a b =
 	| TAnon a1, TAnon a2 ->
 		(try
 			(match !(a2.a_status) with
-			| Statics c -> (match !(a1.a_status) with Statics c2 when c == c2 -> () | _ -> error [])
+			| ClassStatics c -> (match !(a1.a_status) with ClassStatics c2 when c == c2 -> () | _ -> error [])
 			| EnumStatics e -> (match !(a1.a_status) with EnumStatics e2 when e == e2 -> () | _ -> error [])
 			| AbstractStatics a -> (match !(a1.a_status) with AbstractStatics a2 when a == a2 -> () | _ -> error [])
 			| _ -> ()
@@ -801,7 +801,7 @@ let rec unify (uctx : unification_context) a b =
 				| _ -> ());
 			) an.a_fields;
 			(match !(an.a_status) with
-			| Statics _ | EnumStatics _ | AbstractStatics _ -> error []
+			| ClassStatics _ | EnumStatics _ | AbstractStatics _ -> error []
 			| Closed | Extend _ | Const -> ())
 		with
 			Unify_error l -> error (cannot_unify a b :: l))
@@ -809,7 +809,7 @@ let rec unify (uctx : unification_context) a b =
 		unify_anons uctx a b a1 a2
 	| TAnon an, TAbstract ({ a_path = [],"Class" },[pt]) ->
 		(match !(an.a_status) with
-		| Statics cl -> unify uctx (TInst (cl,List.map (fun _ -> mk_mono()) cl.cl_params)) pt
+		| ClassStatics cl -> unify uctx (TInst (cl,List.map (fun _ -> mk_mono()) cl.cl_params)) pt
 		| _ -> error [cannot_unify a b])
 	| TAnon an, TAbstract ({ a_path = [],"Enum" },[pt]) ->
 		(match !(an.a_status) with
@@ -867,7 +867,7 @@ let rec unify (uctx : unification_context) a b =
 		| TAnon an ->
 			(try
 				(match !(an.a_status) with
-				| Statics _ | EnumStatics _ -> error []
+				| ClassStatics _ | EnumStatics _ -> error []
 				| _ -> ());
 				PMap.iter (fun _ f ->
 					try
@@ -910,7 +910,7 @@ and unify_anons uctx a b a1 a2 =
 				in
 				unify_with_access uctx f1 f1_type f2;
 				(match !(a1.a_status) with
-				| Statics c when not (Meta.has Meta.MaybeUsed f1.cf_meta) -> f1.cf_meta <- (Meta.MaybeUsed,[],f1.cf_pos) :: f1.cf_meta
+				| ClassStatics c when not (Meta.has Meta.MaybeUsed f1.cf_meta) -> f1.cf_meta <- (Meta.MaybeUsed,[],f1.cf_pos) :: f1.cf_meta
 				| _ -> ());
 			with
 				Unify_error l -> error (invalid_field n :: l)
@@ -923,7 +923,7 @@ and unify_anons uctx a b a1 a2 =
 					error [has_no_field a n];
 		) a2.a_fields;
 		(match !(a2.a_status) with
-		| Statics c -> (match !(a1.a_status) with Statics c2 when c == c2 -> () | _ -> error [])
+		| ClassStatics c -> (match !(a1.a_status) with ClassStatics c2 when c == c2 -> () | _ -> error [])
 		| EnumStatics e -> (match !(a1.a_status) with EnumStatics e2 when e == e2 -> () | _ -> error [])
 		| AbstractStatics a -> (match !(a1.a_status) with AbstractStatics a2 when a == a2 -> () | _ -> error [])
 		| Const | Extend _ | Closed -> ())

+ 2 - 2
src/core/texpr.ml

@@ -473,13 +473,13 @@ let foldmap f acc e =
 (* Collection of functions that return expressions *)
 module Builder = struct
 	let make_static_this c p =
-		let ta = mk_anon ~fields:c.cl_statics (ref (Statics c)) in
+		let ta = mk_anon ~fields:c.cl_statics (ref (ClassStatics c)) in
 		mk (TTypeExpr (TClassDecl c)) ta p
 
 	let make_typeexpr mt pos =
 		let t =
 			match resolve_typedef mt with
-			| TClassDecl c -> mk_anon ~fields:c.cl_statics (ref (Statics c))
+			| TClassDecl c -> mk_anon ~fields:c.cl_statics (ref (ClassStatics c))
 			| TEnumDecl e -> mk_anon (ref (EnumStatics e))
 			| TAbstractDecl a -> mk_anon (ref (AbstractStatics a))
 			| _ -> die "" __LOC__

+ 1 - 1
src/generators/gencpp.ml

@@ -848,7 +848,7 @@ and type_string_suff suffix haxe_type remap =
    | TAnon a -> "Dynamic"
       (*
       (match !(a.a_status) with
-      | Statics c -> type_string_suff suffix (TInst (c,List.map snd c.cl_params))
+      | ClassStatics c -> type_string_suff suffix (TInst (c,List.map snd c.cl_params))
       | EnumStatics e -> type_string_suff suffix (TEnum (e,List.map snd e.e_params))
       | _ -> "Dynamic"  ^ suffix )
       *)

+ 3 - 3
src/generators/gencs.ml

@@ -971,7 +971,7 @@ let generate con =
 					| TInst(cl, params) -> TInst(cl, change_param_type stack (TClassDecl cl) params)
 					| TAbstract _
 					| TType _ -> t
-					| TAnon (anon) when (match !(anon.a_status) with | Statics _ | EnumStatics _ | AbstractStatics _ -> true | _ -> false) -> t
+					| TAnon (anon) when (match !(anon.a_status) with | ClassStatics _ | EnumStatics _ | AbstractStatics _ -> true | _ -> false) -> t
 					| TFun _ -> TInst(fn_cl,[])
 					| _ -> t_dynamic
 				in
@@ -1027,7 +1027,7 @@ let generate con =
 			| TInst({ cl_kind = KTypeParameter _ }, _) -> true
 			| TAnon anon ->
 				(match !(anon.a_status) with
-					| EnumStatics _ | Statics _ -> false
+					| EnumStatics _ | ClassStatics _ -> false
 					| _ -> true
 				)
 			| _ -> false
@@ -1090,7 +1090,7 @@ let generate con =
 				| TType (({ t_path = p } as t), params) -> (path_param_s (TTypeDecl t) p params)
 				| TAnon (anon) ->
 					(match !(anon.a_status) with
-						| Statics _ | EnumStatics _ -> "System.Type"
+						| ClassStatics _ | EnumStatics _ -> "System.Type"
 						| _ -> "object")
 				| TDynamic _ -> "object"
 				| TAbstract(a,pl) when not (Meta.has Meta.CoreType a.a_meta) ->

+ 2 - 2
src/generators/genhl.ml

@@ -398,9 +398,9 @@ let rec to_type ?tref ctx t =
 			let pt = to_type ctx t in
 			if o && not (is_nullable pt) then HRef pt else pt
 		) args, to_type ctx ret)
-	| TAnon a when (match !(a.a_status) with Statics _ | EnumStatics _ -> true | _ -> false) ->
+	| TAnon a when (match !(a.a_status) with ClassStatics _ | EnumStatics _ -> true | _ -> false) ->
 		(match !(a.a_status) with
-		| Statics c ->
+		| ClassStatics c ->
 			class_type ctx c (extract_param_types c.cl_params) true
 		| EnumStatics e ->
 			enum_class ctx e

+ 3 - 3
src/generators/genjava.ml

@@ -1158,7 +1158,7 @@ let generate con =
 			| TInst _ -> t
 			| TType _ | TAbstract _ -> t
 			| TAnon (anon) -> (match !(anon.a_status) with
-				| Statics _ | EnumStatics _ | AbstractStatics _ -> t
+				| ClassStatics _ | EnumStatics _ | AbstractStatics _ -> t
 				| _ -> t_dynamic)
 			| TFun _ -> TInst(fn_cl,[])
 			| _ -> t_dynamic
@@ -1209,7 +1209,7 @@ let generate con =
 		| TInst({ cl_kind = KTypeParameter _ }, _) -> true
 		| TAnon anon ->
 			(match !(anon.a_status) with
-				| EnumStatics _ | Statics _ | AbstractStatics _ -> false
+				| EnumStatics _ | ClassStatics _ | AbstractStatics _ -> false
 				| _ -> true
 			)
 		| _ -> false
@@ -1271,7 +1271,7 @@ let generate con =
 				| TType (({t_path = p; t_meta = meta} as t), params) -> (path_param_s stack pos (TTypeDecl t) p params meta)
 				| TAnon (anon) ->
 					(match !(anon.a_status) with
-						| Statics _ | EnumStatics _ | AbstractStatics _ ->
+						| ClassStatics _ | EnumStatics _ | AbstractStatics _ ->
 								path_s_import pos (["java";"lang"], "Class") []
 						| _ ->
 								path_s_import pos (["java";"lang"], "Object") [])

+ 3 - 3
src/generators/genlua.ml

@@ -285,7 +285,7 @@ let rec is_string_type t =
     | TInst ({cl_path = ([], "String")}, _) -> true
     | TAnon a ->
         (match !(a.a_status) with
-         | Statics ({cl_path = ([], "String")}) -> true
+         | ClassStatics ({cl_path = ([], "String")}) -> true
          | _ -> false)
     | TAbstract (a,pl) -> is_string_type (Abstract.get_underlying_type a pl)
     | _ -> false
@@ -298,7 +298,7 @@ let is_dynamic t = match follow t with
     | TInst({ cl_kind = KTypeParameter _ }, _) -> true
     | TAnon anon ->
         (match !(anon.a_status) with
-         | EnumStatics _ | Statics _ -> false
+         | EnumStatics _ | ClassStatics _ -> false
          | _ -> true
         )
     | _ -> false
@@ -317,7 +317,7 @@ let rec is_int_type ctx t =
     | TInst ({cl_path = ([], "Int")}, _) -> true
     | TAnon a ->
         (match !(a.a_status) with
-         | Statics ({cl_path = ([], "Int")}) -> true
+         | ClassStatics ({cl_path = ([], "Int")}) -> true
          | _ -> false)
     | TAbstract ({a_path = ([],"Float")}, pl) -> false
     | TAbstract ({a_path = ([],"Int")}, pl) -> true

+ 1 - 1
src/generators/genpy.ml

@@ -38,7 +38,7 @@ module Utils = struct
 			abort (Printf.sprintf "Could not find type %s\n" (s_type_path path)) null_pos
 
 	let mk_static_field c cf p =
-			let ta = mk_anon ~fields:c.cl_statics (ref (Statics c)) in
+			let ta = mk_anon ~fields:c.cl_statics (ref (ClassStatics c)) in
 			let ethis = mk (TTypeExpr (TClassDecl c)) ta p in
 			let t = monomorphs cf.cf_params cf.cf_type in
 			mk (TField (ethis,(FStatic (c,cf)))) t p

+ 3 - 3
src/generators/genswf9.ml

@@ -293,7 +293,7 @@ let classify ctx t =
 		KType (HMPath ([],"Function"))
 	| TAnon a ->
 		(match !(a.a_status) with
-		| Statics _ -> KNone
+		| ClassStatics _ -> KNone
 		| _ -> KDynamic)
 	| TAbstract ({ a_path = ["flash";"utils"],"Object" },[]) ->
 		KType (HMPath ([],"Object"))
@@ -373,7 +373,7 @@ let property ctx fa t =
 		| _ -> ident p, None, false)
 	| TAnon a ->
 		(match !(a.a_status) with
-		| Statics { cl_path = [], "Math" } ->
+		| ClassStatics { cl_path = [], "Math" } ->
 			(match p with
 			| "POSITIVE_INFINITY" | "NEGATIVE_INFINITY" | "NaN" -> ident p, Some KFloat, false
 			| "floor" | "ceil" | "round" when ctx.for_call -> ident p, Some KInt, false
@@ -967,7 +967,7 @@ let gen_access ctx e (forset : 'a) : 'a access =
 				VVolatile (id,None)
 			else
 				VId id
-		| TAnon a, _ when (match !(a.a_status) with Statics _ | EnumStatics _ -> true | _ -> false) ->
+		| TAnon a, _ when (match !(a.a_status) with ClassStatics _ | EnumStatics _ -> true | _ -> false) ->
 			if Codegen.is_volatile e.etype then
 				VVolatile (id,None)
 			else

+ 1 - 1
src/macro/macroApi.ml

@@ -1186,7 +1186,7 @@ and encode_anon_status s =
 		| Closed -> 0, []
 		| Type.Const -> 2, []
 		| Extend tl -> 3, [encode_ref tl (fun tl -> encode_array (List.map encode_type tl)) (fun() -> "<extended types>")]
-		| Statics cl -> 4, [encode_clref cl]
+		| ClassStatics cl -> 4, [encode_clref cl]
 		| EnumStatics en -> 5, [encode_enref en]
 		| AbstractStatics ab -> 6, [encode_abref ab]
 	)

+ 1 - 1
src/optimization/dce.ml

@@ -470,7 +470,7 @@ and expr_field dce e fa is_call_expr =
 					field dce c n CfrMember;
 				| TAnon a, _ ->
 					(match !(a.a_status) with
-					| Statics c ->
+					| ClassStatics c ->
 						mark_class dce c;
 						field dce c n CfrStatic;
 					| _ -> ())

+ 2 - 2
src/optimization/inline.ml

@@ -595,7 +595,7 @@ class inline_state ctx ethis params cf f p = object(self)
 			let unify_func () = unify_raise mt (TFun (tl,tret)) p in
 			(match follow ethis.etype with
 			| TAnon a -> (match !(a.a_status) with
-				| Statics {cl_kind = KAbstractImpl a } when has_class_field_flag cf CfImpl ->
+				| ClassStatics {cl_kind = KAbstractImpl a } when has_class_field_flag cf CfImpl ->
 					if cf.cf_name <> "_new" then begin
 						(* the first argument must unify with a_this for abstract implementation functions *)
 						let tb = (TFun(("",false,map_type a.a_this) :: (List.tl tl),tret)) in
@@ -651,7 +651,7 @@ let rec type_inline ctx cf f ethis params tret config p ?(self_calling_closure=f
 	try
 		let cl = (match follow ethis.etype with
 			| TInst (c,_) -> c
-			| TAnon a -> (match !(a.a_status) with Statics c -> c | _ -> raise Exit)
+			| TAnon a -> (match !(a.a_status) with ClassStatics c -> c | _ -> raise Exit)
 			| _ -> raise Exit
 		) in
 		(match api_inline ctx cl cf.cf_name params p with

+ 2 - 2
src/typing/calls.ml

@@ -165,10 +165,10 @@ let rec acc_get ctx g =
 					e_def
 				| TAnon a ->
 					begin match !(a.a_status) with
-						| Statics c when has_class_field_flag cf CfExtern ->
+						| ClassStatics c when has_class_field_flag cf CfExtern ->
 							display_error ctx.com "Cannot create closure on @:extern inline method" p;
 							e_def
-						| Statics c when chk_class c -> wrap_extern c
+						| ClassStatics c when chk_class c -> wrap_extern c
 						| _ -> e_def
 					end
 				| _ -> e_def

+ 5 - 5
src/typing/fields.ml

@@ -197,7 +197,7 @@ let field_access ctx mode f fh e pfield =
 				normal false
 			| TAnon a ->
 				(match !(a.a_status) with
-				| Statics c2 when ctx.curclass == c2 || can_access ctx c2 { f with cf_flags = unset_flag f.cf_flags (int_of_class_field_flag CfPublic) } true -> normal false
+				| ClassStatics c2 when ctx.curclass == c2 || can_access ctx c2 { f with cf_flags = unset_flag f.cf_flags (int_of_class_field_flag CfPublic) } true -> normal false
 				| _ -> if ctx.untyped then normal false else normal_failure())
 			| _ ->
 				if ctx.untyped then normal false else normal_failure())
@@ -338,13 +338,13 @@ let type_field cfg ctx e i p mode (with_type : WithType.t) =
 					let fmode = FEnum (en,c) in
 					let t = enum_field_type ctx en c p in
 					AKExpr (mk (TField (e,fmode)) t p)
-				| Statics c ->
+				| ClassStatics c ->
 					field_access f (FHStatic c)
 				| _ ->
 					field_access f FHAnon
 			with Not_found ->
 				match !(a.a_status) with
-				| Statics { cl_kind = KAbstractImpl a } ->
+				| ClassStatics { cl_kind = KAbstractImpl a } ->
 					type_field_by_forward_static (fun() ->
 						let mt = try module_type_of_type a.a_this with Exit -> raise Not_found in
 						let et = type_module_type ctx mt p in
@@ -568,12 +568,12 @@ let type_field cfg ctx e i p mode (with_type : WithType.t) =
 				|| List.exists (fun cf -> cf.cf_name = i) a.a_array
 			in
 			match follow t with
-			| TAnon { a_status = { contents = Statics { cl_kind = KAbstractImpl a } } }
+			| TAnon { a_status = { contents = ClassStatics { cl_kind = KAbstractImpl a } } }
 			| TInst ({ cl_kind = KAbstractImpl a },_)
 			| TAbstract (a,_) when has_special_field a ->
 				(* the abstract field is not part of the field list, which is only true when it has no expression (issue #2344) *)
 				display_error ctx.com ("Field " ^ i ^ " cannot be called directly because it has no expression") pfield;
-			| TAnon { a_status = { contents = Statics c } } when PMap.mem i c.cl_fields ->
+			| TAnon { a_status = { contents = ClassStatics c } } when PMap.mem i c.cl_fields ->
 				display_error ctx.com ("Static access to instance field " ^ i ^ " is not allowed") pfield;
 			| _ ->
 				let tthis = e.etype in

+ 1 - 1
src/typing/finalization.ml

@@ -49,7 +49,7 @@ let get_main ctx types =
 			let et = List.find (fun t -> t_path t = path) types in
 			let ec = (match et with TClassDecl c -> c | _ -> die "" __LOC__) in
 			let ef = PMap.find method_name ec.cl_statics in
-			let et = mk (TTypeExpr et) (mk_anon (ref (Statics ec))) null_pos in
+			let et = mk (TTypeExpr et) (mk_anon (ref (ClassStatics ec))) null_pos in
 			mk (TCall (mk (TField (et,FStatic (ec,ef))) ef.cf_type null_pos,[])) ctx.t.tvoid null_pos
 		in
 		(* add haxe.EntryPoint.run() call *)