Commit Graph
768 Commits
Author SHA1 Message Date
Su5eD e779303628 Use 0 as class reader flags in Modlauncher bytecode provider (#137)
Relates to neoforged/NeoForge#768
2024-04-16 21:38:47 +01:00
LlamaLad7 320b74c2d4 Fix: Reset Unique field counters on Mixin application. (#136)
They previously caused hotswaps to fail due to the number increasing on each application.
2024-04-11 13:52:14 +01:00
LlamaLad7 738638f092 Fix: Strip synthetic LVT entries after exporting. (#135)
They are useful for the dumped classes, but they have incorrect labels and as such they confuse IDEA's debugger.
2024-04-03 16:18:33 +01:00
modmuss 49042ea4ca Add maven metadata (#130)
* Add maven metadata

* Typo
2024-03-08 09:27:11 +00:00
LlamaLad7 dadc14717c Fix: Properly extend the stack in CallbackInjector. (#131)
The old logic misses the receiver and does not correctly handle double-size types.
2024-03-08 09:26:04 +00:00
LlamaLad7 8c8ece2737 Fix: Check the staticness of the original call not the current one. (#132) 2024-03-08 09:25:55 +00:00
LlamaLad7 e70693a79a New: Allow injection point specifiers anywhere. (#129)
Takes the relevant changes from https://github.com/SpongePowered/Mixin/commit/e02f4cae3fe51d6bd83de5e020956587ead8087c.
2024-03-03 16:34:02 +00:00
LlamaLad7 3eb5281d66 Fix/modifyarg(s) after redirect (#128)
* Fix: Resolve `@Redirect`s breaking `@ModifyArg`.

* Fix: Resolve `@Redirect`s breaking `@ModifyArgs`.
2024-03-03 16:33:50 +00:00
Matyrobbrt 8caaaaa62d Include the Gson module deps in the module-info (#126)
* Include the Gson module deps in the module-info

* Fully fix modularity

* Update PatternCompiler.java
2024-03-03 16:33:19 +00:00
modmuss 8bb4cfe1a4 Define newer Java versions (#124) 2024-03-03 16:33:04 +00:00
LlamaLad7 cac3570399 Fix: Add a LVT entry for the marshal var in CallbackInjector if necessary.
If the callbackInfo has one already then that's fine since nothing can inject before the duped return value gets replaced by the callbackInfo.
2023-05-04 09:16:43 +01:00
LlamaLad7 755462cd1e Fix: Resolve method references not being correctly remapped in initializers. 2023-05-04 09:16:24 +01:00
LlamaLad7 ccfb5ee089 AP: Fix and simplify checking of factory invoker return types.
We no longer use mirror. The generics are irrelevant in the first place because Mixin does not check them at runtime.
2023-02-24 23:17:57 +00:00
LlamaLad7 7f7dbc1f37 AP: Improve validation of mixin superclasses.
Extending an already-compiled mixin no longer results in an error, and extending (a mixin that targets) your target class does result in an error.
2023-02-24 10:09:18 +00:00
Chocohead eb8de75e32 Fix adding fields to classes with more than one constructor (#105)
* Fix adding fields to classes with more than one constructor

Got to be careful reusing `Label`s when calculating frames

* Reduce changes relative to upstream

`LabelNode#clone` does the equivalent to `labels.get` anyway, so might as well make it simpler
2023-02-18 13:42:36 +00:00
LlamaLad7 0fb3116c4f AP: Skip superclass validation for imaginary and simulated targets. 2023-02-16 20:54:20 +00:00
Chocohead d4b07c0e31 Fix implicit accessors and invokers
They get given the handler's name to guess the target field/method, no good if it guessing with the mod suffix too
2023-02-16 15:32:15 +00:00
LlamaLad7 c902985015 Fix resolution of upper bounds of intersection types. 2023-02-15 22:16:19 +00:00
LlamaLad7 e5d9db491a AP: Fix several cases of ASM TypeHandles breaking code that relies on Mirror. 2023-02-15 22:16:19 +00:00
LlamaLad7 c33a48ba5e Prioritise TypeHandleASM when it is available.
Fixes remapping of synthetic members in resolvable classes.
2023-02-15 22:16:19 +00:00
modmuss50 42a2c0ac3a Ensure that the refmap json is reproducible (#100) 2023-02-13 15:17:43 +00:00
0x22 da8566a7d7 Fix InnerClassGenerator not remapping fields. (#98)
* Fix InnerClassGenerator not remapping fields.

* Fix InnerClassGenerator case-insensitive class owner name comparison.
2023-02-13 15:17:14 +00:00
LlamaLad7 9a2b44a675 Allow array creations and jumps in field initializers. (#90) 2023-02-13 15:16:58 +00:00
Chocohead 734e5828f8 Fix package-private unique fields (#94) 2023-02-13 15:16:39 +00:00
Chocohead 57bcdf6119 Fix package-private mixin inheritance some more (#91)
Fixed this for `childSplit` in 974a7599b4cfafa51f49433a7d3456ae0eddd9cf, but not the line immediately below
2023-02-13 15:16:16 +00:00
Chocohead e2c9aa449c Fix unique fields conflicting where they shouldn't (#92)
* Fix unique fields crashing when staticness mismatches an existing field

Fixes SpongePowered/Mixin#576

* Fix mismatching mixin fields silently being dropped

Allowing them to be included will throw a VerifyError
2023-02-13 15:15:56 +00:00
Chocohead f466542370 Auto-prefix mod handlers & unique annotated methods (#97)
Aims to avoid double prefixing where a mod has correctly prefixed already
2023-02-13 15:15:29 +00:00
Chocohead 3bb4cbfaf8 Fix injectors without groups being retained (#99)
Avoids leaking memory after a mixin has been applied
2023-02-13 15:15:00 +00:00
Jared 350bf5adcb Rename mixin target mapid system property to fix clashes (#88)
Fabric mixin stores data in a different format than Sponge mixin expects, leading to clashes when both try to read and write to the same file.
2022-05-03 19:08:45 +01:00
Player 599fd57a15 Add system properties to bypass ServiceLoader mixin service discovery.
Workaround for https://github.com/SpongePowered/Mixin/issues/569
2022-04-01 11:19:31 +00:00
Player a699d81c1e Generalize mod context printing to cover more cases 2022-04-01 11:19:20 +00:00
Player a7ea7a5b35 Fix invalid cross-mixin interaction in interface applicator preparation. (#83)
The previous implementation gathers InjectionInfos for all annotated
methods in the target class, which after a previous injection means that
it'll see injected methods from unrelated mixins if they happen to
target the same class. This caused it to analyze foreign injections
without the proper refmap and mixin association.
2022-02-11 16:47:21 +00:00
modmuss50andshedaniel 0e1bace9a8 Work around https://github.com/SpongePowered/Mixin/issues/560
Co-authored-by: shedaniel <[email protected]>
2022-01-31 20:15:34 +00:00
shedaniel 345e73663c Fix FabricMC/Mixin#80 2022-01-18 19:50:56 +00:00
modmuss50 03b0b8f571 Merge remote-tracking branch 'SpongePowered/0.8.5'
# Conflicts:
#	build.gradle
#	gradle.properties
#	src/ap/java/org/spongepowered/tools/obfuscation/AnnotatedMixin.java
#	src/ap/java/org/spongepowered/tools/obfuscation/AnnotatedMixinElementHandlerInjector.java
#	src/ap/java/org/spongepowered/tools/obfuscation/AnnotatedMixins.java
#	src/ap/java/org/spongepowered/tools/obfuscation/ObfuscationEnvironment.java
#	src/ap/java/org/spongepowered/tools/obfuscation/ReferenceManager.java
#	src/ap/java/org/spongepowered/tools/obfuscation/mapping/common/MappingWriter.java
#	src/ap/java/org/spongepowered/tools/obfuscation/service/ObfuscationServices.java
#	src/main/java/org/spongepowered/asm/launch/platform/MainAttributes.java
2021-12-13 16:18:54 +00:00
Mumfrey a396db8cd1 Update checkstyle 2021-12-01 20:25:07 +00:00
Mumfrey a40e4bc59a Move potemkin generator to buildSrc and switch to groovy 2021-12-01 19:30:51 +00:00
Mumfrey b47627fd01 Merge remote-tracking branch 'origin/pr/538' into 0.8.5 2021-12-01 18:23:59 +00:00
zml 8cd66d8241 build: Synthesize modules to link with multiple versions of libraries
Gson and Guava are both used in pre- and post-modular versions in
environments where Mixin is used on the module path, so we have to be
able to link against both in the compile-time module descriptor.
2021-12-01 08:15:18 -08:00
Mumfrey 1a328c339d Fix handling of UNC paths when converting from URI to File, fixes #534 2021-11-17 21:22:04 +00:00
modmuss50 21b9d4714f Fix crash when running on UNC (windows) network share.
See: https://bugs.openjdk.java.net/browse/JDK-8178726
2021-11-12 16:44:51 +00:00
Player 1cccdecaf7 Add mod id to another kind of prepare/apply error message 2021-11-05 12:11:43 +00:00
Chocohead f6722f4f29 Fix package-private mixin inheritance
Back at it again trying to fix #68
2021-11-05 12:11:28 +00:00
Mumfrey 1e1aa7fb52 Resolve anonymous inner classes in AP via classpath + ASM where possible
Fixes #518
2021-11-04 20:33:03 +00:00
Mumfrey a9581dd7d9 Remove switch on string 2021-11-01 22:24:02 +00:00
modmuss50 02d368a219 Don't append to existing json files when writing TargetMap to disk. Fixes #72 2021-10-28 22:21:04 +01:00
Chocohead a63d9f6fda Try warning for likely failed interface shadows (#71)
If a final field has a constant primitive value, said value will probably be used rather than referencing the shadowed field
2021-10-28 22:18:43 +01:00
Chocohead 8e78d31487 Account for name mangling when finding callback overrides (#70)
Fixes #68 a bit better
2021-10-28 22:18:36 +01:00
Chocohead e992480867 Account for inheritance when testing for callback use (#69)
* Account for inheritance when testing for callback use

Fixes #68

* Log a bit less for the expected case

It's expected most of the time there won't be any children to check

* Remove troublesome check

It's the child which will certainly have the detached super
2021-10-20 19:56:55 +00:00
Mumfrey 812bfcc811 Enhanced AP messaging, detect IDEA, support configurable message levels 2021-10-16 13:24:30 +01:00