Mercurial > hg > graal-jvmci-8
comparison graal/Runtime/src/com/sun/hotspot/c1x/HotSpotField.java @ 2492:4e5515d09314
Fixed merge issues.
- Accessing static fields from the java.lang.Class object instead of the klassOop (1-line-change)
- Fixed issue with RiField object caching (the caching was only taking the offset as a field ID, but need to take offset+is_static)
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Fri, 22 Apr 2011 19:00:07 +0200 |
parents | 099e697d8934 |
children |
comparison
equal
deleted
inserted
replaced
2491:0654ee04b214 | 2492:4e5515d09314 |
---|---|
22 package com.sun.hotspot.c1x; | 22 package com.sun.hotspot.c1x; |
23 | 23 |
24 import java.lang.reflect.*; | 24 import java.lang.reflect.*; |
25 | 25 |
26 import com.sun.c1x.*; | 26 import com.sun.c1x.*; |
27 import com.sun.c1x.debug.*; | |
27 import com.sun.cri.ci.CiConstant; | 28 import com.sun.cri.ci.CiConstant; |
28 import com.sun.cri.ci.CiKind; | 29 import com.sun.cri.ci.CiKind; |
29 import com.sun.cri.ri.RiField; | 30 import com.sun.cri.ri.RiField; |
30 import com.sun.cri.ri.RiType; | 31 import com.sun.cri.ri.RiType; |
31 | 32 |
38 | 39 |
39 private final RiType holder; | 40 private final RiType holder; |
40 private final String name; | 41 private final String name; |
41 private final RiType type; | 42 private final RiType type; |
42 private final int offset; | 43 private final int offset; |
44 private final int accessFlags; | |
43 private CiConstant constant; | 45 private CiConstant constant; |
44 | 46 |
45 public HotSpotField(Compiler compiler, RiType holder, String name, RiType type, int offset) { | 47 public HotSpotField(Compiler compiler, RiType holder, String name, RiType type, int offset, int accessFlags) { |
46 super(compiler); | 48 super(compiler); |
47 this.holder = holder; | 49 this.holder = holder; |
48 this.name = name; | 50 this.name = name; |
49 this.type = type; | 51 this.type = type; |
50 this.offset = offset; | 52 this.offset = offset; |
53 this.accessFlags = accessFlags; | |
51 } | 54 } |
52 | 55 |
53 @Override | 56 @Override |
54 public int accessFlags() { | 57 public int accessFlags() { |
55 // TODO Auto-generated method stub | 58 return accessFlags; |
56 return 0; | |
57 } | 59 } |
58 | 60 |
59 @Override | 61 @Override |
60 public CiConstant constantValue(CiConstant receiver) { | 62 public CiConstant constantValue(CiConstant receiver) { |
61 if (receiver == null) { | 63 if (receiver == null) { |