Mercurial > hg > truffle
diff src/share/vm/ci/ciObjectFactory.cpp @ 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 | 4ce7240d622c |
line wrap: on
line diff
--- a/src/share/vm/ci/ciObjectFactory.cpp Tue Jan 05 13:05:58 2010 +0100 +++ b/src/share/vm/ci/ciObjectFactory.cpp Tue Jan 05 15:21:25 2010 +0100 @@ -337,7 +337,12 @@ return new (arena()) ciMethodData(h_md); } else if (o->is_instance()) { instanceHandle h_i(THREAD, (instanceOop)o); - return new (arena()) ciInstance(h_i); + if (java_dyn_CallSite::is_instance(o)) + return new (arena()) ciCallSite(h_i); + else if (java_dyn_MethodHandle::is_instance(o)) + return new (arena()) ciMethodHandle(h_i); + else + return new (arena()) ciInstance(h_i); } else if (o->is_objArray()) { objArrayHandle h_oa(THREAD, (objArrayOop)o); return new (arena()) ciObjArray(h_oa);