MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / _Lcmp

Function _Lcmp

vm/ByteCodeTranslator/src/javascript/parparvm_runtime.js:3773–3781  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

3771 return _LL((c16 << 16) | c00, (c48 << 16) | c32);
3772}
3773function _Lcmp(a, b) {
3774 a = _Lc(a); b = _Lc(b);
3775 // Allocation-free: the high word is signed, so it orders the full value; on a
3776 // tie compare the low words as unsigned. Comparisons dominate loops/timing, so
3777 // avoiding the _Lsub object churn here is the main hi/lo perf win.
3778 if (a.h !== b.h) return a.h < b.h ? -1 : 1;
3779 const al = a.l >>> 0, bl = b.l >>> 0;
3780 return al === bl ? 0 : (al < bl ? -1 : 1);
3781}
3782function _Ldiv(a, b) {
3783 a = _Lc(a); b = _Lc(b);
3784 if (_LisZero(b)) { throw new Error("/ by zero"); }

Callers 2

_LdivFunction · 0.85

Calls 1

_LcFunction · 0.85

Tested by

no test coverage detected