Mercurial > hg > graal-jvmci-8
comparison jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java @ 23749:d6bd0b9cd0b6
remove uses of setAccessible (JDK-8165434)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 07 Sep 2016 15:17:13 +0200 |
parents | 1140503536ae |
children | 33421fb951da |
comparison
equal
deleted
inserted
replaced
23748:3e551611f1fc | 23749:d6bd0b9cd0b6 |
---|---|
23 package jdk.vm.ci.hotspot; | 23 package jdk.vm.ci.hotspot; |
24 | 24 |
25 import static java.util.Objects.requireNonNull; | 25 import static java.util.Objects.requireNonNull; |
26 import static jdk.vm.ci.hotspot.CompilerToVM.compilerToVM; | 26 import static jdk.vm.ci.hotspot.CompilerToVM.compilerToVM; |
27 import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime; | 27 import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime; |
28 import static jdk.vm.ci.hotspot.HotSpotModifiers.jvmClassModifiers; | |
28 import static jdk.vm.ci.hotspot.HotSpotVMConfig.config; | 29 import static jdk.vm.ci.hotspot.HotSpotVMConfig.config; |
29 import static jdk.vm.ci.hotspot.UnsafeAccess.UNSAFE; | 30 import static jdk.vm.ci.hotspot.UnsafeAccess.UNSAFE; |
30 | 31 |
31 import java.lang.annotation.Annotation; | 32 import java.lang.annotation.Annotation; |
32 import java.lang.reflect.Array; | 33 import java.lang.reflect.Array; |
46 import jdk.vm.ci.meta.Assumptions.NoFinalizableSubclass; | 47 import jdk.vm.ci.meta.Assumptions.NoFinalizableSubclass; |
47 import jdk.vm.ci.meta.Constant; | 48 import jdk.vm.ci.meta.Constant; |
48 import jdk.vm.ci.meta.JavaConstant; | 49 import jdk.vm.ci.meta.JavaConstant; |
49 import jdk.vm.ci.meta.JavaKind; | 50 import jdk.vm.ci.meta.JavaKind; |
50 import jdk.vm.ci.meta.JavaType; | 51 import jdk.vm.ci.meta.JavaType; |
51 import jdk.vm.ci.meta.ModifiersProvider; | |
52 import jdk.vm.ci.meta.ResolvedJavaField; | 52 import jdk.vm.ci.meta.ResolvedJavaField; |
53 import jdk.vm.ci.meta.ResolvedJavaMethod; | 53 import jdk.vm.ci.meta.ResolvedJavaMethod; |
54 import jdk.vm.ci.meta.ResolvedJavaType; | 54 import jdk.vm.ci.meta.ResolvedJavaType; |
55 | 55 |
56 /** | 56 /** |
149 @Override | 149 @Override |
150 public int getModifiers() { | 150 public int getModifiers() { |
151 if (isArray()) { | 151 if (isArray()) { |
152 return (getElementalType().getModifiers() & (Modifier.PUBLIC | Modifier.PRIVATE | Modifier.PROTECTED)) | Modifier.FINAL | Modifier.ABSTRACT; | 152 return (getElementalType().getModifiers() & (Modifier.PUBLIC | Modifier.PRIVATE | Modifier.PROTECTED)) | Modifier.FINAL | Modifier.ABSTRACT; |
153 } else { | 153 } else { |
154 return getAccessFlags() & ModifiersProvider.jvmClassModifiers(); | 154 return getAccessFlags() & jvmClassModifiers(); |
155 } | 155 } |
156 } | 156 } |
157 | 157 |
158 public int getAccessFlags() { | 158 public int getAccessFlags() { |
159 HotSpotVMConfig config = config(); | 159 HotSpotVMConfig config = config(); |
504 } | 504 } |
505 | 505 |
506 synchronized HotSpotResolvedJavaField createField(String fieldName, JavaType type, long offset, int rawFlags) { | 506 synchronized HotSpotResolvedJavaField createField(String fieldName, JavaType type, long offset, int rawFlags) { |
507 HotSpotResolvedJavaField result = null; | 507 HotSpotResolvedJavaField result = null; |
508 | 508 |
509 final int flags = rawFlags & ModifiersProvider.jvmFieldModifiers(); | 509 final int flags = rawFlags & HotSpotModifiers.jvmFieldModifiers(); |
510 | 510 |
511 final long id = offset + ((long) flags << 32); | 511 final long id = offset + ((long) flags << 32); |
512 | 512 |
513 // Must cache the fields, because the local load elimination only works if the | 513 // Must cache the fields, because the local load elimination only works if the |
514 // objects from two field lookups are identical. | 514 // objects from two field lookups are identical. |