Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hxb #11504

Merged
merged 404 commits into from
Jan 25, 2024
Merged

Hxb #11504

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
404 commits
Select commit Hold shift click to select a range
4daaac2
Merge branch 'development' into hxb_server_cache_simn_cleanup
Simn Dec 29, 2023
445af5c
Merge branch 'development' into hxb_server_cache_simn_cleanup
Simn Dec 29, 2023
1c91911
use identity for field params
Simn Dec 29, 2023
1c9970e
support partial generic expansion for fields
Simn Dec 29, 2023
d39538a
take off @:generic
Simn Dec 29, 2023
2c47591
Merge branch 'development' into hxb_server_cache_simn_cleanup
Simn Dec 29, 2023
01fb137
try something for enum constructor type params
Simn Dec 29, 2023
425c012
gencommon says no
Simn Dec 29, 2023
eb130d5
communicate field type parameters by index again
Simn Dec 29, 2023
cb98ec4
surely anons are just a list of anon field refs
Simn Dec 29, 2023
585c635
Merge branch 'development' into hxb_server_cache_simn_cleanup
Simn Dec 29, 2023
fc022fd
fix generic type param names
Simn Dec 29, 2023
f28fa7d
let's get dangerous
Simn Dec 30, 2023
5393274
Merge branch 'development' into hxb_server_cache_simn_cleanup
Simn Dec 30, 2023
775ca62
handle CBOs in HxbRestore too
Simn Dec 30, 2023
c07ba44
well
Simn Dec 31, 2023
b59166e
chdir
Simn Dec 31, 2023
fec033b
handle warnings as CBOs
Simn Dec 31, 2023
22c98eb
don't try to hxb import.hx because there's nothing in there
Simn Dec 31, 2023
4753ed5
don't roundtrip on Cross and Eval
Simn Dec 31, 2023
c4bc0d1
add CFLR, don't resolve fields like a crazy person
Simn Dec 31, 2023
86a929a
fix but it's still broken
Simn Dec 31, 2023
4bc65f2
stop the roundtrip nonsense for now, enough other problems
Simn Dec 31, 2023
947312f
decode binary modules in check_display_file
Simn Dec 31, 2023
a22623e
remove flush_fields, should not be needed with CFLR
Simn Dec 31, 2023
684f4ce
maybe fix generic type parameter naming
Simn Dec 31, 2023
3facff7
add ENFR too
Simn Jan 1, 2024
d3268ab
pull stricter tanon changes and remove some debug
Simn Jan 1, 2024
84efe05
unused open
kLabz Jan 1, 2024
d35eb2a
fix overloads a bit more
Simn Jan 1, 2024
23e5396
fix generic type param naming a bit more
Simn Jan 1, 2024
f21d85c
check for cf_overloads instead of CfOverloads
Simn Jan 1, 2024
6c23352
fix overloads even more
Simn Jan 1, 2024
3412183
add enum when adding enum field ref
kLabz Jan 1, 2024
dfca12b
fix overloads for real
Simn Jan 1, 2024
1936704
small optimization for the VERY common depth = 0 case
Simn Jan 1, 2024
8fa3f0a
properly initialize typedef monos
Simn Jan 1, 2024
99cc3cf
map anons before identifying them
Simn Jan 1, 2024
b743ed6
write tpp paths instead of names
Simn Jan 1, 2024
1bef62d
remove some debuggery from the writer
Simn Jan 1, 2024
85369be
embrace ttp
Simn Jan 1, 2024
4e20f00
don't follow away Null<Void> in function returns
Simn Jan 1, 2024
d30cd71
encode basic types directly
Simn Jan 1, 2024
0c26f9b
add ANFR for anon fields
kLabz Jan 1, 2024
e1d4c60
Happy new year!
kLabz Jan 1, 2024
b37c95a
[typer] fix functional interface type parameter leak
Simn Jan 1, 2024
dc52867
ANFR earlier
Simn Jan 1, 2024
2eba052
only write cf_expr_unoptimized if it differs from cf_expr
Simn Jan 1, 2024
6775eff
write texpr positions are bit smarter
Simn Jan 1, 2024
101d3bf
add field contexts, hashcons expression type instances
Simn Jan 1, 2024
31f08b9
[display] populate server/modules from hxb since there's only that atm
kLabz Jan 1, 2024
aa45365
remove cf_expr_unoptimized optimization again because the hashconsing…
Simn Jan 1, 2024
bd89477
forward declare locals in texpr
Simn Jan 1, 2024
a711894
be less awkward around ttps
Simn Jan 1, 2024
6295c5a
purge some debug from the reader
Simn Jan 1, 2024
47cdc28
don't generate TLazy and remove random bool
Simn Jan 1, 2024
adecf06
make api an argument of the read function
Simn Jan 2, 2024
b164e3b
demo how continuations could work
Simn Jan 2, 2024
b741f1f
reorder tables to something that makes sense to me
Simn Jan 2, 2024
3bd582d
Merge branch 'development' into hxb_server_cache_simn_cleanup
Simn Jan 2, 2024
7dcf9ad
separate chunk classes more
Simn Jan 2, 2024
ebbfc0f
add cl_type to avoid hundreds of ClassStatics anons
Simn Jan 2, 2024
dd86cb7
don't set anon fields too early
Simn Jan 2, 2024
fa7f472
properly deal with ClassStatics in unification and field typing
Simn Jan 2, 2024
6277c21
bring back missing checks
Simn Jan 2, 2024
9f6e13d
add small ring cache per type kind
Simn Jan 2, 2024
6867306
add more elaborate stats behind -D hxb.stats
Simn Jan 3, 2024
86b7106
move expr stuff out of the way because I keep scrolling past it
Simn Jan 3, 2024
cc3d24a
change mono byte to 1, avoid extra 1 byte for immediate type instance…
Simn Jan 3, 2024
51269b9
encode simple type instances immediately
Simn Jan 3, 2024
4d170b8
potentially avoid some GC write barriers by splitting up pos
Simn Jan 3, 2024
bd3287b
use less ignorant fast_eq
Simn Jan 3, 2024
f795a8f
warnings
kLabz Jan 2, 2024
7ce08c3
basic reader stats
kLabz Jan 3, 2024
55bef96
Merge branch 'development' into hxb_server_cache_simn_cleanup
Simn Jan 3, 2024
40bd0ef
minor cleanup
Simn Jan 3, 2024
b1366c1
fix class field scoping
Simn Jan 3, 2024
2e8c51b
infer nested status from stack
Simn Jan 3, 2024
5779ee9
field type parameters 2.0
Simn Jan 3, 2024
f36dcc4
put all texpr type instances in an array
Simn Jan 3, 2024
ec55dc1
Merge branch 'development' into hxb_server_cache_simn_cleanup
Simn Jan 4, 2024
0ba7ce4
change -bcp to --hxb-lib
Simn Jan 4, 2024
1625bbf
create directory before creating file...
Simn Jan 4, 2024
b132ef4
format stats output nicer because that's very important
Simn Jan 4, 2024
d39244a
rename hxml so I find it easier
Simn Jan 4, 2024
b7cec3e
encode Void directly because it actually appears a lot
Simn Jan 4, 2024
af9600d
reorganize type instance bytes, inline common list lengths
Simn Jan 4, 2024
caa7604
Merge branch 'development' into hxb_server_cache_simn_cleanup
Simn Jan 4, 2024
f864f8a
warnings
kLabz Jan 4, 2024
37e5b37
write blocks less awkwardly
Simn Jan 6, 2024
ad9b161
don't write i32 if it can be helped
Simn Jan 6, 2024
8fb56d5
pass current chunk to pos writer
Simn Jan 6, 2024
7a914af
add texpr stats
Simn Jan 6, 2024
ae2bcb1
optimize TCall
Simn Jan 6, 2024
ced9eb1
optimize static calls
Simn Jan 6, 2024
8e031e7
refactor pos writer slightly
Simn Jan 6, 2024
af48042
optimize this.field
Simn Jan 6, 2024
9fe7b52
fix generator printing
Simn Jan 6, 2024
e3e2cde
Merge branch 'development' into hxb_server_cache_simn_cleanup
Simn Jan 7, 2024
9129157
enable disabled tests
Simn Jan 7, 2024
a3f6934
remove overly fancy position optimization
Simn Jan 7, 2024
ce6c8de
write TInt as leb too
Simn Jan 7, 2024
0823f4a
Merge branch 'development' into hxb_server_cache_simn_cleanup
Simn Jan 8, 2024
7c1f5ef
Revert "write TInt as leb too"
Simn Jan 9, 2024
ff96a23
Merge branch 'development' into hxb_server_cache_simn_cleanup
Simn Jan 9, 2024
6046a70
let's see where we're at
Simn Jan 9, 2024
1d84117
check context before checking cache for display files
Simn Jan 9, 2024
00bbe5b
stop leaving debug prints in your commits ffs
Simn Jan 9, 2024
fdf9d88
Merge branch 'development' into hxb_server_cache_simn_cleanup
Simn Jan 10, 2024
1495a10
adjust test
Simn Jan 10, 2024
89ff3eb
dodge arcane sourcemap test problem
Simn Jan 10, 2024
c86b6ba
dodge more
Simn Jan 10, 2024
588498e
change chunk to module in the writer
Simn Jan 10, 2024
438139d
use SimnBuffer
Simn Jan 10, 2024
de88c11
Merge branch 'development' into hxb_server_cache_simn_cleanup
Simn Jan 11, 2024
ad161fc
remove roundtrip
Simn Jan 11, 2024
126fc86
Merge branch 'development' into hxb_server_cache_simn_cleanup
Simn Jan 11, 2024
26d5bc6
Merge branch 'development' into hxb_server_cache_simn_cleanup
Simn Jan 11, 2024
4d5ff7f
avoid some object overhead in the reader
Simn Jan 11, 2024
18f74f5
use correct v_id when reading from .hxb
Simn Jan 11, 2024
b757fb6
[hxb] use cache hxb for --hxb too
kLabz Jan 11, 2024
536592b
don't generate aux output (including hxb) during diagnostics
kLabz Jan 11, 2024
1f77cff
warnings
kLabz Jan 11, 2024
9eeb5cf
only cache context when using compilation server
kLabz Jan 11, 2024
74ff1ed
Merge branch 'development' into hxb_server_cache_simn_cleanup
Simn Jan 11, 2024
fea2f46
write chunk name before length, and remove crc
Simn Jan 11, 2024
9ee000e
minor refactor to make interface a bit saner
Simn Jan 11, 2024
a855226
skip hxb generation on display too
kLabz Jan 11, 2024
037c64b
warnings
kLabz Jan 11, 2024
84e09e7
move module_cache to HxbData
Simn Jan 11, 2024
d05ee0f
rework reader interface a bit as well
Simn Jan 11, 2024
ccae568
read metadata in forward data
Simn Jan 11, 2024
ae367c4
read anon field meta too
Simn Jan 11, 2024
6907b68
persist ordered list of chunks instead of one big bytes thing
Simn Jan 11, 2024
c5b99ef
Merge branch 'development' into hxb_server_cache_simn_cleanup
Simn Jan 12, 2024
5e8ce67
remove feature nonsense and revert meta change
Simn Jan 12, 2024
260bb3e
warnings
kLabz Jan 12, 2024
037b924
fix server/module, get all data from hxb cache directly
kLabz Jan 12, 2024
a75b469
align chunk order
Simn Jan 12, 2024
91d12ba
[hxb] don't overwrite taint reason with check_display_file
kLabz Jan 12, 2024
d036aa1
[server] we're sending cacheState, not 'dirty'
kLabz Jan 12, 2024
339f620
[tests] update test
kLabz Jan 12, 2024
c7d63cc
[hxb] generate proper warnings for unbound type parameters
kLabz Jan 12, 2024
f684537
Simplify unbound ttp positions; not like they're often useful anyway...
kLabz Jan 12, 2024
e7277a6
ocaml syntax is hard
kLabz Jan 12, 2024
34a397e
anon fields can have @:overload too...
kLabz Jan 12, 2024
2c9809d
Merge branch 'development' into hxb_server_cache_simn_cleanup
Simn Jan 13, 2024
a7bebce
use singular empty anon
Simn Jan 13, 2024
9ffe800
slightly improve field vs. overloads handling
Simn Jan 13, 2024
60dc134
remove some debug because hxb is perfect
Simn Jan 13, 2024
1c1953c
[TYPF] skip module name, only write pack when different from current …
kLabz Jan 13, 2024
b6adb9b
no need to complicate things
kLabz Jan 13, 2024
436e3d8
[tests] add test for #11480
kLabz Jan 13, 2024
bba59cd
add CFEX, but don't generate anything into it yet
Simn Jan 13, 2024
e3a95b4
move local type params to expressions
Simn Jan 13, 2024
a4f4efb
don't write type parameter length twice
Simn Jan 14, 2024
10bbeee
write ttp host
Simn Jan 14, 2024
68ea14a
write nested status so the reader doesn't have to track this
Simn Jan 14, 2024
95656e3
more CFEX work
Simn Jan 14, 2024
4af7e35
rename chunks
Simn Jan 14, 2024
d12d520
move all field references in front of definitions
Simn Jan 14, 2024
3ad3a35
rename chunk reader functions too
Simn Jan 14, 2024
1f38d6e
Merge branch 'development' into hxb_server_cache_simn_cleanup
Simn Jan 15, 2024
e1c5ef7
sanity catch Error when resolving types
Simn Jan 15, 2024
026c223
more sanity
Simn Jan 15, 2024
9c3b3e5
forward declare module type parameters in MTF
Simn Jan 15, 2024
411c725
fix overload handling again
Simn Jan 15, 2024
3f6bed7
remove manual cl_build call, add enable_field_access to api
Simn Jan 15, 2024
a41a549
add marker chunks, read hxb modules delayed
Simn Jan 16, 2024
55795dd
work around java.Init issue so we can run JVM roundtrip on CI
Simn Jan 16, 2024
eb7276b
fail nicer if we can't write the archive
Simn Jan 16, 2024
f422030
write cl_flags in MTF
Simn Jan 16, 2024
897f029
remove enable_field_access, rely on typing passes instead
Simn Jan 16, 2024
e54c141
only load a native lib once we actually need it
Simn Jan 16, 2024
44c248c
generate extern modules too
Simn Jan 16, 2024
38de537
activate EXD, handle field type parameters awfully for now
Simn Jan 16, 2024
9c83402
don't write empty chunks
Simn Jan 16, 2024
1bcbc35
Merge branch 'development' into hxb_server_cache_simn_cleanup
Simn Jan 16, 2024
07f7f7c
reduce diff against development
Simn Jan 16, 2024
9c847cc
bucket class fields by their name to avoid long linear lookups
Simn Jan 17, 2024
fc07fc4
remove rings
Simn Jan 17, 2024
e5546d9
comment out stats writes because this might be an observable overhead
Simn Jan 17, 2024
195bbe5
time writer per-module so we can find pathological modules
Simn Jan 17, 2024
6d9bdfd
lose some more byte-level OOP overhead
Simn Jan 17, 2024
a92c34d
remove some debug noise
Simn Jan 17, 2024
ce83790
merge IOChunk and Chunk, remove string_pool
Simn Jan 17, 2024
c2c8760
no comment
Simn Jan 17, 2024
94b2145
simplify type instance writing again
Simn Jan 17, 2024
9bfb8d2
add custom StringPool implementation
Simn Jan 17, 2024
28ecf77
optimize locals a bit more
Simn Jan 17, 2024
e63ca36
maybe deal with duplicate var declaration
Simn Jan 17, 2024
1c0c936
revert local changes
Simn Jan 17, 2024
0477c76
try local optimization again
Simn Jan 18, 2024
ab8f870
invert texpr order: kind, type, pos
Simn Jan 18, 2024
ddaf46c
introduce implicit texpr type instances
Simn Jan 18, 2024
52e08d5
walk back a little
Simn Jan 18, 2024
a19a2b6
Merge branch 'development' into hxb_server_cache_simn_cleanup
Simn Jan 18, 2024
c211f97
don't double match type params
Simn Jan 18, 2024
3401831
Merge branch 'development' into hxb_server_cache_simn_cleanup
Simn Jan 18, 2024
d5fe39e
avoid some EXD reading
Simn Jan 18, 2024
fe038de
small cleanup
Simn Jan 18, 2024
922bd32
avoid some list reading for things that aren't lists
Simn Jan 18, 2024
979660d
reverse field order and create both list and PMap at the same time
Simn Jan 18, 2024
5e91041
Generate dump even with --no-output
kLabz Jan 18, 2024
71169d6
avoid write_list for anon fields too
Simn Jan 18, 2024
88867c8
write pos pairs where applicable
Simn Jan 18, 2024
8e784fb
delay IO.input creation, add per-chunk timer
Simn Jan 18, 2024
2d0561b
avoid IO in reader too
Simn Jan 18, 2024
bf8a264
don't look if you want to sleep at night
kLabz Jan 18, 2024
088ba16
less nightmares
kLabz Jan 18, 2024
c97e6be
remove abstract reader
Simn Jan 19, 2024
e64cee5
do less in display requests
kLabz Jan 19, 2024
03182b1
start working on delayed expression reading
Simn Jan 19, 2024
4ff9faf
Add hxb.stats to ignored defines for signature
kLabz Jan 19, 2024
8505558
put the dodge in place, activate
Simn Jan 20, 2024
c4a27d2
Merge branch 'development' into hxb_server_cache_simn_cleanup
Simn Jan 20, 2024
48aaef0
adjust to cl_init changes
Simn Jan 20, 2024
660afc8
used hashed identity pool for anon fields too
Simn Jan 20, 2024
8f231ff
less classes
Simn Jan 20, 2024
ec58885
less classes
Simn Jan 20, 2024
3ee8ff5
no classes
Simn Jan 20, 2024
a87c537
avoid some pointless DynArray to List operations
Simn Jan 20, 2024
02055a0
more DynArray
Simn Jan 20, 2024
7603234
add MDR to deal with import to @:keep
Simn Jan 20, 2024
15ff2ff
Merge branch 'development' into hxb_server_cache_simn_cleanup
Simn Jan 20, 2024
68a3938
write CLR and friends after CFR
Simn Jan 21, 2024
21bb9e1
actually install cf_type
Simn Jan 21, 2024
65a5908
change field type parameter storing to something more awkward and eff…
Simn Jan 21, 2024
6617bde
avoid some unnecessary byte blitting
Simn Jan 21, 2024
f9b02fe
fix HxbId insertion on fields without expression
Simn Jan 22, 2024
679f12d
Warnings
kLabz Jan 22, 2024
c4e07fa
[server-hxb] only read expressions eagerly when full typing
kLabz Jan 22, 2024
6df6d4b
[hxb] write type for TMeta
kLabz Jan 22, 2024
e3d2826
[hxb] whitespace nazi
kLabz Jan 22, 2024
47ad4bc
tanon identification / tunification: stricterer EqStricter
kLabz Jan 22, 2024
bfe0837
Why was this debug even pushed..
kLabz Jan 22, 2024
4ed30fa
hacktoberfest
kLabz Jan 22, 2024
1189e3a
[display] server/type: only restore hxb headers
kLabz Jan 22, 2024
7713b39
check if 3725 is still a problem
Simn Jan 22, 2024
a517968
remove TODO comment
Simn Jan 22, 2024
db1c97f
Remove TODOs
kLabz Jan 23, 2024
5cff609
Merge branch 'development' into hxb_server_cache_simn_cleanup
kLabz Jan 23, 2024
fe75341
clean up unit hxmls
Simn Jan 23, 2024
4bd8b05
don't null-terminate bytes
Simn Jan 23, 2024
9017bec
Merge branch 'development' into hxb
kLabz Jan 23, 2024
8cbf396
Merge branch 'development' into hxb
Simn Jan 23, 2024
d85f0cd
[tests] add display test for static field completion
kLabz Jan 24, 2024
5903203
Merge branch 'development' into hxb
Simn Jan 24, 2024
9417cee
die when writing out empty module or type name
Simn Jan 24, 2024
bba9a34
Merge branch 'development' into hxb
kLabz Jan 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tanon identification / tunification: stricterer EqStricter
  • Loading branch information
kLabz committed Jan 22, 2024
commit 47ad4bc701df2eed4009c80a96f4a54754c5072a
12 changes: 6 additions & 6 deletions src/core/tUnification.ml
Original file line number Diff line number Diff line change
Expand Up @@ -516,11 516,11 @@ let rec type_eq uctx a b =
| _ , TLazy f -> type_eq uctx a (lazy_type f)
| TMono t , _ ->
(match t.tm_type with
| None -> if param = EqCoreType || not (link t a b) then error [cannot_unify a b]
| None -> if param = EqCoreType || param = EqStricter || not (link t a b) then error [cannot_unify a b]
| Some t -> type_eq uctx t b)
| _ , TMono t ->
(match t.tm_type with
| None -> if param = EqCoreType || not (link t b a) then error [cannot_unify a b]
| None -> if param = EqCoreType || param = EqStricter || not (link t b a) then error [cannot_unify a b]
| Some t -> type_eq uctx a t)
| TDynamic None, TDynamic None ->
()
Expand Down Expand Up @@ -630,7 630,7 @@ let type_iseq uctx a b =

let type_iseq_strict a b =
try
type_eq {default_unification_context with equality_kind = EqDoNotFollowNull} a b;
type_eq {default_unification_context with equality_kind = EqStricter} a b;
true
with Unify_error _ ->
false
Expand Down Expand Up @@ -660,11 660,11 @@ let rec unify (uctx : unification_context) a b =
| _ , TLazy f -> unify uctx a (lazy_type f)
| TMono t , _ ->
(match t.tm_type with
| None -> if not (link t a b) then error [cannot_unify a b]
| None -> if uctx.equality_kind = EqStricter || not (link t a b) then error [cannot_unify a b]
| Some t -> unify uctx t b)
| _ , TMono t ->
(match t.tm_type with
| None -> if not (link t b a) then error [cannot_unify a b]
| None -> if uctx.equality_kind = EqStricter || not (link t b a) then error [cannot_unify a b]
| Some t -> unify uctx a t)
| TType (t,tl) , _ ->
rec_stack unify_stack (a,b)
Expand Down Expand Up @@ -885,7 885,7 @@ let rec unify (uctx : unification_context) a b =
error [cannot_unify a b]
end
| _ , TDynamic None ->
()
if uctx.equality_kind = EqStricter then error [cannot_unify a b]
| _ , TDynamic (Some t1) ->
begin match a with
| TAnon an ->
Expand Down
6 changes: 3 additions & 3 deletions src/typing/tanon_identification.ml
Original file line number Diff line number Diff line change
@@ -1,12 1,12 @@
open Globals
open Type

let replace_mono t =
let replace_mono tmono_as_tdynamic t =
let visited_anons = ref [] in
let rec loop t =
match t with
| TMono ({ tm_type = None }) ->
t_dynamic
if tmono_as_tdynamic then t_dynamic else t
| TAnon an ->
if not (List.memq an !visited_anons) then begin
visited_anons := an :: !visited_anons;
Expand Down Expand Up @@ -167,7 167,7 @@ object(self)
end
| _ ->
let arity,fields = PMap.fold (fun cf (i,acc) ->
let t = replace_mono cf.cf_type in
let t = replace_mono (not strict) cf.cf_type in
(i 1),(PMap.add cf.cf_name {cf with cf_type = t} acc)
) an.a_fields (0,PMap.empty) in
let an = { a_fields = fields; a_status = an.a_status; } in
Expand Down
Loading