Commit 3ec1ed2c authored by Marius Gerbershagen's avatar Marius Gerbershagen
Browse files

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).
parent 69e9e1d4
...@@ -656,20 +656,23 @@ ecl_interpret(cl_object frame, cl_object env, cl_object bytecodes) ...@@ -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); if (flag != ECL_NIL) ECL_STACK_PUSH(the_env, value);
ECL_STACK_PUSH(the_env, flag); ECL_STACK_PUSH(the_env, flag);
} }
if (count) { if (count && Null(aok)) {
if (Null(aok)) { cl_object *p = first;
int aok = 0, mask = 1; for (; p != last; ++p) {
cl_object *p = first; if (*(p++) == @':allow-other-keys') {
for (; p != last; ++p) { aok = *p;
if (*(p++) == @':allow-other-keys') { count -= 2;
if (!Null(*p)) aok |= mask; /* only the first :allow-other-keys argument is considered */
mask <<= 1; for (++p; p != last; ++p) {
if (*(p++) != @':allow-other-keys')
break;
count -= 2; 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; THREAD_NEXT;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment