[JAEGER] Re-added script->nmap creation.

This commit is contained in:
David Anderson
2010-06-02 02:09:17 -07:00
parent fcc22c9ffd
commit f6ec296cd3
2 changed files with 19 additions and 0 deletions

View File

@@ -205,6 +205,21 @@ mjit::Compiler::finishThisUp()
memcpy(result, masm.buffer(), masm.size());
memcpy(result + masm.size(), stubcc.buffer(), stubcc.size());
/* Build the pc -> ncode mapping. */
void **nmap = (void **)cx->calloc(sizeof(void *) * script->length);
if (!nmap) {
execPool->release();
return Compile_Error;
}
for (size_t i = 0; i < script->length; i++) {
Label L = jumpMap[i];
if (analysis[i].safePoint) {
JS_ASSERT(L.isValid());
nmap[i] = (uint8 *)(result + masm.distanceOf(L));
}
}
/* Link fast and slow paths together. */
stubcc.fixCrossJumps(result, masm.size(), masm.size() + stubcc.size());