Skip to content
This repository was archived by the owner on Jun 20, 2019. It is now read-only.

Comments

Update frontend to dmd/stable#683

Merged
ibuclaw merged 43 commits intoD-Programming-GDC:masterfrom
ibuclaw:dmdstable
Jul 14, 2018
Merged

Update frontend to dmd/stable#683
ibuclaw merged 43 commits intoD-Programming-GDC:masterfrom
ibuclaw:dmdstable

Conversation

@ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented Jun 20, 2018

Only got as far as linking, no testing runtime problems yet...

@ibuclaw ibuclaw force-pushed the dmdstable branch 2 times, most recently from 5eb6cc7 to 0f8aa3c Compare June 21, 2018 22:44
@ibuclaw
Copy link
Member Author

ibuclaw commented Jun 21, 2018

Compiler seems fine now when building the parts of druntime and phobos it can. No compile-time ICE or failures when building druntime/phobos. Only reported missing symbols in object.d

@Geod24
Copy link

Geod24 commented Jun 22, 2018

That's 2.081 right ? 👍

@ibuclaw
Copy link
Member Author

ibuclaw commented Jun 22, 2018

@Geod24 unless a release happened in the last seven hours since I looked, then it's still 2.081-beta.

@ibuclaw
Copy link
Member Author

ibuclaw commented Jun 22, 2018

The first patch should be split up between frontend and glue changes. Some parts can be cherry picked into the C++ branch.

@ibuclaw ibuclaw force-pushed the dmdstable branch 4 times, most recently from f054cc8 to 46a7060 Compare June 24, 2018 18:42
@ibuclaw
Copy link
Member Author

ibuclaw commented Jun 25, 2018

There's a number of ICEs introduced by the new frontend. Surprisingly a couple look suspiciously like memory corruption. Possibly coming from dinterpret.d, where in one example there's a StructLiteralExp with pointers to what was then the stack.

# of expected passes		30806
# of unexpected failures	296
# of unresolved testcases	2924

@ibuclaw ibuclaw force-pushed the dmdstable branch 4 times, most recently from e6a8829 to efb6733 Compare June 30, 2018 22:04
@ibuclaw
Copy link
Member Author

ibuclaw commented Jul 1, 2018

This 3 dozen commit mess is the reason why I don't do "release" merges anymore. Still many bugs to fix, still memory corruption bug in interpret3.d, many implementation regressions pushed upstream though.

# of expected passes		31005
# of unexpected failures	44
# of unresolved testcases	2868

@ibuclaw
Copy link
Member Author

ibuclaw commented Jul 2, 2018

Thousands of unresolved tests were due to a link error have seen previously (there's an open upstream bug report on it).

Reverted, and now we're down to something more manageable.

# of expected passes		33729
# of unexpected failures	76
# of unresolved testcases	112

@ibuclaw
Copy link
Member Author

ibuclaw commented Jul 7, 2018

Looks like just around 4 things left to look at.

  • ICE in testsuite caused by memory corruption.
  • ICE in building unittests - bad dwarf codegen by the looks.
  • Check for new runtime library functions that should be called, add missing tests.
  • Resync with upstream, as its been another week since last.

@ibuclaw
Copy link
Member Author

ibuclaw commented Jul 8, 2018

ICE in unittests is reproducible on master:

void test()
{
  interface I {
    final void foo() { }
  }
}

Happens because dwarf2out doesn't handle DW interface types in prune_unused_types_walk_local_classes(), added case to the gcc patches, however alternatively we could just not mark D interface types with RECORD_IS_INTERFACE in the first place, so its just treated as a regular class according to debug info.

@ibuclaw ibuclaw force-pushed the dmdstable branch 2 times, most recently from b11fc9f to e15fe5c Compare July 8, 2018 21:31
@ibuclaw
Copy link
Member Author

ibuclaw commented Jul 8, 2018

Looks like just the memory corruption to address.

@belka-ew
Copy link
Contributor

I think, I found a regression:

module dub.generators.generator;

struct Package
{
    @property string name() const
    {
        return null;
    }
}

void ProjectGenerator()
{
    string[string] targets;

    void collectDependencies(ref string)
    {
    }

    collectDependencies(targets[Package.init.name]);
}

gives:

source/dub/generators/generator.d: In function ‘ProjectGenerator’:
source/dub/generators/generator.d:19:24: internal compiler error: in add_expr, at tree.c:7454
collectDependencies(targets[Package.init.name]);
^
0x6f7308 ???
../sysdeps/x86_64/start.S:118

@ibuclaw
Copy link
Member Author

ibuclaw commented Jul 14, 2018

@belka-ew - I can reproduce on stable branch, so was not introduced by this change.

Should raise a bug report though.

@belka-ew
Copy link
Contributor

ok. everything else looks fine

@ibuclaw
Copy link
Member Author

ibuclaw commented Jul 14, 2018

OK, hitting merge, have plenty of time to fix bugs and iron out other parts. At least with this in we can do weekly merge updates with dmd. :-)

Though having a quick look at the size/frequency of master->stable merges, will probably want to switch to being in sync with master when the next merge happens.

dlang/dmd@4473071 88 days ago
dlang/dmd@b591bdb 29 days ago

As the idea was to catch problems introduced by dmd early in the development cycle.

@ibuclaw ibuclaw merged commit 1c2972f into D-Programming-GDC:master Jul 14, 2018
@ibuclaw ibuclaw deleted the dmdstable branch July 14, 2018 21:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants