… | |
… | |
5562 | |
5562 | |
5563 | for (;;) |
5563 | for (;;) |
5564 | { |
5564 | { |
5565 | op_code_info *pcd = dispatch_table + SCHEME_V->op; |
5565 | op_code_info *pcd = dispatch_table + SCHEME_V->op; |
5566 | |
5566 | |
|
|
5567 | #if USE_ERROR_CHECKING |
5567 | if (pcd->name) /* if built-in function, check arguments */ |
5568 | if (pcd->name) /* if built-in function, check arguments */ |
5568 | { |
5569 | { |
5569 | #if USE_ERROR_CHECKING |
5570 | int ok = 1; |
5570 | char msg[STRBUFFSIZE]; |
5571 | char msg[STRBUFFSIZE]; |
5571 | int ok = 1; |
|
|
5572 | int n = list_length (SCHEME_A_ SCHEME_V->args); |
5572 | int n = list_length (SCHEME_A_ SCHEME_V->args); |
5573 | |
5573 | |
5574 | /* Check number of arguments */ |
5574 | /* Check number of arguments */ |
5575 | if (n < pcd->min_arity) |
5575 | if (n < pcd->min_arity) |
5576 | { |
5576 | { |
… | |
… | |
5583 | { |
5583 | { |
5584 | ok = 0; |
5584 | ok = 0; |
5585 | snprintf (msg, STRBUFFSIZE, "%s: needs%s %d argument(s)", |
5585 | snprintf (msg, STRBUFFSIZE, "%s: needs%s %d argument(s)", |
5586 | pcd->name, pcd->min_arity == pcd->max_arity ? "" : " at most", pcd->max_arity); |
5586 | pcd->name, pcd->min_arity == pcd->max_arity ? "" : " at most", pcd->max_arity); |
5587 | } |
5587 | } |
5588 | #endif |
|
|
5589 | |
5588 | |
5590 | if (ok) |
5589 | if (ok) |
5591 | { |
5590 | { |
5592 | if (pcd->arg_tests_encoding && USE_ERROR_CHECKING) |
5591 | if (pcd->arg_tests_encoding) |
5593 | { |
5592 | { |
5594 | int i = 0; |
5593 | int i = 0; |
5595 | int j; |
5594 | int j; |
5596 | const char *t = pcd->arg_tests_encoding; |
5595 | const char *t = pcd->arg_tests_encoding; |
5597 | pointer arglist = SCHEME_V->args; |
5596 | pointer arglist = SCHEME_V->args; |
… | |
… | |
5635 | return; |
5634 | return; |
5636 | |
5635 | |
5637 | pcd = dispatch_table + SCHEME_V->op; |
5636 | pcd = dispatch_table + SCHEME_V->op; |
5638 | } |
5637 | } |
5639 | } |
5638 | } |
|
|
5639 | #endif |
5640 | |
5640 | |
5641 | ok_to_freely_gc (SCHEME_A); |
5641 | ok_to_freely_gc (SCHEME_A); |
5642 | |
5642 | |
5643 | if (pcd->func (SCHEME_A_ SCHEME_V->op) == NIL) |
5643 | if (pcd->func (SCHEME_A_ SCHEME_V->op) == NIL) |
5644 | return; |
5644 | return; |