mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-10 11:12:58 -08:00
MULTIPLE-VALUE-SETQ must output _only_ the primary value.
This commit is contained in:
parent
5643e40059
commit
bfceb89a55
3 changed files with 12 additions and 5 deletions
|
|
@ -7,6 +7,8 @@ ECL 0.9h
|
|||
high level routines (VECTOR-PUSH-EXTEND) to handle the vector of weak
|
||||
pointers to the files.
|
||||
|
||||
- MULTIPLE-VALUE-SETQ must output only the primary value.
|
||||
|
||||
* Design:
|
||||
|
||||
- Simplified the structure of the frame stack, removing redundant fields.
|
||||
|
|
|
|||
|
|
@ -1368,7 +1368,7 @@ static int
|
|||
c_multiple_value_setq(cl_object orig_args, int flags) {
|
||||
cl_object args = orig_args;
|
||||
cl_object orig_vars;
|
||||
cl_object vars = Cnil;
|
||||
cl_object vars = Cnil, values;
|
||||
cl_object old_variables = ENV->variables;
|
||||
cl_index nvars = 0;
|
||||
|
||||
|
|
@ -1394,12 +1394,14 @@ c_multiple_value_setq(cl_object orig_args, int flags) {
|
|||
}
|
||||
|
||||
/* Compile values */
|
||||
compile_form(pop(&args), FLAG_VALUES);
|
||||
values = pop(&args);
|
||||
if (args != Cnil)
|
||||
FEprogram_error("MULTIPLE-VALUE-SETQ: Too many arguments.", 0);
|
||||
if (nvars == 0)
|
||||
if (nvars == 0) {
|
||||
/* No variables */
|
||||
return flags;
|
||||
return compile_form(cl_list(2, @'values', values), flags);
|
||||
}
|
||||
compile_form(values, FLAG_VALUES);
|
||||
|
||||
/* Compile variables */
|
||||
asm_op2(OP_MSETQ, nvars);
|
||||
|
|
|
|||
|
|
@ -540,7 +540,10 @@ interpret_msetq(cl_object bytecodes, cl_opcode *vector)
|
|||
ECL_SETQ(name, value);
|
||||
}
|
||||
}
|
||||
if (NVALUES > 1) NVALUES = 1;
|
||||
if (NVALUES == 0) {
|
||||
VALUES(0) = Cnil;
|
||||
}
|
||||
NVALUES = 1;
|
||||
return vector;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue