Conversation
ac7bab2 to
f6f55a9
Compare
|
It also has auto-arg changes.. please keep commits small so it's easier for me to review.. |
|
I just split this PR into 2 separate commits:
|
|
|
||
| if (a.getCall()) { | ||
| qt = ma.analyseExpr(a.getCall2(), true, RHS); | ||
| if (qt.isInvalid()) return; |
There was a problem hiding this comment.
In which case will a.getCall() be nil?
There was a problem hiding this comment.
the call expression is only constructed by the parser if asserts are enabled. The expression is always parsed and stored for the analyser.
e15d382 to
32c8780
Compare
a483970 to
1fea052
Compare
d7be4b3 to
f5c7b25
Compare
55626d0 to
e143bd3
Compare
83ea8af to
35d20f6
Compare
9be0d32 to
4010aa5
Compare
113f33a to
7481cb5
Compare
31a11a7 to
3c4cf82
Compare
23cd690 to
4b162e3
Compare
a10471a to
e9bc6a6
Compare
6a171b7 to
3fd9fc8
Compare
|
I lookat the the PR again. It slows down parsing 16.1 -> 16.6 ms on avg on my system. Is there a reason we add the call during parsing? Otherwise it could follow the other AST changes and just store the basic info during parsing and only change the AST if asserts are enabled and the compiler is not in check-only mode. Then --check would be faster |
|
Thanks for reviewing this again. Indeed I can delay constructing the call to the analyser and only if needed. I suspect the slowdown is due in large part to the conversion from |
* compute the assert string and function call at analysis time if !check_only * add `c2_assert` module in C library interface `libs/libc/c2_assert.c2i` * update tests
auto_funcfunction parameter attributeauto_xxxattributes