Mercurial > hg > graal-compiler
comparison src/cpu/x86/vm/x86_64.ad @ 989:148e5441d916
6863023: need non-perm oops in code cache for JSR 292
Summary: Make a special root-list for those few nmethods which might contain non-perm oops.
Reviewed-by: twisti, kvn, never, jmasa, ysr
author | jrose |
---|---|
date | Tue, 15 Sep 2009 21:53:47 -0700 |
parents | 62001a362ce9 |
children | 97125851f396 |
comparison
equal
deleted
inserted
replaced
987:00977607da34 | 989:148e5441d916 |
---|---|
681 int format) | 681 int format) |
682 { | 682 { |
683 #ifdef ASSERT | 683 #ifdef ASSERT |
684 if (rspec.reloc()->type() == relocInfo::oop_type && | 684 if (rspec.reloc()->type() == relocInfo::oop_type && |
685 d32 != 0 && d32 != (intptr_t) Universe::non_oop_word()) { | 685 d32 != 0 && d32 != (intptr_t) Universe::non_oop_word()) { |
686 assert(oop((intptr_t)d32)->is_oop() && oop((intptr_t)d32)->is_perm(), "cannot embed non-perm oops in code"); | 686 assert(oop((intptr_t)d32)->is_oop() && (ScavengeRootsInCode || !oop((intptr_t)d32)->is_scavengable()), "cannot embed scavengable oops in code"); |
687 } | 687 } |
688 #endif | 688 #endif |
689 cbuf.relocate(cbuf.inst_mark(), rspec, format); | 689 cbuf.relocate(cbuf.inst_mark(), rspec, format); |
690 | 690 |
691 *((int* )(cbuf.code_end())) = d32; | 691 *((int* )(cbuf.code_end())) = d32; |
719 int format) | 719 int format) |
720 { | 720 { |
721 #ifdef ASSERT | 721 #ifdef ASSERT |
722 if (rspec.reloc()->type() == relocInfo::oop_type && | 722 if (rspec.reloc()->type() == relocInfo::oop_type && |
723 d64 != 0 && d64 != (int64_t) Universe::non_oop_word()) { | 723 d64 != 0 && d64 != (int64_t) Universe::non_oop_word()) { |
724 assert(oop(d64)->is_oop() && oop(d64)->is_perm(), | 724 assert(oop(d64)->is_oop() && (ScavengeRootsInCode || !oop(d64)->is_scavengable()), |
725 "cannot embed non-perm oops in code"); | 725 "cannot embed scavengable oops in code"); |
726 } | 726 } |
727 #endif | 727 #endif |
728 cbuf.relocate(cbuf.inst_mark(), rspec, format); | 728 cbuf.relocate(cbuf.inst_mark(), rspec, format); |
729 | 729 |
730 *((int64_t*) (cbuf.code_end())) = d64; | 730 *((int64_t*) (cbuf.code_end())) = d64; |