Mercurial > hg > truffle
comparison src/share/vm/interpreter/rewriter.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 | 389049f3f393 |
children | 760213a60e8b c18cbe5936b8 ab102d5d923e |
comparison
equal
deleted
inserted
replaced
1137:97125851f396 | 1138:dd57230ba8fe |
---|---|
245 } | 245 } |
246 | 246 |
247 | 247 |
248 void Rewriter::rewrite(instanceKlassHandle klass, TRAPS) { | 248 void Rewriter::rewrite(instanceKlassHandle klass, TRAPS) { |
249 ResourceMark rm(THREAD); | 249 ResourceMark rm(THREAD); |
250 Rewriter rw(klass, CHECK); | 250 Rewriter rw(klass, klass->constants(), klass->methods(), CHECK); |
251 // (That's all, folks.) | 251 // (That's all, folks.) |
252 } | 252 } |
253 | 253 |
254 Rewriter::Rewriter(instanceKlassHandle klass, TRAPS) | 254 |
255 void Rewriter::rewrite(instanceKlassHandle klass, constantPoolHandle cpool, objArrayHandle methods, TRAPS) { | |
256 ResourceMark rm(THREAD); | |
257 Rewriter rw(klass, cpool, methods, CHECK); | |
258 // (That's all, folks.) | |
259 } | |
260 | |
261 | |
262 Rewriter::Rewriter(instanceKlassHandle klass, constantPoolHandle cpool, objArrayHandle methods, TRAPS) | |
255 : _klass(klass), | 263 : _klass(klass), |
256 // gather starting points | 264 _pool(cpool), |
257 _pool( THREAD, klass->constants()), | 265 _methods(methods) |
258 _methods(THREAD, klass->methods()) | |
259 { | 266 { |
260 assert(_pool->cache() == NULL, "constant pool cache must not be set yet"); | 267 assert(_pool->cache() == NULL, "constant pool cache must not be set yet"); |
261 | 268 |
262 // determine index maps for methodOop rewriting | 269 // determine index maps for methodOop rewriting |
263 compute_index_maps(); | 270 compute_index_maps(); |