Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: jit.c 7575 2007-03-25 20:30:50Z twisti $
-
*/
#include "vm/types.h"
#include "mm/memory.h"
+
#include "native/native.h"
+
#include "toolbox/logging.h"
-#if defined(ENABLE_THREADS)
-# include "threads/native/lock.h"
-#else
-# include "threads/none/lock.h"
-#endif
+#include "threads/lock-common.h"
+#include "threads/threads-common.h"
#include "vm/global.h"
#include "vm/initialize.h"
# include "vm/jit/optimizing/ssa.h"
#endif
+#if defined(ENABLE_INLINING)
+# include "vm/jit/inline/inline.h"
+#endif
+
#include "vm/jit/loop/analyze.h"
#include "vm/jit/loop/graph.h"
#include "vm/jit/loop/loop.h"
#include "vm/jit/verify/typecheck.h"
-#if defined(ENABLE_THREADS)
-# include "threads/native/threads.h"
-#endif
-
#include "vmcore/class.h"
#include "vmcore/loader.h"
#include "vmcore/method.h"
DEBUG_JIT_COMPILEVERBOSE("Compiling: ");
+#if defined(ENABLE_DEBUG_FILTER)
+ show_filters_apply(jd->m);
+#endif
+
/* handle native methods and create a native stub */
if (m->flags & ACC_NATIVE) {
f = NULL;
#endif
- code = codegen_createnativestub(f, m);
+ code = codegen_generate_stub_native(m, f);
assert(!m->code); /* native methods are never recompiled */
m->code = code;
#endif /* defined(ENABLE_JIT) */
RT_TIMING_GET_TIME(time_alloc);
-#if defined(ENABLE_PROFLING)
+#if defined(ENABLE_PROFILING)
/* Allocate memory for basic block profiling information. This
_must_ be done after loop optimization and register allocation,
since they can change the basic block count. */
} else
# endif
{
- if (!codegen(jd)) {
+ if (!codegen_generate(jd)) {
DEBUG_JIT_COMPILEVERBOSE("Exception while generating code: ");
return NULL;
DEBUG_JIT_COMPILEVERBOSE("Generating code done: ");
#if !defined(NDEBUG)
- /* intermediate and assembly code listings */
+#if defined(ENABLE_DEBUG_FILTER)
+ if (jd->m->filtermatches & SHOW_FILTER_FLAG_SHOW_METHOD)
+#endif
+ {
+ /* intermediate and assembly code listings */
- if (JITDATA_HAS_FLAG_SHOWINTERMEDIATE(jd)) {
- show_method(jd, SHOW_CODE);
- }
- else if (JITDATA_HAS_FLAG_SHOWDISASSEMBLE(jd)) {
+ if (JITDATA_HAS_FLAG_SHOWINTERMEDIATE(jd)) {
+ show_method(jd, SHOW_CODE);
+ }
+ else if (JITDATA_HAS_FLAG_SHOWDISASSEMBLE(jd)) {
# if defined(ENABLE_DISASSEMBLER)
- DISASSEMBLE(code->entrypoint,
- code->entrypoint + (code->mcodelength - cd->dseglen));
+ DISASSEMBLE(code->entrypoint,
+ code->entrypoint + (code->mcodelength - cd->dseglen));
# endif
- }
+ }
- if (opt_showddatasegment)
- dseg_display(jd);
+ if (opt_showddatasegment)
+ dseg_display(jd);
+ }
#endif
DEBUG_JIT_COMPILEVERBOSE("Compiling done: ");