@@ -745,18 +745,18 @@ function compute_frameinfo(ir::IRCode)
745
745
ndims = alloc_array_ndims (nn)
746
746
ndims === nothing && @goto next_stmt
747
747
if ndims ≠ 0
748
- length (args) ≥ ndims+ 6 || @goto next_stmt
748
+ length (args) ≥ ndims+ 7 || @goto next_stmt
749
749
dims = Int[]
750
750
for i in 1 : ndims
751
- dim = argextype (args[i+ 6 ], ir)
751
+ dim = argextype (args[i+ 7 ], ir)
752
752
isa (dim, Const) || @goto next_stmt
753
753
dim = dim. val
754
754
isa (dim, Int) || @goto next_stmt
755
755
push! (dims, dim)
756
756
end
757
757
else
758
- length (args) ≥ 7 || @goto next_stmt
759
- dims = argextype (args[7 ], ir)
758
+ length (args) ≥ 8 || @goto next_stmt
759
+ dims = argextype (args[8 ], ir)
760
760
if isa (dims, Const)
761
761
dims = dims. val
762
762
isa (dims, Tuple{Vararg{Int}}) || @goto next_stmt
@@ -1153,7 +1153,7 @@ end
1153
1153
# TODO : we can apply a similar strategy like builtin calls to specialize some foreigncalls
1154
1154
function escape_foreigncall! (astate:: AnalysisState , pc:: Int , args:: Vector{Any} )
1155
1155
nargs = length (args)
1156
- if nargs < 6
1156
+ if nargs < 7
1157
1157
# invalid foreigncall, just escape everything
1158
1158
add_conservative_changes! (astate, pc, args)
1159
1159
return
@@ -1196,7 +1196,7 @@ function escape_foreigncall!(astate::AnalysisState, pc::Int, args::Vector{Any})
1196
1196
add_escape_change! (astate, args[5 + i], arg_info)
1197
1197
add_liveness_change! (astate, args[5 + i], pc)
1198
1198
end
1199
- for i = (5 + nargs): length (args)
1199
+ for i = (6 + nargs): length (args)
1200
1200
arg = args[i]
1201
1201
add_escape_change! (astate, arg, ⊥)
1202
1202
add_liveness_change! (astate, arg, pc)
0 commit comments