Pārlūkot izejas kodu

remove flush_fields, should not be needed with CFLR

Simon Krajewski 1 gadu atpakaļ
vecāks
revīzija
a22623e15c

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

@@ -1652,7 +1652,6 @@ class hxb_reader
 				self#read_absd;
 				loop()
 			| CFLR ->
-				api#flush_fields ();
 				self#read_cflr;
 				loop();
 			| CFLD ->

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

@@ -5,5 +5,4 @@ class virtual hxb_reader_api = object(self)
 	method virtual make_module : path -> string -> module_def
 	method virtual add_module : module_def -> unit
 	method virtual resolve_type : string list -> string -> string -> module_type
-	method virtual flush_fields : unit -> unit
 end

+ 0 - 3
src/compiler/server.ml

@@ -421,9 +421,6 @@ class hxb_reader_api_server
 		in
 		List.find (fun t -> snd (t_path t) = tname) m.m_types
 
-	method flush_fields () =
-		Typecore.flush_pass ctx PConnectField "hxb"
-
 	method find_module (m_path : path) =
 		try
 			GoodModule (ctx.com.module_lut#find m_path)

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

@@ -129,11 +129,6 @@ class hxb_reader_api_com
 		let m = self#find_module path in
 		List.find (fun t -> snd (t_path t) = tname) m.m_types
 
-	method flush_fields () =
-		(* TODO: We don't have a typer, so we cannot flush anything. The hxb reader shouldn't read
-		   any tables that require this. *)
-		()
-
 	method find_module (m_path : path) =
 		try
 			com.module_lut#find m_path

+ 2 - 6
src/typing/typeloadModule.ml

@@ -152,12 +152,11 @@ module ModuleLevel = struct
 					t_meta = d.d_meta;
 				} in
 				(* failsafe in case the typedef is not initialized (see #3933) *)
-				(* HXB_TODO: Investigate the problem here. It might come from a flush_fields in hxbReader. *)
-				(* delay ctx PBuildModule (fun () ->
+				delay ctx PBuildModule (fun () ->
 					match t.t_type with
 					| TMono r -> (match r.tm_type with None -> Monomorph.bind r com.basic.tvoid | _ -> ())
 					| _ -> ()
-				); *)
+				);
 				decls := (TTypeDecl t, decl) :: !decls;
 				acc
 			| EAbstract d ->
@@ -796,9 +795,6 @@ class hxb_reader_api_typeload
 	method resolve_type (pack : string list) (mname : string) (tname : string) =
 		let m = load_module ctx (pack,mname) p in
 		List.find (fun t -> snd (t_path t) = tname) m.m_types
-
-	method flush_fields () =
-		flush_pass ctx PConnectField "hxb"
 end
 
 let rec get_reader ctx p =