1. 15 Sep, 2015 2 commits
    • Yedidya Feldblum's avatar
      No need to export global instances of folly::AsciiCase(Ins|S)ensitive · 40673e01
      Yedidya Feldblum authored
      Summary: [Folly] No need to export global instances of `folly::AsciiCaseInsensitive` and `folly::AsciiCaseSensitive`.
      
      Calling code may simply construct instances at will - the compiler will optimize away the object construction since it has only the default ctor/dtor, no storage, and no vtable.
      
      Reviewed By: @fugalh
      
      Differential Revision: D2437419
      40673e01
    • Yedidya Feldblum's avatar
      Drop support for GCC < 4.8 in folly/FBString.h · b57fd1bc
      Yedidya Feldblum authored
      Summary: [Folly] Drop support for GCC < 4.8 in `folly/FBString.h`.
      
      Can't stay indefinitely backcompat with older compilers.
      
      Reviewed By: @JoelMarcey
      
      Differential Revision: D2441747
      b57fd1bc
  2. 14 Sep, 2015 10 commits
  3. 13 Sep, 2015 3 commits
  4. 12 Sep, 2015 1 commit
  5. 11 Sep, 2015 7 commits
  6. 10 Sep, 2015 4 commits
    • Mark McDuff's avatar
      use thread_local instead of ThreadLocal for some statics in Random · 6caa3d95
      Mark McDuff authored
      Summary: Exit synchronization is the worst!  The worst!
      
      Reviewed By: @​bmaurer
      
      Differential Revision: D2253073
      6caa3d95
    • Giuseppe Ottaviano's avatar
      Make EliasFanoReader and BitVectorReader API more consistent · 2baf3f69
      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
      2baf3f69
    • Elliott Clark's avatar
      Add SharedPromise<T>::isFulfilled · fc0470a9
      Elliott Clark authored
      Summary: Promise<T> has isFulFilled. This patch adds the corresponding functionality to shared promise.
      
      Reviewed By: @jsedgwick
      
      Differential Revision: D2417631
      fc0470a9
    • Lucian Grijincu's avatar
      folly: small_vector: emplace_back for iterator constructor (compat with std::vector) · 9f9e6d96
      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
      9f9e6d96
  7. 09 Sep, 2015 3 commits
    • Eugene Pekurovsky's avatar
      folly::FunctionScheduler: Adding support for uniform interval distribution · 3e6ccd5c
      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
      3e6ccd5c
    • Tom Jackson's avatar
      Handle take(-1) better · 6699f91a
      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
      6699f91a
    • Yedidya Feldblum's avatar
      Drop support for GCC < 4.8 in folly/Conv.h · 541d1209
      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
      541d1209
  8. 08 Sep, 2015 5 commits
    • Yedidya Feldblum's avatar
      Drop support for GCC < 4.8 in folly/test/FBStringTest.cpp · 26164748
      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
      26164748
    • Giuseppe Ottaviano's avatar
      Implement assume() · b6a63714
      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
      b6a63714
    • Orvid King's avatar
      Switch a local from long to size_t for MSVC · 37cd970a
      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
      37cd970a
    • Tom Hughes's avatar
      Implement adjacent_tokens_only() for GFlagValueSemanticBase · 29193aca
      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
      29193aca
    • Christopher Dolan's avatar
      Declare missing environ variable · f0fdd87a
      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
      f0fdd87a
  9. 07 Sep, 2015 1 commit
  10. 04 Sep, 2015 2 commits
  11. 03 Sep, 2015 1 commit
  12. 02 Sep, 2015 1 commit
    • Sven Over's avatar
      folly: specialise makeFutureWith for functions returning futures · 823a8c01
      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
      823a8c01