7023639: JSR 292 method handle invocation needs a fast path for compiled code

6984705: JSR 292 method handle creation should not go through JNI

Remove assembly code for JDK 7 chained method handles

Co-authored-by: John Rose <john.r.rose@oracle.com>
Co-authored-by: Michael Haupt <michael.haupt@oracle.com>
Reviewed-by: jrose, twisti, kvn, mhaupt
This commit is contained in:
Christian Thalinger 2012-07-24 10:51:00 -07:00
parent 893817c28d
commit 12901d0e5b
181 changed files with 5760 additions and 14402 deletions

View file

@ -170,11 +170,9 @@ void frame::set_pc(address newpc ) {
}
// type testers
bool frame::is_ricochet_frame() const {
RicochetBlob* rcb = SharedRuntime::ricochet_blob();
return (_cb == rcb && rcb != NULL && rcb->returns_to_bounce_addr(_pc));
bool frame::is_ignored_frame() const {
return false; // FIXME: some LambdaForm frames should be ignored
}
bool frame::is_deoptimized_frame() const {
assert(_deopt_state != unknown, "not answerable");
return _deopt_state == is_deoptimized;
@ -348,17 +346,12 @@ frame frame::java_sender() const {
frame frame::real_sender(RegisterMap* map) const {
frame result = sender(map);
while (result.is_runtime_frame() ||
result.is_ricochet_frame()) {
result.is_ignored_frame()) {
result = result.sender(map);
}
return result;
}
frame frame::sender_for_ricochet_frame(RegisterMap* map) const {
assert(is_ricochet_frame(), "");
return MethodHandles::ricochet_frame_sender(*this, map);
}
// Note: called by profiler - NOT for current thread
frame frame::profile_find_Java_sender_frame(JavaThread *thread) {
// If we don't recognize this frame, walk back up the stack until we do
@ -541,7 +534,6 @@ jint frame::interpreter_frame_expression_stack_size() const {
const char* frame::print_name() const {
if (is_native_frame()) return "Native";
if (is_interpreted_frame()) return "Interpreted";
if (is_ricochet_frame()) return "Ricochet";
if (is_compiled_frame()) {
if (is_deoptimized_frame()) return "Deoptimized";
return "Compiled";
@ -728,8 +720,6 @@ void frame::print_on_error(outputStream* st, char* buf, int buflen, bool verbose
st->print("v ~RuntimeStub::%s", ((RuntimeStub *)_cb)->name());
} else if (_cb->is_deoptimization_stub()) {
st->print("v ~DeoptimizationBlob");
} else if (_cb->is_ricochet_stub()) {
st->print("v ~RichochetBlob");
} else if (_cb->is_exception_stub()) {
st->print("v ~ExceptionBlob");
} else if (_cb->is_safepoint_stub()) {
@ -993,9 +983,6 @@ void frame::oops_interpreted_arguments_do(Symbol* signature, bool has_receiver,
void frame::oops_code_blob_do(OopClosure* f, CodeBlobClosure* cf, const RegisterMap* reg_map) {
assert(_cb != NULL, "sanity check");
if (_cb == SharedRuntime::ricochet_blob()) {
oops_ricochet_do(f, reg_map);
}
if (_cb->oop_maps() != NULL) {
OopMapSet::oops_do(this, reg_map, f);
@ -1014,11 +1001,6 @@ void frame::oops_code_blob_do(OopClosure* f, CodeBlobClosure* cf, const Register
cf->do_code_blob(_cb);
}
void frame::oops_ricochet_do(OopClosure* f, const RegisterMap* map) {
assert(is_ricochet_frame(), "");
MethodHandles::ricochet_frame_oops_do(*this, f, map);
}
class CompiledArgumentOopFinder: public SignatureInfo {
protected:
OopClosure* _f;
@ -1087,7 +1069,7 @@ oop frame::retrieve_receiver(RegisterMap* reg_map) {
// First consult the ADLC on where it puts parameter 0 for this signature.
VMReg reg = SharedRuntime::name_for_receiver();
oop r = *caller.oopmapreg_to_location(reg, reg_map);
assert( Universe::heap()->is_in_or_null(r), "bad receiver" );
assert(Universe::heap()->is_in_or_null(r), err_msg("bad receiver: " INTPTR_FORMAT " (" INTX_FORMAT ")", (intptr_t) r, (intptr_t) r));
return r;
}
@ -1407,8 +1389,6 @@ void frame::describe(FrameValues& values, int frame_no) {
values.describe(-1, info_address,
FormatBuffer<1024>("#%d nmethod " INTPTR_FORMAT " for native method %s", frame_no,
nm, nm->method()->name_and_sig_as_C_string()), 2);
} else if (is_ricochet_frame()) {
values.describe(-1, info_address, err_msg("#%d ricochet frame", frame_no), 2);
} else {
// provide default info if not handled before
char *info = (char *) "special frame";