Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline

Feed Advanced Search

Apr 7 2022

howard.hinnant added a comment to D120327: compiler-rt: Add udivmodei5 to builtins and add bitint library.

I am no longer active in this community.

Apr 7 2022, 8:25 AM · Restricted Project, Restricted Project

Dec 8 2020

howard.hinnant added a comment to D92190: [libc++] fix std::sort(T**, T**).

Oh, yes, I believe that was it. Just a code size optimization.

Dec 8 2020, 10:30 AM · Restricted Project
howard.hinnant added a comment to D92190: [libc++] fix std::sort(T**, T**).

I agree that the change from size_t to uintptr_t is the right thing to do here. I don't recall exactly why I didn't use uintptr_t in the first place. It may have simply been an oversight. Or it may have been that uintptr_t wasn't in my toolbox at the time.

Dec 8 2020, 10:03 AM · Restricted Project

Jun 9 2020

howard.hinnant accepted D81477: [libc++] Avoid UB in year_month_day_last::day() for incorrect months.

Thanks!

Jun 9 2020, 10:25 AM · Restricted Project
howard.hinnant added a comment to D70346: [libc++] [LWG3231] Mark "year_month_day_last::day() specification does not cover !ok() values" issue as "Nothing to do", but add assertion..

This is part of a larger design philosophy for the entire library. It is not necessarily a logic error to have a date or date component be in a state such that its .ok() returns false. There is an example demonstrating this idea here:

Jun 9 2020, 8:45 AM · Restricted Project
howard.hinnant added a comment to D70346: [libc++] [LWG3231] Mark "year_month_day_last::day() specification does not cover !ok() values" issue as "Nothing to do", but add assertion..

The spec does not allow year_month_day_last::day() to crash. It must not assert. It must not index an array out of bounds. It must not cause undefined behavior.

Jun 9 2020, 7:05 AM · Restricted Project

Nov 13 2019

howard.hinnant added a comment to D56398: Add new EINTEGRITY errno.

I don't recall exactly what ELAST was for either. Though something like this is typically used to see if an enum/integral value is within the range of the declared enums.

Nov 13 2019, 10:52 PM

Sep 18 2018

howard.hinnant added a comment to D49514: [compiler-rt] [builtins] Add logb/logbf/logbl methods to compiler-rt to avoid libm dependencies when possible..
Sep 18 2018, 10:34 AM

Oct 16 2017

howard.hinnant added a comment to D38599: Remove warnings for dynamic_cast fallback..

Ok. Well that's why it is under a #define: to make it easier to include or not, depending on the needs of the platform.

Oct 16 2017, 5:03 PM
howard.hinnant added a comment to D38599: Remove warnings for dynamic_cast fallback..

Fwiw, I wrote this code. All of that "fallback" stuff was written to make customer code that was incorrect, but working on OS X -version-that-used-libsupc++ continue to work. I.e. to be a crutch for incorrect code. It should all be removed if you no longer want to provide such a crutch.

Oct 16 2017, 4:53 PM

Jan 4 2017

howard.hinnant added inline comments to D27429: [Chrono][Darwin] On Darwin use CLOCK_UPTIME_RAW instead of CLOCK_MONOTONIC.
Jan 4 2017, 5:08 PM

Dec 11 2016

howard.hinnant added a comment to D27429: [Chrono][Darwin] On Darwin use CLOCK_UPTIME_RAW instead of CLOCK_MONOTONIC.

Thanks Eric.

Dec 11 2016, 2:16 PM
howard.hinnant added a comment to D27429: [Chrono][Darwin] On Darwin use CLOCK_UPTIME_RAW instead of CLOCK_MONOTONIC.

One more comment: steady_clock::now() is not allowed to throw an exception because it shall satisfy the requirements of TrivialClock ([time.clock]/p1). And [time.clock.req]/p4/b4 says that a TrivialClock::now() does not throw exceptions.

Dec 11 2016, 1:38 PM

Dec 9 2016

howard.hinnant added a comment to D27429: [Chrono][Darwin] On Darwin use CLOCK_UPTIME_RAW instead of CLOCK_MONOTONIC.

I would like to offer two thoughts:

Dec 9 2016, 5:39 PM

Jun 22 2016

howard.hinnant removed a reviewer for D21510: [libc++] Check hash before calling __hash_table key_eq function: howard.hinnant.
Jun 22 2016, 8:09 AM

Jun 15 2016

howard.hinnant added a comment to D21396: [libcxxabi] Reorder base class initializers in libc++abi tests to prevent -Wreorder.

Look good to me.

Jun 15 2016, 12:38 PM

Jun 14 2016

howard.hinnant added a comment to D21343: Implement `lcm` and `gcd` from library fundamentals V2.

Can't call std::abs as it isn't constexpr. You'll have to roll your own.

Jun 14 2016, 5:20 PM
howard.hinnant added a comment to D21343: Implement `lcm` and `gcd` from library fundamentals V2.

I created a top-level gcd which did nothing but make everything unsigned and do the abs once, and then called a __gcd specialized for unsigned and only one kind of unsigned, and got measurably faster results (about 10%).

Jun 14 2016, 4:16 PM

May 9 2016

howard.hinnant removed a reviewer for D19681: builtins: use -fPIC if supported: howard.hinnant.
May 9 2016, 12:17 PM

Apr 29 2016

howard.hinnant added a comment to D19623: [libcxx] [test] Initialize local doubles to NaN..

A quiet nan is the right tool. A signaling nan is nothing more than a 40-year-old design flaw. A quiet nan is "sticky" in that if you try to compute with it, the result is quiet nan. But you can assign a valid number to something containing a quiet nan. So if your answer has nans in it, you know you didn't initialize something properly somewhere.

Apr 29 2016, 2:04 PM

Apr 27 2016

howard.hinnant added a comment to D19623: [libcxx] [test] Initialize local doubles to NaN..

When in doubt, I find initializing to nan a safe thing to do. Either the code is correct, or the nan will find the bug.

Apr 27 2016, 3:26 PM

Oct 2 2014

howard.hinnant added a comment to D4948: [libcxx] Fix __is_power2 and __next_power2. Change hashmap to handle new behavior..

Only tangentially related, here is some documentation on __next_prime:

Oct 2 2014, 12:21 PM