Skip to content

Commit

Permalink
hacktoberfest
Browse files Browse the repository at this point in the history
  • Loading branch information
kLabz committed Jan 22, 2024
1 parent bfe0837 commit 4ed30fa
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 40 deletions.
4 changes: 2 additions & 2 deletions src/compiler/hxb/hxbLib.ml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ let create_hxb_lib com file_path =
else try
Common.find_file com file_path
with Not_found ->
failwith ("hxb lib " ^ file_path ^ " not found")
failwith ("hxb lib " ^ file_path ^ " not found")
in
new hxb_library file
new hxb_library file
74 changes: 37 additions & 37 deletions src/compiler/hxb/hxbWriter.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1149,11 +1149,11 @@ module HxbWriter = struct

(*
simple references:
0 - mono
1 -> type ttp
2 -> field ttp
3 -> local ttp
4 -> Dynamic
0 - mono
1 -> type ttp
2 -> field ttp
3 -> local ttp
4 -> Dynamic
special references:
10 - class statics
Expand Down Expand Up @@ -2280,37 +2280,37 @@ module HxbWriter = struct
end

let create warn anon_id stats =
let cp = StringPool.create ()in
{
warn;
anon_id;
stats;
current_module = null_module;
chunks = DynArray.create ();
cp = cp;
docs = StringPool.create ();
chunk = Obj.magic ();
classes = Pool.create ();
enums = Pool.create ();
typedefs = Pool.create ();
abstracts = Pool.create ();
anons = Pool.create ();
anon_fields = HashedIdentityPool.create ();
tmonos = IdentityPool.create ();
own_classes = Pool.create ();
own_abstracts = Pool.create ();
own_enums = Pool.create ();
own_typedefs = Pool.create ();
type_param_lut = Pool.create ();
class_fields = HashedIdentityPool.create ();
enum_fields = Pool.create ();
type_type_parameters = Pool.create ();
field_type_parameters = IdentityPool.create ();
local_type_parameters = IdentityPool.create ();
field_stack = [];
unbound_ttp = IdentityPool.create ();
t_instance_chunk = Chunk.create EOM cp 32;
}
let cp = StringPool.create () in
{
warn;
anon_id;
stats;
current_module = null_module;
chunks = DynArray.create ();
cp = cp;
docs = StringPool.create ();
chunk = Obj.magic ();
classes = Pool.create ();
enums = Pool.create ();
typedefs = Pool.create ();
abstracts = Pool.create ();
anons = Pool.create ();
anon_fields = HashedIdentityPool.create ();
tmonos = IdentityPool.create ();
own_classes = Pool.create ();
own_abstracts = Pool.create ();
own_enums = Pool.create ();
own_typedefs = Pool.create ();
type_param_lut = Pool.create ();
class_fields = HashedIdentityPool.create ();
enum_fields = Pool.create ();
type_type_parameters = Pool.create ();
field_type_parameters = IdentityPool.create ();
local_type_parameters = IdentityPool.create ();
field_stack = [];
unbound_ttp = IdentityPool.create ();
t_instance_chunk = Chunk.create EOM cp 32;
}

let write_module writer m =
HxbWriter.write_module writer m
Expand All @@ -2325,4 +2325,4 @@ let export : 'a . hxb_writer -> 'a IO.output -> unit = fun writer ch ->
let l = HxbWriter.get_sorted_chunks writer in
List.iter (fun io ->
Chunk.export writer.stats io ch
) l
) l
2 changes: 1 addition & 1 deletion src/compiler/server.ml
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ and type_module sctx (ctx:Typecore.typer) mpath p =
(* "Good" here is an assumption, it only means that the module wasn't explicitly invalidated
in the cache. The true cache state will be known after check_module. *)
begin match check_module sctx ctx mpath m.m_extra p with
| None ->
| None ->
add_modules false m;
| Some reason ->
skip m.m_path reason
Expand Down

0 comments on commit 4ed30fa

Please sign in to comment.