mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-26 06:22:33 -08:00
interpreter: simplify handling of :allow-other-keys parsing a bit
Get rid of the unnecessary mask (which wouldn't have worked correctly anyway if somebody passed more than 32 :allow-other-keys arguments).
This commit is contained in:
parent
69e9e1d46c
commit
3ec1ed2ce0
1 changed files with 14 additions and 11 deletions
|
|
@ -656,20 +656,23 @@ ecl_interpret(cl_object frame, cl_object env, cl_object bytecodes)
|
|||
if (flag != ECL_NIL) ECL_STACK_PUSH(the_env, value);
|
||||
ECL_STACK_PUSH(the_env, flag);
|
||||
}
|
||||
if (count) {
|
||||
if (Null(aok)) {
|
||||
int aok = 0, mask = 1;
|
||||
cl_object *p = first;
|
||||
for (; p != last; ++p) {
|
||||
if (*(p++) == @':allow-other-keys') {
|
||||
if (!Null(*p)) aok |= mask;
|
||||
mask <<= 1;
|
||||
if (count && Null(aok)) {
|
||||
cl_object *p = first;
|
||||
for (; p != last; ++p) {
|
||||
if (*(p++) == @':allow-other-keys') {
|
||||
aok = *p;
|
||||
count -= 2;
|
||||
/* only the first :allow-other-keys argument is considered */
|
||||
for (++p; p != last; ++p) {
|
||||
if (*(p++) != @':allow-other-keys')
|
||||
break;
|
||||
count -= 2;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (ecl_unlikely(count && (aok & 1) == 0)) {
|
||||
unknown_keyword(bytecodes, frame);
|
||||
}
|
||||
}
|
||||
if (ecl_likely(count && Null(aok))) {
|
||||
unknown_keyword(bytecodes, frame);
|
||||
}
|
||||
}
|
||||
THREAD_NEXT;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue