summaryrefslogtreecommitdiffstats
path: root/generic/tclCompile.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-07-17 15:38:17 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-07-17 15:38:17 (GMT)
commit20bd9d9cabc9db212abbaf9d4dbb18eb490e9f71 (patch)
tree145f048872ec19521a9251dbced311d3a61d2ce6 /generic/tclCompile.c
parent738eb47e4edaaf2d67f93a159f124a5306dea171 (diff)
downloadtcl-20bd9d9cabc9db212abbaf9d4dbb18eb490e9f71.zip
tcl-20bd9d9cabc9db212abbaf9d4dbb18eb490e9f71.tar.gz
tcl-20bd9d9cabc9db212abbaf9d4dbb18eb490e9f71.tar.bz2
Eliminate "register" keyword _everywhere_ in Tcl. This keyword is deprecated in C++ (removed in C++17, even), and essentially does nothing with most modern compilers.
Diffstat (limited to 'generic/tclCompile.c')
-rw-r--r--generic/tclCompile.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/generic/tclCompile.c b/generic/tclCompile.c
index c10e3ee..8a13eba 100644
--- a/generic/tclCompile.c
+++ b/generic/tclCompile.c
@@ -990,7 +990,7 @@ DupByteCodeInternalRep(
static void
FreeByteCodeInternalRep(
- register Tcl_Obj *objPtr) /* Object whose internal rep to free. */
+ Tcl_Obj *objPtr) /* Object whose internal rep to free. */
{
ByteCode *codePtr;
@@ -1021,14 +1021,14 @@ FreeByteCodeInternalRep(
void
TclPreserveByteCode(
- register ByteCode *codePtr)
+ ByteCode *codePtr)
{
codePtr->refCount++;
}
void
TclReleaseByteCode(
- register ByteCode *codePtr)
+ ByteCode *codePtr)
{
if (codePtr->refCount-- > 1) {
return;
@@ -1040,14 +1040,14 @@ TclReleaseByteCode(
static void
CleanupByteCode(
- register ByteCode *codePtr) /* Points to the ByteCode to free. */
+ ByteCode *codePtr) /* Points to the ByteCode to free. */
{
Tcl_Interp *interp = (Tcl_Interp *) *codePtr->interpHandle;
Interp *iPtr = (Interp *) interp;
int numLitObjects = codePtr->numLitObjects;
int numAuxDataItems = codePtr->numAuxDataItems;
- register Tcl_Obj **objArrayPtr, *objPtr;
- register const AuxData *auxDataPtr;
+ Tcl_Obj **objArrayPtr, *objPtr;
+ const AuxData *auxDataPtr;
int i;
#ifdef TCL_COMPILE_STATS
@@ -1392,9 +1392,9 @@ CompileSubstObj(
static void
FreeSubstCodeInternalRep(
- register Tcl_Obj *objPtr) /* Object whose internal rep to free. */
+ Tcl_Obj *objPtr) /* Object whose internal rep to free. */
{
- register ByteCode *codePtr;
+ ByteCode *codePtr;
ByteCodeGetIntRep(objPtr, &substCodeType, codePtr);
assert(codePtr != NULL);
@@ -1443,7 +1443,7 @@ void
TclInitCompileEnv(
Tcl_Interp *interp, /* The interpreter for which a CompileEnv
* structure is initialized. */
- register CompileEnv *envPtr,/* Points to the CompileEnv structure to
+ CompileEnv *envPtr,/* Points to the CompileEnv structure to
* initialize. */
const char *stringPtr, /* The source string to be compiled. */
int numBytes, /* Number of bytes in source string. */
@@ -1650,7 +1650,7 @@ TclInitCompileEnv(
void
TclFreeCompileEnv(
- register CompileEnv *envPtr)/* Points to the CompileEnv structure. */
+ CompileEnv *envPtr)/* Points to the CompileEnv structure. */
{
if (envPtr->localLitTable.buckets != envPtr->localLitTable.staticBuckets){
ckfree(envPtr->localLitTable.buckets);
@@ -2782,13 +2782,13 @@ PreventCycle(
ByteCode *
TclInitByteCode(
- register CompileEnv *envPtr)/* Points to the CompileEnv structure from
+ CompileEnv *envPtr)/* Points to the CompileEnv structure from
* which to create a ByteCode structure. */
{
- register ByteCode *codePtr;
+ ByteCode *codePtr;
size_t codeBytes, objArrayBytes, exceptArrayBytes, cmdLocBytes;
size_t auxDataArrayBytes, structureSize;
- register unsigned char *p;
+ unsigned char *p;
#ifdef TCL_COMPILE_DEBUG
unsigned char *nextPtr;
#endif
@@ -2923,7 +2923,7 @@ TclInitByteCodeObj(
* and whose string rep contains the source
* code. */
const Tcl_ObjType *typePtr,
- register CompileEnv *envPtr)/* Points to the CompileEnv structure from
+ CompileEnv *envPtr)/* Points to the CompileEnv structure from
* which to create a ByteCode structure. */
{
ByteCode *codePtr;
@@ -2968,7 +2968,7 @@ TclInitByteCodeObj(
int
TclFindCompiledLocal(
- register const char *name, /* Points to first character of the name of a
+ const char *name, /* Points to first character of the name of a
* scalar or array variable. If NULL, a
* temporary var should be created. */
int nameBytes, /* Number of bytes in the name. */
@@ -2976,9 +2976,9 @@ TclFindCompiledLocal(
* variable if it is new. */
CompileEnv *envPtr) /* Points to the current compile environment*/
{
- register CompiledLocal *localPtr;
+ CompiledLocal *localPtr;
int localVar = -1;
- register int i;
+ int i;
Proc *procPtr;
/*
@@ -3351,11 +3351,11 @@ EnterCmdWordData(
int
TclCreateExceptRange(
ExceptionRangeType type, /* The kind of ExceptionRange desired. */
- register CompileEnv *envPtr)/* Points to CompileEnv for which to create a
+ CompileEnv *envPtr)/* Points to CompileEnv for which to create a
* new ExceptionRange structure. */
{
- register ExceptionRange *rangePtr;
- register ExceptionAux *auxPtr;
+ ExceptionRange *rangePtr;
+ ExceptionAux *auxPtr;
int index = envPtr->exceptArrayNext;
if (index >= envPtr->exceptArrayEnd) {
@@ -3719,11 +3719,11 @@ TclCreateAuxData(
* the new aux data record. */
const AuxDataType *typePtr, /* Pointer to the type to attach to this
* AuxData */
- register CompileEnv *envPtr)/* Points to the CompileEnv for which a new
+ CompileEnv *envPtr)/* Points to the CompileEnv for which a new
* aux data structure is to be allocated. */
{
int index; /* Index for the new AuxData structure. */
- register AuxData *auxDataPtr;
+ AuxData *auxDataPtr;
/* Points to the new AuxData structure */
index = envPtr->auxDataArrayNext;
@@ -3782,7 +3782,7 @@ TclCreateAuxData(
void
TclInitJumpFixupArray(
- register JumpFixupArray *fixupArrayPtr)
+ JumpFixupArray *fixupArrayPtr)
/* Points to the JumpFixupArray structure to
* initialize. */
{
@@ -3814,7 +3814,7 @@ TclInitJumpFixupArray(
void
TclExpandJumpFixupArray(
- register JumpFixupArray *fixupArrayPtr)
+ JumpFixupArray *fixupArrayPtr)
/* Points to the JumpFixupArray structure to
* enlarge. */
{
@@ -3863,7 +3863,7 @@ TclExpandJumpFixupArray(
void
TclFreeJumpFixupArray(
- register JumpFixupArray *fixupArrayPtr)
+ JumpFixupArray *fixupArrayPtr)
/* Points to the JumpFixupArray structure to
* free. */
{
@@ -4310,7 +4310,7 @@ GetCmdLocEncodingSize(
* containing the CmdLocation structure to
* encode. */
{
- register CmdLocation *mapPtr = envPtr->cmdMapPtr;
+ CmdLocation *mapPtr = envPtr->cmdMapPtr;
int numCmds = envPtr->numCommands;
int codeDelta, codeLen, srcDelta, srcLen;
int codeDeltaNext, codeLengthNext, srcDeltaNext, srcLengthNext;
@@ -4394,11 +4394,11 @@ EncodeCmdLocMap(
* memory block where the location information
* is to be stored. */
{
- register CmdLocation *mapPtr = envPtr->cmdMapPtr;
+ CmdLocation *mapPtr = envPtr->cmdMapPtr;
int numCmds = envPtr->numCommands;
- register unsigned char *p = startPtr;
+ unsigned char *p = startPtr;
int codeDelta, codeLen, srcDelta, srcLen, prevOffset;
- register int i;
+ int i;
/*
* Encode the code offset for each command as a sequence of deltas.
@@ -4512,7 +4512,7 @@ RecordByteCodeStats(
* to add to accumulated statistics. */
{
Interp *iPtr = (Interp *) *codePtr->interpHandle;
- register ByteCodeStats *statsPtr;
+ ByteCodeStats *statsPtr;
if (iPtr == NULL) {
/* Avoid segfaulting in case we're called in a deleted interp */