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

Update to D 2.068.1 FE #162

Merged
merged 1 commit into from
Jun 8, 2016
Merged

Update to D 2.068.1 FE #162

merged 1 commit into from
Jun 8, 2016

Conversation

ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented Mar 6, 2016

WORK IN PROGRESS

Things carried over from 2.066+2.067 updates, see #99

There is still a lot of catching up to do with regards to moving most things over to either free functions, double-dispatch visitors, or removing a whole range of stubs entirely!

Planned changes:

  • Remove TREE_THIS_VOLATILE from codegen.
  • Update signatures for new lifetime.d routines.
  • Update for new RTTI layout (I think).
  • Introduction of more intuitively named switches. (E.g: Deprecate -fintfc)

Some end goals (and this is the last release that I aim to get them done by):

  • Grouping functions into clearly named source files.
  • Adding a namespace gcc { namespace d { } } for common codegen routines, or...
  • Encapsulating codegen routines into the Visitor classes, and possibly in the process...
  • Replace dt_t* with tree and remove the dt_t** functions
  • Merge toDt with the general toElem codegen routines.
  • It would also be nice to remove Symbol, and block, but that will have to wait until 2.07x maybe.

Immediate things that need to be done:

  • Pass 2.068 the library unittests
  • Pass 2.068 the testsuite
  • BUG Pass 2.068 the library unittests with optimizations turned on.

@ibuclaw ibuclaw force-pushed the 2.068 branch 2 times, most recently from 4a3528a to c8ff589 Compare March 6, 2016 22:25
@ibuclaw
Copy link
Member Author

ibuclaw commented Mar 9, 2016

List of things backported from later versions of druntime:

@ibuclaw
Copy link
Member Author

ibuclaw commented Mar 11, 2016

There are some CTFE vs runtime assertions being triggered in core.internal.hash and core.internal.convert - I assume this is because CTFE precision of real is higher than runtime (There are 160 mantissa bits represented vs. 64). @MartinNowak - you wrote these if I recall right.

@ibuclaw
Copy link
Member Author

ibuclaw commented Mar 11, 2016

Actually wait, these are regressions from 2.067 -> 2.068. And all that has changed is the frontend... hmm.

@ibuclaw
Copy link
Member Author

ibuclaw commented Mar 11, 2016

Or maybe not...

@ibuclaw
Copy link
Member Author

ibuclaw commented Mar 12, 2016

It's almost as if the unittests are never ran in 2.067, or simply luck makes them pass.

For core.internal.hash failures. It's because toUbytes returns a garbage slice if the input value is a struct literal, as after returning the stack is wiped clean (missing a .dup).

@ibuclaw
Copy link
Member Author

ibuclaw commented Mar 12, 2016

It also fails because you can't rely on padding between fields always being zero.

@ibuclaw
Copy link
Member Author

ibuclaw commented Mar 13, 2016

Ah, I see now why it has been silently passing the unittester, it's because core.internal.xxx modules were never pulled into the final executable because it's was never a dependency.

Wonderful! I wonder how many other bugs are hiding, or it's just these two modules...

@jpf91
Copy link
Contributor

jpf91 commented Mar 15, 2016

Ah, I see now why it has been silently passing the unittester, it's because core.internal.xxx modules were never pulled into the final executable because it's was never a dependency.

Wonderful! I wonder how many other bugs are hiding, or it's just these two modules...

Maybe we should use --whole-archive when linking our unittests, but I'm not sure if this is 100% portable. Why do we even create libg*_t.a libraries? If we link all *.t.o objects directly into the unittest executable we can probably avoid this issue in a portable way.

@ibuclaw ibuclaw force-pushed the 2.068 branch 3 times, most recently from c77ec27 to ed3b724 Compare March 24, 2016 21:33
@ibuclaw
Copy link
Member Author

ibuclaw commented May 15, 2016

Time to rebase against master. Argh!

@ibuclaw ibuclaw force-pushed the 2.068 branch 4 times, most recently from d4de553 to 17491e7 Compare May 20, 2016 16:31
@ibuclaw
Copy link
Member Author

ibuclaw commented May 20, 2016

@jpf91 should I be worried?

Old build system: https://semaphoreci.com/d-programming-gdc/gdc/branches/pull-request-162/builds/11

./unittest
core.exception.AssertError@/home/runner/GDC/libphobos/src/std/conv.d(1042): unittest failure
----------------
core.exception.AssertError@/home/runner/GDC/libphobos/src/std/base64.d(1669): Assertion failure
----------------

New build system: https://semaphoreci.com/d-programming-gdc/gdc/branches/pull-request-162/builds/12

0.004s PASS release64 std.conv

Then I can't rule out that another change fixed it. But if it did, was not directly intentional.

@jpf91
Copy link
Contributor

jpf91 commented May 20, 2016

038613c

base64 also fails in master, but I explicitly disabled the test to match the old build system. The old build system didn't test base64 in 2.067 (the linker stripped the module).

I'm not sure about std.conv. One reason I switched to the new test_runner.d from upstream was that some modules failed depending on compilation order / order in which the modules were tested. I think std.conv was one of these, though I'm not sure.

Upstream and the new build system now only test one module per process, so every module is tested in a clean environment. You could add a printf to the unittest to check if it's really executed though.

@ibuclaw ibuclaw force-pushed the 2.068 branch 4 times, most recently from eb93051 to 2bd9849 Compare June 7, 2016 20:57
@ibuclaw
Copy link
Member Author

ibuclaw commented Jun 7, 2016

Great, now one of the tests no longer compiles because it pulls in a symbol only held by std.net.curl module.

@ibuclaw
Copy link
Member Author

ibuclaw commented Jun 8, 2016

OK, removed the test for now. Let's get in the breaking stuff now.

@ibuclaw ibuclaw merged commit 91397b8 into D-Programming-GDC:master Jun 8, 2016
@ibuclaw ibuclaw deleted the 2.068 branch June 8, 2016 06: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.

2 participants