< Summary - FSharp.Interop.Dlr

Information
Class: FSharp.Interop.Dlr.Dlr
Assembly: FSharp.Interop.Dlr
File(s): /home/runner/work/FSharp.Interop.Dlr/FSharp.Interop.Dlr/FSharp.Interop.Dlr/Operators.fs
Line coverage
100%
Covered lines: 34
Uncovered lines: 0
Coverable lines: 34
Total lines: 149
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
named(...)100%11100%
namedOf(...)100%11100%
argsOf(...)100%11100%
get_out()100%11100%
outAs()100%11100%
ref(...)100%11100%
item(...)100%11100%
setItem(...)100%11100%
typeArgs()100%11100%
typeArgsOf(...)100%11100%
new'()100%11100%
new'(...)100%11100%
new'(...)100%11100%
new'(...)100%11100%
new'(...)100%11100%
new'(...)100%11100%
new'(...)100%11100%
new'(...)100%11100%
new'(...)100%11100%
cast(...)100%11100%
get(...)100%11100%
call(...)100%11100%
apply(...)100%11100%
addAssign(...)100%11100%
subtractAssign(...)100%11100%
set(...)100%11100%
invoke(...)100%11100%
implicit(...)100%11100%
neg(...)100%11100%
not(...)100%11100%
complement(...)100%11100%

File(s)

/home/runner/work/FSharp.Interop.Dlr/FSharp.Interop.Dlr/FSharp.Interop.Dlr/Operators.fs

#LineLine coverage
 1namespace FSharp.Interop.Dlr
 2
 3open System
 4open System.Diagnostics.CodeAnalysis
 5open System.Runtime.CompilerServices
 6
 7// Every marker below is [<MethodImpl(MethodImplOptions.NoInlining)>]: the F# optimizer inlines
 8// small functions across assemblies, and after inlining `ignore (target, name, value); outside …`
 9// the arguments are dead, so a Release build stops capturing them in the block's closure - and
 10// the translator then has nothing to read. The attribute keeps the call, and its arguments, intact.
 11module internal Outside =
 12    let outside (name: string) : 'T =
 13        raise (InvalidOperationException(sprintf "'%s' is only meaningful inside dlr { }; it is inspected as a quotation
 14
 15open Outside
 16
 17[<Sealed; ExcludeFromCodeCoverage>]
 18type Named<'T> private () =
 19    class end
 20
 21[<Sealed; ExcludeFromCodeCoverage>]
 22type TypeArgs private () =
 23    class end
 24
 25[<Sealed; ExcludeFromCodeCoverage>]
 26type OutArg private () =
 27    class end
 28
 29[<Sealed; ExcludeFromCodeCoverage>]
 30type RefArg<'T> private () =
 31    class end
 32
 33[<AutoOpen>]
 34module Operators =
 35
 36    [<MethodImpl(MethodImplOptions.NoInlining)>]
 37    let ( ? ) (target: obj) (name: string) : 'TResult = ignore (target, name); outside "?"
 38    [<MethodImpl(MethodImplOptions.NoInlining)>]
 39    let ( ?<- ) (target: obj) (name: string) (value: 'TValue) : unit = ignore (target, name, value); outside "?<-"
 40
 41    [<MethodImpl(MethodImplOptions.NoInlining)>]
 42    let ( ?%? ) (left: obj) (right: obj) : 'TResult = ignore (left, right); outside "?%?"
 43    [<MethodImpl(MethodImplOptions.NoInlining)>]
 44    let ( ?*? ) (left: obj) (right: obj) : 'TResult = ignore (left, right); outside "?*?"
 45    [<MethodImpl(MethodImplOptions.NoInlining)>]
 46    let ( ?+? ) (left: obj) (right: obj) : 'TResult = ignore (left, right); outside "?+?"
 47    [<MethodImpl(MethodImplOptions.NoInlining)>]
 48    let ( ?-? ) (left: obj) (right: obj) : 'TResult = ignore (left, right); outside "?-?"
 49    [<MethodImpl(MethodImplOptions.NoInlining)>]
 50    let ( ?/? ) (left: obj) (right: obj) : 'TResult = ignore (left, right); outside "?/?"
 51    [<MethodImpl(MethodImplOptions.NoInlining)>]
 52    let ( ?&&&? ) (left: obj) (right: obj) : 'TResult = ignore (left, right); outside "?&&&?"
 53    [<MethodImpl(MethodImplOptions.NoInlining)>]
 54    let ( ?|||? ) (left: obj) (right: obj) : 'TResult = ignore (left, right); outside "?|||?"
 55    [<MethodImpl(MethodImplOptions.NoInlining)>]
 56    let ( ?^^^? ) (left: obj) (right: obj) : 'TResult = ignore (left, right); outside "?^^^?"
 57    [<MethodImpl(MethodImplOptions.NoInlining)>]
 58    let ( ?<<<? ) (left: obj) (right: obj) : 'TResult = ignore (left, right); outside "?<<<?"
 59    [<MethodImpl(MethodImplOptions.NoInlining)>]
 60    let ( ?>>>? ) (left: obj) (right: obj) : 'TResult = ignore (left, right); outside "?>>>?"
 61    [<MethodImpl(MethodImplOptions.NoInlining)>]
 62    let ( ?<=? ) (left: obj) (right: obj) : bool = ignore (left, right); outside "?<=?"
 63    [<MethodImpl(MethodImplOptions.NoInlining)>]
 64    let ( ?<>? ) (left: obj) (right: obj) : bool = ignore (left, right); outside "?<>?"
 65    [<MethodImpl(MethodImplOptions.NoInlining)>]
 66    let ( ?<? ) (left: obj) (right: obj) : bool = ignore (left, right); outside "?<?"
 67    [<MethodImpl(MethodImplOptions.NoInlining)>]
 68    let ( ?=? ) (left: obj) (right: obj) : bool = ignore (left, right); outside "?=?"
 69    [<MethodImpl(MethodImplOptions.NoInlining)>]
 70    let ( ?>? ) (left: obj) (right: obj) : bool = ignore (left, right); outside "?>?"
 71    [<MethodImpl(MethodImplOptions.NoInlining)>]
 72    let ( ?>=? ) (left: obj) (right: obj) : bool = ignore (left, right); outside "?>=?"
 73
 74[<Sealed; AbstractClass>]
 75type Dlr =
 76    [<MethodImpl(MethodImplOptions.NoInlining)>]
 677    static member named (record: 'T) : Named<'T> = ignore record; outside "Dlr.named"
 78    [<MethodImpl(MethodImplOptions.NoInlining)>]
 679    static member namedOf (args: (string * obj) list) : Named<(string * obj) list> = ignore args; outside "Dlr.namedOf"
 80    [<MethodImpl(MethodImplOptions.NoInlining)>]
 681    static member argsOf (args: obj list) : Named<obj list> = ignore args; outside "Dlr.argsOf"
 482    static member out with [<MethodImpl(MethodImplOptions.NoInlining)>] get () : OutArg = outside "Dlr.out"
 83    [<MethodImpl(MethodImplOptions.NoInlining)>]
 484    static member outAs<'T> () : OutArg = outside "Dlr.outAs"
 85    [<MethodImpl(MethodImplOptions.NoInlining)>]
 686    static member ref (variable: 'T) : RefArg<'T> = ignore variable; outside "Dlr.ref"
 87    [<MethodImpl(MethodImplOptions.NoInlining)>]
 688    static member item (indexes: 'TIndexes) (target: obj) : 'T = ignore (indexes, target); outside "Dlr.item"
 89    [<MethodImpl(MethodImplOptions.NoInlining)>]
 690    static member setItem (indexes: 'TIndexes) (value: 'TValue) (target: obj) : unit = ignore (indexes, value, target); 
 91    [<MethodImpl(MethodImplOptions.NoInlining)>]
 492    static member typeArgs<'A> () : TypeArgs = outside "Dlr.typeArgs"
 93    [<MethodImpl(MethodImplOptions.NoInlining)>]
 494    static member typeArgs<'A, 'B> () : TypeArgs = outside "Dlr.typeArgs"
 95    [<MethodImpl(MethodImplOptions.NoInlining)>]
 496    static member typeArgs<'A, 'B, 'C> () : TypeArgs = outside "Dlr.typeArgs"
 97    [<MethodImpl(MethodImplOptions.NoInlining)>]
 498    static member typeArgs<'A, 'B, 'C, 'D> () : TypeArgs = outside "Dlr.typeArgs"
 99    [<MethodImpl(MethodImplOptions.NoInlining)>]
 6100    static member typeArgsOf (types: System.Type list) : TypeArgs = ignore types; outside "Dlr.typeArgsOf"
 101    [<MethodImpl(MethodImplOptions.NoInlining)>]
 4102    static member new'<'T> () : 'T = outside "Dlr.new'"
 103    [<MethodImpl(MethodImplOptions.NoInlining)>]
 6104    static member new'<'T> (a: obj) : 'T = ignore (a); outside "Dlr.new'"
 105    [<MethodImpl(MethodImplOptions.NoInlining)>]
 6106    static member new'<'T> (a: obj, b: obj) : 'T = ignore (a, b); outside "Dlr.new'"
 107    [<MethodImpl(MethodImplOptions.NoInlining)>]
 6108    static member new'<'T> (a: obj, b: obj, c: obj) : 'T = ignore (a, b, c); outside "Dlr.new'"
 109    [<MethodImpl(MethodImplOptions.NoInlining)>]
 6110    static member new'<'T> (a: obj, b: obj, c: obj, d: obj) : 'T = ignore (a, b, c, d); outside "Dlr.new'"
 111    [<MethodImpl(MethodImplOptions.NoInlining)>]
 6112    static member new'<'T> (a: obj, b: obj, c: obj, d: obj, e: obj) : 'T = ignore (a, b, c, d, e); outside "Dlr.new'"
 113    [<MethodImpl(MethodImplOptions.NoInlining)>]
 6114    static member new'<'T> (a: obj, b: obj, c: obj, d: obj, e: obj, f: obj) : 'T = ignore (a, b, c, d, e, f); outside "D
 115    [<MethodImpl(MethodImplOptions.NoInlining)>]
 6116    static member new'<'T> (a: obj, b: obj, c: obj, d: obj, e: obj, f: obj, g: obj) : 'T = ignore (a, b, c, d, e, f, g);
 117    [<MethodImpl(MethodImplOptions.NoInlining)>]
 6118    static member new'<'T> (a: obj, b: obj, c: obj, d: obj, e: obj, f: obj, g: obj, h: obj) : 'T = ignore (a, b, c, d, e
 119    [<MethodImpl(MethodImplOptions.NoInlining)>]
 6120    static member cast<'T> (value: obj) : 'T = ignore value; outside "Dlr.cast"
 121    [<MethodImpl(MethodImplOptions.NoInlining)>]
 6122    static member get (name: string) (target: obj) : 'T = ignore (name, target); outside "Dlr.get"
 123    [<MethodImpl(MethodImplOptions.NoInlining)>]
 6124    static member call (target: obj) : 'T = ignore target; outside "Dlr.call"
 125    [<MethodImpl(MethodImplOptions.NoInlining)>]
 6126    static member apply (args: 'TArgs) (target: obj) : 'T = ignore (args, target); outside "Dlr.apply"
 127    [<MethodImpl(MethodImplOptions.NoInlining)>]
 6128    static member addAssign (name: string) (value: 'TValue) (target: obj) : unit = ignore (name, value, target); outside
 129    [<MethodImpl(MethodImplOptions.NoInlining)>]
 6130    static member subtractAssign (name: string) (value: 'TValue) (target: obj) : unit = ignore (name, value, target); ou
 131    [<MethodImpl(MethodImplOptions.NoInlining)>]
 6132    static member set (name: string) (value: 'TValue) (target: obj) : unit = ignore (name, value, target); outside "Dlr.
 133    [<MethodImpl(MethodImplOptions.NoInlining)>]
 6134    static member invoke (name: string) (args: 'TArgs) (target: obj) : 'T = ignore (name, args, target); outside "Dlr.in
 135    [<MethodImpl(MethodImplOptions.NoInlining)>]
 6136    static member implicit (value: obj) : 'T = ignore value; outside "Dlr.implicit"
 137    [<MethodImpl(MethodImplOptions.NoInlining)>]
 6138    static member neg (value: obj) : 'TResult = ignore value; outside "Dlr.neg"
 139    [<MethodImpl(MethodImplOptions.NoInlining)>]
 6140    static member not (value: obj) : 'TResult = ignore value; outside "Dlr.not"
 141    [<MethodImpl(MethodImplOptions.NoInlining)>]
 6142    static member complement (value: obj) : 'TResult = ignore value; outside "Dlr.complement"
 143
 144[<CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
 145module Dlr =
 146    [<Sealed; AbstractClass>]
 147    type Static<'T> =
 148        static member Overloads
 149            with [<MethodImpl(MethodImplOptions.NoInlining)>] get () : obj = outside "Dlr.Static<T>.Overloads"