Skip to content

Commit

Permalink
Fix errors after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
ckoparkar committed Aug 21, 2023
1 parent af2c23c commit 33c805c
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 8 deletions.
4 changes: 2 additions & 2 deletions gibbon-compiler/src/Gibbon/Compiler.hs
Original file line number Diff line number Diff line change
Expand Up @@ -642,11 +642,11 @@ passes config@Config{dynflags} l0 = do
l1 <- go "L1.typecheck" L1.tcProg l1
l1 <- goE1 "removeCopyAliases" removeAliasesForCopyCalls l1
l2 <- goE2 "inferLocations" inferLocs l1
l2 <- goE2 "simplifyLocBinds_a" simplifyLocBinds l2
l2 <- goE2 "simplifyLocBinds_a" (simplifyLocBinds True) l2
l2 <- go "L2.typecheck" L2.tcProg l2
l2 <- go "regionsInwards" regionsInwards l2
l2 <- go "L2.typecheck" L2.tcProg l2
l2 <- goE2 "simplifyLocBinds" simplifyLocBinds l2
l2 <- goE2 "simplifyLocBinds" (simplifyLocBinds True) l2
l2 <- go "fixRANs" fixRANs l2
l2 <- go "L2.typecheck" L2.tcProg l2
l2 <- goE2 "L2.flatten" flattenL2 l2
Expand Down
2 changes: 1 addition & 1 deletion gibbon-compiler/src/Gibbon/L2/Typecheck.hs
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@ tcExp ddfs env funs constrs regs tstatein exp =
sequence_ [ ensureEqualTyNoLoc exp ty1 ty2
| (ty1,ty2) <- zip args tys ]
-- -- TODO: need to fix this check
-- ensureDataCon exp l tys constrs
ensureDataCon exp l tys constrs
tstate2 <- switchOutLoc exp tstate1 l
return (PackedTy dcty l, tstate2)

Expand Down
5 changes: 5 additions & 0 deletions gibbon-compiler/src/Gibbon/Passes/InferLocations.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2373,3 +2373,8 @@ freeVarsInOrder exp = case exp of

SpawnE v _ ls -> [v] ++ (L.concat $ L.map freeVarsInOrder ls)
SyncE -> []
Ext ext ->
case ext of
L1.AddFixed v i -> [v]
L1.StartOfPkdCursor v -> [v]
L1.BenchE _f _locs args _b -> L.concat $ (L.map freeVarsInOrder args)
31 changes: 26 additions & 5 deletions gibbon-compiler/tests/test-gibbon-examples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,15 @@ tests:
- name: SS.hs
dir: examples/gc
answer-file: examples/gc/SS.ans
# Failing due to a bug in AddTraversals.
failing: [gibbon1]
- name: Test187.hs
answer-file: examples/Test187.ans
skip: true

# Needs manual inspection.
- name: test14_repair.gib
# Unexpected L3 error.
skip: true


- name: test14a_tup.gib
- name: test14b_tup.gib
Expand Down Expand Up @@ -119,6 +120,8 @@ tests:
- name: test19_unarytree.gib
- name: test20_bintree.gib
- name: test20b_bintree.gib
# Inferlocations bug.
failing: [gibbon3, gibbon2]
- name: test20c_bintree.gib
- name: test20d_bintree.gib
- name: test20e_bintree.gib
Expand All @@ -129,6 +132,8 @@ tests:
- name: test29a_list.gib
- name: test29b_list.gib
- name: test30_twitter.gib
# ThreadRegions bug.
failing: [gibbon3, gibbon2]
- name: test_buildstree.gib
- name: test_buildtree.gib
- name: test_buildtreesum.gib
Expand All @@ -144,7 +149,11 @@ tests:
skip: true
answer-file: examples/void_type.ans
- name: T64_1.gib
# Inferlocations bug.
failing: [gibbon3, gibbon2]
- name: test_addtrees.gib
# Inferlocations bug.
failing: [gibbon3, gibbon2]
- name: TestStrings.hs
# interp outputs 'h' versus the expected h (without quotes)
failing: [interp1]
Expand Down Expand Up @@ -183,13 +192,17 @@ tests:
- name: bench_rightmost.gib
bench: true
more-iters: [pointer, gibbon2]
# Inferlocations bug.
failing: [gibbon3, gibbon2]

- name: bench_build_searchtree.gib
bench: true

- name: bench_tree_lookup.gib
bench: true
more-iters: [pointer, gibbon2]
# Inferlocations bug.
failing: [gibbon3, gibbon2]

- name: bench_tree_insert.gib
bench: true
Expand All @@ -200,12 +213,16 @@ tests:

- name: bench_repmax.gib
bench: true
# Inferlocations bug.
failing: [gibbon3, gibbon2]

- name: bench_repconst.gib
bench: true

- name: bench_findmax.gib
bench: true
# Inferlocations bug.
failing: [gibbon3, gibbon2]

## There is no significant difference between compose1 / compose2.
## compose2 should be much faster.
Expand Down Expand Up @@ -334,7 +351,8 @@ tests:
- name: test_printpacked.hs
dir: examples
answer-file: examples/test_printpacked.ans
failing: [interp1,gibbon1,pointer]
# gibbon3 and gibbon2: Inferlocations bug.
failing: [interp1,gibbon1,pointer,gibbon3,gibbon2]

## FAILING: Multiple packed outputs.
- name: TupleTest.hs
Expand Down Expand Up @@ -550,8 +568,11 @@ tests:

- name: test_power.hs
answer-file: examples/test_power.ans
# gib_alloc_region_on_heap: gib_alloc failed
failing: [gibbon1]

- name: test_191.hs
answer-file: examples/test_191.ans
failing: [pointer, gibbon1, interp1]
run-modes: ["gibbon2"]
# Gibbon2 and Gibbon3 modes don't pass the L2 typechecker.
failing: [pointer, gibbon1, interp1, gibbon3, gibbon2]
run-modes: ["gibbon2"]

0 comments on commit 33c805c

Please sign in to comment.