Commit Graph
1022 Commits
Author SHA1 Message Date
Player da648eae8d Fix enum MixinEnvironment.Option parsing always using the default (#157)
* Fix enum MixinEnvironment.Option parsing always using the default

* Incorporate Chocohead's suggestion
2025-07-27 14:09:02 -04:00
LlamaLad7 da718519e2 Merge pull request #158 from Player3324/reflectClassInfo
Analyze jdk classes through reflection instead of asm
2025-07-27 12:51:34 +01:00
modmuss c09f39457c Bump version 2025-07-26 15:43:02 +01:00
Luke Bemish de008c2c4d Allow querying whether classes could be transformed by mixin (#176)
* Initial attempt at exposing will-be-transformed-ness of classes via mixin

* Use mixin environment properly

* Fix some ordering

* Make processingCouldTransform default true and log error

* Simplify logic slightly

* Address feedback, sans checkstyle

* Hopefully fix checkstyle

* Log class name as well

* Address feedback

Require that environment passed to `couldTransformClass` be current, and integrate check before `ClassNode` creation in `transformClass` that takes bytes.

* Use locking logic from applyMixins to avoid reentrance issues

* Extract common locking logic

* Add optional byte argument to couldTransform checks

* Revert "Add optional byte argument to couldTransform checks"

This reverts commit 925fa612d02c1001faf54ba6648ccdea6c12b762.

* Revert "Extract common locking logic"

This reverts commit 155fe1568944f72f710ff6895a67b823219378ec.

* Extract common locking logic, but nicer

* Shift around to reduce diff

* Remove unnecessary changes

* Remove more unnecessary format changes

* Update log message to match method name
2025-07-26 15:42:15 +01:00
PlayerandLlamaLad7 a64ce0d7cc Populate class nesting information
Co-authored-by: LlamaLad7 <[email protected]>
2025-07-01 11:52:59 -04:00
modmuss 9f04e07bd0 Bump version 2025-07-01 11:12:16 +01:00
modmuss d628b14f39 Bump version 2025-07-01 11:02:54 +01:00
modmuss 95a00eda6b New Maven Central publishing (#175)
* New Maven Central publishing

* Only Java 21
2025-07-01 11:02:14 +01:00
modmuss 4d0e1dfd9a Update to Gradle 8.14 (#174) 2025-07-01 09:47:57 +01:00
LlamaLad7 5334af3f15 Fix: Synchronize methods in MixinTransformer.
Fixes #166.
Previously `ClassInfo`s were used unsynchronized when writing classes.
2025-06-22 16:19:54 +01:00
modmuss50 fe482da742 Fix typo. 2025-06-18 17:13:26 +01:00
modmuss b205f54956 Add new Java versions (#170) 2025-06-18 12:20:32 +01:00
sschr15 0d455742b9 Fix assuming annotation values were keys (#168) 2025-06-18 09:43:04 +01:00
joe 7c7eac3a70 Don't initialize classes in mixin audit 2025-06-17 22:32:23 +01:00
LlamaLad7 26c8d9c12b Fix: Pass binary class name from agent to transformer.
The transformer expects binary names and internal format ones can cause unexpected behaviour in several places.
2025-01-23 17:35:21 +00:00
Player cfe821a9df Bump version 2024-11-24 15:11:39 -05:00
Geolykt 3b77b68c30 Allow @Desc to match field instructions 2024-11-24 16:49:53 +00:00
LlamaLad7 1c695238c3 Fix: Rework bridge method merging.
The previous implementation did not properly handle pseudo-instructions, sometimes leading to unnecessary mismatches.
2024-11-24 16:47:21 +00:00
LlamaLad7 c516fb7d3f Fix: Properly handle arrays when checking if members are owned by mixins.
No longer throws when a method call is on an array.

Closes #147
2024-10-30 15:11:44 +00:00
modmuss 0b6875f972 Bump version 2024-10-26 18:48:36 +01:00
IThundxr ec76ae4da5 Fix L being dropped from @Shadow's (#154)
Fixes #134
2024-10-26 18:47:48 +01:00
Player 1d7fff6e64 Analyze jdk classes through reflection instead of asm 2024-09-20 14:23:27 -04:00
modmuss c0676344c4 Bump version 2024-09-03 09:12:51 +01:00
LlamaLad7 c3e6d66002 Fix: Fix interface injector visibility checks. (#156)
`InjectionInfo.parse` can be very expensive and in the case of some MixinExtras features is not pure.
The correct approach would be to use `InjectionInfo.getInjectorAnnotation`, but the override is no longer needed anyway since we only support Java 8+ so Mixin will already make injector methods private and synthetic.
Except, Mixin does it based on the current `COMPATIBILITY_LEVEL`, which is wrong, because we could be on JAVA_17 and yet a class compiled with JAVA_8 had no choice but to use public methods.
The original implementation was also incomplete because it forgot about default methods.
2024-09-03 09:12:09 +01:00
LlamaLad7 adcd9526d2 Fix: Rewrite argMap allocation algorithm.
The old one did not properly account for discontinuities in the list, leading to double-width types clobbering meaningful locals and causing mysterious VerifyErrors.
2024-08-30 12:04:41 +01:00
LlamaLad7 023e393348 Build: Bump version. 2024-08-15 12:18:01 +01:00
LlamaLad7 4254da4433 Revert "Compat: Gate NEW descriptor filtering." 2024-08-15 11:55:59 +01:00
LlamaLad7 2307a333b0 Revert "Fix: Fix NEW descriptor gating."
This reverts commit 74a1696d99.
2024-08-15 11:51:36 +01:00
modmuss a4aaaa92c6 Bump version 2024-08-13 08:40:50 +01:00
LlamaLad7 81284c8401 Fix: Remove incorrect PUTFIELD owner check when inspecting initialisers.
These will never match because the LHS is the mixin name and the RHS is the target name.
This restores the 0.8.5 behaviour which does not check the owner at all.
We have never supported assignment expressions in initialisers until now anyway, and even if we check the owner we cannot determine whether the instruction is operating on the current *instance* without proper static analysis, so IMO there's not much point bothering.
2024-07-19 18:42:45 +01:00
LlamaLad7 74a1696d99 Fix: Fix NEW descriptor gating.
Bafflingly, Mixin fails to match a `NEW` instruction whose `<init>` call is outside the slice range, *iff the user specified a descriptor*.
I'm even more surprised that a mod relied on this.
Fixes #152.
2024-07-19 18:40:44 +01:00
modmuss 9aca17d500 Merge pull request #151 from FabricMC/merge/0.8.7
Merge/0.8.7
2024-07-09 18:08:47 +01:00
LlamaLad7 7f00ee3485 Build: Bump version. 2024-07-09 15:40:16 +01:00
LlamaLad7 55670f2779 Merge branch 'refs/heads/0.8.7' into merge/0.8.7
# Conflicts:
#	gradle.properties
#	src/main/java/org/spongepowered/asm/mixin/MixinEnvironment.java
2024-07-09 15:38:33 +01:00
LlamaLad7 96b758dedf Revert "Fix/modifyarg(s) after redirect (#128)"
This reverts commit 3eb5281d
2024-07-09 15:35:43 +01:00
LlamaLad7 b20b9b3465 Revert "Fix: Check the staticness of the original call not the current one. (#132)"
This reverts commit 8c8ece2737.
2024-07-09 15:35:16 +01:00
LlamaLad7 60aa12f26c Revert "Use 0 as class reader flags in Modlauncher bytecode provider (#137)"
This reverts commit e779303628.
2024-07-09 15:35:12 +01:00
Mumfrey 4053421aa1 Mixin 0.8.7 RELEASE 2024-07-06 22:41:39 +01:00
Mumfrey 7d7d4dc46c Properly handle empty args window and report name of the original method 2024-07-06 13:54:43 +01:00
Mumfrey c8be3caa40 Use InjectorOrder.DEFAULT for field, fixes third-party injector order 2024-07-06 12:43:28 +01:00
Mumfrey 0c79de4957 Handle offset arg window correctly for ModifyArgs injector, updates #544 2024-07-06 12:41:11 +01:00
Mumfrey 0239904a1b Handle offset arg window correctly for ModifyArg injector, updates #544 2024-07-05 21:46:09 +01:00
Mumfrey 96e81bb780 Use ClassReader flags tunable for metadata ClassNodes too, updates #671 2024-07-04 22:36:05 +01:00
modmuss 2cd49e6314 Enable checkstyle (#149) 2024-07-01 09:09:16 +01:00
LlamaLad7 2edfbc448e Fix: Do not re-parent calls to interface super methods. (#150)
The existing logic is wrong, and they will always be valid as-is because any superinterfaces will be merged onto the target class.
2024-07-01 08:58:23 +01:00
Mumfrey 017eecf17d Propagate local context through compounds via decoration, closes #532 2024-06-25 23:45:48 +01:00
Mumfrey d2105c6359 Display correct node type in printLocals 2024-06-21 00:01:58 +01:00
Mumfrey 8f0bb79ae5 Add fuzz and skip options to AfterInvoke, closes #653 2024-06-20 23:54:19 +01:00
modmuss d0a6ebdf9e Update Gradle (#148) 2024-06-19 23:18:56 +01:00
LlamaLad7 a8254c7483 Fix: Properly extend the stack in ModifyArgInjector. (#144)
The old logic doesn't really make any sense and the calculated extension usually ended up being negative.
Instead, we just make room for our possible receiver and all of our args.
2024-06-08 15:17:38 +01:00