comparison src/share/vm/code/codeBlob.hpp @ 6266:1d7922586cf6

7023639: JSR 292 method handle invocation needs a fast path for compiled code 6984705: JSR 292 method handle creation should not go through JNI Summary: remove assembly code for JDK 7 chained method handles Reviewed-by: jrose, twisti, kvn, mhaupt Contributed-by: John Rose <john.r.rose@oracle.com>, Christian Thalinger <christian.thalinger@oracle.com>, Michael Haupt <michael.haupt@oracle.com>
author twisti
date Tue, 24 Jul 2012 10:51:00 -0700
parents 167b70ff3abc
children 957c266d8bc5 da91efe96a93
comparison
equal deleted inserted replaced
6241:aba91a731143 6266:1d7922586cf6
33 // CodeBlob - superclass for all entries in the CodeCache. 33 // CodeBlob - superclass for all entries in the CodeCache.
34 // 34 //
35 // Suptypes are: 35 // Suptypes are:
36 // nmethod : Compiled Java methods (include method that calls to native code) 36 // nmethod : Compiled Java methods (include method that calls to native code)
37 // RuntimeStub : Call to VM runtime methods 37 // RuntimeStub : Call to VM runtime methods
38 // RicochetBlob : Used for blocking MethodHandle adapters
39 // DeoptimizationBlob : Used for deoptimizatation 38 // DeoptimizationBlob : Used for deoptimizatation
40 // ExceptionBlob : Used for stack unrolling 39 // ExceptionBlob : Used for stack unrolling
41 // SafepointBlob : Used to handle illegal instruction exceptions 40 // SafepointBlob : Used to handle illegal instruction exceptions
42 // 41 //
43 // 42 //
97 96
98 // Typing 97 // Typing
99 virtual bool is_buffer_blob() const { return false; } 98 virtual bool is_buffer_blob() const { return false; }
100 virtual bool is_nmethod() const { return false; } 99 virtual bool is_nmethod() const { return false; }
101 virtual bool is_runtime_stub() const { return false; } 100 virtual bool is_runtime_stub() const { return false; }
102 virtual bool is_ricochet_stub() const { return false; }
103 virtual bool is_deoptimization_stub() const { return false; } 101 virtual bool is_deoptimization_stub() const { return false; }
104 virtual bool is_uncommon_trap_stub() const { return false; } 102 virtual bool is_uncommon_trap_stub() const { return false; }
105 virtual bool is_exception_stub() const { return false; } 103 virtual bool is_exception_stub() const { return false; }
106 virtual bool is_safepoint_stub() const { return false; } 104 virtual bool is_safepoint_stub() const { return false; }
107 virtual bool is_adapter_blob() const { return false; } 105 virtual bool is_adapter_blob() const { return false; }
348 void print_value_on(outputStream* st) const; 346 void print_value_on(outputStream* st) const;
349 }; 347 };
350 348
351 349
352 //---------------------------------------------------------------------------------------------------- 350 //----------------------------------------------------------------------------------------------------
353 // RicochetBlob
354 // Holds an arbitrary argument list indefinitely while Java code executes recursively.
355
356 class RicochetBlob: public SingletonBlob {
357 friend class VMStructs;
358 private:
359
360 int _bounce_offset;
361 int _exception_offset;
362
363 // Creation support
364 RicochetBlob(
365 CodeBuffer* cb,
366 int size,
367 int bounce_offset,
368 int exception_offset,
369 int frame_size
370 );
371
372 public:
373 // Creation
374 static RicochetBlob* create(
375 CodeBuffer* cb,
376 int bounce_offset,
377 int exception_offset,
378 int frame_size
379 );
380
381 // Typing
382 bool is_ricochet_stub() const { return true; }
383
384 // GC for args
385 void preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) { /* Nothing to do */ }
386
387 address bounce_addr() const { return code_begin() + _bounce_offset; }
388 address exception_addr() const { return code_begin() + _exception_offset; }
389 bool returns_to_bounce_addr(address pc) const {
390 address bounce_pc = bounce_addr();
391 return (pc == bounce_pc || (pc + frame::pc_return_offset) == bounce_pc);
392 }
393 };
394
395
396 //----------------------------------------------------------------------------------------------------
397 // DeoptimizationBlob 351 // DeoptimizationBlob
398 352
399 class DeoptimizationBlob: public SingletonBlob { 353 class DeoptimizationBlob: public SingletonBlob {
400 friend class VMStructs; 354 friend class VMStructs;
401 private: 355 private: