Home | History | Annotate | Download | only in libxml2

Lines Matching full:cache

568     void *cache;
762 comp->steps[comp->nbStep].cache = NULL;
811 * XPath object cache structures *
817 #define XP_HAS_CACHE(c) ((c != NULL) && ((c)->cache != NULL))
1355 if (ctxt->cache != NULL) {
1356 xmlXPathContextCachePtr cache =
1357 (xmlXPathContextCachePtr) ctxt->cache;
1359 cache->dbgCachedAll = 0;
1360 cache->dbgCachedNodeset = 0;
1361 cache->dbgCachedString = 0;
1362 cache->dbgCachedBool = 0;
1363 cache->dbgCachedNumber = 0;
1364 cache->dbgCachedPoint = 0;
1365 cache->dbgCachedRange = 0;
1366 cache->dbgCachedLocset = 0;
1367 cache->dbgCachedUsers = 0;
1368 cache->dbgCachedXSLTTree = 0;
1369 cache->dbgCachedUndefined = 0;
1371 cache->dbgReusedAll = 0;
1372 cache->dbgReusedNodeset = 0;
1373 cache->dbgReusedString = 0;
1374 cache->dbgReusedBool = 0;
1375 cache->dbgReusedNumber = 0;
1376 cache->dbgReusedPoint = 0;
1377 cache->dbgReusedRange = 0;
1378 cache->dbgReusedLocset = 0;
1379 cache->dbgReusedUsers = 0;
1380 cache->dbgReusedXSLTTree = 0;
1381 cache->dbgReusedUndefined = 0;
1430 if (ctxt->cache != NULL) {
1431 xmlXPathContextCachePtr cache =
1432 (xmlXPathContextCachePtr) ctxt->cache;
1436 cache->dbgReusedAll++;
1439 cache->dbgReusedUndefined++;
1442 cache->dbgReusedNodeset++;
1445 cache->dbgReusedBool++;
1448 cache->dbgReusedNumber++;
1451 cache->dbgReusedString++;
1454 cache->dbgReusedPoint++;
1457 cache->dbgReusedRange++;
1460 cache->dbgReusedLocset++;
1463 cache->dbgReusedUsers++;
1466 cache->dbgReusedXSLTTree++;
1584 if (ctxt->cache != NULL) {
1585 xmlXPathContextCachePtr cache =
1586 (xmlXPathContextCachePtr) ctxt->cache;
1590 cache->dbgCachedAll++;
1593 cache->dbgCachedUndefined++;
1596 cache->dbgCachedNodeset++;
1599 cache->dbgCachedBool++;
1602 cache->dbgCachedNumber++;
1605 cache->dbgCachedString++;
1608 cache->dbgCachedPoint++;
1611 cache->dbgCachedRange++;
1614 cache->dbgCachedLocset++;
1617 cache->dbgCachedUsers++;
1620 cache->dbgCachedXSLTTree++;
1688 if (ctxt->cache != NULL) {
1689 xmlXPathContextCachePtr cache =
1690 (xmlXPathContextCachePtr) ctxt->cache;
1692 reAll = cache->dbgReusedAll;
1694 reNodeset = cache->dbgReusedNodeset;
1696 reString = cache->dbgReusedString;
1698 reBool = cache->dbgReusedBool;
1700 reNumber = cache->dbgReusedNumber;
1702 reXSLTTree = cache->dbgReusedXSLTTree;
1704 reUndefined = cache->dbgReusedUndefined;
1707 caAll = cache->dbgCachedAll;
1708 caBool = cache->dbgCachedBool;
1709 caNodeset = cache->dbgCachedNodeset;
1710 caString = cache->dbgCachedString;
1711 caNumber = cache->dbgCachedNumber;
1712 caXSLTTree = cache->dbgCachedXSLTTree;
1713 caUndefined = cache->dbgCachedUndefined;
1715 if (cache->nodesetObjs)
1716 leftObjs -= cache->nodesetObjs->number;
1717 if (cache->stringObjs)
1718 leftObjs -= cache->stringObjs->number;
1719 if (cache->booleanObjs)
1720 leftObjs -= cache->booleanObjs->number;
1721 if (cache->numberObjs)
1722 leftObjs -= cache->numberObjs->number;
1723 if (cache->miscObjs)
1724 leftObjs -= cache->miscObjs->number;
1786 * Create a new object cache
1797 cache\n");
1838 xmlXPathFreeCache(xmlXPathContextCachePtr cache)
1840 if (cache == NULL)
1842 if (cache->nodesetObjs)
1843 xmlXPathCacheFreeObjectList(cache->nodesetObjs);
1844 if (cache->stringObjs)
1845 xmlXPathCacheFreeObjectList(cache->stringObjs);
1846 if (cache->booleanObjs)
1847 xmlXPathCacheFreeObjectList(cache->booleanObjs);
1848 if (cache->numberObjs)
1849 xmlXPathCacheFreeObjectList(cache->numberObjs);
1850 if (cache->miscObjs)
1851 xmlXPathCacheFreeObjectList(cache->miscObjs);
1852 xmlFree(cache);
1859 * @active: enables/disables (creates/frees) the cache
1863 * Creates/frees an object cache on the XPath context.
1886 xmlXPathContextCachePtr cache;
1888 if (ctxt->cache == NULL) {
1889 ctxt->cache = xmlXPathNewCache();
1890 if (ctxt->cache == NULL)
1893 cache = (xmlXPathContextCachePtr) ctxt->cache;
1897 cache->maxNodeset = value;
1898 cache->maxString = value;
1899 cache->maxNumber = value;
1900 cache->maxBoolean = value;
1901 cache->maxMisc = value;
1903 } else if (ctxt->cache != NULL) {
1904 xmlXPathFreeCache((xmlXPathContextCachePtr) ctxt->cache);
1905 ctxt->cache = NULL;
1923 if ((ctxt != NULL) && (ctxt->cache != NULL)) {
1924 xmlXPathContextCachePtr cache =
1925 (xmlXPathContextCachePtr) ctxt->cache;
1927 if ((cache->miscObjs != NULL) &&
1928 (cache->miscObjs->number != 0))
1933 cache->miscObjs->items[--cache->miscObjs->number];
1960 if ((ctxt != NULL) && (ctxt->cache != NULL)) {
1961 xmlXPathContextCachePtr cache = (xmlXPathContextCachePtr) ctxt->cache;
1963 if ((cache->stringObjs != NULL) &&
1964 (cache->stringObjs->number != 0))
1970 cache->stringObjs->items[--cache->stringObjs->number];
1977 } else if ((cache->miscObjs != NULL) &&
1978 (cache->miscObjs->number != 0))
1982 * Fallback to misc-cache.
1985 cache->miscObjs->items[--cache->miscObjs->number];
2012 if ((ctxt != NULL) && (ctxt->cache)) {
2013 xmlXPathContextCachePtr cache = (xmlXPathContextCachePtr) ctxt->cache;
2015 if ((cache->nodesetObjs != NULL) &&
2016 (cache->nodesetObjs->number != 0))
2020 * Use the nodset-cache.
2023 cache->nodesetObjs->items[--cache->nodesetObjs->number];
2040 } else if ((cache->miscObjs != NULL) &&
2041 (cache->miscObjs->number != 0))
2045 * Fallback to misc-cache.
2049 cache->miscObjs->items[--cache->miscObjs->number];
2076 if ((ctxt != NULL) && (ctxt->cache)) {
2077 xmlXPathContextCachePtr cache = (xmlXPathContextCachePtr) ctxt->cache;
2079 if ((cache->stringObjs != NULL) &&
2080 (cache->stringObjs->number != 0))
2085 cache->stringObjs->items[--cache->stringObjs->number];
2093 } else if ((cache->miscObjs != NULL) &&
2094 (cache->miscObjs->number != 0))
2099 cache->miscObjs->items[--cache->miscObjs->number];
2125 if ((ctxt != NULL) && (ctxt->cache)) {
2126 xmlXPathContextCachePtr cache = (xmlXPathContextCachePtr) ctxt->cache;
2128 if ((cache->stringObjs != NULL) &&
2129 (cache->stringObjs->number != 0))
2134 cache->stringObjs->items[--cache->stringObjs->number];
2144 } else if ((cache->miscObjs != NULL) &&
2145 (cache->miscObjs->number != 0))
2150 cache->miscObjs->items[--cache->miscObjs->number];
2179 if ((ctxt != NULL) && (ctxt->cache)) {
2180 xmlXPathContextCachePtr cache = (xmlXPathContextCachePtr) ctxt->cache;
2182 if ((cache->booleanObjs != NULL) &&
2183 (cache->booleanObjs->number != 0))
2188 cache->booleanObjs->items[--cache->booleanObjs->number];
2195 } else if ((cache->miscObjs != NULL) &&
2196 (cache->miscObjs->number != 0))
2201 cache->miscObjs->items[--cache->miscObjs->number];
2227 if ((ctxt != NULL) && (ctxt->cache)) {
2228 xmlXPathContextCachePtr cache = (xmlXPathContextCachePtr) ctxt->cache;
2230 if ((cache->numberObjs != NULL) &&
2231 (cache->numberObjs->number != 0))
2236 cache->numberObjs->items[--cache->numberObjs->number];
2243 } else if ((cache->miscObjs != NULL) &&
2244 (cache->miscObjs->number != 0))
2249 cache->miscObjs->items[--cache->miscObjs->number];
5395 * @obj: the xmlXPathObjectPtr to free or to cache
5397 * Depending on the state of the cache this frees the given
5398 * XPath object or stores it in the cache.
5411 if ((ctxt == NULL) || (ctxt->cache == NULL)) {
5414 xmlXPathContextCachePtr cache =
5415 (xmlXPathContextCachePtr) ctxt->cache;
5431 (XP_CACHE_WANTS(cache->nodesetObjs,
5432 cache->maxNodeset)))
5434 XP_CACHE_ADD(cache->nodesetObjs, obj);
5446 if (XP_CACHE_WANTS(cache->stringObjs, cache->maxString)) {
5447 XP_CACHE_ADD(cache->stringObjs, obj);
5452 if (XP_CACHE_WANTS(cache->booleanObjs, cache->maxBoolean)) {
5453 XP_CACHE_ADD(cache->booleanObjs, obj);
5458 if (XP_CACHE_WANTS(cache->numberObjs, cache->maxNumber)) {
5459 XP_CACHE_ADD(cache->numberObjs, obj);
5477 if (XP_CACHE_WANTS(cache->miscObjs, cache->maxMisc)) {
5478 XP_CACHE_ADD(cache->miscObjs, obj);
5524 * Cache is full; free the object.
6042 if (ctxt->cache != NULL)
6043 xmlXPathFreeCache((xmlXPathContextCachePtr) ctxt->cache);
13367 if (op->cache != NULL)
13368 XML_CAST_FPTR(func) = op->cache;
13393 op->cache = XML_CAST_FPTR(func);