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

Vireo allocates some dataspace elements during preflight #335

Open
spathiwa opened this issue Aug 31, 2017 · 0 comments
Open

Vireo allocates some dataspace elements during preflight #335

spathiwa opened this issue Aug 31, 2017 · 0 comments

Comments

@spathiwa
Copy link
Contributor

There is a check in TDViaParser::FinalizeVILoad() which asserts that during the preflight phase of parsing a VI/clump, no new allocations have been made in the type manager.
This is commented out because it's not currently true.

This doesn't usually cause any problems; the allocations are either used or deleted and reallocated during the allocation phrase, but it's extra work we don't need to be doing, and these extra allocations did expose a bug in CopyProcName() (see DE14013 and PR #344) because the reallocations didn't have the same alignment (when incorrectly expecting alignment to match beyond 8-byte boundaries).

This issue is to track preventing these allocation during preflight. After fixing DE14013, they aren't known to be manifeting any incorrect behavior, but it's conceptually incorrect as well as a minor performance issue.

Some of the allocations known to occur in preflight:

ClumpParseState::ResolveActualArgument():

~line 530, a DefaultValueType is allocated for unwired (*) arguments.
~line 590, calling actualArgument->Begin(...) will allocate arrays

ClumpParseState::EmitInstruction():
~line 1080, DVTs allocated for extra formal arguments not specified.

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

No branches or pull requests

1 participant