147 |
m_fnShRight = new CoreVMFunction_sh_right; |
m_fnShRight = new CoreVMFunction_sh_right; |
148 |
m_fnMin = new CoreVMFunction_min; |
m_fnMin = new CoreVMFunction_min; |
149 |
m_fnMax = new CoreVMFunction_max; |
m_fnMax = new CoreVMFunction_max; |
150 |
|
m_fnArrayEqual = new CoreVMFunction_array_equal; |
151 |
|
m_fnSearch = new CoreVMFunction_search; |
152 |
|
m_fnSort = new CoreVMFunction_sort; |
153 |
} |
} |
154 |
|
|
155 |
ScriptVM::~ScriptVM() { |
ScriptVM::~ScriptVM() { |
166 |
delete m_fnShRight; |
delete m_fnShRight; |
167 |
delete m_fnMin; |
delete m_fnMin; |
168 |
delete m_fnMax; |
delete m_fnMax; |
169 |
|
delete m_fnArrayEqual; |
170 |
|
delete m_fnSearch; |
171 |
|
delete m_fnSort; |
172 |
delete m_varRealTimer; |
delete m_varRealTimer; |
173 |
delete m_varPerfTimer; |
delete m_varPerfTimer; |
174 |
} |
} |
275 |
else if (name == "sh_right") return m_fnShRight; |
else if (name == "sh_right") return m_fnShRight; |
276 |
else if (name == "min") return m_fnMin; |
else if (name == "min") return m_fnMin; |
277 |
else if (name == "max") return m_fnMax; |
else if (name == "max") return m_fnMax; |
278 |
|
else if (name == "array_equal") return m_fnArrayEqual; |
279 |
|
else if (name == "search") return m_fnSearch; |
280 |
|
else if (name == "sort") return m_fnSort; |
281 |
return NULL; |
return NULL; |
282 |
} |
} |
283 |
|
|
353 |
m_parserContext->execContext = ctx; |
m_parserContext->execContext = ctx; |
354 |
|
|
355 |
ctx->status = VM_EXEC_RUNNING; |
ctx->status = VM_EXEC_RUNNING; |
356 |
|
ctx->instructionsCount = 0; |
357 |
StmtFlags_t flags = STMT_SUCCESS; |
StmtFlags_t flags = STMT_SUCCESS; |
358 |
int instructionsCounter = 0; |
int instructionsCounter = 0; |
359 |
|
|
462 |
ctx->reset(); |
ctx->reset(); |
463 |
} |
} |
464 |
|
|
465 |
|
ctx->instructionsCount = instructionsCounter; |
466 |
|
|
467 |
m_eventHandler = NULL; |
m_eventHandler = NULL; |
468 |
m_parserContext->execContext = NULL; |
m_parserContext->execContext = NULL; |
469 |
m_parserContext = NULL; |
m_parserContext = NULL; |