Skip to content

Commit

Permalink
shared mem opts, part 4
Browse files Browse the repository at this point in the history
Summary:
Remove unnecessary field in info, which gets serialized / deserialized every
time we access InfoHeap.

Reviewed By: samwgoldman

Differential Revision: D3918803

fbshipit-source-id: de9f48711bc64c5f55a5288c246809161bd298e0
  • Loading branch information
avikchaudhuri authored and Facebook Github Bot 8 committed Sep 28, 2016
1 parent 3ce7162 commit c450e09
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/services/inference/module_js.ml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ module NameMap = MyMap.Make(Modulename)
that's probably guessable.
**)
type info = {
file: filename; (* file name *)
_module: Modulename.t; (* module name *)
required: NameSet.t; (* required module names *)
require_loc: Loc.t SMap.t; (* statement locations *)
Expand Down Expand Up @@ -791,7 +790,6 @@ let info_of ~options cx =
SMap.add (Modulename.to_string resolved_r) loc require_loc)
(Context.require_loc cx) SMap.empty in
{
file = Context.file cx;
_module = Context.module_name cx;
required;
require_loc;
Expand All @@ -806,7 +804,7 @@ let info_of ~options cx =
Note that we wait to choose providers until inference is complete. *)
let add_module_info ~audit ~options cx =
let info = info_of ~options cx in
add_info ~audit info.file info
add_info ~audit (Context.file cx) info

(* We need to track files that have failed to parse. This begins with
adding tracking records for unparsed files to InfoHeap. They never
Expand All @@ -824,7 +822,7 @@ let add_unparsed_info ~audit ~options file docblock =
Docblock.is_flow docblock ||
Docblock.isDeclarationFile docblock
in
let info = { file; _module; checked; parsed = false;
let info = { _module; checked; parsed = false;
required = NameSet.empty;
require_loc = SMap.empty;
resolved_modules = SMap.empty;
Expand Down
1 change: 0 additions & 1 deletion src/services/inference/module_js.mli
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ module NameSet: Set.S with type elt = Modulename.t
module NameMap: MyMap.S with type key = Modulename.t

type info = {
file: filename; (* file name *)
_module: Modulename.t; (* module name *)
required: NameSet.t; (* required module names *)
require_loc: Loc.t SMap.t; (* statement locations *)
Expand Down

0 comments on commit c450e09

Please sign in to comment.