Skip to content

Commit

Permalink
added module_def_extra.m_file_key (#9509)
Browse files Browse the repository at this point in the history
  • Loading branch information
RealyUniqueName committed Jun 18, 2020
1 parent 5152a89 commit e3ba0e7
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions extra/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
display : fixed completion for out-of-bounds argument in a call (#9435)
display : fixed "find references" through interfaces (#9470)
display : optimized "find references" (#9504)
display : optimized "server/invalidate" requests (#9509)
macro : fixed type intersection syntax in macro reification (#9404)
lua : fixed lua code generation without `--main` compilation argument (#9489)
php : added an overload signature for `session_set_cookie_params` function (#9507)
Expand Down
2 changes: 1 addition & 1 deletion src/context/compilationServer.ml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class cache = object(self)
method taint_modules file_key =
Hashtbl.iter (fun _ cc ->
Hashtbl.iter (fun _ m ->
if Path.UniqueKey.create m.m_extra.m_file = file_key then m.m_extra.m_dirty <- Some m.m_path
if m.m_extra.m_file_key() = file_key then m.m_extra.m_dirty <- Some m.m_path
) cc#get_modules
) contexts

Expand Down
9 changes: 9 additions & 0 deletions src/core/tFunctions.ml
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,17 @@ let mk_class m path pos name_pos =
}

let module_extra file sign time kind policy =
let file_key = ref None in
{
m_file = file;
m_file_key = (fun () ->
match !file_key with
| Some key -> key
| None ->
let key = Path.UniqueKey.create file in
file_key := Some key;
key
);
m_sign = sign;
m_display = {
m_inline_calls = [];
Expand Down
1 change: 1 addition & 0 deletions src/core/tType.ml
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ and module_def_display = {

and module_def_extra = {
m_file : string;
m_file_key : unit -> Path.UniqueKey.t;
m_sign : string;
m_display : module_def_display;
mutable m_check_policy : module_check_policy list;
Expand Down

0 comments on commit e3ba0e7

Please sign in to comment.