Fix up some debug wiring for method merged state

This commit is contained in:
Mumfrey committed 2017-07-18 13:42:16 +01:00
1 parent ba0a48a39f
commit 6aee1957e4
3 files changed
+12 -4

No files matched your search

@@ -438,6 +438,7 @@ class MixinApplicatorStandard {
AnnotationNode intrinsic = Annotations.getInvisible(method, Intrinsic.class);
if (intrinsic != null) {
if (this.mergeIntrinsic(mixin, method, isOverwrite, target, intrinsic)) {
mixin.getTarget().methodMerged(method);
return;
}
} else {
@@ -394,6 +394,10 @@ final class MixinConfig implements Comparable<MixinConfig>, IMixinConfig {
}
private boolean checkVersion() throws MixinInitialisationError {
if (this.version == null) {
this.logger.error("Mixin config {} does not specify \"minVersion\" property", this.name);
}
VersionNumber minVersion = VersionNumber.parse(this.version);
VersionNumber curVersion = VersionNumber.parse(this.env.getVersion());
if (minVersion.compareTo(curVersion) > 0) {
@@ -274,11 +274,11 @@ class MixinPreProcessorStandard {
}
if (this.attachOverwriteMethod(context, mixinMethod)) {
context.addMixinMethod(mixinMethod);
continue;
}
if (this.attachUniqueMethod(context, mixinMethod)) {
context.addMixinMethod(mixinMethod);
iter.remove();
continue;
}
@@ -471,6 +471,7 @@ class MixinPreProcessorStandard {
Bytecode.compareBridgeMethods(target, mixinMethod);
MixinPreProcessorStandard.logger.debug("Discarding sythetic bridge method {} in {} because existing method in {} is compatible",
type, mixinMethod.name, this.mixin, context.getTarget());
return true;
} catch (SyntheticBridgeException ex) {
if (this.verboseLogging || this.env.getOption(Option.DEBUG_VERIFY)) {
// Show analysis if debug options are active, implying we're in a dev environment
@@ -478,12 +479,14 @@ class MixinPreProcessorStandard {
}
throw new InvalidMixinException(this.mixin, ex.getMessage());
}
} else {
MixinPreProcessorStandard.logger.warn("Discarding {} public method {} in {} because it already exists in {}", type, mixinMethod.name,
this.mixin, context.getTarget());
}
MixinPreProcessorStandard.logger.warn("Discarding {} public method {} in {} because it already exists in {}", type, mixinMethod.name,
this.mixin, context.getTarget());
return true;
}
context.addMixinMethod(mixinMethod);
return true;
}