Global Metrics

path: .metrics.cognitive.sum
old: 0.0
new: 5.0

path: .metrics.cognitive.average
old: null
new: 5.0

path: .metrics.mi.mi_visual_studio
old: 46.358215987059246
new: 38.53851695393994

path: .metrics.mi.mi_sei
old: 53.02686788155924
new: 47.90466490298349

path: .metrics.mi.mi_original
old: 79.27254933787131
new: 65.9008639912373

path: .metrics.nargs.sum
old: 0.0
new: 3.0

path: .metrics.nargs.average
old: null
new: 3.0

path: .metrics.loc.blank
old: 3.0
new: 4.0

path: .metrics.loc.ploc
old: 26.0
new: 35.0

path: .metrics.loc.lloc
old: 0.0
new: 50.0

path: .metrics.loc.cloc
old: 1.0
new: 6.0

path: .metrics.loc.sloc
old: 30.0
new: 45.0

path: .metrics.cyclomatic.average
old: 1.0
new: 8.5

path: .metrics.cyclomatic.sum
old: 4.0
new: 17.0

path: .metrics.nom.functions
old: 0.0
new: 1.0

path: .metrics.nom.total
old: 0.0
new: 1.0

path: .metrics.halstead.vocabulary
old: 32.0
new: 61.0

path: .metrics.halstead.bugs
old: 0.13847518607356746
new: 0.4669228816851548

path: .metrics.halstead.n2
old: 25.0
new: 39.0

path: .metrics.halstead.purity_ratio
old: 0.7070202562436007
new: 0.9027839232808552

path: .metrics.halstead.difficulty
old: 8.82
new: 26.23076923076923

path: .metrics.halstead.length
old: 192.0
new: 337.0

path: .metrics.halstead.time
old: 470.4
new: 2912.5749684645907

path: .metrics.halstead.volume
old: 960.0
new: 1998.6584827586928

path: .metrics.halstead.N2
old: 63.0
new: 93.0

path: .metrics.halstead.level
old: 0.11337868480725624
new: 0.03812316715542522

path: .metrics.halstead.N1
old: 129.0
new: 244.0

path: .metrics.halstead.estimated_program_length
old: 135.74788919877133
new: 304.23818214564824

path: .metrics.halstead.n1
old: 7.0
new: 22.0

path: .metrics.halstead.effort
old: 8467.2
new: 52426.34943236263

path: .metrics.nexits.average
old: null
new: 0.0

Spaces Data

Minimal test - lines (15, 45)

path: .spaces[0].metrics.cognitive.average
old: null
new: 5.0

path: .spaces[0].metrics.cognitive.sum
old: 0.0
new: 5.0

path: .spaces[0].metrics.halstead.N2
old: 3.0
new: 89.0

path: .spaces[0].metrics.halstead.bugs
old: 0.00170906242423416
new: 0.4762441978994581

path: .spaces[0].metrics.halstead.n2
old: 3.0
new: 35.0

path: .spaces[0].metrics.halstead.estimated_program_length
old: 6.754887502163468
new: 277.63240120309433

path: .spaces[0].metrics.halstead.volume
old: 11.60964047443681
new: 1930.686594688529

path: .spaces[0].metrics.halstead.time
old: 0.6449800263576005
new: 3000.225676508048

path: .spaces[0].metrics.halstead.difficulty
old: 1.0
new: 27.97142857142857

path: .spaces[0].metrics.halstead.vocabulary
old: 5.0
new: 57.0

path: .spaces[0].metrics.halstead.effort
old: 11.60964047443681
new: 54004.062177144864

path: .spaces[0].metrics.halstead.n1
old: 2.0
new: 22.0

path: .spaces[0].metrics.halstead.length
old: 5.0
new: 331.0

path: .spaces[0].metrics.halstead.purity_ratio
old: 1.3509775004326936
new: 0.8387685836951491

path: .spaces[0].metrics.halstead.level
old: 1.0
new: 0.03575076608784474

path: .spaces[0].metrics.halstead.N1
old: 2.0
new: 242.0

path: .spaces[0].metrics.cyclomatic.average
old: 1.0
new: 16.0

path: .spaces[0].metrics.cyclomatic.sum
old: 1.0
new: 16.0

path: .spaces[0].metrics.mi.mi_visual_studio
old: 92.40962204246613
new: 42.308845764918935

path: .spaces[0].metrics.mi.mi_sei
old: 152.37629276875444
new: 44.037897375677325

path: .spaces[0].metrics.mi.mi_original
old: 158.02045369261705
new: 72.34812625801138

path: .spaces[0].metrics.nexits.average
old: null
new: 0.0

path: .spaces[0].metrics.nom.total
old: 0.0
new: 1.0

path: .spaces[0].metrics.nom.functions
old: 0.0
new: 1.0

path: .spaces[0].metrics.loc.ploc
old: 1.0
new: 30.0

path: .spaces[0].metrics.loc.lloc
old: 0.0
new: 50.0

path: .spaces[0].metrics.loc.sloc
old: 1.0
new: 31.0

path: .spaces[0].metrics.loc.cloc
old: 0.0
new: 1.0

path: .spaces[0].metrics.nargs.sum
old: 0.0
new: 3.0

path: .spaces[0].metrics.nargs.average
old: null
new: 3.0

Code

invoke_copy_to_stack(uint32_t* d, uint32_t paramCount, nsXPTCVariant* s)
{
    for(; paramCount > 0; paramCount--, d++, s++)
    {
        if(s->IsIndirect())
        {
            *((void**)d) = &s->val;
            continue;
        }
        switch(s->type)
        {
        case nsXPTType::T_I8     : *((int8_t*)  d) = s->val.i8;          break;
        case nsXPTType::T_I16    : *((int16_t*) d) = s->val.i16;         break;
        case nsXPTType::T_I32    : *((int32_t*) d) = s->val.i32;         break;
        case nsXPTType::T_I64    : *((int64_t*) d) = s->val.i64; d++;    break;
        case nsXPTType::T_U8     : *((uint8_t*) d) = s->val.u8;          break;
        case nsXPTType::T_U16    : *((uint16_t*)d) = s->val.u16;         break;
        case nsXPTType::T_U32    : *((uint32_t*)d) = s->val.u32;         break;
        case nsXPTType::T_U64    : *((uint64_t*)d) = s->val.u64; d++;    break;
        case nsXPTType::T_FLOAT  : *((float*)   d) = s->val.f;           break;
        case nsXPTType::T_DOUBLE : *((double*)  d) = s->val.d;   d++;    break;
        case nsXPTType::T_BOOL   : *((bool*)  d) = s->val.b;           break;
        case nsXPTType::T_CHAR   : *((char*)    d) = s->val.c;           break;
        case nsXPTType::T_WCHAR  : *((wchar_t*) d) = s->val.wc;          break;
        default:
            // all the others are plain pointer types
            *((void**)d) = s->val.p;
            break;
        }
    }
}