Conversation
|
I want to wait on this a while longer before breaking old compiled code. |
|
It's been over 6 months, is there a plan for when this will get merged in? |
|
I'd be happy to update it to current, but it's also very low priority cleanup. I mostly did it because it was easy and it was a good way to play with the pull system back right after we'd moved to github. |
|
I consider anything that removes redundant or dead code from the glue layer to be very useful. It's a very scary and confusing part of the compiler for me. As it's also one of the oldest pull requests, and fairly straightforward, I was wondering how long Walter planned to wait. |
|
Brad, if you want to update the pull request, I'll fold it in. Also, a lot of the changes appear to be gratuitous whitespace changes - please run detab over files before checking them in. |
|
On Monday, August 29, 2011 8:40:23 PM, WalterBright wrote:
I'll update. They're not gratuitious whitespace changes though.. it's |
|
Hrm.. updating it to current code is trivial, but one of the interpret tests is failing and the stack trace looks very familiar.. something I hit when I played with this before. I don't recall what I did to fix it, or if I even did. Essentially everything passes except for the dmd test compilable/interpret3.d. The problem has to do with AA Literals: #0 0x0818a637 in TemplateInstance::semantic (this=0x8468b08, sc=0x0, fargs=0x0) at template.c:3795 frame 0 is: frame 9 is here: Given that this isn't urgent at all, I'm going to set it aside. If anyone else wants to dive into it, the changes shown in the diff are essentially search for aaGetSymbol in e2ir.c and make the I64 branch the only case. The variable in those cases isn't about 64 bitness but about druntime api versioning. |
|
It's trying to run semantic on the AA template without a scope. I think using object.d's global scope is the correct solution. |
|
Key question: Why is that new block of code required? It wasn't before and isn't required on 64 bits, just 32 bits. Secondary becomes, why doesn't the type instance have a scope already? Is it really ok to borrow the parent scope? My instincts tell me to figure out why it doesn't already have one, not figure out how to get one. |
|
Fair enough, I'll find the answer tomorrow. My instinct tells me the explanation is that the semi-library aa implementation is borked, as usual. |
|
By tomorrow I meant 2 weeks. The reason it doesn't fail on 64bit is this - you disabled it. |
|
#381 should fix the segfault. |
|
Aren't you glad I pushed for a better root cause determination? :) I'd forgotten all about that other bug (filed quite a few 64 bit bugs that still aren't fixed while doing the d2 x86/64 work). After pull 381 is incorporated I'll update this one and re-test it. Assuming all goes well, then this can be pulled in. Thanks for doing the research. |
|
sigh, yes. Hopefully one day I'll be able to push myself to do it. |
|
Re-creating as a new pull request. |
Add additional tests for dll
Add hooks to take a release the slock in order to stop the world.
…dlang#7) * Fix parsing tuple notation without `-preview=tuples` After dlang#5, without `-preview=tuples`, the parser would cause an assert error when finding tokens that satisfy `isTupleNotation`. * Fix parsing malformed auto declaration starting with `(` Change preview check to an assert after last commit. Handle a tuple declaration that doesn't have `=` after the last `)`. The `peekPastParen(&token).value == TOK.assign` check is not needed because the `parseInitializer` parameter is true so `check(TOK.assign)` does the job and provides a good error message if missing. Add test for malformed auto and non-auto tuple declarations. * Remove unnecessary preview check
…dlang#7) * Fix parsing tuple notation without `-preview=tuples` After dlang#5, without `-preview=tuples`, the parser would cause an assert error when finding tokens that satisfy `isTupleNotation`. * Fix parsing malformed auto declaration starting with `(` Change preview check to an assert after last commit. Handle a tuple declaration that doesn't have `=` after the last `)`. The `peekPastParen(&token).value == TOK.assign` check is not needed because the `parseInitializer` parameter is true so `check(TOK.assign)` does the job and provides a good error message if missing. Add test for malformed auto and non-auto tuple declarations. * Remove unnecessary preview check
…dlang#7) * Fix parsing tuple notation without `-preview=tuples` After dlang#5, without `-preview=tuples`, the parser would cause an assert error when finding tokens that satisfy `isTupleNotation`. * Fix parsing malformed auto declaration starting with `(` Change preview check to an assert after last commit. Handle a tuple declaration that doesn't have `=` after the last `)`. The `peekPastParen(&token).value == TOK.assign` check is not needed because the `parseInitializer` parameter is true so `check(TOK.assign)` does the job and provides a good error message if missing. Add test for malformed auto and non-auto tuple declarations. * Remove unnecessary preview check
…dlang#7) * Fix parsing tuple notation without `-preview=tuples` After dlang#5, without `-preview=tuples`, the parser would cause an assert error when finding tokens that satisfy `isTupleNotation`. * Fix parsing malformed auto declaration starting with `(` Change preview check to an assert after last commit. Handle a tuple declaration that doesn't have `=` after the last `)`. The `peekPastParen(&token).value == TOK.assign` check is not needed because the `parseInitializer` parameter is true so `check(TOK.assign)` does the job and provides a good error message if missing. Add test for malformed auto and non-auto tuple declarations. * Remove unnecessary preview check
…dlang#7) * Fix parsing tuple notation without `-preview=tuples` After dlang#5, without `-preview=tuples`, the parser would cause an assert error when finding tokens that satisfy `isTupleNotation`. * Fix parsing malformed auto declaration starting with `(` Change preview check to an assert after last commit. Handle a tuple declaration that doesn't have `=` after the last `)`. The `peekPastParen(&token).value == TOK.assign` check is not needed because the `parseInitializer` parameter is true so `check(TOK.assign)` does the job and provides a good error message if missing. Add test for malformed auto and non-auto tuple declarations. * Remove unnecessary preview check
# This is the 1st commit message: refactoring # This is the commit message #2: refactoring # This is the commit message #3: refactoring # This is the commit message #4: refactoring # This is the commit message #5: refactoring # This is the commit message #6: refactoring # This is the commit message #7: refactoring # This is the commit message #8: refactor/irstate-attrs refactoring add pragma(inline, true) change pragma(inline, true) -> pragma(inline, false) introduce root.Array.only and test it out in expressionsem (dlang#21520) [attrib.d] remove unused semantic import [dstruct.d] remove unused import [aggregate.d] move `searchCtor` to `expressionsem.d` remove some now unused semantic symbols from the import list. [cond.d] remove unused `typesem` import (dlang#21538) [expression.d] restrict `typesem` import fix dlang#19587 No debug line info for simple code blocks (dlang#21544) set location info on return statement, not only on return expression [dsymbol.d] remove dependance on glue layer (dlang#21532) move `loadModuleFromLibrary` to `dsymbolsem.d` (dlang#21535) remove `dmodule.d` dependance of a few more `dsymbolsem.d` symbols. [func.d] remove dependance on glue layer (dlang#21534) [aggregate.d] move `checkOverlappedFields` to `dsymbolsem.d` (dlang#21542) and make private Templatize `_adEq2` (dlang#21513) * Mark array literals as `on-stack` to bypass `@nogc` analysis * Update `fail_compilation` test output After updating the memcmp-ability criteria, now dynamic array can also be compared using `memcmp` if their element type is comparable bit by bit. refactor: use new array constructor throughout expressionsem refactoring refactoring refactoring refactoring refactoring refactoring refactoring refactoring refactoring
…dlang#7) * Fix parsing tuple notation without `-preview=tuples` After dlang#5, without `-preview=tuples`, the parser would cause an assert error when finding tokens that satisfy `isTupleNotation`. * Fix parsing malformed auto declaration starting with `(` Change preview check to an assert after last commit. Handle a tuple declaration that doesn't have `=` after the last `)`. The `peekPastParen(&token).value == TOK.assign` check is not needed because the `parseInitializer` parameter is true so `check(TOK.assign)` does the job and provides a good error message if missing. Add test for malformed auto and non-auto tuple declarations. * Remove unnecessary preview check
…dlang#7) * Fix parsing tuple notation without `-preview=tuples` After dlang#5, without `-preview=tuples`, the parser would cause an assert error when finding tokens that satisfy `isTupleNotation`. * Fix parsing malformed auto declaration starting with `(` Change preview check to an assert after last commit. Handle a tuple declaration that doesn't have `=` after the last `)`. The `peekPastParen(&token).value == TOK.assign` check is not needed because the `parseInitializer` parameter is true so `check(TOK.assign)` does the job and provides a good error message if missing. Add test for malformed auto and non-auto tuple declarations. * Remove unnecessary preview check
The new non-vararg interfaces to druntime works for both 32 and 64, so let's drop the old version in favor of the new one. It's simpler, more portable, and having just one interface reduces maintenance costs.