diff options
author | Ben Cheng <bccheng@android.com> | 2009-06-01 13:00:29 -0700 |
---|---|---|
committer | Ben Cheng <bccheng@android.com> | 2009-06-04 12:46:11 -0700 |
commit | ba4fc8bfc1bccae048403bd1cea3b869dca61dd7 (patch) | |
tree | 3c05c1988501fd8a22ae73e02742ab291b2ff333 /vm/mterp/out/InterpC-allstubs.c | |
parent | b38914129f30aa696726717db6484735ad7fe234 (diff) | |
download | android_dalvik-ba4fc8bfc1bccae048403bd1cea3b869dca61dd7.tar.gz android_dalvik-ba4fc8bfc1bccae048403bd1cea3b869dca61dd7.tar.bz2 android_dalvik-ba4fc8bfc1bccae048403bd1cea3b869dca61dd7.zip |
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.
Diffstat (limited to 'vm/mterp/out/InterpC-allstubs.c')
-rw-r--r-- | vm/mterp/out/InterpC-allstubs.c | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/vm/mterp/out/InterpC-allstubs.c b/vm/mterp/out/InterpC-allstubs.c index 420873e1c..0b70c9ef6 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 @@ static inline void putDoubleToArray(u4* ptr, int idx, double dval) * 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 @@ static inline bool checkForNullExportPC(Object* obj, u4* fp, const u2* pc) return true; } - /* File: cstubs/stubdefs.c */ /* this is a standard (no debug support) interpreter */ #define INTERP_TYPE INTERP_STD @@ -3877,6 +3869,9 @@ GOTO_TARGET(invokeMethod, bool methodCallRange, const Method* _methodToCall, #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 @@ GOTO_TARGET(invokeMethod, bool methodCallRange, const Method* _methodToCall, assert(false); // should not get here GOTO_TARGET_END - /* File: cstubs/enddefs.c */ /* undefine "magic" name remapping */ |