summaryrefslogtreecommitdiffstats
path: root/vm/compiler/Utility.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm/compiler/Utility.c')
-rw-r--r--vm/compiler/Utility.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/vm/compiler/Utility.c b/vm/compiler/Utility.c
index 26bb3d082..83caab745 100644
--- a/vm/compiler/Utility.c
+++ b/vm/compiler/Utility.c
@@ -66,11 +66,7 @@ retry:
* could go above the limit we need to enhance the allocation
* mechanism.
*/
- if (size > ARENA_DEFAULT_SIZE) {
- LOGE("Requesting %d bytes which exceed the maximal size allowed\n",
- size);
- dvmAbort();
- }
+ assert(size <= ARENA_DEFAULT_SIZE);
/* Time to allocate a new arena */
ArenaMemBlock *newArena = (ArenaMemBlock *)
malloc(sizeof(ArenaMemBlock) + ARENA_DEFAULT_SIZE);
@@ -281,3 +277,15 @@ void dvmDebugBitVector(char *msg, const BitVector *bv, int length)
}
}
}
+
+void dvmCompilerAbort(CompilationUnit *cUnit)
+{
+ LOGE("Jit: aborting trace compilation, reverting to interpreter");
+ /* Force a traceback in debug builds */
+ assert(0);
+ /*
+ * Abort translation and force to interpret-only for this trace
+ * Matching setjmp in compiler thread work loop in Compiler.c.
+ */
+ longjmp(*cUnit->bailPtr, 1);
+}