Mercurial > hg > graal-compiler
changeset 1278:da9559b49b84
6915557: assert(_gvn.type(l)->higher_equal(type),"must constrain OSR typestate") with debug build
Reviewed-by: kvn
author | never |
---|---|
date | Thu, 25 Feb 2010 11:38:50 -0800 |
parents | 855c5171834c |
children | 2432acbee618 |
files | src/share/vm/opto/parse1.cpp |
diffstat | 1 files changed, 14 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/vm/opto/parse1.cpp Tue Feb 23 17:46:29 2010 +0100 +++ b/src/share/vm/opto/parse1.cpp Thu Feb 25 11:38:50 2010 -0800 @@ -1,5 +1,5 @@ /* - * Copyright 1997-2009 Sun Microsystems, Inc. All Rights Reserved. + * Copyright 1997-2010 Sun Microsystems, Inc. All Rights Reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -237,7 +237,6 @@ C->record_method_not_compilable("OSR in empty or breakpointed method"); return; } - MethodLivenessResult raw_live_locals = method()->raw_liveness_at_bci(osr_bci()); // Extract the needed locals from the interpreter frame. Node *locals_addr = basic_plus_adr(osr_buf, osr_buf, (max_locals-1)*wordSize); @@ -306,6 +305,7 @@ SafePointNode* bad_type_exit = clone_map(); bad_type_exit->set_control(new (C, 1) RegionNode(1)); + assert(osr_block->flow()->jsrs()->size() == 0, "should be no jsrs live at osr point"); for (index = 0; index < max_locals; index++) { if (stopped()) break; Node* l = local(index); @@ -317,8 +317,18 @@ continue; } } - if (type->basic_type() == T_ADDRESS && !raw_live_locals.at(index)) { - // Skip type check for dead address locals + if (type->basic_type() == T_ADDRESS) { + // In our current system it's illegal for jsr addresses to be + // live into an OSR entry point because the compiler performs + // inlining of jsrs. ciTypeFlow has a bailout that detect this + // case and aborts the compile if addresses are live into an OSR + // entry point. Because of that we can assume that any address + // locals at the OSR entry point are dead. Method liveness + // isn't precise enought to figure out that they are dead in all + // cases so simply skip checking address locals all + // together. Any type check is guaranteed to fail since the + // interpreter type is the result of a load which might have any + // value and the expected type is a constant. continue; } set_local(index, check_interpreter_type(l, type, bad_type_exit));