< prev index next >
src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -124,11 +124,11 @@
? options.isSet(G)
: options.isSet(G_CUSTOM, "vars");
genCrt = options.isSet(XJCOV);
debugCode = options.isSet("debug.code");
allowBetterNullChecks = target.hasObjects();
- virtualizePrivateAccess = options.isSet("virtualizePrivateAccess");
+ disableVirtualizedPrivateInvoke = options.isSet("disableVirtualizedPrivateInvoke");
pool = new Pool(types);
// ignore cldc because we cannot have both stackmap formats
this.stackMap = StackMapFormat.JSR202;
annotate = Annotate.instance(context);
@@ -139,11 +139,11 @@
private final boolean lineDebugInfo;
private final boolean varDebugInfo;
private final boolean genCrt;
private final boolean debugCode;
private final boolean allowBetterNullChecks;
- private boolean virtualizePrivateAccess;
+ private boolean disableVirtualizedPrivateInvoke;
/** Code buffer, set by genMethod.
*/
private Code code;
@@ -2070,12 +2070,13 @@
}
}
//where
private boolean nonVirtualForPrivateAccess(Symbol sym) {
- return !(virtualizePrivateAccess || target.hasVirtualPrivateInvoke()) &&
- ((sym.flags() & PRIVATE) != 0);
+ boolean useVirtual = target.hasVirtualPrivateInvoke() &&
+ !disableVirtualizedPrivateInvoke;
+ return !useVirtual && ((sym.flags() & PRIVATE) != 0);
}
public void visitSelect(JCFieldAccess tree) {
Symbol sym = tree.sym;
< prev index next >