summaryrefslogtreecommitdiffstats
path: root/generic/tclDisassemble.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclDisassemble.c')
-rw-r--r--generic/tclDisassemble.c47
1 files changed, 24 insertions, 23 deletions
diff --git a/generic/tclDisassemble.c b/generic/tclDisassemble.c
index f5cc8b7..0bc3de1 100644
--- a/generic/tclDisassemble.c
+++ b/generic/tclDisassemble.c
@@ -44,17 +44,17 @@ static const Tcl_ObjType instNameType = {
NULL, /* setFromAnyProc */
};
-#define InstNameSetIntRep(objPtr, inst) \
+#define InstNameSetInternalRep(objPtr, inst) \
do { \
- Tcl_ObjIntRep ir; \
+ Tcl_ObjInternalRep ir; \
ir.wideValue = (inst); \
- Tcl_StoreIntRep((objPtr), &instNameType, &ir); \
+ Tcl_StoreInternalRep((objPtr), &instNameType, &ir); \
} while (0)
-#define InstNameGetIntRep(objPtr, inst) \
+#define InstNameGetInternalRep(objPtr, inst) \
do { \
- const Tcl_ObjIntRep *irPtr; \
- irPtr = TclFetchIntRep((objPtr), &instNameType); \
+ const Tcl_ObjInternalRep *irPtr; \
+ irPtr = TclFetchInternalRep((objPtr), &instNameType); \
assert(irPtr != NULL); \
(inst) = (size_t)irPtr->wideValue; \
} while (0)
@@ -259,7 +259,7 @@ DisassembleByteCodeObj(
Interp *iPtr;
Tcl_Obj *bufferObj, *fileObj;
- ByteCodeGetIntRep(objPtr, &tclByteCodeType, codePtr);
+ ByteCodeGetInternalRep(objPtr, &tclByteCodeType, codePtr);
iPtr = (Interp *) *codePtr->interpHandle;
@@ -301,13 +301,14 @@ DisassembleByteCodeObj(
#ifdef TCL_COMPILE_STATS
Tcl_AppendPrintfToObj(bufferObj,
- " Code %lu = header %lu+inst %d+litObj %lu+exc %lu+aux %lu+cmdMap %d\n",
- (unsigned long) codePtr->structureSize,
- (unsigned long) (sizeof(ByteCode) - sizeof(size_t) - sizeof(Tcl_Time)),
+ " Code %" TCL_Z_MODIFIER "u = header %" TCL_Z_MODIFIER "u+inst %d+litObj %"
+ TCL_Z_MODIFIER "u+exc %" TCL_Z_MODIFIER "u+aux %" TCL_Z_MODIFIER "u+cmdMap %d\n",
+ codePtr->structureSize,
+ offsetof(ByteCode, localCachePtr),
codePtr->numCodeBytes,
- (unsigned long) (codePtr->numLitObjects * sizeof(Tcl_Obj *)),
- (unsigned long) (codePtr->numExceptRanges*sizeof(ExceptionRange)),
- (unsigned long) (codePtr->numAuxDataItems * sizeof(AuxData)),
+ codePtr->numLitObjects * sizeof(Tcl_Obj *),
+ codePtr->numExceptRanges*sizeof(ExceptionRange),
+ codePtr->numAuxDataItems * sizeof(AuxData),
codePtr->numCmdLocBytes);
#endif /* TCL_COMPILE_STATS */
@@ -761,10 +762,10 @@ TclGetInnerContext(
int len;
/*
- * Reset while keeping the list intrep as much as possible.
+ * Reset while keeping the list internalrep as much as possible.
*/
- Tcl_ListObjLength(interp, result, &len);
+ TclListObjLengthM(interp, result, &len);
Tcl_ListObjReplace(interp, result, 0, len, 0, NULL);
}
Tcl_ListObjAppendElement(NULL, result, TclNewInstNameObj(*pc));
@@ -808,7 +809,7 @@ TclNewInstNameObj(
TclNewObj(objPtr);
TclInvalidateStringRep(objPtr);
- InstNameSetIntRep(objPtr, (long) inst);
+ InstNameSetInternalRep(objPtr, inst);
return objPtr;
}
@@ -830,7 +831,7 @@ UpdateStringOfInstName(
size_t inst; /* NOTE: We know this is really an unsigned char */
char *dst;
- InstNameGetIntRep(objPtr, inst);
+ InstNameGetInternalRep(objPtr, inst);
if (inst > LAST_INST_OPCODE) {
dst = Tcl_InitStringRep(objPtr, NULL, TCL_INTEGER_SPACE + 5);
@@ -945,7 +946,7 @@ DisassembleByteCodeAsDicts(
int codeOffset, codeLength, sourceOffset, sourceLength;
int i, val, line;
- ByteCodeGetIntRep(objPtr, &tclByteCodeType, codePtr);
+ ByteCodeGetInternalRep(objPtr, &tclByteCodeType, codePtr);
/*
* Get the literals from the bytecode.
@@ -1368,7 +1369,7 @@ Tcl_DisassembleObjCmd(
return TCL_ERROR;
}
- if (!TclHasIntRep(objv[2], &tclByteCodeType) && (TCL_OK
+ if (!TclHasInternalRep(objv[2], &tclByteCodeType) && (TCL_OK
!= TclSetByteCodeFromAny(interp, objv[2], NULL, NULL))) {
return TCL_ERROR;
}
@@ -1419,7 +1420,7 @@ Tcl_DisassembleObjCmd(
* Compile if necessary.
*/
- if (!TclHasIntRep(procPtr->bodyPtr, &tclByteCodeType)) {
+ if (!TclHasInternalRep(procPtr->bodyPtr, &tclByteCodeType)) {
Command cmd;
/*
@@ -1484,7 +1485,7 @@ Tcl_DisassembleObjCmd(
* Compile if necessary.
*/
- if (!TclHasIntRep(procPtr->bodyPtr, &tclByteCodeType)) {
+ if (!TclHasInternalRep(procPtr->bodyPtr, &tclByteCodeType)) {
Command cmd;
/*
@@ -1569,7 +1570,7 @@ Tcl_DisassembleObjCmd(
"METHODTYPE", NULL);
return TCL_ERROR;
}
- if (!TclHasIntRep(procPtr->bodyPtr, &tclByteCodeType)) {
+ if (!TclHasInternalRep(procPtr->bodyPtr, &tclByteCodeType)) {
Command cmd;
/*
@@ -1597,7 +1598,7 @@ Tcl_DisassembleObjCmd(
* Do the actual disassembly.
*/
- ByteCodeGetIntRep(codeObjPtr, &tclByteCodeType, codePtr);
+ ByteCodeGetInternalRep(codeObjPtr, &tclByteCodeType, codePtr);
if (codePtr->flags & TCL_BYTECODE_PRECOMPILED) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(