Lines Matching defs:cache

569     void *cache;
763 comp->steps[comp->nbStep].cache = NULL;
812 * XPath object cache structures *
818 #define XP_HAS_CACHE(c) ((c != NULL) && ((c)->cache != NULL))
1356 if (ctxt->cache != NULL) {
1357 xmlXPathContextCachePtr cache =
1358 (xmlXPathContextCachePtr) ctxt->cache;
1360 cache->dbgCachedAll = 0;
1361 cache->dbgCachedNodeset = 0;
1362 cache->dbgCachedString = 0;
1363 cache->dbgCachedBool = 0;
1364 cache->dbgCachedNumber = 0;
1365 cache->dbgCachedPoint = 0;
1366 cache->dbgCachedRange = 0;
1367 cache->dbgCachedLocset = 0;
1368 cache->dbgCachedUsers = 0;
1369 cache->dbgCachedXSLTTree = 0;
1370 cache->dbgCachedUndefined = 0;
1372 cache->dbgReusedAll = 0;
1373 cache->dbgReusedNodeset = 0;
1374 cache->dbgReusedString = 0;
1375 cache->dbgReusedBool = 0;
1376 cache->dbgReusedNumber = 0;
1377 cache->dbgReusedPoint = 0;
1378 cache->dbgReusedRange = 0;
1379 cache->dbgReusedLocset = 0;
1380 cache->dbgReusedUsers = 0;
1381 cache->dbgReusedXSLTTree = 0;
1382 cache->dbgReusedUndefined = 0;
1431 if (ctxt->cache != NULL) {
1432 xmlXPathContextCachePtr cache =
1433 (xmlXPathContextCachePtr) ctxt->cache;
1437 cache->dbgReusedAll++;
1440 cache->dbgReusedUndefined++;
1443 cache->dbgReusedNodeset++;
1446 cache->dbgReusedBool++;
1449 cache->dbgReusedNumber++;
1452 cache->dbgReusedString++;
1455 cache->dbgReusedPoint++;
1458 cache->dbgReusedRange++;
1461 cache->dbgReusedLocset++;
1464 cache->dbgReusedUsers++;
1467 cache->dbgReusedXSLTTree++;
1585 if (ctxt->cache != NULL) {
1586 xmlXPathContextCachePtr cache =
1587 (xmlXPathContextCachePtr) ctxt->cache;
1591 cache->dbgCachedAll++;
1594 cache->dbgCachedUndefined++;
1597 cache->dbgCachedNodeset++;
1600 cache->dbgCachedBool++;
1603 cache->dbgCachedNumber++;
1606 cache->dbgCachedString++;
1609 cache->dbgCachedPoint++;
1612 cache->dbgCachedRange++;
1615 cache->dbgCachedLocset++;
1618 cache->dbgCachedUsers++;
1621 cache->dbgCachedXSLTTree++;
1689 if (ctxt->cache != NULL) {
1690 xmlXPathContextCachePtr cache =
1691 (xmlXPathContextCachePtr) ctxt->cache;
1693 reAll = cache->dbgReusedAll;
1695 reNodeset = cache->dbgReusedNodeset;
1697 reString = cache->dbgReusedString;
1699 reBool = cache->dbgReusedBool;
1701 reNumber = cache->dbgReusedNumber;
1703 reXSLTTree = cache->dbgReusedXSLTTree;
1705 reUndefined = cache->dbgReusedUndefined;
1708 caAll = cache->dbgCachedAll;
1709 caBool = cache->dbgCachedBool;
1710 caNodeset = cache->dbgCachedNodeset;
1711 caString = cache->dbgCachedString;
1712 caNumber = cache->dbgCachedNumber;
1713 caXSLTTree = cache->dbgCachedXSLTTree;
1714 caUndefined = cache->dbgCachedUndefined;
1716 if (cache->nodesetObjs)
1717 leftObjs -= cache->nodesetObjs->number;
1718 if (cache->stringObjs)
1719 leftObjs -= cache->stringObjs->number;
1720 if (cache->booleanObjs)
1721 leftObjs -= cache->booleanObjs->number;
1722 if (cache->numberObjs)
1723 leftObjs -= cache->numberObjs->number;
1724 if (cache->miscObjs)
1725 leftObjs -= cache->miscObjs->number;
1787 * Create a new object cache
1798 xmlXPathErrMemory(NULL, "creating object cache\n");
1839 xmlXPathFreeCache(xmlXPathContextCachePtr cache)
1841 if (cache == NULL)
1843 if (cache->nodesetObjs)
1844 xmlXPathCacheFreeObjectList(cache->nodesetObjs);
1845 if (cache->stringObjs)
1846 xmlXPathCacheFreeObjectList(cache->stringObjs);
1847 if (cache->booleanObjs)
1848 xmlXPathCacheFreeObjectList(cache->booleanObjs);
1849 if (cache->numberObjs)
1850 xmlXPathCacheFreeObjectList(cache->numberObjs);
1851 if (cache->miscObjs)
1852 xmlXPathCacheFreeObjectList(cache->miscObjs);
1853 xmlFree(cache);
1860 * @active: enables/disables (creates/frees) the cache
1864 * Creates/frees an object cache on the XPath context.
1887 xmlXPathContextCachePtr cache;
1889 if (ctxt->cache == NULL) {
1890 ctxt->cache = xmlXPathNewCache();
1891 if (ctxt->cache == NULL)
1894 cache = (xmlXPathContextCachePtr) ctxt->cache;
1898 cache->maxNodeset = value;
1899 cache->maxString = value;
1900 cache->maxNumber = value;
1901 cache->maxBoolean = value;
1902 cache->maxMisc = value;
1904 } else if (ctxt->cache != NULL) {
1905 xmlXPathFreeCache((xmlXPathContextCachePtr) ctxt->cache);
1906 ctxt->cache = NULL;
1924 if ((ctxt != NULL) && (ctxt->cache != NULL)) {
1925 xmlXPathContextCachePtr cache =
1926 (xmlXPathContextCachePtr) ctxt->cache;
1928 if ((cache->miscObjs != NULL) &&
1929 (cache->miscObjs->number != 0))
1934 cache->miscObjs->items[--cache->miscObjs->number];
1961 if ((ctxt != NULL) && (ctxt->cache != NULL)) {
1962 xmlXPathContextCachePtr cache = (xmlXPathContextCachePtr) ctxt->cache;
1964 if ((cache->stringObjs != NULL) &&
1965 (cache->stringObjs->number != 0))
1971 cache->stringObjs->items[--cache->stringObjs->number];
1978 } else if ((cache->miscObjs != NULL) &&
1979 (cache->miscObjs->number != 0))
1983 * Fallback to misc-cache.
1986 cache->miscObjs->items[--cache->miscObjs->number];
2013 if ((ctxt != NULL) && (ctxt->cache)) {
2014 xmlXPathContextCachePtr cache = (xmlXPathContextCachePtr) ctxt->cache;
2016 if ((cache->nodesetObjs != NULL) &&
2017 (cache->nodesetObjs->number != 0))
2021 * Use the nodset-cache.
2024 cache->nodesetObjs->items[--cache->nodesetObjs->number];
2041 } else if ((cache->miscObjs != NULL) &&
2042 (cache->miscObjs->number != 0))
2046 * Fallback to misc-cache.
2050 cache->miscObjs->items[--cache->miscObjs->number];
2077 if ((ctxt != NULL) && (ctxt->cache)) {
2078 xmlXPathContextCachePtr cache = (xmlXPathContextCachePtr) ctxt->cache;
2080 if ((cache->stringObjs != NULL) &&
2081 (cache->stringObjs->number != 0))
2086 cache->stringObjs->items[--cache->stringObjs->number];
2094 } else if ((cache->miscObjs != NULL) &&
2095 (cache->miscObjs->number != 0))
2100 cache->miscObjs->items[--cache->miscObjs->number];
2126 if ((ctxt != NULL) && (ctxt->cache)) {
2127 xmlXPathContextCachePtr cache = (xmlXPathContextCachePtr) ctxt->cache;
2129 if ((cache->stringObjs != NULL) &&
2130 (cache->stringObjs->number != 0))
2135 cache->stringObjs->items[--cache->stringObjs->number];
2145 } else if ((cache->miscObjs != NULL) &&
2146 (cache->miscObjs->number != 0))
2151 cache->miscObjs->items[--cache->miscObjs->number];
2180 if ((ctxt != NULL) && (ctxt->cache)) {
2181 xmlXPathContextCachePtr cache = (xmlXPathContextCachePtr) ctxt->cache;
2183 if ((cache->booleanObjs != NULL) &&
2184 (cache->booleanObjs->number != 0))
2189 cache->booleanObjs->items[--cache->booleanObjs->number];
2196 } else if ((cache->miscObjs != NULL) &&
2197 (cache->miscObjs->number != 0))
2202 cache->miscObjs->items[--cache->miscObjs->number];
2228 if ((ctxt != NULL) && (ctxt->cache)) {
2229 xmlXPathContextCachePtr cache = (xmlXPathContextCachePtr) ctxt->cache;
2231 if ((cache->numberObjs != NULL) &&
2232 (cache->numberObjs->number != 0))
2237 cache->numberObjs->items[--cache->numberObjs->number];
2244 } else if ((cache->miscObjs != NULL) &&
2245 (cache->miscObjs->number != 0))
2250 cache->miscObjs->items[--cache->miscObjs->number];
5422 * @obj: the xmlXPathObjectPtr to free or to cache
5424 * Depending on the state of the cache this frees the given
5425 * XPath object or stores it in the cache.
5438 if ((ctxt == NULL) || (ctxt->cache == NULL)) {
5441 xmlXPathContextCachePtr cache =
5442 (xmlXPathContextCachePtr) ctxt->cache;
5458 (XP_CACHE_WANTS(cache->nodesetObjs,
5459 cache->maxNodeset)))
5461 XP_CACHE_ADD(cache->nodesetObjs, obj);
5473 if (XP_CACHE_WANTS(cache->stringObjs, cache->maxString)) {
5474 XP_CACHE_ADD(cache->stringObjs, obj);
5479 if (XP_CACHE_WANTS(cache->booleanObjs, cache->maxBoolean)) {
5480 XP_CACHE_ADD(cache->booleanObjs, obj);
5485 if (XP_CACHE_WANTS(cache->numberObjs, cache->maxNumber)) {
5486 XP_CACHE_ADD(cache->numberObjs, obj);
5504 if (XP_CACHE_WANTS(cache->miscObjs, cache->maxMisc)) {
5505 XP_CACHE_ADD(cache->miscObjs, obj);
6069 if (ctxt->cache != NULL)
6070 xmlXPathFreeCache((xmlXPathContextCachePtr) ctxt->cache);
13413 if (op->cache != NULL)
13414 XML_CAST_FPTR(func) = op->cache;
13440 op->cache = XML_CAST_FPTR(func);