Global Metrics
path: .metrics.nexits.sum
old: 0.0
new: 1.0
path: .metrics.nexits.average
old: 0.0
new: 1.0
path: .metrics.cyclomatic.average
old: 1.0
new: 9.5
path: .metrics.cyclomatic.sum
old: 3.0
new: 19.0
path: .metrics.mi.mi_original
old: 76.71101516172014
new: 57.85599507310849
path: .metrics.mi.mi_visual_studio
old: 44.860242784631666
new: 33.83391524743186
path: .metrics.mi.mi_sei
old: 65.45781286689768
new: 45.26413956071192
path: .metrics.loc.cloc
old: 7.0
new: 18.0
path: .metrics.loc.lloc
old: 0.0
new: 50.0
path: .metrics.loc.ploc
old: 27.0
new: 41.0
path: .metrics.loc.blank
old: 6.0
new: 10.0
path: .metrics.loc.sloc
old: 40.0
new: 69.0
path: .metrics.cognitive.average
old: 0.0
new: 8.0
path: .metrics.cognitive.sum
old: 0.0
new: 8.0
path: .metrics.halstead.effort
old: 3906.767200037929
new: 65364.45892182232
path: .metrics.halstead.estimated_program_length
old: 268.7443162330219
new: 370.1802547229907
path: .metrics.halstead.n1
old: 9.0
new: 25.0
path: .metrics.halstead.N2
old: 57.0
new: 106.0
path: .metrics.halstead.level
old: 0.17153996101364524
new: 0.03471698113207547
path: .metrics.halstead.volume
old: 670.1666931838943
new: 2269.256687097228
path: .metrics.halstead.bugs
old: 0.08268443577461564
new: 0.5408869777537211
path: .metrics.halstead.difficulty
old: 5.829545454545454
new: 28.804347826086957
path: .metrics.halstead.time
old: 217.0426222243294
new: 3631.358828990129
path: .metrics.halstead.vocabulary
old: 53.0
new: 71.0
path: .metrics.halstead.length
old: 117.0
new: 369.0
path: .metrics.halstead.N1
old: 60.0
new: 263.0
path: .metrics.halstead.purity_ratio
old: 2.296959967803606
new: 1.0031985222845277
path: .metrics.halstead.n2
old: 44.0
new: 46.0
path: .metrics.nargs.average
old: 2.0
new: 3.0
path: .metrics.nargs.sum
old: 2.0
new: 3.0
Spaces Data
Minimal test - lines (16, 69)
path: .spaces[0].metrics.nargs.sum
old: 2.0
new: 3.0
path: .spaces[0].metrics.nargs.average
old: 2.0
new: 3.0
path: .spaces[0].metrics.cyclomatic.average
old: 1.0
new: 17.0
path: .spaces[0].metrics.cyclomatic.sum
old: 2.0
new: 17.0
path: .spaces[0].metrics.cognitive.average
old: 0.0
new: 7.0
path: .spaces[0].metrics.cognitive.sum
old: 0.0
new: 7.0
path: .spaces[0].metrics.nexits.average
old: 0.0
new: 1.0
path: .spaces[0].metrics.nexits.sum
old: 0.0
new: 1.0
path: .spaces[0].metrics.loc.cloc
old: 0.0
new: 12.0
path: .spaces[0].metrics.loc.sloc
old: 25.0
new: 54.0
path: .spaces[0].metrics.loc.blank
old: 2.0
new: 5.0
path: .spaces[0].metrics.loc.ploc
old: 23.0
new: 37.0
path: .spaces[0].metrics.loc.lloc
old: 0.0
new: 50.0
path: .spaces[0].metrics.mi.mi_sei
old: 46.82397739846533
new: 49.588002645471306
path: .spaces[0].metrics.mi.mi_visual_studio
old: 49.58279985009109
new: 36.563870671797694
path: .spaces[0].metrics.mi.mi_original
old: 84.78658774365577
new: 62.524218848774055
path: .spaces[0].metrics.halstead.difficulty
old: 5.785714285714286
new: 27.928571428571427
path: .spaces[0].metrics.halstead.length
old: 113.0
new: 360.0
path: .spaces[0].metrics.halstead.bugs
old: 0.07986347848465594
new: 0.5139936391343491
path: .spaces[0].metrics.halstead.estimated_program_length
old: 255.00665676968876
new: 330.5192567460192
path: .spaces[0].metrics.halstead.n1
old: 9.0
new: 23.0
path: .spaces[0].metrics.halstead.time
old: 206.03059188517895
new: 3363.9225927058937
path: .spaces[0].metrics.halstead.N1
old: 59.0
new: 258.0
path: .spaces[0].metrics.halstead.N2
old: 54.0
new: 102.0
path: .spaces[0].metrics.halstead.vocabulary
old: 51.0
new: 65.0
path: .spaces[0].metrics.halstead.effort
old: 3708.5506539332214
new: 60550.60666870609
path: .spaces[0].metrics.halstead.level
old: 0.1728395061728395
new: 0.03580562659846547
path: .spaces[0].metrics.halstead.purity_ratio
old: 2.2566960776078653
new: 0.91810904651672
path: .spaces[0].metrics.halstead.volume
old: 640.984063642779
new: 2168.0524126902437
Code
extern "C" uint64_t
invoke_copy_to_stack(uint64_t* d, uint32_t paramCount, nsXPTCVariant* s)
{
/*
We need to copy the parameters for this function to locals and use them
from there since the parameters occupy the same stack space as the stack
we're trying to populate.
*/
uint64_t *l_d = d;
nsXPTCVariant *l_s = s;
uint64_t l_paramCount = paramCount;
uint64_t regCount = 0; // return the number of registers to load from the stack
for(uint64_t i = 0; i < l_paramCount; i++, l_d++, l_s++)
{
if (regCount < 5) regCount++;
if (l_s->IsIndirect())
{
*l_d = (uint64_t) &l_s->val;
continue;
}
switch (l_s->type)
{
case nsXPTType::T_I8 : *((int64_t*)l_d) = l_s->val.i8; break;
case nsXPTType::T_I16 : *((int64_t*)l_d) = l_s->val.i16; break;
case nsXPTType::T_I32 : *((int64_t*)l_d) = l_s->val.i32; break;
case nsXPTType::T_I64 : *((int64_t*)l_d) = l_s->val.i64; break;
case nsXPTType::T_U8 : *((uint64_t*)l_d) = l_s->val.u8; break;
case nsXPTType::T_U16 : *((uint64_t*)l_d) = l_s->val.u16; break;
case nsXPTType::T_U32 : *((uint64_t*)l_d) = l_s->val.u32; break;
case nsXPTType::T_U64 : *((uint64_t*)l_d) = l_s->val.u64; break;
/* in the case of floats, we want to put the bits in to the
64bit space right justified... floats in the parameter array on
sparcv9 use odd numbered registers.. %f1, %f3, so we have to skip
the space that would be occupied by %f0, %f2, etc.
*/
case nsXPTType::T_FLOAT : *(((float*)l_d) + 1) = l_s->val.f; break;
case nsXPTType::T_DOUBLE: *((double*)l_d) = l_s->val.d; break;
case nsXPTType::T_BOOL : *((int64_t*)l_d) = l_s->val.b; break;
case nsXPTType::T_CHAR : *((uint64_t*)l_d) = l_s->val.c; break;
case nsXPTType::T_WCHAR : *((int64_t*)l_d) = l_s->val.wc; break;
default:
// all the others are plain pointer types
*((void**)l_d) = l_s->val.p;
break;
}
}
return regCount;
}