-
-
Notifications
You must be signed in to change notification settings - Fork 264
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
Merge 2.076.1 front-end and stdlibs #2362
Conversation
Biggest changes: * idgen.d has been replaced by a CTFE implementation, id.d. I manually added a C++ header declaring the symbols we need and adapted (simplified) the CMake script accordingly. * More semantic() methods have been extracted as visitors; most notably for expressions.
|
That was quick - you beat me to it. ;) |
|
Oh sorry, hope you didn't invest too much time into it [I committed the submodules yesterday, so I hoped it'd be clear I'm working on it]. |
|
Btw, apparently there are no new |
|
Great work! |
|
No new Phobos release without regressions for 64-bit reals: dlang/phobos#5762 Thanks Rainer, I was wondering whether I shouldn't accept |
There's some in https://github.com/ldc-developers/dmd-testsuite/blob/ldc-merge-2.076/runnable/cassert.d, https://github.com/ldc-developers/dmd-testsuite/blob/ldc-merge-2.076/compilable/betterCarray.d and perhaps https://github.com/ldc-developers/dmd-testsuite/blob/ldc-merge-2.076/compilable/betterCswitch.d (don't know why the betterC switch is not used there?), though far from anything extensive. ( |
I hope I didn't miss anything - fixing these bugs is super-tedious.
* druntime: Adapt test/shared to vanished osmodel.mak * LDMD: Accept multiple `-fPIC`. It translates to `-relocation-model=pic`; that option is provided by LLVM and only allowed once in the command line. That issue is new for 2.076, as druntime's test/common.mak defaults to PIC now.
Analogous to DMD.
|
Semaphore, Circle, Travis: only |
|
Reduced issue: import core.stdc.stdio;
int dtor_cnt = 0;
struct S57
{
int v;
this(int n){ v = n; printf("S.ctor v=%d\n", v); }
~this(){ ++dtor_cnt; printf("S.dtor v=%d\n", v); }
bool opCast(T:bool)(){ printf("S.cast v=%d\n", v); return true; }
}
S57 f(int n){ return S57(n); }
void main()
{
dtor_cnt = 0;
if (auto s = (f(1), f(2), f(10)))
{
assert(dtor_cnt == 2);
}
else assert(0);
assert(dtor_cnt == 3);
}The result of From Edit: A merge regression, I overlooked a line. ;) |
|
The testpdb failure happens, because
|
|
BTW: I just noticed that |
|
Thanks Rainer.
class MyClass {
int a;
bool myMethod() { return true; }
}
void main() {
auto str = "this is a string";
auto c = new MyClass();
}Wrt. class names: !14 = !DIDerivedType(tag: DW_TAG_pointer_type, name: "di.MyClass", baseType: !15, size: 64, align: 64)
!15 = !DICompositeType(tag: DW_TAG_structure_type, name: "MyClass", file: !3, line: 1, baseType: !16, size: 192, align: 64, elements: !18, identifier: "C2di7MyClass")
!16 = !DICompositeType(tag: DW_TAG_structure_type, name: "Object", file: !17, line: 89, size: 128, align: 64, elements: !4, identifier: "C6Object")So we use the fully qualified name for the DI pointer type name (which VS doesn't display, it shows Wrt. strings, that's got to be an accidental regression: !37 = !DIBasicType(name: "immutable(char)", size: 8, encoding: DW_ATE_unsigned_char) |
AFAICT a pointer type doesn't have a name in CV, I guess it is just discarded. |
Hmm, not so easy. |
I took a short look: With the VS C expression evaluator, there is a |
It rebuilt the type inserting "immutable", but that kept the |
|
I opened a PR for the |
ddmd/func.d has seen a major change wrt. in/out contracts, which are now generated after inferring the function return type in semantic3. See dlang/dmd@831552d2047d.
Conflicts: runtime/phobos
|
All good on Android/ARM, all the same tests pass as master once I disabled building the new |
|
Nope, #2365 doesn't make use of that druntime file at all (edit: and neither does DMD afaict). |
|
OK, in that case, can you add a CMake line to this pull taking it out of the list of D files to compile? It's a declaration-only file anyway, nothing to compile. I suppose it currently warns porters that their OS is not included, but seems pointless to enforce that if it's only opt-in anyway. |
|
Well the compiler uses its own hardcoded set of C assert function signatures, so knowing the one for Android/Bionic would be good in order to make |
Tested by dmd-testsuite's runnable/testpdb.
[2.076] Debuginfos: Use fully qualified names
Conflicts: runtime/druntime
|
Seeing a strange linker error when trying to build the tests for some phobos modules with the latest 1.6 beta release, that I'm not seeing with the 1.5 release: Not sure what's going on, as the symbol appears to be there in both object files in ldc 1.5 also, but I'm only getting an error with the 1.6 beta. |
|
I seem to recall seeing in IR that the ModuleInfos aren't emitted as COMDATs anymore. I thought it'd make no difference as there's one per module. When compiling a stdlib unittest module and linking it against druntime/Phobos, I'd have assumed that only the unittest module is pulled in for linking, but at least in your case it seems to pull in both. |
|
I just tried it with dmd 2.075-7 on linux/x64, cannot reproduce the error with any of the three latest versions, so seems only related to the latest 1.6 beta. |
|
What's the linker command line? Does Yesterday I linked similar manual unittests ( |
|
The linker command is basically identical for 1.5 and 1.6 beta, with If I try to run the gcc command that ldc 1.5 puts out but with the I didn't see this issue with |
|
Should be fixed by #2409. |
|
Yep, that fixes it, confirmed by reverting only that commit and comparing. |
No description provided.