Skip to content

Commit 45c5c9b

Browse files
Kenoaviatesk
andauthored
Move compiler tests to Compiler package (#56522)
This does not yet make the compiler tests independently runnable using `] test Compiler`; it only moves the files and wires them up to continue running as part of the Base test runner. --------- Co-authored-by: Shuhei Kadowaki <aviatesk@gmail.com>
1 parent 001c666 commit 45c5c9b

35 files changed

+64
-46
lines changed

Compiler/src/optimize.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ include("ssair/slot2ssa.jl")
217217
include("ssair/inlining.jl")
218218
include("ssair/verify.jl")
219219
include("ssair/legacy.jl")
220-
include("ssair/EscapeAnalysis/EscapeAnalysis.jl")
220+
include("ssair/EscapeAnalysis.jl")
221221
include("ssair/passes.jl")
222222
include("ssair/irinterp.jl")
223223

Compiler/src/ssair/EscapeAnalysis/EscapeAnalysis.jl renamed to Compiler/src/ssair/EscapeAnalysis.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ using ..Compiler: # Core.Compiler specific definitions
3333
function include(x)
3434
if !isdefined(_TOP_MOD.Base, :end_base_include)
3535
# During bootstrap, all includes are relative to `base/`
36-
x = ccall(:jl_prepend_string, Ref{String}, (Any, Any), "ssair/EscapeAnalysis/", x)
36+
x = ccall(:jl_prepend_string, Ref{String}, (Any, Any), "ssair/", x)
3737
end
3838
_TOP_MOD.include(@__MODULE__, x)
3939
end

Compiler/src/ssair/heap.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,11 @@
33
# Heap operations on flat vectors
44
# -------------------------------
55

6-
76
# Binary heap indexing
87
heapleft(i::Integer) = 2i
98
heapright(i::Integer) = 2i + 1
109
heapparent(i::Integer) = div(i, 2)
1110

12-
1311
# Binary min-heap percolate down.
1412
function percolate_down!(xs::Vector, i::Integer, x, o::Ordering, len::Integer=length(xs))
1513
@inbounds while (l = heapleft(i)) <= len
@@ -60,7 +58,6 @@ function heappush!(xs::Vector, x, o::Ordering)
6058
return xs
6159
end
6260

63-
6461
"""
6562
heapify!(v, ord::Ordering)
6663
File renamed without changes.
File renamed without changes.

test/compiler/EscapeAnalysis/EscapeAnalysis.jl renamed to Compiler/test/EscapeAnalysis.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
module test_EA
22

3-
const use_core_compiler = true
3+
global use_core_compiler::Bool = true
44

55
if use_core_compiler
66
const EscapeAnalysis = Core.Compiler.EscapeAnalysis
77
else
8-
include(normpath(Sys.BINDIR, "..", "..", "base", "compiler", "ssair", "EscapeAnalysis", "EscapeAnalysis.jl"))
8+
include(normpath(Sys.BINDIR, "..", "..", "Compiler", "src", "ssair", "EscapeAnalysis.jl"))
99
end
1010

1111
include("EAUtils.jl")
12-
include("../irutils.jl")
12+
include("irutils.jl")
1313

1414
using Test, .EscapeAnalysis, .EAUtils
1515
using .EscapeAnalysis: ignore_argescape
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)