Check-in [6e3a672696]
Not logged in
Tcl 2014 Conference, Portland/OR, US, Nov 10-14
Browse the schedule online.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
SHA1 Hash:6e3a67269680df7bdd904e3816e1b06e3965fe3d
Date: 2013-12-22 14:11:46
User: mig
Comment:remove unnecessary messing around INST_CONTINUE and INST_BREAK: local continue/break are already converted to jumps, so that these are either caught or returned - in either case, the stacks are cleaned up properly by TEBC itself.
Tags And Properties
Changes

Changes to generic/tclCompCmds.c

485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502

503
504
505
506
507
508
509
...
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748

749
750
751
752
753
754
755
    if (rangePtr && rangePtr->type == LOOP_EXCEPTION_RANGE) {
	/*
	 * Found the target! No need for a nasty INST_BREAK here.
	 */

	TclCleanupStackForBreakContinue(envPtr, auxPtr);
	TclAddLoopBreakFixup(envPtr, auxPtr);
	TclAdjustStackDepth(1, envPtr);
    } else {
	/*
	 * Emit a real break.
	 */

	PushStringLiteral(envPtr, "");
	TclEmitOpcode(INST_DUP, envPtr);
	TclEmitInstInt4(INST_RETURN_IMM, TCL_BREAK, envPtr);
	TclEmitInt4(0, envPtr);
    }


    return TCL_OK;
}
 
/*
 *----------------------------------------------------------------------
 *
................................................................................
    if (rangePtr && rangePtr->type == LOOP_EXCEPTION_RANGE) {
	/*
	 * Found the target! No need for a nasty INST_CONTINUE here.
	 */

	TclCleanupStackForBreakContinue(envPtr, auxPtr);
	TclAddLoopContinueFixup(envPtr, auxPtr);
	TclAdjustStackDepth(1, envPtr);
    } else {
	/*
	 * Emit a real continue.
	 */

	PushStringLiteral(envPtr, "");
	TclEmitOpcode(INST_DUP, envPtr);
	TclEmitInstInt4(INST_RETURN_IMM, TCL_CONTINUE, envPtr);
	TclEmitInt4(0, envPtr);
    }


    return TCL_OK;
}
 
/*
 *----------------------------------------------------------------------
 *







<





<
|
<
<

>







 







<





<
|
<
<

>







485
486
487
488
489
490
491

492
493
494
495
496

497


498
499
500
501
502
503
504
505
506
...
728
729
730
731
732
733
734

735
736
737
738
739

740


741
742
743
744
745
746
747
748
749
    if (rangePtr && rangePtr->type == LOOP_EXCEPTION_RANGE) {
	/*
	 * Found the target! No need for a nasty INST_BREAK here.
	 */

	TclCleanupStackForBreakContinue(envPtr, auxPtr);
	TclAddLoopBreakFixup(envPtr, auxPtr);

    } else {
	/*
	 * Emit a real break.
	 */


	TclEmitOpcode(INST_BREAK, envPtr);


    }
    TclAdjustStackDepth(1, envPtr);

    return TCL_OK;
}
 
/*
 *----------------------------------------------------------------------
 *
................................................................................
    if (rangePtr && rangePtr->type == LOOP_EXCEPTION_RANGE) {
	/*
	 * Found the target! No need for a nasty INST_CONTINUE here.
	 */

	TclCleanupStackForBreakContinue(envPtr, auxPtr);
	TclAddLoopContinueFixup(envPtr, auxPtr);

    } else {
	/*
	 * Emit a real continue.
	 */


	TclEmitOpcode(INST_CONTINUE, envPtr);


    }
    TclAdjustStackDepth(1, envPtr);

    return TCL_OK;
}
 
/*
 *----------------------------------------------------------------------
 *