diff options
| author | 2010-06-15 12:15:57 -0700 | |
|---|---|---|
| committer | 2010-06-15 12:15:57 -0700 | |
| commit | 96ed4cfa62dd09aafb3f9da01e047661b4fe3c95 (patch) | |
| tree | fdf2cc680ff2af9a4e9e9052200dea65cfac7cd9 /libs/rs/rsScriptC.cpp | |
| parent | 56985cea7759fa1e72085ec851fafa2d9a450dd7 (diff) | |
Remove InvokeData and add ContextFinish to generate a sync point.
Change-Id: I27da8bf5fba2c8a428964cb6a5e66dd7a94958d8
Diffstat (limited to 'libs/rs/rsScriptC.cpp')
| -rw-r--r-- | libs/rs/rsScriptC.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/libs/rs/rsScriptC.cpp b/libs/rs/rsScriptC.cpp index ef372860a9e6..975b7045cf33 100644 --- a/libs/rs/rsScriptC.cpp +++ b/libs/rs/rsScriptC.cpp @@ -260,16 +260,24 @@ void ScriptCState::runCompiler(Context *rsc, ScriptC *s) s->mProgram.mInit(); } - s->mEnviroment.mInvokeFunctions = (Script::InvokeFunc_t *)calloc(100, sizeof(void *)); - BCCchar **labels = new char*[100]; - bccGetFunctions(s->mBccScript, (BCCsizei *)&s->mEnviroment.mInvokeFunctionCount, - 100, (BCCchar **)labels); + bccGetExportFuncs(s->mBccScript, (BCCsizei*) &s->mEnviroment.mInvokeFunctionCount, 0, NULL); + if(s->mEnviroment.mInvokeFunctionCount <= 0) + s->mEnviroment.mInvokeFunctions = NULL; + else { + s->mEnviroment.mInvokeFunctions = (Script::InvokeFunc_t*) calloc(s->mEnviroment.mInvokeFunctionCount, sizeof(Script::InvokeFunc_t)); + bccGetExportFuncs(s->mBccScript, NULL, s->mEnviroment.mInvokeFunctionCount, (BCCvoid **) s->mEnviroment.mInvokeFunctions); + } + +// s->mEnviroment.mInvokeFunctions = (Script::InvokeFunc_t *)calloc(100, sizeof(void *)); +// BCCchar **labels = new char*[100]; +// bccGetFunctions(s->mBccScript, (BCCsizei *)&s->mEnviroment.mInvokeFunctionCount, +// 100, (BCCchar **)labels); //LOGE("func count %i", s->mEnviroment.mInvokeFunctionCount); - for (uint32_t i=0; i < s->mEnviroment.mInvokeFunctionCount; i++) { - BCCsizei length; - bccGetFunctionBinary(s->mBccScript, labels[i], (BCCvoid **)&(s->mEnviroment.mInvokeFunctions[i]), &length); +// for (uint32_t i=0; i < s->mEnviroment.mInvokeFunctionCount; i++) { +// BCCsizei length; +// bccGetFunctionBinary(s->mBccScript, labels[i], (BCCvoid **)&(s->mEnviroment.mInvokeFunctions[i]), &length); //LOGE("func %i %p", i, s->mEnviroment.mInvokeFunctions[i]); - } + // } s->mEnviroment.mFieldAddress = (void **)calloc(100, sizeof(void *)); bccGetExportVars(s->mBccScript, (BCCsizei *)&s->mEnviroment.mFieldCount, |