X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Fvm%2Fjit%2Fparse.cpp;h=caee0955745fdab5bb1f53578e5822865eb86813;hb=4e25f6be9878154a9a7ae28917ed34427cb8ca6a;hp=63a15bb8960880051544123019bd3abda7a0e836;hpb=adb235ae1e53d15c6f71602049b2879451920c67;p=cacao.git diff --git a/src/vm/jit/parse.cpp b/src/vm/jit/parse.cpp index 63a15bb89..caee09557 100644 --- a/src/vm/jit/parse.cpp +++ b/src/vm/jit/parse.cpp @@ -1,6 +1,6 @@ /* src/vm/jit/parse.c - parser for JavaVM to intermediate code translation - Copyright (C) 1996-2005, 2006, 2007, 2008 + Copyright (C) 1996-2011 CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO This file is part of CACAO. @@ -30,13 +30,13 @@ #include "vm/types.h" -#include "mm/memory.h" +#include "mm/memory.hpp" #include "native/native.hpp" #include "threads/lock.hpp" -#include "toolbox/logging.h" +#include "toolbox/logging.hpp" #include "vm/jit/builtin.hpp" #include "vm/exceptions.hpp" @@ -534,6 +534,17 @@ fetch_opcode: s_count += bytecode[opcode].slots; + /* Generate a breakpoint instruction right before the actual + instruction, if the method contains a breakpoint at the + current bytecode index. */ + + if (m->breakpoints != NULL && m->breakpoints->contains(bcindex)) { + INSTRUCTIONS_CHECK(1); + OP_PREPARE_ZEROFLAGS(ICMD_BREAKPOINT); + iptr->sx.val.anyptr = m->breakpoints->get_breakpoint(bcindex); + PINC; + } + /* We check here for the space of 1 instruction in the instruction array. If an opcode is converted to more than 1 instruction, this is checked in the corresponding @@ -1209,9 +1220,7 @@ jsr_tail: md = fmi->parseddesc.md; - if (md->params == NULL) - if (!descriptor_params_from_paramtypes(md, ACC_STATIC)) - return false; + descriptor_params_from_paramtypes(md, ACC_STATIC); goto invoke_method; @@ -1243,9 +1252,7 @@ invoke_nonstatic_method: md = fmi->parseddesc.md; - if (md->params == NULL) - if (!descriptor_params_from_paramtypes(md, 0)) - return false; + descriptor_params_from_paramtypes(md, 0); invoke_method: code_unflag_leafmethod(code); @@ -1283,9 +1290,6 @@ invoke_method: (opcode == BC_invokestatic), (opcode == BC_invokespecial)); - if (um == NULL) - return false; - /* store the unresolved_method pointer */ iptr->sx.s23.s3.um = um;