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

lib: deprecate the smalloc module #1564

Merged
merged 1 commit into from
Apr 29, 2015

Conversation

bnoordhuis
Copy link
Member

Upcoming V8 changes will make it impossible to keep supporting the
smalloc module so deprecate it now and tell people to switch to
typed arrays.

The module is used in core in a few places so this commit makes the
public module private and replaces the public part with wrappers that
print deprecation notices.

R=@domenic @trevnorris

TBD: Deprecate src/smalloc.h as well? Probably a good thing but the header is used when building core and deprecation warnings would be annoying (although I guess it could be made conditional on NODE_WANT_INTERNALS.)

Upcoming V8 changes will make it impossible to keep supporting the
smalloc module so deprecate it now and tell people to switch to
typed arrays.

The module is used in core in a few places so this commit makes the
public module private and replaces the public part with wrappers that
print deprecation notices.

PR-URL: nodejs#1564
Reviewed-By: Domenic Denicola <[email protected]>
Reviewed-By: Trevor Norris <[email protected]>
return false;

return smalloc.hasExternalData(obj);
}
Copy link
Member Author

Choose a reason for hiding this comment

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

lib/smalloc.js was moved to lib/internal/smalloc.js, then a stub lib/smalloc.js. Unfortunately, git/github doesn't quite fathom that and the diff is noisier because of it.

@domenic
Copy link
Contributor

domenic commented Apr 29, 2015

LGTM but would prefer @trevnorris's sign-off.

@trevnorris
Copy link
Contributor

@bnoordhuis Have we deprecated *.h files in the past?

Changes as they are LGTM.

@bnoordhuis bnoordhuis merged commit d5ce47e into nodejs:master Apr 29, 2015
@bnoordhuis bnoordhuis deleted the deprecate-smalloc-module branch April 29, 2015 21:56
@bnoordhuis
Copy link
Member Author

Have we deprecated *.h files in the past?

I think this is a first. I'll open another PR for that.

@trevnorris
Copy link
Contributor

Fare thee well smalloc. I enjoyed abusing your awesome power.

@brendanashworth brendanashworth added smalloc semver-minor PRs that contain new features and should be released in the next minor version. labels Apr 30, 2015
@brendanashworth
Copy link
Contributor

Are doc changes being committed in separately?

@bnoordhuis
Copy link
Member Author

Wups, I forgot to commit that. I'll open a new pull request for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-minor PRs that contain new features and should be released in the next minor version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants