Skip to content

Commit 302cc17

Browse files
committed
Merge branch 'bigint' of github.com:/perl6/nqp into bigint
2 parents 71c9c2b + 1db0ea8 commit 302cc17

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/PAST/NQP.pir

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,8 @@ entry to produce the node to be returned.
464464

465465
maphash['gcd_i'] = 'gcd__Ii'
466466
maphash['gcd_I'] = 'nqp_bigint_gcd__PP'
467-
maphash['lcm_i'] = 'lcmd__Ii'
468-
maphash['lcm_I'] = 'nqp_bigint_lcmd__PP'
467+
maphash['lcm_i'] = 'lcm__Ii'
468+
maphash['lcm_I'] = 'nqp_bigint_lcm__PP'
469469

470470
maphash['ceil_n'] = 'ceil__Nn'
471471
maphash['floor_n'] = 'floor__NN'
@@ -534,6 +534,7 @@ entry to produce the node to be returned.
534534
maphash['isgt_i'] = 'isgt__Iii'
535535
maphash['isge_i'] = 'isge__Iii'
536536

537+
maphash['bool_I'] = 'nqp_bigint_bool__iP'
537538
maphash['cmp_I'] = 'nqp_bigint_cmp__IPP'
538539
maphash['iseq_I'] = 'nqp_bigint_eq__IPP'
539540
maphash['isne_I'] = 'nqp_bigint_ne__IPP'

src/ops/nqp_bigint.ops

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,10 @@ inline op nqp_bigint_cmp(out INT, in PMC, in PMC) :base_cor {
9696
$1 = mp_cmp(a, b);
9797
}
9898

99+
inline op nqp_bigint_bool(out INT, in PMC) :base_core {
100+
$1 = !mp_iszero(get_bigint(interp, $2));
101+
}
102+
99103
inline op nqp_bigint_eq(out INT, in PMC, in PMC) :base_cor {
100104
mp_int *a = get_bigint(interp, $2);
101105
mp_int *b = get_bigint(interp, $3);

0 commit comments

Comments
 (0)