提交 77ac5c1b 编写于 作者: T twisti

8005818: Shark: fix OSR for non-empty incoming stack

Reviewed-by: twisti
Contributed-by: NRoman Kennke <rkennke@redhat.com>
上级 908e0bc9
......@@ -185,6 +185,9 @@ void SharkCompiler::compile_method(ciEnv* env,
// Build the LLVM IR for the method
Function *function = SharkFunction::build(env, &builder, flow, name);
if (env->failing()) {
return;
}
// Generate native code. It's unpleasant that we have to drop into
// the VM to do this -- it blocks safepoints -- but I can't see any
......
......@@ -77,6 +77,10 @@ void SharkFunction::initialize(const char *name) {
// Walk the tree from the start block to determine which
// blocks are entered and which blocks require phis
SharkTopLevelBlock *start_block = block(flow()->start_block_num());
if (is_osr() && start_block->stack_depth_at_entry() != 0) {
env()->record_method_not_compilable("can't compile OSR block with incoming stack-depth > 0");
return;
}
assert(start_block->start() == flow()->start_bci(), "blocks out of order");
start_block->enter();
......
......@@ -68,7 +68,7 @@ class SharkCompileInvariants : public ResourceObj {
//
// Accessing this directly is kind of ugly, so it's private. Add
// new accessors below if you need something from it.
private:
protected:
ciEnv* env() const {
assert(_env != NULL, "env not available");
return _env;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册