Mercurial > hg > graal-compiler
comparison src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp @ 6725:da91efe96a93
6964458: Reimplement class meta-data storage to use native memory
Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes
Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland
Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author | coleenp |
---|---|
date | Sat, 01 Sep 2012 13:25:18 -0400 |
parents | e2fe93124108 |
children | 8a02ca5e5576 |
comparison
equal
deleted
inserted
replaced
6724:36d1d483d5d6 | 6725:da91efe96a93 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
937 LIR_Opr tmp4 = FrameMap::O1_oop_opr; | 937 LIR_Opr tmp4 = FrameMap::O1_oop_opr; |
938 LIR_Opr klass_reg = FrameMap::G5_oop_opr; | 938 LIR_Opr klass_reg = FrameMap::G5_oop_opr; |
939 LIR_Opr len = length.result(); | 939 LIR_Opr len = length.result(); |
940 | 940 |
941 CodeStub* slow_path = new NewObjectArrayStub(klass_reg, len, reg, info); | 941 CodeStub* slow_path = new NewObjectArrayStub(klass_reg, len, reg, info); |
942 ciObject* obj = (ciObject*) ciObjArrayKlass::make(x->klass()); | 942 ciMetadata* obj = ciObjArrayKlass::make(x->klass()); |
943 if (obj == ciEnv::unloaded_ciobjarrayklass()) { | 943 if (obj == ciEnv::unloaded_ciobjarrayklass()) { |
944 BAILOUT("encountered unloaded_ciobjarrayklass due to out of memory error"); | 944 BAILOUT("encountered unloaded_ciobjarrayklass due to out of memory error"); |
945 } | 945 } |
946 jobject2reg_with_patching(klass_reg, obj, patching_info); | 946 klass2reg_with_patching(klass_reg, obj, patching_info); |
947 __ allocate_array(reg, len, tmp1, tmp2, tmp3, tmp4, T_OBJECT, klass_reg, slow_path); | 947 __ allocate_array(reg, len, tmp1, tmp2, tmp3, tmp4, T_OBJECT, klass_reg, slow_path); |
948 | 948 |
949 LIR_Opr result = rlock_result(x); | 949 LIR_Opr result = rlock_result(x); |
950 __ move(reg, result); | 950 __ move(reg, result); |
951 } | 951 } |
984 } | 984 } |
985 | 985 |
986 // This instruction can be deoptimized in the slow path : use | 986 // This instruction can be deoptimized in the slow path : use |
987 // O0 as result register. | 987 // O0 as result register. |
988 const LIR_Opr reg = result_register_for(x->type()); | 988 const LIR_Opr reg = result_register_for(x->type()); |
989 jobject2reg_with_patching(reg, x->klass(), patching_info); | 989 klass2reg_with_patching(reg, x->klass(), patching_info); |
990 LIR_Opr rank = FrameMap::O1_opr; | 990 LIR_Opr rank = FrameMap::O1_opr; |
991 __ move(LIR_OprFact::intConst(x->rank()), rank); | 991 __ move(LIR_OprFact::intConst(x->rank()), rank); |
992 LIR_Opr varargs = FrameMap::as_pointer_opr(O2); | 992 LIR_Opr varargs = FrameMap::as_pointer_opr(O2); |
993 int offset_from_sp = (frame::memory_parameter_word_sp_offset * wordSize) + STACK_BIAS; | 993 int offset_from_sp = (frame::memory_parameter_word_sp_offset * wordSize) + STACK_BIAS; |
994 __ add(FrameMap::SP_opr, | 994 __ add(FrameMap::SP_opr, |