Skip to content

Commit 2e9df16

Browse files
committed
Revert "Save the argument name when classifying arguments."
This reverts commit 96f2de4.
1 parent af0fd86 commit 2e9df16

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

src/irgen.jl

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -312,42 +312,31 @@ end
312312
GHOST # not passed
313313
end
314314

315-
function method_argnames(m::Method)
316-
argnames = ccall(:jl_uncompress_argnames, Vector{Symbol}, (Any,), m.slot_syms)
317-
isempty(argnames) && return argnames
318-
return argnames[1:m.nargs]
319-
end
320-
321315
function classify_arguments(@nospecialize(job::CompilerJob), codegen_ft::LLVM.FunctionType)
322316
source_sig = typed_signature(job)
323317

324318
source_types = [source_sig.parameters...]
325-
source_method = only(method_matches(typed_signature(job); job.source.world)).method
326-
source_arguments = method_argnames(source_method)
327319

328320
codegen_types = parameters(codegen_ft)
329321

330322
args = []
331323
codegen_i = 1
332324
for (source_i, source_typ) in enumerate(source_types)
333-
source_name = source_arguments[min(source_i, length(source_arguments))]
334-
# NOTE: in case of varargs, we have fewer arguments than parameters
335-
336325
if isghosttype(source_typ) || Core.Compiler.isconstType(source_typ)
337-
push!(args, (cc=GHOST, typ=source_typ, name=source_name))
326+
push!(args, (cc=GHOST, typ=source_typ))
338327
continue
339328
end
340329

341330
codegen_typ = codegen_types[codegen_i]
342331
if codegen_typ isa LLVM.PointerType && !issized(eltype(codegen_typ))
343-
push!(args, (cc=MUT_REF, typ=source_typ, name=source_name,
332+
push!(args, (cc=MUT_REF, typ=source_typ,
344333
codegen=(typ=codegen_typ, i=codegen_i)))
345334
elseif codegen_typ isa LLVM.PointerType && issized(eltype(codegen_typ)) &&
346335
!(source_typ <: Ptr) && !(source_typ <: Core.LLVMPtr)
347-
push!(args, (cc=BITS_REF, typ=source_typ, name=source_name,
336+
push!(args, (cc=BITS_REF, typ=source_typ,
348337
codegen=(typ=codegen_typ, i=codegen_i)))
349338
else
350-
push!(args, (cc=BITS_VALUE, typ=source_typ, name=source_name,
339+
push!(args, (cc=BITS_VALUE, typ=source_typ,
351340
codegen=(typ=codegen_typ, i=codegen_i)))
352341
end
353342
codegen_i += 1

0 commit comments

Comments
 (0)