Mercurial > hg > graal-compiler
comparison src/share/vm/code/nmethod.hpp @ 1135:e66fd840cb6b
6893081: method handle & invokedynamic code needs additional cleanup (post 6815692, 6858164)
Summary: During the work for 6829187 we have fixed a number of basic bugs which are logically grouped with 6815692 and 6858164 but which must be reviewed and pushed separately.
Reviewed-by: kvn, never
author | twisti |
---|---|
date | Mon, 04 Jan 2010 18:38:08 +0100 |
parents | 032260830071 |
children | b1f619d38249 |
comparison
equal
deleted
inserted
replaced
1134:0910903272e5 | 1135:e66fd840cb6b |
---|---|
79 | 79 |
80 // nmethods (native methods) are the compiled code versions of Java methods. | 80 // nmethods (native methods) are the compiled code versions of Java methods. |
81 | 81 |
82 struct nmFlags { | 82 struct nmFlags { |
83 friend class VMStructs; | 83 friend class VMStructs; |
84 unsigned int version:8; // version number (0 = first version) | 84 unsigned int version:8; // version number (0 = first version) |
85 unsigned int level:4; // optimization level | 85 unsigned int level:4; // optimization level |
86 unsigned int age:4; // age (in # of sweep steps) | 86 unsigned int age:4; // age (in # of sweep steps) |
87 | 87 |
88 unsigned int state:2; // {alive, zombie, unloaded) | 88 unsigned int state:2; // {alive, zombie, unloaded) |
89 | 89 |
90 unsigned int isUncommonRecompiled:1; // recompiled because of uncommon trap? | 90 unsigned int isUncommonRecompiled:1; // recompiled because of uncommon trap? |
91 unsigned int isToBeRecompiled:1; // to be recompiled as soon as it matures | 91 unsigned int isToBeRecompiled:1; // to be recompiled as soon as it matures |
92 unsigned int hasFlushedDependencies:1; // Used for maintenance of dependencies | 92 unsigned int hasFlushedDependencies:1; // Used for maintenance of dependencies |
93 unsigned int markedForReclamation:1; // Used by NMethodSweeper | 93 unsigned int markedForReclamation:1; // Used by NMethodSweeper |
94 | 94 |
95 unsigned int has_unsafe_access:1; // May fault due to unsafe access. | 95 unsigned int has_unsafe_access:1; // May fault due to unsafe access. |
96 unsigned int has_method_handle_invokes:1; // Has this method MethodHandle invokes? | |
96 | 97 |
97 void clear(); | 98 void clear(); |
98 }; | 99 }; |
99 | 100 |
100 | 101 |
407 void unmark_for_reclamation() { check_safepoint(); flags.markedForReclamation = 0; } | 408 void unmark_for_reclamation() { check_safepoint(); flags.markedForReclamation = 0; } |
408 | 409 |
409 bool has_unsafe_access() const { return flags.has_unsafe_access; } | 410 bool has_unsafe_access() const { return flags.has_unsafe_access; } |
410 void set_has_unsafe_access(bool z) { flags.has_unsafe_access = z; } | 411 void set_has_unsafe_access(bool z) { flags.has_unsafe_access = z; } |
411 | 412 |
413 bool has_method_handle_invokes() const { return flags.has_method_handle_invokes; } | |
414 void set_has_method_handle_invokes(bool z) { flags.has_method_handle_invokes = z; } | |
415 | |
412 int level() const { return flags.level; } | 416 int level() const { return flags.level; } |
413 void set_level(int newLevel) { check_safepoint(); flags.level = newLevel; } | 417 void set_level(int newLevel) { check_safepoint(); flags.level = newLevel; } |
414 | 418 |
415 int comp_level() const { return _comp_level; } | 419 int comp_level() const { return _comp_level; } |
416 | 420 |
539 bool is_deopt_pc(address pc); | 543 bool is_deopt_pc(address pc); |
540 // Accessor/mutator for the original pc of a frame before a frame was deopted. | 544 // Accessor/mutator for the original pc of a frame before a frame was deopted. |
541 address get_original_pc(const frame* fr) { return *orig_pc_addr(fr); } | 545 address get_original_pc(const frame* fr) { return *orig_pc_addr(fr); } |
542 void set_original_pc(const frame* fr, address pc) { *orig_pc_addr(fr) = pc; } | 546 void set_original_pc(const frame* fr, address pc) { *orig_pc_addr(fr) = pc; } |
543 | 547 |
548 // MethodHandle | |
549 bool is_method_handle_return(address return_pc); | |
550 | |
544 // jvmti support: | 551 // jvmti support: |
545 void post_compiled_method_load_event(); | 552 void post_compiled_method_load_event(); |
546 | 553 |
547 // verify operations | 554 // verify operations |
548 void verify(); | 555 void verify(); |