-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[superseded] move comment
field out of TNode
=> sizeof(TNode) = 32 instead of 40
#10054
Conversation
a42d5cf
to
1abe88c
Compare
comment
field out of TNode
comment
field out of TNode
=> sizeof(TNode) = 32 instead of 40
@timotheecour er, @krux02 is actively working on this feature too. |
mainly did this as an experiment to see whether we could get away with removing that @krux02 @Araq how will #10046 avoid code breakage, eg for macros that use |
The node kind is different now. I don't think there is any code that accesses a Since I am actively working on this issue I am closing your PR here. I hope you are OK with it. |
I'm ok with you closing my PR if you're actively working on this issue but last commit on #10061 was 17 days ago (819dd27) ; [EDIT] upon further investigation, it looks like you've blocked my account from commenting on any issue/PR that was authored by you (I'm hoping it was by accident, please unblock me as this makes no sense) see https://irclogs.nim-lang.org/07-01-2019.html#05:06:20 |
just an update. I am actively working on this change. But you know, there was christmas. I didn't work during that time. Since this is a breaking change it takes a while, too. I want it to be the least amount of breaking as possible. And everything that used to compile should have a very nice error message. I don't want to break somebody's code with a nice error message such as "internal error". |
Since my work on this issue is on ice I reopen this. |
@timotheecour this has "work in progress" in the title: has there been any work or progress recently? Can we close this one, and you can open a new one when the merge conflicts are resolved and more work has been done (if there's still a need for it)? |
1abe88c
to
42251b3
Compare
PR has stalled, feel free to rebase and reopen, removing the comment field from the AST would still be much appreciated. |
comment
field out of TNode
=> sizeof(TNode) = 32 instead of 40comment
field out of TNode
=> sizeof(TNode) = 32 instead of 40
comment
field out of TNode
=> sizeof(TNode) = 32 instead of 40comment
field out of TNode
=> sizeof(TNode) = 32 instead of 40
superseded by #18760 |
after this PR, sizeof(TNode) = 32 instead of 40.
comment
to macros.nim (via a revived version of [TODO] add macros.comment(NimNode) magic to get node doc comment #8903)here's the main change:
comment
is only placed where it's useful: in a node of kind nkCommentStmt, or in aPSym
(where we're not as concerned about space since there are fewer suchPSym
compared toTNode
;TSym
is already quite large and adding a comment field to it doesn't add up to much )current results (WIP)
I was able to recompile nim and run code as well as nim doc on this, here's current results:
it's lacking comments except for runnableExamples and mainFun currently
it renders as:
what I'm not yet sure about
nkCommentStmt
doesn't havesons
, however it seems used in following code (where I had to comment out therecorded.add
sincesons
isn't available anymore):It seems to me compiler could be patched, that
recordPragma
could be done differently to allow what I'm doing hererawSkipComment