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

[decomp] make use of the generated load boundary data #984

Merged
merged 2 commits into from
Dec 1, 2021

Conversation

ManDude
Copy link
Member

@ManDude ManDude commented Nov 24, 2021

No description provided.

@coveralls
Copy link

coveralls commented Nov 24, 2021

Pull Request Test Coverage Report for Build 1500849870

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 55.644%

Totals Coverage Status
Change from base Build 1498012185: 0.0%
Covered Lines: 40425
Relevant Lines: 72649

💛 - Coveralls

Copy link
Collaborator

@water111 water111 left a comment

Choose a reason for hiding this comment

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

looks good - just one comment on the doarray macro

(while (< ,i ,len)
,@body
(1+! ,i)
(set! ,val (-> ,arr ,i))
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this will read past the end of the array on the last iteration through. I think you'll need to put a (let ((,val (-> ,arr ,i))) inside of the while to get val with the right type, and not read past the end.

Copy link
Member Author

@ManDude ManDude Nov 30, 2021

Choose a reason for hiding this comment

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

This is the original code:

(let* ((gp-0 (-> *static-load-boundary-list* length))
      (s5-0 0)
      (a0-1 (-> *static-load-boundary-list* s5-0))
      )
  (while (< s5-0 gp-0)
   (load-boundary-from-template (the-as (array object) a0-1))
   (+! s5-0 1)
   (set! a0-1 (-> *static-load-boundary-list* s5-0))
   )
  )

val will be out of bounds after the last iteration, but that value won't ever be used because the while condition will fail anyway.

Copy link
Collaborator

Choose a reason for hiding this comment

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

ah ok, in that case let's do the same thing they did. Agreed that it won't cause problems. Unless you have an array that ends at the end of memory, but they never do this.

@water111 water111 merged commit 6a38597 into open-goal:master Dec 1, 2021
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