1 |
/* |
/* |
2 |
* Copyright (c) 2014 Christian Schoenebeck |
* Copyright (c) 2014 - 2015 Christian Schoenebeck |
3 |
* |
* |
4 |
* http://www.linuxsampler.org |
* http://www.linuxsampler.org |
5 |
* |
* |
111 |
context->createScanner(is); |
context->createScanner(is); |
112 |
|
|
113 |
InstrScript_parse(context); |
InstrScript_parse(context); |
114 |
dmsg(2,("Allocating %d bytes of global int VM memory.\n", context->globalIntVarCount * sizeof(int))); |
dmsg(2,("Allocating %ld bytes of global int VM memory.\n", long(context->globalIntVarCount * sizeof(int)))); |
115 |
dmsg(2,("Allocating %d of global VM string variables.\n", context->globalStrVarCount)); |
dmsg(2,("Allocating %d of global VM string variables.\n", context->globalStrVarCount)); |
116 |
if (!context->globalIntMemory) |
if (!context->globalIntMemory) |
117 |
context->globalIntMemory = new ArrayList<int>(); |
context->globalIntMemory = new ArrayList<int>(); |
153 |
_requiredMaxStackSizeFor(&*parserCtx->handlers); |
_requiredMaxStackSizeFor(&*parserCtx->handlers); |
154 |
} |
} |
155 |
execCtx->stack.resize(parserCtx->requiredMaxStackSize); |
execCtx->stack.resize(parserCtx->requiredMaxStackSize); |
156 |
dmsg(2,("Created VM exec context with %d bytes VM stack size.\n", |
dmsg(2,("Created VM exec context with %ld bytes VM stack size.\n", |
157 |
parserCtx->requiredMaxStackSize * sizeof(ExecContext::StackFrame))); |
long(parserCtx->requiredMaxStackSize * sizeof(ExecContext::StackFrame)))); |
158 |
//printf("execCtx=0x%lx\n", (uint64_t)execCtx); |
//printf("execCtx=0x%lx\n", (uint64_t)execCtx); |
159 |
const int polySize = parserCtx->polyphonicIntVarCount; |
const int polySize = parserCtx->polyphonicIntVarCount; |
160 |
execCtx->polyphonicIntMemory.resize(polySize); |
execCtx->polyphonicIntMemory.resize(polySize); |
161 |
memset(&execCtx->polyphonicIntMemory[0], 0, polySize * sizeof(int)); |
memset(&execCtx->polyphonicIntMemory[0], 0, polySize * sizeof(int)); |
162 |
|
|
163 |
dmsg(2,("Allocated %d bytes polyphonic memory.\n", polySize * sizeof(int))); |
dmsg(2,("Allocated %ld bytes polyphonic memory.\n", long(polySize * sizeof(int)))); |
164 |
return execCtx; |
return execCtx; |
165 |
} |
} |
166 |
|
|