Skip to content
Closed
Show file tree
Hide file tree
Changes from 45 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
1b886cc
initial draft; the pass does nothing at all, yet
matthewhammer Feb 5, 2019
7b739f1
sanity check: pipeline still passes all tests
matthewhammer Feb 5, 2019
c686ad0
notes and questions about the planned transforms; writing them out sh…
matthewhammer Feb 6, 2019
df1f3c1
move RHS's of loop transforms, stil pending, into Construct module
matthewhammer Feb 8, 2019
2467678
1/3 of the derived loop forms in Construct; triggering WASM test errors
matthewhammer Feb 8, 2019
517d236
minor: fix typo in comment
matthewhammer Feb 8, 2019
53fbdc1
fix bug that I introduced; another xform case passes all tests
matthewhammer Feb 8, 2019
c28bf05
stuck: how to get the Con env where I need it?
matthewhammer Feb 8, 2019
397fe7a
Bundle the kind with the con
nomeata Feb 8, 2019
0dde544
Simplify Ir.TypD
nomeata Feb 8, 2019
4f146b5
Make the representation of con.kind private
nomeata Feb 9, 2019
d5baf2b
Make set_kind check that the kind is not set a second time
nomeata Feb 9, 2019
da7d6ae
Address nit
nomeata Feb 9, 2019
779c806
Merge branch 'master' into joachim/con-ann
nomeata Feb 11, 2019
a8f87df
Refactor avoid to take a `con_set`, not a `con_env`
nomeata Feb 11, 2019
0986cff
Drop con_env argument to Type.avoid (use kind inside)
nomeata Feb 11, 2019
51fc8f7
Remove `con_env` from `scope`
nomeata Feb 11, 2019
933c928
Actually, get rid of `Typing.con_set`
nomeata Feb 11, 2019
0838bc8
Delete definition of `Type.con_env`
nomeata Feb 11, 2019
5eb9c57
Make `kind` a field and type parameter of `Con.t`
nomeata Feb 11, 2019
2b6da66
Write an .mli file for `Check_ir`
nomeata Feb 11, 2019
127ef3a
Merge remote-tracking branch 'origin/master' into joachim/con-ann
nomeata Feb 12, 2019
ceff9e8
Address nits
nomeata Feb 14, 2019
e083606
Merge branch 'master' into joachim/con-ann
nomeata Feb 14, 2019
5ff49b5
Better name for the abstract annotations on cons
nomeata Feb 14, 2019
ae896ef
initial draft; the pass does nothing at all, yet
matthewhammer Feb 5, 2019
3917757
sanity check: pipeline still passes all tests
matthewhammer Feb 5, 2019
8758f77
notes and questions about the planned transforms; writing them out sh…
matthewhammer Feb 6, 2019
35ba3e0
rebase on joachims work; fixup
matthewhammer Feb 14, 2019
b4a96e1
move RHS's of loop transforms, stil pending, into Construct module
matthewhammer Feb 8, 2019
e646622
1/3 of the derived loop forms in Construct; triggering WASM test errors
matthewhammer Feb 8, 2019
669d542
minor: fix typo in comment
matthewhammer Feb 8, 2019
1a8e45e
fix bug that I introduced; another xform case passes all tests
matthewhammer Feb 8, 2019
8bfd4d8
stuck: how to get the Con env where I need it?
matthewhammer Feb 8, 2019
1625513
minor: typo
matthewhammer Feb 11, 2019
76d2050
merge
matthewhammer Feb 14, 2019
2235771
fix merge
matthewhammer Feb 14, 2019
15c03c1
avoid new ANF forms in simploop; all passes dump, then check
matthewhammer Feb 15, 2019
923b29c
Make `check_ir` dump prog when it does not typecheck
nomeata Feb 15, 2019
295edc0
Remove extra call to `Check_ir` from pipeline
nomeata Feb 15, 2019
df93f3a
Let Simploop handle `AsyncE` and `AwaitE`
nomeata Feb 15, 2019
80e4590
Run simploop also in `-r -iR` mode
nomeata Feb 15, 2019
f59be98
Add call to check_prog back in simploop.ml
nomeata Feb 15, 2019
53d1e78
Make Check_ir dump the IR only upon `-v` (and tell the user about it)
nomeata Feb 15, 2019
041c1ce
Fix Construct.labelE (it needs to set the return type)
nomeata Feb 15, 2019
629b881
simploop: move into desugar, use less ANF; Question about array-gen.as
matthewhammer Feb 26, 2019
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
4 changes: 2 additions & 2 deletions src/arrange_ir.ml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ and dec d = match d.it with
| VarD (i, e) -> "VarD" $$ [id i; exp e]
| FuncD (cc, i, tp, p, t, e) ->
"FuncD" $$ [call_conv cc; id i] @ List.map typ_bind tp @ [pat p; typ t; exp e]
| TypD (c,k) ->
"TypD" $$ [con c; kind k]
| TypD c ->
"TypD" $$ [con c; kind (Type.kind c)]

and typ_bind (tb : typ_bind) =
Con.to_string tb.it.con $$ [typ tb.it.bound]
Expand Down
17 changes: 11 additions & 6 deletions src/async.ml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ and t_kind k =
| T.Def(typ_binds,typ) ->
T.Def(t_binds typ_binds, t_typ typ)

and t_con con =
T.modify_kind con t_kind;
con

and t_operator_type ot =
(* We recreate the reference here. That is ok, because it
we run after type inference. Once we move async past desugaring,
Expand Down Expand Up @@ -308,8 +312,8 @@ and t_dec dec =
and t_dec' dec' =
match dec' with
| ExpD exp -> ExpD (t_exp exp)
| TypD (con_id, k) ->
TypD (con_id, t_kind k)
| TypD con_id ->
TypD (t_con con_id)
| LetD (pat,exp) -> LetD (t_pat pat,t_exp exp)
| VarD (id,exp) -> VarD (id,t_exp exp)
| FuncD (cc, id, typbinds, pat, typT, exp) ->
Expand Down Expand Up @@ -376,7 +380,7 @@ and t_pat' pat =
AltP (t_pat pat1, t_pat pat2)

and t_typ_bind' {con; bound} =
{con; bound = t_typ bound}
{con = t_con con; bound = t_typ bound}

and t_typ_bind typ_bind =
{ typ_bind with it = t_typ_bind' typ_bind.it }
Expand All @@ -397,9 +401,10 @@ let check_typ env typ =
| _ -> ()

let check_prog scope prog =
let env = { (Check_ir.env_of_scope scope) with
Check_ir.check_exp = check_exp;
Check_ir.check_typ = check_typ }
let env =
Check_ir.env_of_scope scope |>
Check_ir.with_check_exp check_exp |>
Check_ir.with_check_typ check_typ
in
Check_ir.check_prog env prog

Expand Down
5 changes: 3 additions & 2 deletions src/awaitopt.ml
Original file line number Diff line number Diff line change
Expand Up @@ -569,8 +569,9 @@ let check_exp env exp =
| _ -> ()

let check_prog scope prog =
let env = { (Check_ir.env_of_scope scope) with
Check_ir.check_exp = check_exp }
let env =
Check_ir.env_of_scope scope |>
Check_ir.with_check_exp check_exp
in
Check_ir.check_prog env prog

Expand Down
Loading