JuliaCompilerPlugins / CodeInfoTools.jl

Compare d482384 ... +0 ... f9711b3

Coverage Reach
CodeInfoTools.jl

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 1 of 2 files from the diff.
Other files ignored by Codecov
test/misc.jl has changed.

@@ -570,8 +570,29 @@
Loading
570 570
##### Evaluation
571 571
#####
572 572
573 +
# Your scientists were so preoccupied with whether or not they could, they didn’t stop to think if they should.
574 +
function wipe(src::CodeInfo)
575 +
    b = Builder(src)
576 +
    for (v, st) in b
577 +
    end
578 +
    new = finish(b)
579 +
    if src.ssavaluetypes isa Vector
580 +
        new.ssavaluetypes = length(src.ssavaluetypes)
581 +
    end
582 +
    new.inferred = false
583 +
    new.parent = nothing
584 +
    if !(new.slottypes === nothing)
585 +
        new.slottypes = [Any for _ in new.slottypes]
586 +
    end
587 +
    new.slotflags = [0x0 for _ in new.slotflags]
588 +
    new.rettype = Any
589 +
    new.linetable = [Core.LineInfoNode(@__MODULE__, :λ, 
590 +
                    Symbol("Why have you done this?"), 0, 0)]
591 +
    return new
592 +
end
593 +
573 594
function lambda(m::Module, src::Core.CodeInfo)
574 -
    ci = copy(src)
595 +
    ci = wipe(copy(src))
575 596
    verify(ci)
576 597
    inds = findall(==(0x00), src.slotflags)
577 598
    @assert(inds !== nothing)
@@ -582,7 +603,7 @@
Loading
582 603
end
583 604
584 605
function lambda(m::Module, src::Core.CodeInfo, nargs::Int)
585 -
    ci = copy(src)
606 +
    ci = wipe(copy(src))
586 607
    verify(ci)
587 608
    @debug "Warning: using explicit `nargs` to construct the generated function. If this number does not match the correct number of arguments in the :slotflags field of `src::Core.CodeInfo`, this can lead to segfaults and other bad behavior."
588 609
    args = src.slotnames[2 : 1 + nargs]

Learn more Showing 1 files with coverage changes found.

Changes in src/CodeInfoTools.jl
-10
+10
Loading file...
Files Coverage
src/CodeInfoTools.jl -3.87% 95.72%
Project Totals (1 files) 95.72%
Loading