/usr/lib/kaya/FnCache.h is in kaya 0.4.4-6ubuntu3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | #ifndef _FNCACHE_H // -*-C++-*-
#define _FNCACHE_H
class Value;
class VMState;
// Cache for pure function results. Currently only handles nullary
// functions (so handy for complicated constant functions, for example).
// HOWEVER: I'm not sure this is actually valid in general... so it remains
// unimplemented for the moment. Consider, for example, the pure function
// which creates a structure, but then that structure gets modified, thus
// invalidating the cache. Curse these mutable structures!
class FnCache {
public:
FnCache(VMState* vm);
void addEntry(Value* result);
void addEntry(Value* arg1, Value* result);
Value* checkCache(int args);
private:
VMState* m_vm;
Value** m_cache;
Value** m_cacheptr;
Value** m_cacheend;
};
#endif
|