340 const VMRegPair *regs);
341
342 // OSR support
343
344 // OSR_migration_begin will extract the jvm state from an interpreter
345 // frame (locals, monitors) and store the data in a piece of C heap
346 // storage. This then allows the interpreter frame to be removed from the
347 // stack and the OSR nmethod to be called. That method is called with a
348 // pointer to the C heap storage. This pointer is the return value from
349 // OSR_migration_begin.
350
351 static intptr_t* OSR_migration_begin( JavaThread *thread);
352
353 // OSR_migration_end is a trivial routine. It is called after the compiled
354 // method has extracted the jvm state from the C heap that OSR_migration_begin
355 // created. It's entire job is to simply free this storage.
356 static void OSR_migration_end ( intptr_t* buf);
357
358 // Convert a sig into a calling convention register layout
359 // and find interesting things about it.
360 static VMRegPair* find_callee_arguments(symbolOop sig, bool is_static, int *arg_size);
361 static VMReg name_for_receiver();
362
363 // "Top of Stack" slots that may be unused by the calling convention but must
364 // otherwise be preserved.
365 // On Intel these are not necessary and the value can be zero.
366 // On Sparc this describes the words reserved for storing a register window
367 // when an interrupt occurs.
368 static uint out_preserve_stack_slots();
369
370 // Save and restore a native result
371 static void save_native_result(MacroAssembler *_masm, BasicType ret_type, int frame_slots );
372 static void restore_native_result(MacroAssembler *_masm, BasicType ret_type, int frame_slots );
373
374 // Generate a native wrapper for a given method. The method takes arguments
375 // in the Java compiled code convention, marshals them to the native
376 // convention (handlizes oops, etc), transitions to native, makes the call,
377 // returns to java state (possibly blocking), unhandlizes any result and
378 // returns.
379 static nmethod *generate_native_wrapper(MacroAssembler* masm,
380 methodHandle method,
|
340 const VMRegPair *regs);
341
342 // OSR support
343
344 // OSR_migration_begin will extract the jvm state from an interpreter
345 // frame (locals, monitors) and store the data in a piece of C heap
346 // storage. This then allows the interpreter frame to be removed from the
347 // stack and the OSR nmethod to be called. That method is called with a
348 // pointer to the C heap storage. This pointer is the return value from
349 // OSR_migration_begin.
350
351 static intptr_t* OSR_migration_begin( JavaThread *thread);
352
353 // OSR_migration_end is a trivial routine. It is called after the compiled
354 // method has extracted the jvm state from the C heap that OSR_migration_begin
355 // created. It's entire job is to simply free this storage.
356 static void OSR_migration_end ( intptr_t* buf);
357
358 // Convert a sig into a calling convention register layout
359 // and find interesting things about it.
360 static VMRegPair* find_callee_arguments(symbolOop sig, bool has_receiver, int *arg_size);
361 static VMReg name_for_receiver();
362
363 // "Top of Stack" slots that may be unused by the calling convention but must
364 // otherwise be preserved.
365 // On Intel these are not necessary and the value can be zero.
366 // On Sparc this describes the words reserved for storing a register window
367 // when an interrupt occurs.
368 static uint out_preserve_stack_slots();
369
370 // Save and restore a native result
371 static void save_native_result(MacroAssembler *_masm, BasicType ret_type, int frame_slots );
372 static void restore_native_result(MacroAssembler *_masm, BasicType ret_type, int frame_slots );
373
374 // Generate a native wrapper for a given method. The method takes arguments
375 // in the Java compiled code convention, marshals them to the native
376 // convention (handlizes oops, etc), transitions to native, makes the call,
377 // returns to java state (possibly blocking), unhandlizes any result and
378 // returns.
379 static nmethod *generate_native_wrapper(MacroAssembler* masm,
380 methodHandle method,
|