Encapsulate Script::compiler -> Script::mCompiler.
diff --git a/lib/bcc/bcc.cpp b/lib/bcc/bcc.cpp
index 97d53f3..7bd4633 100644
--- a/lib/bcc/bcc.cpp
+++ b/lib/bcc/bcc.cpp
@@ -75,7 +75,7 @@
extern "C" int bccReadModule(BCCscript *script, BCCvoid *module) {
BCC_FUNC_LOGGER();
- return script->compiler.readModule(reinterpret_cast<llvm::Module*>(module));
+ return script->readModule(reinterpret_cast<llvm::Module*>(module));
}
extern "C" int bccReadBC(BCCscript *script,
@@ -86,21 +86,21 @@
const BCCchar *resName,
const BCCchar *cacheDir) {
BCC_FUNC_LOGGER();
- return script->compiler.readBC(bitcode, bitcodeSize,
- bitcodeFileModTime, bitcodeFileCRC32,
- resName, cacheDir);
+ return script->readBC(bitcode, bitcodeSize,
+ bitcodeFileModTime, bitcodeFileCRC32,
+ resName, cacheDir);
}
extern "C" void bccLinkBC(BCCscript *script,
const BCCchar *bitcode,
BCCint size) {
BCC_FUNC_LOGGER();
- script->compiler.linkBC(bitcode, size);
+ script->linkBC(bitcode, size);
}
extern "C" int bccLoadBinary(BCCscript *script) {
BCC_FUNC_LOGGER();
- int result = script->compiler.loadCacheFile();
+ int result = script->loadCacheFile();
#if defined(USE_DISASSEMBLER_FILE)
LOGI("[LoadBinary] result=%d", result);
@@ -118,7 +118,7 @@
android::StopWatch compileTimer("RenderScript compile time");
#endif
- int result = script->compiler.compile();
+ int result = script->compile();
if (result)
script->setError(BCC_INVALID_OPERATION);
@@ -130,7 +130,7 @@
BCCsizei *length,
BCCchar *infoLog) {
BCC_FUNC_LOGGER();
- char const *message = script->compiler.getErrorMessage();
+ char const *message = script->getCompilerErrorMessage();
int messageLength = strlen(message) + 1;
if (length)
*length = messageLength;
@@ -149,7 +149,7 @@
const BCCchar *name,
BCCvoid **address) {
BCC_FUNC_LOGGER();
- void *value = script->compiler.lookup(name);
+ void *value = script->lookup(name);
if (value) {
*address = value;
#if defined(USE_DISASSEMBLER_FILE)
@@ -165,7 +165,7 @@
BCCsizei maxVarCount,
BCCvoid **vars) {
BCC_FUNC_LOGGER();
- script->compiler.getExportVars(actualVarCount, maxVarCount, vars);
+ script->getExportVars(actualVarCount, maxVarCount, vars);
#if defined(USE_DISASSEMBLER_FILE)
int i;
@@ -184,7 +184,7 @@
BCCsizei maxFuncCount,
BCCvoid **funcs) {
BCC_FUNC_LOGGER();
- script->compiler.getExportFuncs(actualFuncCount, maxFuncCount, funcs);
+ script->getExportFuncs(actualFuncCount, maxFuncCount, funcs);
#if defined(USE_DISASSEMBLER_FILE)
int i;
@@ -203,7 +203,7 @@
BCCsizei maxStringCount,
BCCchar **strings) {
BCC_FUNC_LOGGER();
- script->compiler.getPragmas(actualStringCount, maxStringCount, strings);
+ script->getPragmas(actualStringCount, maxStringCount, strings);
#if defined(USE_DISASSEMBLER_FILE)
int i;
@@ -219,7 +219,7 @@
BCCsizei maxFunctionCount,
BCCchar **functions) {
BCC_FUNC_LOGGER();
- script->compiler.getFunctions(actualFunctionCount,
+ script->getFunctions(actualFunctionCount,
maxFunctionCount,
functions);
}
@@ -229,5 +229,5 @@
BCCvoid **base,
BCCsizei *length) {
BCC_FUNC_LOGGER();
- script->compiler.getFunctionBinary(function, base, length);
+ script->getFunctionBinary(function, base, length);
}