Request for reviews (XXL): 6893268: additional dynamic language related optimizations in C2
Christian Thalinger
Christian.Thalinger at Sun.COM
Thu Dec 3 03:16:52 PST 2009
On Wed, 2009-12-02 at 15:19 -0800, Tom Rodriguez wrote:
> doCall.cpp:
>
> + if (n->is_Con()) {
> + assert(n->Opcode() == Op_ConP, "sanity");
> + ConPNode* con = (ConPNode*) n; // XXX Is there another way?
> + const Type* t = con->type();
> + const TypeOopPtr* oop_ptr = t->isa_oopptr();
>
> You could also write this as:
>
> if (n->Opcode() == Op_ConP) {
> const TypeOopPtr* oop_ptr = n->bottom_type()->is_oopptr();
>
> is_Con() would return true for top if that somehow managed to sneak in there.
Ahh, OK. Thanks for that.
> what this about?
>
> + // XXX The returned direct call to target_method is not a MH
> + // invoke and does not work.
> + //if (hit_cg != NULL)
> + if (hit_cg != NULL && hit_cg->is_inline())
> + return hit_cg;
>
> could the commented piece simply be deleted or is there some lingering question here?
In the beginning I hoped that I can use the returned CallGenerator, even
if it's not an inlined one, because it would be a direct call to the
generated adapters. But I think this would not work anyway. I will
remove that comment.
> otherwise this looks good.
Here is the updated webrev:
http://cr.openjdk.java.net/~twisti/6893268/webrev.03/
-- Christian
More information about the hotspot-compiler-dev
mailing list