Import Tcl 8.6.11
This commit is contained in:
@@ -663,7 +663,7 @@ BBEmitOpcode(
|
||||
/* Compilation environment */
|
||||
BasicBlock* bbPtr = assemEnvPtr->curr_bb;
|
||||
/* Current basic block */
|
||||
int op = TalInstructionTable[tblIdx].tclInstCode & 0xff;
|
||||
int op = TalInstructionTable[tblIdx].tclInstCode & 0xFF;
|
||||
|
||||
/*
|
||||
* If this is the first instruction in a basic block, record its line
|
||||
@@ -725,13 +725,13 @@ BBEmitInst1or4(
|
||||
/* Current basic block */
|
||||
int op = TalInstructionTable[tblIdx].tclInstCode;
|
||||
|
||||
if (param <= 0xff) {
|
||||
if (param <= 0xFF) {
|
||||
op >>= 8;
|
||||
} else {
|
||||
op &= 0xff;
|
||||
op &= 0xFF;
|
||||
}
|
||||
TclEmitInt1(op, envPtr);
|
||||
if (param <= 0xff) {
|
||||
if (param <= 0xFF) {
|
||||
TclEmitInt1(param, envPtr);
|
||||
} else {
|
||||
TclEmitInt4(param, envPtr);
|
||||
@@ -803,7 +803,7 @@ TclNRAssembleObjCmd(
|
||||
Tcl_AddErrorInfo(interp, "\n (\"");
|
||||
Tcl_AppendObjToErrorInfo(interp, objv[0]);
|
||||
Tcl_AddErrorInfo(interp, "\" body, line ");
|
||||
backtrace = Tcl_NewIntObj(Tcl_GetErrorLine(interp));
|
||||
TclNewIntObj(backtrace, Tcl_GetErrorLine(interp));
|
||||
Tcl_AppendObjToErrorInfo(interp, backtrace);
|
||||
Tcl_AddErrorInfo(interp, ")");
|
||||
return TCL_ERROR;
|
||||
@@ -840,7 +840,7 @@ CompileAssembleObj(
|
||||
Interp *iPtr = (Interp *) interp;
|
||||
/* Internals of the interpreter */
|
||||
CompileEnv compEnv; /* Compilation environment structure */
|
||||
register ByteCode *codePtr = NULL;
|
||||
ByteCode *codePtr = NULL;
|
||||
/* Bytecode resulting from the assembly */
|
||||
Namespace* namespacePtr; /* Namespace in which variable and command
|
||||
* names in the bytecode resolve */
|
||||
@@ -1697,9 +1697,7 @@ AssembleOneLine(
|
||||
goto cleanup;
|
||||
}
|
||||
{
|
||||
int flags = TCL_REG_ADVANCED | (opnd ? TCL_REG_NOCASE : 0);
|
||||
|
||||
BBEmitInstInt1(assemEnvPtr, tblIdx, flags, 0);
|
||||
BBEmitInstInt1(assemEnvPtr, tblIdx, TCL_REG_ADVANCED | (opnd ? TCL_REG_NOCASE : 0), 0);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -2091,8 +2089,9 @@ GetNextOperand(
|
||||
* with \-substitutions done. */
|
||||
{
|
||||
Tcl_Interp* interp = (Tcl_Interp*) assemEnvPtr->envPtr->iPtr;
|
||||
Tcl_Obj* operandObj = Tcl_NewObj();
|
||||
Tcl_Obj* operandObj;
|
||||
|
||||
TclNewObj(operandObj);
|
||||
if (!TclWordKnownAtCompileTime(*tokenPtrPtr, operandObj)) {
|
||||
Tcl_DecrRefCount(operandObj);
|
||||
if (assemEnvPtr->flags & TCL_EVAL_DIRECT) {
|
||||
@@ -2226,7 +2225,7 @@ GetIntegerOperand(
|
||||
* TCL_ERROR (with an appropriate error message) if the parse fails.
|
||||
*
|
||||
* Side effects:
|
||||
* Stores the list index at '*index'. Values between -1 and 0x7fffffff
|
||||
* Stores the list index at '*index'. Values between -1 and 0x7FFFFFFF
|
||||
* have their natural meaning; values between -2 and -0x80000000
|
||||
* represent 'end-2-N'.
|
||||
*
|
||||
@@ -2389,7 +2388,7 @@ CheckOneByte(
|
||||
{
|
||||
Tcl_Obj* result; /* Error message */
|
||||
|
||||
if (value < 0 || value > 0xff) {
|
||||
if (value < 0 || value > 0xFF) {
|
||||
result = Tcl_NewStringObj("operand does not fit in one byte", -1);
|
||||
Tcl_SetObjResult(interp, result);
|
||||
Tcl_SetErrorCode(interp, "TCL", "ASSEM", "1BYTE", NULL);
|
||||
@@ -2424,7 +2423,7 @@ CheckSignedOneByte(
|
||||
{
|
||||
Tcl_Obj* result; /* Error message */
|
||||
|
||||
if (value > 0x7f || value < -0x80) {
|
||||
if (value > 0x7F || value < -0x80) {
|
||||
result = Tcl_NewStringObj("operand does not fit in one byte", -1);
|
||||
Tcl_SetObjResult(interp, result);
|
||||
Tcl_SetErrorCode(interp, "TCL", "ASSEM", "1BYTE", NULL);
|
||||
@@ -2838,7 +2837,7 @@ CalculateJumpRelocations(
|
||||
if (bbPtr->flags & BB_JUMP1) {
|
||||
offset = jumpTarget->startOffset
|
||||
- (bbPtr->jumpOffset + motion);
|
||||
if (offset < -0x80 || offset > 0x7f) {
|
||||
if (offset < -0x80 || offset > 0x7F) {
|
||||
opcode = TclGetUInt1AtPtr(envPtr->codeStart
|
||||
+ bbPtr->jumpOffset);
|
||||
++opcode;
|
||||
@@ -4262,7 +4261,7 @@ AddBasicBlockRangeToErrorInfo(
|
||||
Tcl_Obj* lineNo; /* Line number in the source */
|
||||
|
||||
Tcl_AddErrorInfo(interp, "\n in assembly code between lines ");
|
||||
lineNo = Tcl_NewIntObj(bbPtr->startLine);
|
||||
TclNewIntObj(lineNo, bbPtr->startLine);
|
||||
Tcl_IncrRefCount(lineNo);
|
||||
Tcl_AppendObjToErrorInfo(interp, lineNo);
|
||||
Tcl_AddErrorInfo(interp, " and ");
|
||||
|
||||
Reference in New Issue
Block a user