Mercurial > hg > graal-jvmci-8
diff src/share/vm/ci/ciObject.hpp @ 1138:dd57230ba8fe
6893268: additional dynamic language related optimizations in C2
Summary: C2 needs some additional optimizations to be able to handle MethodHandle invokes and invokedynamic instructions at the best performance.
Reviewed-by: kvn, never
author | twisti |
---|---|
date | Tue, 05 Jan 2010 15:21:25 +0100 |
parents | 97125851f396 |
children | 35069ca331f2 c18cbe5936b8 |
line wrap: on
line diff
--- a/src/share/vm/ci/ciObject.hpp Tue Jan 05 13:05:58 2010 +0100 +++ b/src/share/vm/ci/ciObject.hpp Tue Jan 05 15:21:25 2010 +0100 @@ -131,10 +131,12 @@ // What kind of ciObject is this? virtual bool is_null_object() const { return false; } + virtual bool is_call_site() const { return false; } virtual bool is_cpcache() const { return false; } virtual bool is_instance() { return false; } virtual bool is_method() { return false; } virtual bool is_method_data() { return false; } + virtual bool is_method_handle() const { return false; } virtual bool is_array() { return false; } virtual bool is_obj_array() { return false; } virtual bool is_type_array() { return false; } @@ -186,6 +188,10 @@ assert(is_null_object(), "bad cast"); return (ciNullObject*)this; } + ciCallSite* as_call_site() { + assert(is_call_site(), "bad cast"); + return (ciCallSite*) this; + } ciCPCache* as_cpcache() { assert(is_cpcache(), "bad cast"); return (ciCPCache*) this; @@ -202,6 +208,10 @@ assert(is_method_data(), "bad cast"); return (ciMethodData*)this; } + ciMethodHandle* as_method_handle() { + assert(is_method_handle(), "bad cast"); + return (ciMethodHandle*) this; + } ciArray* as_array() { assert(is_array(), "bad cast"); return (ciArray*)this;