- 14 Sep, 2015 9 commits
-
-
Giuseppe Ottaviano authored
Summary: `Final` is idempotent, no reason for it not to be `const`. Checked with a benchmark that the new version does not affect performance. Reviewed By: @yfeldblum Differential Revision: D2397377
-
Yedidya Feldblum authored
Summary: [Folly] CodeMod: Drop `FOLLY_OVERRIDE` and `FOLLY_FINAL`. These were to support GCC 4.6 and earlier, and MSVC 2008 and earlier. Reviewed By: @philippv Differential Revision: D2438309
-
Yedidya Feldblum authored
Summary: [Folly] Lift the test for `<ext/random>` and `__gnu_cxx::sfmt19937`. Put an actual check in `folly/configure.ac` and use the result in `folly/Random.h`. Reviewed By: @Gownta Differential Revision: D2438420
-
Orvid King authored
Summary: MSVC 2015 supports constexpr intrinsics, and, as the GCC builtins are implemented by #287, we can remove all the MSVC specific intrinsic stuff that isn't constexpr supported. Closes https://github.com/facebook/folly/pull/288 Reviewed By: @yfeldblum Differential Revision: D2419064 Pulled By: @JoelMarcey
-
Orvid King authored
Summary: MSVC doesn't like it when you use `%1$s`, and actually emits a warning at compile time, so pass the second arugment twice instead. Closes https://github.com/facebook/folly/pull/302 Reviewed By: @yfeldblum Differential Revision: D2371262 Pulled By: @JoelMarcey
-
Christopher Cole authored
Summary: There's 2 ways this could be implemented - either as a series of preprocessor blocks depending on target architecture (as I have implemented it here), or by encapsulating access to MediumLarge::capacity_ within getters/setters as in a similar manner to setSmallSize() and smallSize(). The first option makes the code a bit harder to read, but the second option changes the existing control flow a bit which could slightly alter performance. I opted for the first so as to keep the existing amd64 flow untouched, but can easily change the pull request to the second option to keep code readability a priority. Closes https://github.com/facebook/folly/pull/244 Reviewed By: @Gownta Differential Revision: D2306568 Pulled By: @JoelMarcey
-
Orvid King authored
Summary: Winsock's structures don't have a member named `s6_addr16`, so use the name for Winsock's structure. Closes https://github.com/facebook/folly/pull/279 Reviewed By: @yfeldblum Differential Revision: D2284223 Pulled By: @JoelMarcey
-
Yedidya Feldblum authored
Summary: [Folly] Support `unique_ptr` instances with custom deleters in `to_shared_ptr`. We now support `unique_ptr<T, D>` rather than just `unique_ptr<T>`. Reviewed By: @lbrandy Differential Revision: D2438217
-
Yedidya Feldblum authored
Summary: [Folly] The ' in `folly/configure.ac` messes with Vim's highlighting. Reviewed By: @JoelMarcey Differential Revision: D2438280
-
- 13 Sep, 2015 3 commits
-
-
Orvid King authored
Summary: Because .native() produces a wstring under MSVC. Closes #306 Reviewed By: @yfeldblum Differential Revision: D2419043 Pulled By: @JoelMarcey
-
Yedidya Feldblum authored
Summary: [Folly] Drop support for GCC < 4.8 in folly/experimental/Bits.h Can't stay indefinitely backcompat with older compilers. Reviewed By: @meyering Differential Revision: D2420133
-
Leonardo Bianconi authored
Summary: This patch adds PPC64 specific code in order to support this architecture and be able to be used by HHVM. Closes #299 Reviewed By: @simpkins Differential Revision: D2340723 Pulled By: @JoelMarcey
-
- 12 Sep, 2015 1 commit
-
-
Giuseppe Ottaviano authored
Reviewed By: @liviu Differential Revision: D2436705
-
- 11 Sep, 2015 7 commits
-
-
Bryce Redd authored
Summary: The capacity variable changed types, and turn function needed an explicit cast. Reviewed By: @BurntBrunch Differential Revision: D2421421
-
Kevin Hurley authored
Summary: Adding ability to merge dynamic objects with another object. It will just overwrite duplicate keys Reviewed By: @yfeldblum Differential Revision: D2413628
-
Maxim Georgiev authored
Summary: folly::AsyncSSLSocket class has a number of "get..." methods which don't change the object's state, but are not marked as "const". As a result these methods can't be called on objects passed through const pointer or referrence. Adding "const" modificator for these methods. Reviewed By: @yfeldblum Differential Revision: D2430134
-
Sara Golemon authored
This reverts commit 6caa3d95.
-
Lucian Grijincu authored
Reviewed By: @yfeldblum Differential Revision: D2433146
-
Yedidya Feldblum authored
Summary: [Folly] Use type-parameterized test cases in `folly/test/SynchronizedTest.cpp`. And some cleanups. Reviewed By: @nbronson Differential Revision: D2428287
-
Yedidya Feldblum authored
Summary: [Folly] Fix Build: IPv6: `SocketAddressTest.SetFromStrings` and `AsyncSocketTest.ConnectTimeout` failing On IPv6-only machines, the `SocketAddressTest.SetFromStrings` example in `folly/test/SocketAddressTest.cpp` was failing because it tries to resolve `127.0.0.1` with `AI_ADDRCONFIG` set. Fix it by detecting which of IPv6 and IPv4 are enabled, and picking an appropriate loopback address. On IPv6-only machines, the `AsyncSocketTest.ConnectTimeout` example in `folly/io/async/test/AsyncSocketTest2.cpp` was failing because it tries to connect `8.8.8.8`, which is IPv4. Fix it by detecting which of IPv6 and IPv4 are enabled, and picking an approprate remote address. Reviewed By: @chipturner Differential Revision: D2429109
-
- 10 Sep, 2015 4 commits
-
-
Mark McDuff authored
Summary: Exit synchronization is the worst! The worst! Reviewed By: @bmaurer Differential Revision: D2253073
-
Giuseppe Ottaviano authored
Summary: This diff introduces a few breaking API changes to both EliasFanoReader and BitVectorReader in order to fix some inconsistencies: - As initalized, `EliasFanoReader` and `BitVectorReader` held a value of `0`, thus if `0` is present in the list `skipTo(0)` would not update the position to `0`, as it happens with any other `skipTo(<first element>)`. This fixes `jumpTo` accordingly. - `jump(i + 1)` would go at position `i`. Now `reader.jump(i)`'s postcondition is `reader.position() == i`. - It is now illegal to retrieve `value()` from a reader in an out-of-bounds position (before-the-begin or past-the-end). Validity of a reader can be checked with `valid()`. Reviewed By: @philippv Differential Revision: D2420023
-
Elliott Clark authored
Summary: Promise<T> has isFulFilled. This patch adds the corresponding functionality to shared promise. Reviewed By: @jsedgwick Differential Revision: D2417631
-
Lucian Grijincu authored
Summary: This works: std::vector<T*> v; std::vector<std::unique_ptr<T>> uv(v.begin(), v.end()) Make it work for small_vector as well. Reviewed By: @ot, @Gownta Differential Revision: D2426919
-
- 09 Sep, 2015 3 commits
-
-
Eugene Pekurovsky authored
Summary: 1) Added uniform interval distribution functionality. 2) Added a generic API for custom interval distribution algorithms. 3) Fixed an issue with removing a canceled function. 4) Did some code cleanup along the way. Reviewed By: @kaanb Differential Revision: D2339911
-
Tom Jackson authored
Summary: It's easy to accidentally pass a negative value to ##take()##, which leads to underflow on conversion to ##size_t##. Reviewed By: @rosephilip, @philippv Differential Revision: D2421459
-
Yedidya Feldblum authored
Summary: [Folly] Drop support for GCC < 4.8 in folly/Conv.h. Can't stay indefinitely backcompat with older compilers. Reviewed By: @Gownta, @JoelMarcey Differential Revision: D2422369
-
- 08 Sep, 2015 5 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Drop support for GCC < 4.8 in folly/test/FBStringTest.cpp. Can't stay indefinitely backcompat with older compilers. Reviewed By: @tudor Differential Revision: D2422425
-
Giuseppe Ottaviano authored
Summary: In some cases hinting the compiler about conditions that are guaranteed to be true can help it generate better code. For instance, remove unnecessary bound checks. Clang has `__builtin_assume` and on GCC we can simulate it with `__builtin_unreachable`, so better just abstract both into a function. Reviewed By: @philippv Differential Revision: D2419937
-
Orvid King authored
Summary: Because MSVC would try to calculate the mmapLength as a long value, which isn't correct, and MSVC issues multiple warnings if you try to do it. Closes #289 Reviewed By: @yfeldblum Differential Revision: D2419061 Pulled By: @JoelMarcey
-
Tom Hughes authored
Summary: Needed for boost 1.59.0 which added this as a pure virtual function in the value_semantic base class. Fixes #314. Closes #315 Reviewed By: @yfeldblum Differential Revision: D2419035 Pulled By: @JoelMarcey
-
Christopher Dolan authored
Summary: Declaring `extern char** environ` in `experimental/TestUtil.cpp` fixes a compilation issue on OS X 10.10. Closes #311 Reviewed By: @yfeldblum Differential Revision: D2419037 Pulled By: @JoelMarcey
-
- 07 Sep, 2015 1 commit
-
-
Yedidya Feldblum authored
Summary: [Folly] Dead Code: GCC-v4.6 Back Compat: folly/Chrono.h Reviewed By: @philippv Differential Revision: D2419086
-
- 04 Sep, 2015 2 commits
-
-
James Sedgwick authored
Summary: was using the renamed/nonexistent makeTryFunction Reviewed By: @elliottneilclark Differential Revision: D2416178
-
Jason Evans authored
Summary: Fix MemoryIdler::flushLocalMallocCaches() to use the correct type when querying jemalloc's "opt.narenas" mallctl. Reviewed By: @jobenber Differential Revision: D2414309
-
- 03 Sep, 2015 1 commit
-
-
Brian Watling authored
Summary: Allow users to access the stack pointer and stack size Reviewed By: @alikhtarov Differential Revision: D2407252
-
- 02 Sep, 2015 2 commits
-
-
Sven Over authored
Summary: makeFutureWith executes a function and returns a future containing set to the function's return value. This diff adds a specialisation for the case when the function returns some type Future<T>. Instead of returning Future<Future<T>>, makeFutureWith now just passes on the future that the function returned, which may or may not have a value set at this time. In case the function throws, makeFutureWith returns a Future<T> containing the exception. With this diff, the following two lines produce equivalent results: auto f1 = makeFutureWith(func); auto f2 = makeFuture().then(func); except for the fact that f2 requires an additional temporary Future<Unit> to be created and destroyed. Reviewed By: @fugalh Differential Revision: D2388335
-
Haijun Zhu authored
Summary: Erasing Cpp2Worker happens in acceptor thread but when evb is destroyed and drains its callback queue, the callbacks may access the worker. This moves erasing Cpp2Worer to its own evb thread, after all callbacks are run. Reviewed By: @yfeldblum Differential Revision: D2398089
-
- 31 Aug, 2015 2 commits
-
-
Sara Golemon authored
-
Jason Evans authored
Summary: Universally update to jemalloc 4.0.0. Update MALLOC_CONF/malloc_conf configuration, and use the "arena.<i>.purge" mallctl (replaces "arenas.purge"). Reviewed By: @bmaurer Differential Revision: D2355602
-