- 28 Oct, 2016 1 commit
-
-
Christopher Dykes authored
Summary: If Folly was compiled without support for SSE 4.2, but this function ends up getting called, we'd abort due to the check failing. To solve this, just don't do the check and fall back to the non-sse version. This is reasonable because it means that the code calling `qfind_first_byte_of_sse42` only needs to care whether there is CPU support for SSE 4.2, not whether we were able to actually implement the search with SSE 4.2 based on compiler support. Reviewed By: yfeldblum Differential Revision: D4096645 fbshipit-source-id: d26a791c09f61595e40c84c47a7a2596b9b69c1e
-
- 27 Oct, 2016 1 commit
-
-
Andrew Gallagher authored
Summary: When using `-fvisibility-inlines-hidden` or using C/C++ shared libs transitively from a Python binary, static locals in inline functions can potentially have more than one definition at runtime. This diff explicitly marks this static local as safe for this scenario. Reviewed By: djwatson Differential Revision: D4082831 fbshipit-source-id: 75616ac26a39f44691ef59b889ea555e9daa391b
-
- 26 Oct, 2016 2 commits
-
-
Giuseppe Ottaviano authored
Summary: Now that the initializer list syntax has been removed we can add a default constructor. Also, - The `dynamic(T)` constructor was unconstrained, so it would match any type but then fail to compile (as a side effect, `is_convertible<T, dynamic>` would be always true). This also leaked the implementation details of `Array` and `Object`, as they were accepted as arguments. The diff makes the constructor accept only integral and float arguments, and all other types are SFINAEd out. - `dynamic(Iterator, Iterator)` is made `explicit` to avoid accepting statements like `dynamic d = {"a", "b"};`. - `object(...)` methods are simplified. Reviewed By: luciang Differential Revision: D4065021 fbshipit-source-id: ac289da7bece67c674b7036b7b51d5e016b297e5
-
Andrew Gallagher authored
Summary: This refactors inline functions defined in headers which had static locals so that their definition is moved to the corresponding implementation file. Reviewed By: yfeldblum Differential Revision: D4049175 fbshipit-source-id: 56eeb82eb23b04c3b9940d803d05050949aa5ef9
-
- 25 Oct, 2016 5 commits
-
-
Matthieu Martin authored
Summary: A bit more clear Reviewed By: yfeldblum Differential Revision: D4075931 fbshipit-source-id: 1398500336d412b5e7663ef1e67b20a329ce2979
-
Michael Lee authored
Summary: Some compilers think result may be uninitialized Reviewed By: francis-ma Differential Revision: D4074526 fbshipit-source-id: 5df4568cfa5eb8f3b2993a82b831fd5e4028a281
-
Philip Pronin authored
Summary: Consider `Expected<..., eUnion>(Expected&&)` ctor, where `ExpectedUnion` move ctor would be called first, which is noop leaving `which_` uninitialized; then `MoveConstructible` ctor is executed, calling `assignValue()`, which performs action depending on uninitialized `which_`. Reviewed By: yfeldblum Differential Revision: D4073199 fbshipit-source-id: 623660e7047afcebf9f72d83f91f84ff6078090f
-
Ben Maurer authored
Summary: Add a prevPowTwo method to bits.h and optimize the current code for GCCs output. Reviewed By: ot Differential Revision: D4072341 fbshipit-source-id: 6e949d0bfcf88ff8500022939d08a2b5aa9e00c9
-
Tudor Bosman authored
Summary: folly/experimental/symbolizer doesn't actually link with libdwarf, it only requires dwarf.h. Closes https://github.com/facebook/folly/pull/501 Differential Revision: D4068438 Pulled By: djwatson fbshipit-source-id: 6339eabf8fceac300caafb478c003833768125fd
-
- 24 Oct, 2016 3 commits
-
-
Subodh Iyengar authored
Summary: Add smart pointer types for ec groups and points Reviewed By: yfeldblum Differential Revision: D4066848 fbshipit-source-id: f8a5c59cf902584e5a4bea7265834fcc8898677b
-
James Sedgwick authored
Summary: as above Reviewed By: yfeldblum Differential Revision: D4066250 fbshipit-source-id: 7dfe07656dd338ec42fcd966328e46331202bf58
-
Sven Over authored
Summary: This diff adds a method to folly::Function that moves the Function object into a copyable, callable proxy object. folly::Function already has the asStdFunction method, which does the same, but wraps the proxy object in a std::function. When a copyable shared-state proxy of a folly::Function is needed, it is not necessarily to turn it into a std::function. If instead the shared proxy will be passed to several functions taking folly::Function, what happens is the folly::Function is moved on the heap, a shared_ptr is put into a std::function, and that is wrapped in a new folly::Function, which always requires a memory allocation, because std::function is not noexcept-movable. When using asSharedProxy instead, an unspecified copyable type is returned that can implicitly converted into a folly::Function, but without an additional memory allocation at this point. Reviewed By: yfeldblum Differential Revision: D4048621 fbshipit-source-id: b642027b0a6957058fe0089cceeb657ec52e8669
-
- 22 Oct, 2016 1 commit
-
-
Giuseppe Ottaviano authored
Summary: It has been deprecated for several months, time to nuke it. Reviewed By: yfeldblum Differential Revision: D4045250 fbshipit-source-id: 21b55a7c99602c42b1a87ced6a59788fe0ac25d7
-
- 21 Oct, 2016 1 commit
-
-
Eric Niebler authored
Summary: Someone debugged a runtime crash and traced it back to code like: `vector<fbstring>{{"this", "that"}}`. Presumably the user thought they were passing an initializer list of strings to the vector constructor. Instead, they constructed a single fbstring with two char pointers pointing into //different// strings. With the appropriate fbstring constructors, we can flag this as invalid at compile-time. Reviewed By: yfeldblum Differential Revision: D3927397 fbshipit-source-id: ab61e1e8498ec99592a2a7726eaf1cb6324f1455
-
- 20 Oct, 2016 5 commits
-
-
Laurent Demailly authored
Summary: improve documentation of custom singleton creation through an example (from fbcode SIOF thread suggestion) Reviewed By: yfeldblum Differential Revision: D4053322 fbshipit-source-id: e9c2ef3d1ef43d52c0bf0a601d94c017047a23a3
-
Eric Niebler authored
Summary: Someone debugged a runtime crash and traced it back to code like: `vector<fbstring>{{"this", "that"}}`. Presumably the user thought they were passing an initializer list of strings to the vector constructor. Instead, they constructed a single fbstring with two char pointers pointing into //different// strings. With the appropriate fbstring constructors, we can flag this as invalid at compile-time. Reviewed By: yfeldblum Differential Revision: D3927397 fbshipit-source-id: a5f335073fb55bbb703a23f06874238cbdb5d91a
-
Jim Meyering authored
Summary: Nested uses of SYNCHRONIZED (and related) macros leads inevitably to shadowed variable declarations. There is already a use of FOLLY_GCC_DISABLE_WARNING(shadow) to disable -Wshadow in that code, but obviously, that cannot help with the new options, so do similar for them via the new FOLLY_GCC_DISABLE_NEW_SHADOW_WARNINGS. Depends on D4041696 Reviewed By: markisaa Differential Revision: D4041728 fbshipit-source-id: b85fb3452f6855d359f9b910abbd02cf8433f3f7
-
Jim Meyering authored
Summary: Add a configure-time check for whether -Wshadow-local and -Wshadow-compatible-local are supported. If so, arrange to define HAVE_SHADOW_LOCAL_WARNINGS. In Portability.h, use that new symbol to choose whether to define FOLLY_GCC_DISABLE_NEW_SHADOW_WARNINGS, which used pragmas to disable those new warnings. Differential Revision: D4041696 fbshipit-source-id: 520ee88ae55147a13d0a045aca7d86567a8da99d
-
Shubhanshu Agrawal authored
Summary: add missing includes in folly fibers.q Reviewed By: A5he Differential Revision: D4036830 fbshipit-source-id: 4dcb87377979f2875ba31b4869c2637a82298957
-
- 19 Oct, 2016 16 commits
-
-
Dmitry Pleshkov authored
Summary: Test fails because of loop unrolling: frames are not being grouped up Reviewed By: ot Differential Revision: D4034910 fbshipit-source-id: 159d3a4f116f90fdd0d51ee9de38634167ed0dc4
-
Andrii Grynenko authored
Summary: This diff adapts the fibers code to the modified `fcontext` API from Boost 1.61 Reviewed By: Orvid Differential Revision: D4035769 fbshipit-source-id: d3f4b6b03efdd3b6e4b92e0e1c7373747bb74fbb
-
Jim Meyering authored
Summary: Fix warnings exposed by the upstream-proposed -Wshadow-compatible-local option. Reviewed By: philippv Differential Revision: D4041749 fbshipit-source-id: 9e0dcec3b35c60e5588a2e53dfdb8605e74721c4
-
Jim Meyering authored
Summary: Fix warnings exposed by the upstream-proposed -Wshadow-compatible-local option. Reviewed By: igorsugak Differential Revision: D4041931 fbshipit-source-id: fcddbc8636c16124a9711c4491a08cc7db76a224
-
Lee Howes authored
Reviewed By: yfeldblum Differential Revision: D4035412 fbshipit-source-id: 4b7a178088d2950f9f042e0c79b54b3982eb43f5
-
Jim Meyering authored
Summary: Fix warnings exposed by the upstream-proposed -Wshadow-compatible-local option. Reviewed By: markisaa Differential Revision: D4041764 fbshipit-source-id: b2aa6543ce4bc36069b010f1107f1ac117073b26
-
Jim Meyering authored
Summary: Fix warnings exposed by the upstream-proposed -Wshadow-compatible-local option. Reviewed By: igorsugak Differential Revision: D4041769 fbshipit-source-id: 257bfe9370279f755b8e965ffc1c37fef454d4c4
-
Jim Meyering authored
Summary: Fix warnings exposed by the upstream-proposed -Wshadow-compatible-local option. Reviewed By: igorsugak Differential Revision: D4041789 fbshipit-source-id: 79eefaccbe2ca27993ab102ac1b6e3caf3bfb7ce
-
Jim Meyering authored
Summary: Fix warnings exposed by the upstream-proposed -Wshadow-compatible-local option. Reviewed By: igorsugak Differential Revision: D4041937 fbshipit-source-id: a9412dae6d1e43931f3b65bffaf462225f667f13
-
Jim Meyering authored
Summary: Fix warnings exposed by the upstream-proposed -Wshadow-compatible-local option. Reviewed By: igorsugak Differential Revision: D4041919 fbshipit-source-id: 52579a4b7477192ec7145f81216200f81b191183
-
Jim Meyering authored
Summary: Fix warnings exposed by the upstream-proposed -Wshadow-compatible-local option. Reviewed By: igorsugak Differential Revision: D4041910 fbshipit-source-id: d00ea6b294559f80244a226fadf1a3a54c50c78a
-
Jim Meyering authored
Summary: Fix warnings exposed by the upstream-proposed -Wshadow-compatible-local option. Reviewed By: andrewjcg Differential Revision: D4041950 fbshipit-source-id: 7c18564273c5839c647709307f56b2fb5e0f6588
-
Jim Meyering authored
Summary: Fix warnings exposed by the upstream-proposed -Wshadow-compatible-local option. Reviewed By: elsteveogrande Differential Revision: D4041798 fbshipit-source-id: 9fb6901e791176eb42c31f287655aea6be95a30b
-
Jim Meyering authored
Summary: Fix warnings exposed by the upstream-proposed -Wshadow-compatible-local option. Differential Revision: D4041756 fbshipit-source-id: 21faf6ad6bf39b0df42e6ef27481d1c81d37ef99
-
Jim Meyering authored
Summary: Fix warnings exposed by the upstream-proposed -Wshadow-compatible-local option. Reviewed By: nisardan Differential Revision: D4041779 fbshipit-source-id: 375e485a30f01a0610d881fe8b3237cc062aedef
-
Yedidya Feldblum authored
Summary: CodeMod: `dynamic-init-list-ctor`. The `folly::dynamic::dynamic(std::initializer_list<folly::dynamic>)` constructor is deprecated because its meaning is ambiguous and variable across compilers and compiler versions. This diff codemods uses of that constructor to use `folly::dynamic::array<...>(...)` instead. This codemod may not get 100%, but that's okay. Any amount helps. Reviewed By: ot Differential Revision: D4013979 fbshipit-source-id: c6873dbc8027b38e71a0f291466ed2d9bd204a53
-
- 18 Oct, 2016 3 commits
-
-
Andrew Gallagher authored
Summary: - Annotate non-`const` static locals in inline functions which don't require a single copy be used globally at runtime. - Move implmentation from header file to source file (to avoid multiple copies at runtime). - Mark a non-stateful static local as `const` to it easy to ignore when searching for problematic static locals. Reviewed By: yfeldblum Differential Revision: D4010101 fbshipit-source-id: 3be94a5dc5b7029a26e11b2145c0d41968979a5c
-
Phil Willoughby authored
Summary: Some platforms do not output anything when `std::terminate` is called; this fixes the test on those platforms. Reviewed By: yfeldblum, jsedgwick Differential Revision: D4001052 fbshipit-source-id: 671fbca9d6d22e372189b6554440c268c0cff60b
-
Marcelo Juchem authored
Summary: This diff adapts the fibers code to the modified `fcontext` API from Boost 1.61 Reviewed By: Orvid Differential Revision: D4035769 fbshipit-source-id: 54a97294d33c2901af78b8dec95baaefa085c4f5
-
- 15 Oct, 2016 1 commit
-
-
Philip Pronin authored
Summary: We've found clang might be generating incomplete `.debug_aranges`, while falling back to linear `.debug_info` scan is too expensive and shouldn't be used by default, we can afford doing that in fatal signal handler. Also optimize `exception_tracer::printExceptionInfo()` to avoid `LocationInfo` resolution if `NO_FILE_AND_LINE` is used. Reviewed By: luciang, ot Differential Revision: D4020989 fbshipit-source-id: 84172208736b224c19206da48bcb3b5c0b2c67d0
-
- 14 Oct, 2016 1 commit
-
-
Nicholas Ormrod authored
Summary: Removing COW from fbstring had adverse memory consequences when sync'd with libgcc. Revert this diff to keep folly and libgcc in sync. Reviewed By: yfeldblum, luciang Differential Revision: D4019604 fbshipit-source-id: 80bd31c220098bfab37f0effc90f67876432369d
-