Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement as syntax for multiple base types (mob|obj|turf) #1917

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

MyNameIsRomayne
Copy link

This is an attempt to support code like

for (var/atom/A as mob|obj|turf|area in view(null, null))

to continue the implementation parity between OD and DM

@boring-cyborg boring-cyborg bot added Compiler Involves the OpenDream compiler Runtime Involves the OpenDream server/runtime labels Aug 12, 2024
@MyNameIsRomayne
Copy link
Author

This is probably not a great first project (it was supposedly easy at first, but the proper implementation is slightly more complicated) for me, so the code quality is dubious.

Current issues are something along the lines of
Error OD0000 at code/mob/living/silicon/ai.dm:1102:11: Negative stack size
though this should all work fine once these errors are resolved (?)

…ssary second bytecase and a unnecessary null check, though. Also add annotated bytecode case
@github-actions github-actions bot added size/L and removed size/M labels Aug 12, 2024
@MyNameIsRomayne
Copy link
Author

It compiles without errors so I'm undrafting this and re-requesting review

@MyNameIsRomayne MyNameIsRomayne marked this pull request as ready for review August 12, 2024 13:30
// "as anything" performs no check. Other than that, all that's left are type assignments like `as mob|obj|area`.
proc.CreateFilteredBaseTypesListEnumerator((byte) dmTypes.Value.Type, dmTypes.Value.Type);
alreadyCreatedEnumerator = true;
DMCompiler.VerbosePrint($"Created CreateFilteredBaseTypesListEnumerator");
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we want this print here?

Comment on lines +233 to +236

public DreamPath[] GetDMAncestors() {

}
Copy link
Collaborator

Choose a reason for hiding this comment

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

?

Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@amylizzle
Copy link
Contributor

Abandoned?

@MyNameIsRomayne
Copy link
Author

Yeah these haven't been worked on for a while, I'm not sure if I'll be able to get to them. Someone else can continue it or work on it if they want

@MyNameIsRomayne MyNameIsRomayne marked this pull request as draft December 5, 2024 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compiler Involves the OpenDream compiler Merge Conflict Runtime Involves the OpenDream server/runtime size/L
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants