Skip to content

Commit c6b071b

Browse files
committed
Move implementations of resolver meta to dedicated region.
1 parent 1b6df90 commit c6b071b

File tree

3 files changed

+41
-31
lines changed

3 files changed

+41
-31
lines changed

espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/impl/Field.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,8 @@ public final void checkLoadingConstraints(StaticObject loader1, StaticObject loa
214214
getDeclaringKlass().getContext().getRegistries().checkLoadingConstraint(getType(), loader1, loader2);
215215
}
216216

217+
// region FieldAccess impl
218+
217219
@Override
218220
public final void loadingConstraints(Klass accessingClass) {
219221
checkLoadingConstraints(accessingClass.getDefiningClassLoader(), getDeclaringKlass().getDefiningClassLoader());
@@ -226,6 +228,8 @@ public final boolean shouldEnforceInitializerCheck() {
226228
getDeclaringClass().getMajorVersion() >= ClassfileParser.JAVA_9_VERSION;
227229
}
228230

231+
// endregion FieldAccess impl
232+
229233
// region Field accesses
230234

231235
// region Generic

espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/impl/Klass.java

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1796,11 +1796,6 @@ public int getStatus() {
17961796
}
17971797
}
17981798

1799-
@Override
1800-
public Klass getSuperClass() {
1801-
return getSuperKlass();
1802-
}
1803-
18041799
@Override
18051800
public byte getTagConstant() {
18061801
return TagConstants.toTagConstant(getJavaKind());
@@ -1879,30 +1874,30 @@ public Assumption getRedefineAssumption() {
18791874

18801875
// endregion jdwp-specific
18811876

1882-
// TypeAccess impl
1877+
// region TypeAccess impl
18831878

18841879
@Override
18851880
public String getJavaName() {
18861881
return getExternalName();
18871882
}
18881883

18891884
@Override
1890-
public Method lookupInterfaceMethod(Symbol<Name> name, Symbol<Signature> signature) {
1885+
public Klass getSuperClass() {
1886+
return getSuperKlass();
1887+
}
1888+
1889+
@Override
1890+
public Method lookupInterfaceMethod(Symbol<Name> methodName, Symbol<Signature> methodSignature) {
18911891
if (this instanceof ObjectKlass) {
1892-
return ((ObjectKlass) this).resolveInterfaceMethod(name, signature);
1892+
return ((ObjectKlass) this).resolveInterfaceMethod(methodName, methodSignature);
18931893
}
18941894
return null;
18951895
}
18961896

18971897
@Override
1898-
public Method lookupInstanceMethod(Symbol<Name> name, Symbol<Signature> signature) {
1899-
return lookupMethod(name, signature, LookupMode.INSTANCE_ONLY);
1898+
public Method lookupInstanceMethod(Symbol<Name> methodName, Symbol<Signature> methodSignature) {
1899+
return lookupMethod(methodName, methodSignature, LookupMode.INSTANCE_ONLY);
19001900
}
19011901

1902-
@Idempotent
1903-
@Override
1904-
// Implement here for indempotent, and make sure arrays are not abstract.
1905-
public final boolean isAbstract() {
1906-
return !isArray() && TypeAccess.super.isAbstract();
1907-
}
1902+
// endregion TypeAccess impl
19081903
}

espresso/src/com.oracle.truffle.espresso/src/com/oracle/truffle/espresso/impl/Method.java

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,6 @@ public Symbol<Signature> getRawSignature() {
245245
return getLinkedMethod().getRawSignature();
246246
}
247247

248-
@Override
249-
public Symbol<Signature> getSymbolicSignature() {
250-
return getRawSignature();
251-
}
252-
253248
public Symbol<Type>[] getParsedSignature() {
254249
assert parsedSignature != null;
255250
return parsedSignature;
@@ -950,16 +945,6 @@ public void checkLoadingConstraints(StaticObject loader1, StaticObject loader2)
950945
}
951946
}
952947

953-
@Override
954-
public void loadingConstraints(Klass accessingClass) {
955-
checkLoadingConstraints(accessingClass.getDefiningClassLoader(), getDeclaringKlass().getDefiningClassLoader());
956-
}
957-
958-
@Override
959-
public boolean shouldSkipLoadingConstraints() {
960-
return isPolySignatureIntrinsic();
961-
}
962-
963948
public int getCatchLocation(int bci, StaticObject ex) {
964949
ExceptionHandler[] handlers = getExceptionHandlers();
965950
ExceptionHandler resolved = null;
@@ -1330,6 +1315,32 @@ public StaticObject apply(int j) {
13301315
return instance;
13311316
}
13321317

1318+
// region MethodAccess impl
1319+
1320+
@Override
1321+
public Symbol<Signature> getSymbolicSignature() {
1322+
return getRawSignature();
1323+
}
1324+
1325+
@Override
1326+
@Idempotent
1327+
// Re-implement here for indempotent annotation. Some of our nodes benefit from it.
1328+
public boolean isAbstract() {
1329+
return super.isAbstract();
1330+
}
1331+
1332+
@Override
1333+
public boolean shouldSkipLoadingConstraints() {
1334+
return isPolySignatureIntrinsic();
1335+
}
1336+
1337+
@Override
1338+
public void loadingConstraints(Klass accessingClass) {
1339+
checkLoadingConstraints(accessingClass.getDefiningClassLoader(), getDeclaringKlass().getDefiningClassLoader());
1340+
}
1341+
1342+
// endregion MethodAccess impl
1343+
13331344
private static final class Continuum {
13341345
Continuum(LivenessAnalysis livenessAnalysis) {
13351346
this.livenessAnalysis = livenessAnalysis;

0 commit comments

Comments
 (0)