diff options
author | apnadkarni <apnmbx-wits@yahoo.com> | 2022-11-03 17:04:07 (GMT) |
---|---|---|
committer | apnadkarni <apnmbx-wits@yahoo.com> | 2022-11-03 17:04:07 (GMT) |
commit | f768eb3bf2d09ebf310ed07f664dc114e1c1412d (patch) | |
tree | 0654108b366eb7baaf8c4e36a83ae1de9327f2bd /generic/tclCompile.c | |
parent | d9a19f95121e4fd846211083cc7c3b0d22c7a564 (diff) | |
download | tcl-f768eb3bf2d09ebf310ed07f664dc114e1c1412d.zip tcl-f768eb3bf2d09ebf310ed07f664dc114e1c1412d.tar.gz tcl-f768eb3bf2d09ebf310ed07f664dc114e1c1412d.tar.bz2 |
Rewrite lreplace4 implementation not to need extra immediate operands.
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r-- | generic/tclCompile.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c index 57e2d71..2dd0718 100644 --- a/generic/tclCompile.c +++ b/generic/tclCompile.c @@ -675,12 +675,13 @@ InstructionDesc const tclInstructionTable[] = { /* String Less or equal: push (stknext <= stktop) */ {"strge", 1, -1, 0, {OPERAND_NONE}}, /* String Greater or equal: push (stknext >= stktop) */ - {"lreplace4", 17, INT_MIN, 4, {OPERAND_UINT4, OPERAND_UINT4, OPERAND_INT4, OPERAND_INT4}}, - /* Operands: number of arguments, end_indicator, firstIdx, lastIdx - * end_indicator: 1 if "end" is treated as index of last element, - * 0 if "end" is position after last element - * firstIdx,lastIdx: range of elements to delete - * Stack: ... listobj new1 ... newN => ... newlistobj */ + {"lreplace4", 6, INT_MIN, 2, {OPERAND_UINT4, OPERAND_UINT1}}, + /* Operands: number of arguments, flags + * flags: Combination of TCL_LREPLACE4_* flags + * Stack: ... listobj index1 ?index2? new1 ... newN => ... newlistobj + * where index2 is present only if TCL_LREPLACE_SINGLE_INDEX is not + * set in flags. + */ {NULL, 0, 0, 0, {OPERAND_NONE}} }; |