Itcl - the [incr Tcl] extension

Check-in [904c4d882c]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

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

Overview
Comment:**interim** improved, but not ready (tests failed, segfault, rebuild on inheritance, etc)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | sebres-on-dmnd-resolver-perf-branch
Files: files | file ages | folders
SHA3-256: 904c4d882ca2e7dfce6cb365e968e5dce68407f48ae2c224668fc8012b2bc704
User & Date: sebres 2019-04-17 20:43:09
Context
2019-04-17
20:43
on demand resolver almost ready (check if0-commented cases - inheritance, 2-3 test cases failed) check-in: 87972ed991 user: sebres tags: sebres-on-dmnd-resolver-perf-branch
20:43
**interim** improved, but not ready (tests failed, segfault, rebuild on inheritance, etc) check-in: 904c4d882c user: sebres tags: sebres-on-dmnd-resolver-perf-branch
20:42
*interim* try to implement on demand var-resolver virtual table check-in: c3440a6f46 user: sebres tags: sebres-on-dmnd-resolver-perf-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to generic/itclObject.c.

965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
                if (Tcl_SetVar2(interp, varName, NULL,
	                "", TCL_NAMESPACE_ONLY) == NULL) {
                    Tcl_AppendResult(interp, "INTERNAL ERROR cannot set",
		            " variable \"", varName, "\"\n", NULL);
		    goto errorCleanup;
                }
	    }
            hPtr2 = Tcl_FindHashEntry(&ivPtr->iclsPtr->resolveVars, varName);
            if (hPtr2 == NULL) {
                hPtr = Tcl_NextHashEntry(&place);
	        continue;
            }
#ifdef NEW_PROTO_RESOLVER
	    vlookup = Tcl_GetHashValue(hPtr2);
#endif






|







965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
                if (Tcl_SetVar2(interp, varName, NULL,
	                "", TCL_NAMESPACE_ONLY) == NULL) {
                    Tcl_AppendResult(interp, "INTERNAL ERROR cannot set",
		            " variable \"", varName, "\"\n", NULL);
		    goto errorCleanup;
                }
	    }
            hPtr2 = ItclResolveVarEntry(ivPtr->iclsPtr, varName);
            if (hPtr2 == NULL) {
                hPtr = Tcl_NextHashEntry(&place);
	        continue;
            }
#ifdef NEW_PROTO_RESOLVER
	    vlookup = Tcl_GetHashValue(hPtr2);
#endif

Changes to generic/itclResolve.c.

310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
...
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
    /* Check that the object hasn't already been destroyed. */
    hPtr = Tcl_FindHashEntry(&infoPtr->objects, (char *)contextIoPtr);
    if (hPtr == NULL) {
	return TCL_CONTINUE;
    }
        if (contextIoPtr->iclsPtr != vlookup->ivPtr->iclsPtr) {
	    if (strcmp(Tcl_GetString(vlookup->ivPtr->namePtr), "this") == 0) {
                hPtr = Tcl_FindHashEntry(&contextIoPtr->iclsPtr->resolveVars,
                    Tcl_GetString(vlookup->ivPtr->namePtr));

                if (hPtr != NULL) {
                    vlookup = (ItclVarLookup*)Tcl_GetHashValue(hPtr);
                }
            }
        }
................................................................................
	return NULL;
    }

        if (contextIoPtr->iclsPtr != vlookup->ivPtr->iclsPtr) {
	    if (strcmp(Tcl_GetString(vlookup->ivPtr->namePtr), "this") == 0) {
	        /* only for the this variable we need the one of the
		 * contextIoPtr class */
                hPtr = Tcl_FindHashEntry(&contextIoPtr->iclsPtr->resolveVars,
                        Tcl_GetString(vlookup->ivPtr->namePtr));

                if (hPtr != NULL) {
                    vlookup = (ItclVarLookup*)Tcl_GetHashValue(hPtr);
	        }
	    }
        }






|







 







|







310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
...
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
    /* Check that the object hasn't already been destroyed. */
    hPtr = Tcl_FindHashEntry(&infoPtr->objects, (char *)contextIoPtr);
    if (hPtr == NULL) {
	return TCL_CONTINUE;
    }
        if (contextIoPtr->iclsPtr != vlookup->ivPtr->iclsPtr) {
	    if (strcmp(Tcl_GetString(vlookup->ivPtr->namePtr), "this") == 0) {
                hPtr = ItclResolveVarEntry(contextIoPtr->iclsPtr,
                    Tcl_GetString(vlookup->ivPtr->namePtr));

                if (hPtr != NULL) {
                    vlookup = (ItclVarLookup*)Tcl_GetHashValue(hPtr);
                }
            }
        }
................................................................................
	return NULL;
    }

        if (contextIoPtr->iclsPtr != vlookup->ivPtr->iclsPtr) {
	    if (strcmp(Tcl_GetString(vlookup->ivPtr->namePtr), "this") == 0) {
	        /* only for the this variable we need the one of the
		 * contextIoPtr class */
                hPtr = ItclResolveVarEntry(contextIoPtr->iclsPtr,
                        Tcl_GetString(vlookup->ivPtr->namePtr));

                if (hPtr != NULL) {
                    vlookup = (ItclVarLookup*)Tcl_GetHashValue(hPtr);
	        }
	    }
        }