Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

C++-side refactor #126

Closed
wants to merge 12 commits into from
Closed

C++-side refactor #126

wants to merge 12 commits into from

Commits on Sep 20, 2019

  1. quic: remove user_data from quic buffer callback

    Using `std::function` and an opaque pointer are pretty much
    antithetical. This commit chooses the more C++-y variant, i.e.
    `std::function`.
    addaleax committed Sep 20, 2019
    Configuration menu
    Copy the full SHA
    75ea63b View commit details
    Browse the repository at this point in the history
  2. quic: remove typedef enum

    Using `typedef enum` is a C-ism.
    addaleax committed Sep 20, 2019
    Configuration menu
    Copy the full SHA
    762d03f View commit details
    Browse the repository at this point in the history
  3. quic: cleanup node_quic_buffer.h

    Prefer inline functions over macros, use explicit nullptr checks,
    do not mark functions with implicit inline linkage as inline,
    re-use code where possible, etc.
    addaleax committed Sep 20, 2019
    Configuration menu
    Copy the full SHA
    4a11d59 View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2019

  1. src: cleanup histogram code

    Move methods that do not need to be inline into their own file,
    replace `std::function` with a template variant for performance,
    remove `inline` for functions with implicit inline linkage.
    addaleax committed Sep 21, 2019
    Configuration menu
    Copy the full SHA
    1ccfbd2 View commit details
    Browse the repository at this point in the history
  2. quic: remove opaque pointer from Timer callback

    Use the more C++-y `std::function` approach which renders opaque
    pointers unnecessary.
    addaleax committed Sep 21, 2019
    Configuration menu
    Copy the full SHA
    650ea1f View commit details
    Browse the repository at this point in the history
  3. quic: cleanup QuicSession code

    - Do not create new `v8::Function` objects, both for performance
      and because it is unclear whether that leaks memory
      (Node.js issue 28988).
    - Do not put functions into the inline header that do not need to
      be there or that do not make sense as inline functions
      (in particular, callbacks that are provided to C libraries can
      not be realized as inline functions by the compiler).
    - Remove implicit/redundant `inline` qualifiers and add appropriate
      `const` qualifiers.
    - Remove unnecessary `this->` prefixes.
    - Return early for JS failures rather than accumulating them.
    - Minor stylistic changes.
    addaleax committed Sep 21, 2019
    Configuration menu
    Copy the full SHA
    bdd45bd View commit details
    Browse the repository at this point in the history
  4. src: refactor memory tracker implementation

    Use a template class instead of virtual methods to allow inlining
    the subclass methods, as well as other minor cleanups.
    addaleax committed Sep 21, 2019
    Configuration menu
    Copy the full SHA
    e334d94 View commit details
    Browse the repository at this point in the history
  5. http2: use shared memory tracking implementation

    The extensive testing done on http2 makes it easier to make sure
    the implementation is correct (and doesn’t diverge unnecessarily).
    addaleax committed Sep 21, 2019
    Configuration menu
    Copy the full SHA
    34f46df View commit details
    Browse the repository at this point in the history
  6. quic: remove QuicStreamListener

    This listener currently had the drawbacks of leaking memory
    when an error is encountered and was otherwise equivalent to
    the default listener.
    addaleax committed Sep 21, 2019
    Configuration menu
    Copy the full SHA
    5f0ea8e View commit details
    Browse the repository at this point in the history
  7. quic: more general C++ cleanup

    Use default initializers, `const` qualifiers, minor style changes
    to match more common style in the codebase.
    addaleax committed Sep 21, 2019
    Configuration menu
    Copy the full SHA
    96b22fd View commit details
    Browse the repository at this point in the history

Commits on Sep 23, 2019

  1. Configuration menu
    Copy the full SHA
    c7015ef View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3f1b93f View commit details
    Browse the repository at this point in the history