Mercurial > hg > graal-compiler
comparison src/share/vm/c1/c1_Runtime1.cpp @ 2044:06f017f7daa7
Merge.
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Fri, 07 Jan 2011 18:18:08 +0100 |
parents | 00bc9eaf0e24 ac637b7220d1 |
children | d25d4ca69222 |
comparison
equal
deleted
inserted
replaced
1942:00bc9eaf0e24 | 2044:06f017f7daa7 |
---|---|
20 * or visit www.oracle.com if you need additional information or have any | 20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. | 21 * questions. |
22 * | 22 * |
23 */ | 23 */ |
24 | 24 |
25 #include "incls/_precompiled.incl" | 25 #include "precompiled.hpp" |
26 #include "incls/_c1_Runtime1.cpp.incl" | 26 #include "asm/codeBuffer.hpp" |
27 #include "c1/c1_CodeStubs.hpp" | |
28 #include "c1/c1_Defs.hpp" | |
29 #include "c1/c1_FrameMap.hpp" | |
30 #include "c1/c1_LIRAssembler.hpp" | |
31 #include "c1/c1_MacroAssembler.hpp" | |
32 #include "c1/c1_Runtime1.hpp" | |
33 #include "classfile/systemDictionary.hpp" | |
34 #include "classfile/vmSymbols.hpp" | |
35 #include "code/codeBlob.hpp" | |
36 #include "code/compiledIC.hpp" | |
37 #include "code/pcDesc.hpp" | |
38 #include "code/scopeDesc.hpp" | |
39 #include "code/vtableStubs.hpp" | |
40 #include "compiler/disassembler.hpp" | |
41 #include "gc_interface/collectedHeap.hpp" | |
42 #include "interpreter/bytecode.hpp" | |
43 #include "interpreter/interpreter.hpp" | |
44 #include "memory/allocation.inline.hpp" | |
45 #include "memory/barrierSet.hpp" | |
46 #include "memory/oopFactory.hpp" | |
47 #include "memory/resourceArea.hpp" | |
48 #include "oops/objArrayKlass.hpp" | |
49 #include "oops/oop.inline.hpp" | |
50 #include "runtime/biasedLocking.hpp" | |
51 #include "runtime/compilationPolicy.hpp" | |
52 #include "runtime/interfaceSupport.hpp" | |
53 #include "runtime/javaCalls.hpp" | |
54 #include "runtime/sharedRuntime.hpp" | |
55 #include "runtime/threadCritical.hpp" | |
56 #include "runtime/vframe.hpp" | |
57 #include "runtime/vframeArray.hpp" | |
58 #include "utilities/copy.hpp" | |
59 #include "utilities/events.hpp" | |
27 | 60 |
28 | 61 |
29 // Implementation of StubAssembler | 62 // Implementation of StubAssembler |
30 | 63 |
31 StubAssembler::StubAssembler(CodeBuffer* code, const char * name, int stub_id) : C1_MacroAssembler(code) { | 64 StubAssembler::StubAssembler(CodeBuffer* code, const char * name, int stub_id) : C1_MacroAssembler(code) { |
1181 // Potential problem: memmove is not guaranteed to be word atomic | 1214 // Potential problem: memmove is not guaranteed to be word atomic |
1182 // Revisit in Merlin | 1215 // Revisit in Merlin |
1183 memmove(dst_addr, src_addr, length << l2es); | 1216 memmove(dst_addr, src_addr, length << l2es); |
1184 return ac_ok; | 1217 return ac_ok; |
1185 } else if (src->is_objArray() && dst->is_objArray()) { | 1218 } else if (src->is_objArray() && dst->is_objArray()) { |
1186 if (UseCompressedOops) { // will need for tiered | 1219 if (UseCompressedOops) { |
1187 narrowOop *src_addr = objArrayOop(src)->obj_at_addr<narrowOop>(src_pos); | 1220 narrowOop *src_addr = objArrayOop(src)->obj_at_addr<narrowOop>(src_pos); |
1188 narrowOop *dst_addr = objArrayOop(dst)->obj_at_addr<narrowOop>(dst_pos); | 1221 narrowOop *dst_addr = objArrayOop(dst)->obj_at_addr<narrowOop>(dst_pos); |
1189 return obj_arraycopy_work(src, src_addr, dst, dst_addr, length); | 1222 return obj_arraycopy_work(src, src_addr, dst, dst_addr, length); |
1190 } else { | 1223 } else { |
1191 oop *src_addr = objArrayOop(src)->obj_at_addr<oop>(src_pos); | 1224 oop *src_addr = objArrayOop(src)->obj_at_addr<oop>(src_pos); |
1217 BarrierSet* bs = Universe::heap()->barrier_set(); | 1250 BarrierSet* bs = Universe::heap()->barrier_set(); |
1218 assert(bs->has_write_ref_array_opt(), "Barrier set must have ref array opt"); | 1251 assert(bs->has_write_ref_array_opt(), "Barrier set must have ref array opt"); |
1219 assert(bs->has_write_ref_array_pre_opt(), "For pre-barrier as well."); | 1252 assert(bs->has_write_ref_array_pre_opt(), "For pre-barrier as well."); |
1220 if (UseCompressedOops) { | 1253 if (UseCompressedOops) { |
1221 bs->write_ref_array_pre((narrowOop*)dst, num); | 1254 bs->write_ref_array_pre((narrowOop*)dst, num); |
1255 Copy::conjoint_oops_atomic((narrowOop*) src, (narrowOop*) dst, num); | |
1222 } else { | 1256 } else { |
1223 bs->write_ref_array_pre((oop*)dst, num); | 1257 bs->write_ref_array_pre((oop*)dst, num); |
1224 } | 1258 Copy::conjoint_oops_atomic((oop*) src, (oop*) dst, num); |
1225 Copy::conjoint_oops_atomic((oop*) src, (oop*) dst, num); | 1259 } |
1226 bs->write_ref_array(dst, num); | 1260 bs->write_ref_array(dst, num); |
1227 JRT_END | 1261 JRT_END |
1228 | 1262 |
1229 | 1263 |
1230 #ifndef PRODUCT | 1264 #ifndef PRODUCT |