Skip to content

Fix NewArmV8InstructionSet to properly fetch 'this' parameter and add call instructions#557

Merged
SamboyCoding merged 3 commits into
SamboyCoding:developmentfrom
iLillie:development
Jun 8, 2026
Merged

Fix NewArmV8InstructionSet to properly fetch 'this' parameter and add call instructions#557
SamboyCoding merged 3 commits into
SamboyCoding:developmentfrom
iLillie:development

Conversation

@iLillie

@iLillie iLillie commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Add(address, OpCode.CallVoid, target) :
Add(address, OpCode.Call, target, returnRegister2);

call.Operands.AddRange(GetArgumentOperandsForCall(context, target));

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AddRange is required here since previously the ArgumentOperands would be System.Object[] instead of correctly being provided as params.

This is because of C# extracting arrays if it's the only argument to params, but if there are more, it gets appended as a System.Object[] instead of appending each item in the array.

@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 27165607467

Coverage decreased (-0.02%) to 33.768%

Details

  • Coverage decreased (-0.02%) from the base build.
  • Patch coverage: 18 uncovered changes across 3 files (0 of 18 lines covered, 0.0%).
  • 4 coverage regressions across 2 files.

Uncovered Changes

File Changed Covered %
Cpp2IL.Core/InstructionSets/NewArmV8InstructionSet.cs 13 0 0.0%
Cpp2IL.Core/Analysis/LocalVariables.cs 3 0 0.0%
Cpp2IL.Core/IlGenerator.cs 2 0 0.0%

Coverage Regressions

4 previously-covered lines in 2 files lost coverage.

File Lines Losing Coverage Coverage
Cpp2IL.Core/InstructionSets/NewArmV8InstructionSet.cs 3 0.0%
Cpp2IL.Core/IlGenerator.cs 1 0.0%

Coverage Stats

Coverage Status
Relevant Lines: 12461
Covered Lines: 4661
Line Coverage: 37.4%
Relevant Branches: 7916
Covered Branches: 2220
Branch Coverage: 28.04%
Branches in Coverage %: Yes
Coverage Strength: 241224.89 hits per line

💛 - Coveralls

@SamboyCoding SamboyCoding merged commit f907959 into SamboyCoding:development Jun 8, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants