diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2013-12-12 08:09:45 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2013-12-12 08:09:45 (GMT) |
commit | 66b561ac5eb7ff1750f8003c6a14a2c7ae52963b (patch) | |
tree | 5499b48e0f58deeac6df79c28987dd56b8ba6b42 /generic/tclExecute.c | |
parent | 54680ce5e2b52b6cb0a10e77a6627ea92369bcd1 (diff) | |
parent | 05c6524f4576db17abf945a46f2a34d85d34a683 (diff) | |
download | tcl-66b561ac5eb7ff1750f8003c6a14a2c7ae52963b.zip tcl-66b561ac5eb7ff1750f8003c6a14a2c7ae52963b.tar.gz tcl-66b561ac5eb7ff1750f8003c6a14a2c7ae52963b.tar.bz2 |
merge trunk
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r-- | generic/tclExecute.c | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 0a31b38..73f388b 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -6356,8 +6356,8 @@ TEBCresume( */ TclNewObj(tmpPtr); - tmpPtr->internalRep.twoIntValue.int1 = 0; - tmpPtr->internalRep.twoIntValue.int2 = iterMax; + tmpPtr->internalRep.twoPtrValue.ptr1 = INT2PTR(0); + tmpPtr->internalRep.twoPtrValue.ptr2 = INT2PTR(iterMax); PUSH_OBJECT(tmpPtr); /* iterCounts object */ /* @@ -6387,8 +6387,8 @@ TEBCresume( numLists = infoPtr->numLists; tmpPtr = OBJ_AT_DEPTH(1); - iterNum = tmpPtr->internalRep.twoIntValue.int1; - iterMax = tmpPtr->internalRep.twoIntValue.int2; + iterNum = PTR2INT(tmpPtr->internalRep.twoPtrValue.ptr1); + iterMax = PTR2INT(tmpPtr->internalRep.twoPtrValue.ptr2); /* * If some list still has a remaining list element iterate one more @@ -6400,7 +6400,7 @@ TEBCresume( * Set the variables and jump back to run the body */ - tmpPtr->internalRep.twoIntValue.int1 = iterNum + 1; + tmpPtr->internalRep.twoPtrValue.ptr1 = INT2PTR(iterNum + 1); listTmpDepth = numLists + 1; @@ -6464,6 +6464,25 @@ TEBCresume( infoPtr = tmpPtr->internalRep.otherValuePtr; numLists = infoPtr->numLists; NEXT_INST_V(1, numLists+2, 0); + + case INST_LMAP_COLLECT: + /* + * This instruction is only issued by lmap. The stack is: + * - result + * - infoPtr + * - loop counters + * - valLists + * - collecting obj (unshared) + * The instruction lappends the result to the collecting obj. + */ + + tmpPtr = OBJ_AT_DEPTH(1); + infoPtr = tmpPtr->internalRep.otherValuePtr; + numLists = infoPtr->numLists; + + objPtr = OBJ_AT_DEPTH(3 + numLists); + Tcl_ListObjAppendElement(NULL, objPtr, OBJ_AT_TOS); + NEXT_INST_F(1, 1, 0); } case INST_BEGIN_CATCH4: |