Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/sharedRuntime.hpp @ 14318:1020b892787b
Merge
author | hseigel |
---|---|
date | Sun, 02 Feb 2014 15:31:40 -0500 |
parents | 63a4eb8bcd23 |
children | 8a9bb7821e28 |
comparison
equal
deleted
inserted
replaced
14317:b59507f713e0 | 14318:1020b892787b |
---|---|
380 | 380 |
381 // Although a c2i blob will always run interpreted even if compiled code is | 381 // Although a c2i blob will always run interpreted even if compiled code is |
382 // present if we see that compiled code is present the compiled call site | 382 // present if we see that compiled code is present the compiled call site |
383 // will be patched/re-resolved so that later calls will run compiled. | 383 // will be patched/re-resolved so that later calls will run compiled. |
384 | 384 |
385 // Aditionally a c2i blob need to have a unverified entry because it can be reached | 385 // Additionally a c2i blob need to have a unverified entry because it can be reached |
386 // in situations where the call site is an inlined cache site and may go megamorphic. | 386 // in situations where the call site is an inlined cache site and may go megamorphic. |
387 | 387 |
388 // A i2c adapter is simpler than the c2i adapter. This is because it is assumed | 388 // A i2c adapter is simpler than the c2i adapter. This is because it is assumed |
389 // that the interpreter before it does any call dispatch will record the current | 389 // that the interpreter before it does any call dispatch will record the current |
390 // stack pointer in the interpreter frame. On return it will restore the stack | 390 // stack pointer in the interpreter frame. On return it will restore the stack |
574 // | 574 // |
575 // The I2C flavor takes a stock interpreted call setup, marshals the | 575 // The I2C flavor takes a stock interpreted call setup, marshals the |
576 // arguments for a Java-compiled call, and jumps to Rmethod-> code()-> | 576 // arguments for a Java-compiled call, and jumps to Rmethod-> code()-> |
577 // code_begin(). It is broken to call it without an nmethod assigned. | 577 // code_begin(). It is broken to call it without an nmethod assigned. |
578 // The usual behavior is to lift any register arguments up out of the | 578 // The usual behavior is to lift any register arguments up out of the |
579 // stack and possibly re-pack the extra arguments to be contigious. | 579 // stack and possibly re-pack the extra arguments to be contiguous. |
580 // I2C adapters will save what the interpreter's stack pointer will be | 580 // I2C adapters will save what the interpreter's stack pointer will be |
581 // after arguments are popped, then adjust the interpreter's frame | 581 // after arguments are popped, then adjust the interpreter's frame |
582 // size to force alignment and possibly to repack the arguments. | 582 // size to force alignment and possibly to repack the arguments. |
583 // After re-packing, it jumps to the compiled code start. There are | 583 // After re-packing, it jumps to the compiled code start. There are |
584 // no safepoints in this adapter code and a GC cannot happen while | 584 // no safepoints in this adapter code and a GC cannot happen while |
591 // right place. Hence all the args will likely be copied into the | 591 // right place. Hence all the args will likely be copied into the |
592 // interpreter's frame, forcing that frame to grow. The compiled frame's | 592 // interpreter's frame, forcing that frame to grow. The compiled frame's |
593 // outgoing stack args will be dead after the copy. | 593 // outgoing stack args will be dead after the copy. |
594 // | 594 // |
595 // Native wrappers, like adapters, marshal arguments. Unlike adapters they | 595 // Native wrappers, like adapters, marshal arguments. Unlike adapters they |
596 // also perform an offical frame push & pop. They have a call to the native | 596 // also perform an official frame push & pop. They have a call to the native |
597 // routine in their middles and end in a return (instead of ending in a jump). | 597 // routine in their middles and end in a return (instead of ending in a jump). |
598 // The native wrappers are stored in real nmethods instead of the BufferBlobs | 598 // The native wrappers are stored in real nmethods instead of the BufferBlobs |
599 // used by the adapters. The code generation happens here because it's very | 599 // used by the adapters. The code generation happens here because it's very |
600 // similar to what the adapters have to do. | 600 // similar to what the adapters have to do. |
601 | 601 |
608 address _c2i_entry; | 608 address _c2i_entry; |
609 address _c2i_unverified_entry; | 609 address _c2i_unverified_entry; |
610 | 610 |
611 #ifdef ASSERT | 611 #ifdef ASSERT |
612 // Captures code and signature used to generate this adapter when | 612 // Captures code and signature used to generate this adapter when |
613 // verifing adapter equivalence. | 613 // verifying adapter equivalence. |
614 unsigned char* _saved_code; | 614 unsigned char* _saved_code; |
615 int _saved_code_length; | 615 int _saved_code_length; |
616 #endif | 616 #endif |
617 | 617 |
618 void init(AdapterFingerPrint* fingerprint, address i2c_entry, address c2i_entry, address c2i_unverified_entry) { | 618 void init(AdapterFingerPrint* fingerprint, address i2c_entry, address c2i_entry, address c2i_unverified_entry) { |