Initial port of the Dalvik JIT enging to the internal repository.
Fixed files with trailing spaces.
Addressed review comments from Dan.
Addressed review comments from fadden.
Addressed review comments from Dan x 2.
Addressed review comments from Dan x 3.
diff --git a/vm/mterp/out/InterpC-allstubs.c b/vm/mterp/out/InterpC-allstubs.c
index 420873e..0b70c9e 100644
--- a/vm/mterp/out/InterpC-allstubs.c
+++ b/vm/mterp/out/InterpC-allstubs.c
@@ -26,6 +26,7 @@
#include "interp/InterpDefs.h"
#include "mterp/Mterp.h"
#include <math.h> // needed for fmod, fmodf
+#include "mterp/common/FindInterface.h"
/*
* Configuration defines. These affect the C implementations, i.e. the
@@ -334,29 +335,21 @@
* If we're building without debug and profiling support, we never switch.
*/
#if defined(WITH_PROFILER) || defined(WITH_DEBUGGER)
+#if defined(WITH_JIT)
+# define NEED_INTERP_SWITCH(_current) ( \
+ (_current == INTERP_STD) ? \
+ dvmJitDebuggerOrProfilerActive(interpState->jitState) : \
+ !dvmJitDebuggerOrProfilerActive(interpState->jitState) )
+#else
# define NEED_INTERP_SWITCH(_current) ( \
(_current == INTERP_STD) ? \
dvmDebuggerOrProfilerActive() : !dvmDebuggerOrProfilerActive() )
+#endif
#else
# define NEED_INTERP_SWITCH(_current) (false)
#endif
/*
- * Look up an interface on a class using the cache.
- */
-INLINE Method* dvmFindInterfaceMethodInCache(ClassObject* thisClass,
- u4 methodIdx, const Method* method, DvmDex* methodClassDex)
-{
-#define ATOMIC_CACHE_CALC \
- dvmInterpFindInterfaceMethod(thisClass, methodIdx, method, methodClassDex)
-
- return (Method*) ATOMIC_CACHE_LOOKUP(methodClassDex->pInterfaceCache,
- DEX_INTERFACE_CACHE_SIZE, thisClass, methodIdx);
-
-#undef ATOMIC_CACHE_CALC
-}
-
-/*
* Check to see if "obj" is NULL. If so, throw an exception. Assumes the
* pc has already been exported to the stack.
*
@@ -420,7 +413,6 @@
return true;
}
-
/* File: cstubs/stubdefs.c */
/* this is a standard (no debug support) interpreter */
#define INTERP_TYPE INTERP_STD
@@ -3877,6 +3869,9 @@
#endif
newSaveArea->prevFrame = fp;
newSaveArea->savedPc = pc;
+#if defined(WITH_JIT)
+ newSaveArea->returnAddr = 0;
+#endif
newSaveArea->method = methodToCall;
if (!dvmIsNativeMethod(methodToCall)) {
@@ -3971,7 +3966,6 @@
assert(false); // should not get here
GOTO_TARGET_END
-
/* File: cstubs/enddefs.c */
/* undefine "magic" name remapping */