Skip to content
Success

Changes

Summary

  1. Implement argument capture in `@ModifyConstant` and `@ModifyReturnValue` (commit: b9bdb74) (details)
Commit b9bdb749bdaf91ebf351f60a901f8f8419b550d5 by Geolykt
Implement argument capture in `@ModifyConstant` and `@ModifyReturnValue`

I'm not sure why I thought that wasn't possible while first implementing the annotations.
Regardless, this code somehow seems to work first-try, which is why tests don't crash anymore!
However on the flip side of things it seems like the allow tests are a bit flawed - so I might
have incorrectly implemented that annotation element.

There are also two other tests that fail, but I assume that those are long-standing problems
I never bothered to fix. Might be a low-hanging fruit for a potential contributor. Although
I don't think those actually exist (I know you don't exist, dear reader. Don't pretend
anything else). Uh where was I? Ah yes, the failures - I recall there having been one or two
failures for quite a while now, so I assume that this commit doesn't produce any regressions.
And on the front of the allow tests: Well I don't think it really matters whether anything
regressed as the tests wouldn't even run before this commit.
(commit: b9bdb74)
The file was modifiedmicromixin-annotations/src/main/java/org/spongepowered/asm/mixin/injection/ModifyConstant.java (diff)
The file was addedmicromixin-transformer/src/main/java/org/stianloader/micromixin/transform/internal/util/locals/ArgumentCaptureContext.java
The file was modifiedmicromixin-annotations/src/main/java/com/llamalad7/mixinextras/injector/ModifyReturnValue.java (diff)
The file was modifiedmicromixin-transformer/src/main/java/org/stianloader/micromixin/transform/internal/annotation/mixinsextras/MixinExtrasModifyReturnValueAnnotation.java (diff)
The file was modifiedmicromixin-test-j8/src/main/java/org/stianloader/micromixin/test/j8/targets/ArgumentCaptureTest.java (diff)
The file was modifiedmicromixin-test-j8/src/main/java/org/stianloader/micromixin/test/j8/TestHarness.java (diff)
The file was modifiedmicromixin-transformer/src/main/java/org/stianloader/micromixin/transform/internal/annotation/MixinModifyConstantAnnotation.java (diff)
The file was modifiedmicromixin-test-j8/src/main/java/org/stianloader/micromixin/test/j8/mixin/ArgumentCaptureMixins.java (diff)