-
-
Notifications
You must be signed in to change notification settings - Fork 671
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
74 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
open Globals | ||
open TType | ||
open Common | ||
open TFunctions | ||
|
||
type find_module_result = | ||
| GoodModule of module_def | ||
| BadModule of module_skip_reason | ||
| BinaryModule of HxbData.module_cache | ||
| NoModule | ||
|
||
let type_module_hook : (Common.context -> path -> pos -> find_module_result) ref = ref (fun _ _ _ -> NoModule) | ||
|
||
let fake_modules = Hashtbl.create 0 | ||
|
||
let create_fake_module com file = | ||
let key = com.file_keys#get file in | ||
let file = Path.get_full_path file in | ||
let mdep = (try Hashtbl.find fake_modules key with Not_found -> | ||
let mdep = { | ||
m_id = alloc_mid(); | ||
m_path = (["$DEP"],file); | ||
m_types = []; | ||
m_statics = None; | ||
m_extra = module_extra file (Define.get_signature com.defines) (file_time file) MFake com.compilation_step []; | ||
} in | ||
Hashtbl.add fake_modules key mdep; | ||
mdep | ||
) in | ||
com.module_lut#add mdep.m_path mdep; | ||
mdep |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters