Procházet zdrojové kódy

remove enable_field_access, rely on typing passes instead

see #11493
Simon Krajewski před 1 rokem
rodič
revize
897f0294c5

+ 0 - 2
src/compiler/hxb/hxbReader.ml

@@ -1789,10 +1789,8 @@ class hxb_reader
 		| EOT ->
 			()
 		| EFR ->
-			api#enable_field_access;
 			self#read_efr;
 		| CFR ->
-			api#enable_field_access;
 			self#read_cfr;
 		| CFD ->
 			self#read_cfd;

+ 0 - 1
src/compiler/hxb/hxbReaderApi.ml

@@ -7,5 +7,4 @@ class virtual hxb_reader_api = object(self)
 	method virtual resolve_type : string list -> string -> string -> module_type
 	method virtual basic_types : basic_types
 	method virtual get_var_id : int -> int
-	method virtual enable_field_access : unit
 end

+ 0 - 3
src/compiler/server.ml

@@ -442,9 +442,6 @@ class hxb_reader_api_server
 
 	method get_var_id (i : int) =
 		i
-
-	method enable_field_access =
-		()
 end
 
 let handle_cache_bound_objects com cbol =

+ 0 - 3
src/context/display/displayJson.ml

@@ -144,9 +144,6 @@ class hxb_reader_api_com
 
 	method get_var_id (i : int) =
 		i
-
-	method enable_field_access =
-		()
 end
 
 let find_module ~(headers_only : bool) com cc path =

+ 8 - 6
src/typing/typeloadModule.ml

@@ -801,9 +801,6 @@ class hxb_reader_api_typeload
 		let uid = fst alloc_var' in
 		incr uid;
 		!uid
-
-	method enable_field_access =
-		enter_field_typing_pass ctx ("enable_field_access",fst ctx.curclass.cl_path @ [snd ctx.curclass.cl_path;ctx.curfield.cf_name]);
 end
 
 let rec get_reader ctx p =
@@ -813,10 +810,15 @@ and load_hxb_module ctx path p =
 	let read file input =
 		try
 			let read = (get_reader ctx p)#read_hxb input ctx.com.hxb_reader_stats in
-			let m = read EOT in
+			let m = read MTF in
 			delay ctx PBuildClass (fun () ->
-				ignore(read EOF);
-				delay ctx PTypeField (fun () -> ignore(read EOM));
+				ignore(read EOT);
+				delay ctx PConnectField (fun () ->
+					ignore(read EOF);
+					delay ctx PTypeField (fun () ->
+						ignore(read EOM)
+					)
+				);
 			);
 			m
 		with e ->