1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-02-16 12:43:12 +00:00

some cleanups in the arithmetic operations code (#427)

* arithmetic opcode implementations should return LispPTR rather than int

* all callers of ERROR_EXIT() have return type LispPTR, therefore ERROR_EXIT should too

* N_[I]GETNUMBER, [N_]ARITH_SWITCH need (int) casts for some large constants that would otherwise be unsigned

* Expand use of macro N_ARITH_BODY_1_UNSIGNED and correct types

* Remove unused macros N_ARITH_BODY_1 and N_ARITH_BODY_1_UNSIGNED

* Cast to correct type for storing to TopOfStack, and return type of TIMER_EXIT()
This commit is contained in:
Nick Briggs
2022-07-20 10:28:21 -07:00
committed by GitHub
parent 77957d421a
commit 9a10f63fe6
5 changed files with 65 additions and 55 deletions

View File

@@ -43,7 +43,7 @@
*/
/**********************************************************************/
int N_OP_times2(int tosm1, int tos) {
LispPTR N_OP_times2(int tosm1, int tos) {
int arg1, arg2;
int result;
@@ -72,7 +72,7 @@ doufn:
} /* end N_OP_times2 */
int N_OP_itimes2(int tosm1, int tos) {
LispPTR N_OP_itimes2(int tosm1, int tos) {
int arg1, arg2;
int result;
@@ -107,7 +107,7 @@ doufn:
*/
/**********************************************************************/
int N_OP_quot(int tosm1, int tos) {
LispPTR N_OP_quot(int tosm1, int tos) {
int arg1, arg2;
int result;
@@ -125,7 +125,7 @@ doufn:
} /* end N_OP_quot */
int N_OP_iquot(int tosm1, int tos) {
LispPTR N_OP_iquot(int tosm1, int tos) {
register int arg1, arg2;
register int result;
@@ -149,7 +149,7 @@ doufn:
*/
/**********************************************************************/
int N_OP_iremainder(int tosm1, int tos) {
LispPTR N_OP_iremainder(int tosm1, int tos) {
register int arg1, arg2;
register int result;