Skip to content

Commit ab977fc

Browse files
Merge pull request #721 from AayushSabharwal/as/fix-benchmarks
fix: remove Metatheory from benchmark environment
2 parents eb9f4db + 1290352 commit ab977fc

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

benchmark/Project.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
[deps]
2-
Metatheory = "e9d8d322-4543-424a-9be4-0cc815abe26c"

benchmark/benchmarks.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
using BenchmarkTools, SymbolicUtils
22
using SymbolicUtils: is_literal_number, @rule
3-
using Metatheory
43

54
using Random
65

test/benchmark.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# A little trick for travis
22
using PkgBenchmark, SymbolicUtils
3-
using Metatheory
43

54
pkgpath = dirname(dirname(pathof(SymbolicUtils)))
65
# move it out of the repository so that you can check out different branches

test/cse.jl

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,17 +142,16 @@ end
142142
@syms a b c d::Array e f
143143
fn = Func([a, DestructuredArgs([b, c])], [], Let([Assignment(d, [a^2 + b^2, b^2 + c^2]), DestructuredArgs([e, f], term(broadcast, *, 2, d))], a^2 + b^2 + e + f))
144144
csex = cse(fn)
145-
146-
@test length(csex.body.pairs) == 9
147145
sexprs = csex.body.pairs
148146
assignments = filter(x -> x isa Assignment, sexprs)
149-
@test sexprs[6].lhs === d
147+
didx = findfirst(x -> isequal(x.lhs, d), sexprs)
150148
# the array in the assignment should be CSEd
151-
i, j = findfirst.(isequal.(sexprs[6].rhs), (Code.lhs.(assignments),))
149+
i, j = findfirst.(isequal.(sexprs[didx].rhs), (Code.lhs.(assignments),))
152150
@test i !== nothing
153151
@test j !== nothing
154-
@test sexprs[8] isa DestructuredArgs
155-
@test isequal(sexprs[8].name, sexprs[7].lhs)
152+
didx = findfirst(x -> x isa DestructuredArgs, sexprs)
153+
@test sexprs[didx] isa DestructuredArgs
154+
@test findfirst(isequal(sexprs[didx].name), Code.lhs.(assignments)) !== nothing
156155

157156
rgf = @RuntimeGeneratedFunction(toexpr(csex))
158157
trueval = let a = 1,

0 commit comments

Comments
 (0)