Skip to content

Misc Parity Fixes - #2669

Open
ike709 wants to merge 11 commits into
OpenDreamProject:masterfrom
ike709:misc_builtins
Open

Misc Parity Fixes#2669
ike709 wants to merge 11 commits into
OpenDreamProject:masterfrom
ike709:misc_builtins

Conversation

@ike709

@ike709 ike709 commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator
  • Fixes misc builtins not properly handling some bad args
  • Fixes incorrect list size handling, particularly for multidimensional lists
  • Fixes some bitwise operator behavior on lists

All of the new unit tests were passing in BYOND but not in OpenDream prior to these changes.

@ike709
ike709 requested a review from wixoaGit July 20, 2026 06:39
@boring-cyborg boring-cyborg Bot added Compiler Involves the OpenDream compiler Runtime Involves the OpenDream server/runtime labels Jul 20, 2026
Comment thread DMCompiler/DM/Expressions/Builtins.cs Fixed
// BYOND's one-dimensional list produces null when its runtime size is negative
// This is different from multidimensional lists, where the negative dimensions become zero
if (dimensionCount == 1 && dimensionSizes[0].TryGetValueAsInteger(out int size) && size < 0) {
dimensionSizes[0].Dispose();
Comment thread OpenDreamRuntime/Procs/DMOpcodeHandlers.cs Fixed
Comment thread OpenDreamRuntime/Procs/DMOpcodeHandlers.cs Dismissed
@wixoaGit

Copy link
Copy Markdown
Member

I think you've encountered a refcounting bug in BYOND with this one
image

@ike709

ike709 commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator Author

I slapped NOBYOND on the test pending a response to https://www.byond.com/forum/post/2989691

Comment thread DMCompiler/DM/Expressions/Builtins.cs Outdated
Comment thread OpenDreamRuntime/Procs/DMOpcodeHandlers.cs Outdated
Comment thread OpenDreamRuntime/Procs/DMOpcodeHandlers.cs Outdated
Comment thread OpenDreamRuntime/Procs/DMOpcodeHandlers.cs Outdated
ike709 and others added 3 commits July 27, 2026 01:30
Co-authored-by: wixoa <wixoag@gmail.com>
Co-authored-by: wixoa <wixoag@gmail.com>
Co-authored-by: wixoa <wixoag@gmail.com>
Comment thread OpenDreamRuntime/Procs/DMOpcodeHandlers.cs Outdated
@ike709
ike709 requested a review from wixoaGit July 28, 2026 06:03
Comment thread Content.Tests/DMProject/Tests/List/DimensionalListSizes.dm Outdated
@ike709

ike709 commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

BYOND bug should be fixed

@ike709 ike709 closed this Aug 6, 2026
@ike709 ike709 reopened this Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Compiler Involves the OpenDream compiler Runtime Involves the OpenDream server/runtime size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants