Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: refactor grow_async_ids_stack #23808

Merged
merged 2 commits into from
Oct 24, 2018
Merged

Conversation

refack
Copy link
Contributor

@refack refack commented Oct 21, 2018

Added AliasedBuffer::reserve()

CI: https://ci.nodejs.org/job/node-test-pull-request/18034/

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Oct 21, 2018
@refack refack self-assigned this Oct 21, 2018
src/aliased_buffer.h Show resolved Hide resolved
src/aliased_buffer.h Show resolved Hide resolved
const v8::HandleScope handle_scope(isolate_);

const size_t oldSizeInBytes = sizeof(NativeT) * count_;
const size_t newSizeInBytes = sizeof(NativeT) * new_capacity;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style nit: old_size_in_bytes, new_size_in_bytes

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack.
Turned up the level of my IDE's inspection of these to "error".

const size_t newSizeInBytes = sizeof(NativeT) * new_capacity;

// allocate new native buffer
auto new_buffer = Calloc<NativeT>(new_capacity);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style nit: NativeT* new_buffer

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack

Copy link
Member

@joyeecheung joyeecheung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with the style nits from @addaleax

@refack
Copy link
Contributor Author

refack commented Oct 23, 2018

@mmarchini mmarchini added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Oct 24, 2018
@refack refack force-pushed the grow_async_ids branch 2 times, most recently from 888b26e to b845fd6 Compare October 24, 2018 16:18
@refack
Copy link
Contributor Author

refack commented Oct 24, 2018

refactor grow_async_ids_stack

PR-URL: nodejs#23808
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
PR-URL: nodejs#23808
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
@refack refack merged commit 586daae into nodejs:master Oct 24, 2018
@refack refack deleted the grow_async_ids branch October 24, 2018 21:37
@refack refack removed their assignment Oct 24, 2018
targos pushed a commit that referenced this pull request Oct 26, 2018
refactor grow_async_ids_stack

PR-URL: #23808
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
targos pushed a commit that referenced this pull request Oct 26, 2018
PR-URL: #23808
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
@addaleax addaleax mentioned this pull request Oct 29, 2018
@targos
Copy link
Member

targos commented Nov 1, 2018

Marking dont-land-on-v11.x until nodejs/build#1542 is fixed

@refack
Copy link
Contributor Author

refack commented Nov 1, 2018

@targos there are two more PR that will require GCC4.9

@targos targos mentioned this pull request Nov 2, 2018
2 tasks
@refack
Copy link
Contributor Author

refack commented Nov 15, 2018

@targos the arm7 issue in ci-release was resolved - https://ci-release.nodejs.org/job/iojs+release/nodes=centos7-arm64-gcc6/3919/

targos pushed a commit that referenced this pull request Nov 18, 2018
refactor grow_async_ids_stack

PR-URL: #23808
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
targos pushed a commit that referenced this pull request Nov 18, 2018
PR-URL: #23808
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
@targos
Copy link
Member

targos commented Nov 18, 2018

@refack thanks! I backported this (and others) to v11.x and confirmed: https://ci-release.nodejs.org/job/iojs+release/3934/nodes=centos7-arm64-gcc6/

rvagg pushed a commit that referenced this pull request Nov 28, 2018
refactor grow_async_ids_stack

PR-URL: #23808
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
rvagg pushed a commit that referenced this pull request Nov 28, 2018
PR-URL: #23808
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
@BridgeAR BridgeAR mentioned this pull request Dec 5, 2018
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants