-
Notifications
You must be signed in to change notification settings - Fork 757
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
Enable leak checks #403
Enable leak checks #403
Conversation
@@ -63,7 +63,8 @@ ELSE() | |||
ADD_COMPILE_FLAG("-O0") | |||
ADD_COMPILE_FLAG("-g3") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hoist out this -g3
instead of duplicating below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, this is just throwaway code for testing on travis. Just makes the stack traces from leaks nicer to read. I'll remove when this PR is done and the leaks are gone.
73807b3
to
c8d4fbe
Compare
ea38248
to
3ba2501
Compare
…nction types, can more simply be held by unique_ptrs on the owning module. this avoids need to coordinate arena allocation for their elements, and only the far more plentiful expression nodes are a perf factor anyhow
Ok, this should be good to go. I rebased now and removed the debug help stuff, and all leaks are gone. A bunch of code changed here, but aside from the |
std::map<IString, std::vector<CallImport*>> importedFunctionCalls; | ||
|
||
void noteImportedFunctionCall(Ref ast, WasmType resultType, AsmData *asmData, CallImport* call) { | ||
assert(ast[0] == CALL && ast[1][0] == NAME); | ||
IString importName = ast[1][1]->getIString(); | ||
auto* type = allocator.alloc<FunctionType>(); | ||
std::unique_ptr<FunctionType> type = make_unique<FunctionType>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
auto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.
Merging as this touches so much code, it's a merge collision hazard. Let's do additional comments as followups. @jfbastien: I already addressed the first of your comments, and had some questions about the others. @dschuff: about merge vs squash commits, this pr is an example of where i think a merge commit is better. It's lots of tiny separate commits, not worth their own pr, and it's nice to keep them separate for future bisection and readability purposes. Also the merge commit shows the structure (that those commits led up to the commit enabling leak tests now that they pass). |
Let's see where things stand now.