Skip to content

Commit

Permalink
Giveup on Julia v1.6, use v1.7 at minimum
Browse files Browse the repository at this point in the history
  • Loading branch information
Keluaa committed Apr 1, 2024
1 parent 48ecd70 commit d2b6ec9
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
matrix:
version:
- '1.10'
- '1.6'
- '1.7'
- 'nightly'
os:
- ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ReferenceTests = "0.10"
StringDistances = "0.11"
Test = "1"
WidthLimitedIO = "1"
julia = "1.6"
julia = "1.7"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ f1 (generic function with 1 method)
julia> @code_diff type=:llvm debuginfo=:none f1(Int64(1)) f1(Int8(1))
define i64 @f1(i64 signext %0) #0 { ⟪╋⟫define i64 @f1(i8 signext %0) #0 {
top: ┃ top:
┣⟫ %1 = sext i8 %0 to i64
%1 = add i64 %0, 1 ⟪╋⟫ %2 = add nsw i64 %1, 1
ret i64 %1 ⟪╋⟫ ret i64 %2
┣⟫ %1 = sext i8 %0 to i64
} ┃ }

julia> f2(a) = a - 1
Expand Down
2 changes: 1 addition & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ f1 (generic function with 1 method)
julia> @code_diff type=:llvm debuginfo=:none color=false f1(Int64(1)) f1(Int8(1))
define i64 @f1(i64 signext %0) #0 { ⟪╋⟫define i64 @f1(i8 signext %0) #0 {
top: ┃ top:
┣⟫ %1 = sext i8 %0 to i64
%1 = add i64 %0, 1 ⟪╋⟫ %2 = add nsw i64 %1, 1
ret i64 %1 ⟪╋⟫ ret i64 %2
┣⟫ %1 = sext i8 %0 to i64
} ┃ }
julia> f2(a) = a - 1
Expand Down
6 changes: 1 addition & 5 deletions src/compare.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,7 @@ function replace_llvm_module_name(code::AbstractString, function_name)
# See 'get_function_name' in 'julia/src/codegen.cpp'
function_name = function_name[2:end]
end
if v"1.7-" VERSION
func_re = Regex("(?>julia|japi3|japi1)_\\Q$(function_name)\\E_(\\d+)")
else
func_re = Regex("(?>julia|japi3|japi1)_$(function_name)_(\\d+)")
end
func_re = Regex("(?>julia|japi3|japi1)_\\Q$(function_name)\\E_(\\d+)")
return replace(code, func_re => function_name)
end

Expand Down

0 comments on commit d2b6ec9

Please sign in to comment.