Skip to content

eliminate array bounds error helper function#6536

Merged
andralex merged 1 commit intodlang:masterfrom
WalterBright:darrayp
Feb 16, 2017
Merged

eliminate array bounds error helper function#6536
andralex merged 1 commit intodlang:masterfrom
WalterBright:darrayp

Conversation

@WalterBright
Copy link
Member

Consolidated the code that builds the error call into buildArrayBoundsError() and then fixed it to load the file pointer directly rather than call a helper function.

Once this works, I'll delete the old code, and then amend it to reduce the bloat from redundant file strings being emitted.

* Construct elem to run when an array bounds check fails.
* Returns:
* elem generated
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

No documentation for the parameters.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can loc be const since it's passed by ref and not modified, as far as I can see.

if (SegData[seg])
{ seg_data *pseg = SegData[seg];
{
seg_data *pseg = SegData[seg];
Copy link
Member

Choose a reason for hiding this comment

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

yay

@andralex
Copy link
Member

Auto-merge toggled on

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