提交 0fbcc6a6 编写于 作者: D drchase

Merge

/* /*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -639,7 +639,6 @@ void MachCallNode::dump_spec(outputStream *st) const { ...@@ -639,7 +639,6 @@ void MachCallNode::dump_spec(outputStream *st) const {
} }
#endif #endif
bool MachCallNode::return_value_is_used() const { bool MachCallNode::return_value_is_used() const {
if (tf()->range()->cnt() == TypeFunc::Parms) { if (tf()->range()->cnt() == TypeFunc::Parms) {
// void return // void return
...@@ -657,6 +656,14 @@ bool MachCallNode::return_value_is_used() const { ...@@ -657,6 +656,14 @@ bool MachCallNode::return_value_is_used() const {
return false; return false;
} }
// Similar to cousin class CallNode::returns_pointer
// Because this is used in deoptimization, we want the type info, not the data
// flow info; the interpreter will "use" things that are dead to the optimizer.
bool MachCallNode::returns_pointer() const {
const TypeTuple *r = tf()->range();
return (r->cnt() > TypeFunc::Parms &&
r->field_at(TypeFunc::Parms)->isa_ptr());
}
//------------------------------Registers-------------------------------------- //------------------------------Registers--------------------------------------
const RegMask &MachCallNode::in_RegMask(uint idx) const { const RegMask &MachCallNode::in_RegMask(uint idx) const {
......
/* /*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -784,6 +784,10 @@ public: ...@@ -784,6 +784,10 @@ public:
bool returns_long() const { return tf()->return_type() == T_LONG; } bool returns_long() const { return tf()->return_type() == T_LONG; }
bool return_value_is_used() const; bool return_value_is_used() const;
// Similar to cousin class CallNode::returns_pointer
bool returns_pointer() const;
#ifndef PRODUCT #ifndef PRODUCT
virtual void dump_spec(outputStream *st) const; virtual void dump_spec(outputStream *st) const;
#endif #endif
......
/* /*
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -856,8 +856,7 @@ void Compile::Process_OopMap_Node(MachNode *mach, int current_offset) { ...@@ -856,8 +856,7 @@ void Compile::Process_OopMap_Node(MachNode *mach, int current_offset) {
} }
// Check if a call returns an object. // Check if a call returns an object.
if (mcall->return_value_is_used() && if (mcall->returns_pointer()) {
mcall->tf()->range()->field_at(TypeFunc::Parms)->isa_ptr()) {
return_oop = true; return_oop = true;
} }
safepoint_pc_offset += mcall->ret_addr_offset(); safepoint_pc_offset += mcall->ret_addr_offset();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册