I'm using V8's code cache as exposed by vm in https://github.com/zertosh/v8-compile-cache, but I'm hitting cache versioning issues. I'd like know with certainty that a particular cache generated by one machine is compatible with another. ScriptCompiler::CachedDataVersionTag can let you do that (
|
/** |
|
* Return a version tag for CachedData for the current V8 version & flags. |
|
* |
|
* This value is meant only for determining whether a previously generated |
|
* CachedData instance is still valid; the tag has no other meaing. |
|
* |
|
* Background: The data carried by CachedData may depend on the exact |
|
* V8 version number or currently compiler flags. This means when |
|
* persisting CachedData, the embedder must take care to not pass in |
|
* data from another V8 version, or the same version with different |
|
* features enabled. |
|
* |
|
* The easiest way to do so is to clear the embedder's cache on any |
|
* such change. |
|
* |
|
* Alternatively, this tag can be stored alongside the cached data and |
|
* compared when it is being used. |
|
*/ |
|
static uint32_t CachedDataVersionTag(); |
).
I'd like to submit a PR exposing that data somewhere. Maybe expose it as a function on the vm module, or a static function on the Script constructor. Any ideas? Preferences?
I'm using V8's code cache as exposed by
vmin https://github.com/zertosh/v8-compile-cache, but I'm hitting cache versioning issues. I'd like know with certainty that a particular cache generated by one machine is compatible with another.ScriptCompiler::CachedDataVersionTagcan let you do that (node/deps/v8/include/v8.h
Lines 1379 to 1397 in ca48071
I'd like to submit a PR exposing that data somewhere. Maybe expose it as a function on the
vmmodule, or a static function on theScriptconstructor. Any ideas? Preferences?