Refactoring into Script::internalLoadCache()
Move some duplicate code from prepareRelocatable() and prepareExecutable()
into internalLoadCache().
Change-Id: I32b321ef789217f40f47c0a3783e4b232fdd16ee
diff --git a/lib/ExecutionEngine/Script.h b/lib/ExecutionEngine/Script.h
index 8f78683..70df516 100644
--- a/lib/ExecutionEngine/Script.h
+++ b/lib/ExecutionEngine/Script.h
@@ -220,7 +220,12 @@
private:
#if USE_CACHE
- int internalLoadCache(bool checkOnly);
+ //
+ // It returns 0 if there's a cache hit.
+ //
+ // Side effect: it will set mCacheDir, mCacheName and mObjectType.
+ int internalLoadCache(char const *cacheDir, char const *cacheName,
+ ScriptObject::ObjectType objectType, bool checkOnly);
#endif
int internalCompile(const CompilerOption&);