Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Feb 25, 2013
  1. @bnoordhuis
Commits on Feb 10, 2013
  1. @bnoordhuis

    buffer: fix Buffer::HasInstance() check

    bnoordhuis authored
    It was returning true for typed arrays. Check that the object was
    instantiated with the Buffer constructor.
Commits on Feb 7, 2013
  1. @isaacs

    Merge remote-tracking branch 'ry/v0.8' into master

    isaacs authored
    Conflicts:
    	AUTHORS
    	ChangeLog
    	deps/npm/html/api/bin.html
    	deps/npm/html/api/bugs.html
    	deps/npm/html/api/commands.html
    	deps/npm/html/api/config.html
    	deps/npm/html/api/deprecate.html
    	deps/npm/html/api/docs.html
    	deps/npm/html/api/edit.html
    	deps/npm/html/api/explore.html
    	deps/npm/html/api/help-search.html
    	deps/npm/html/api/init.html
    	deps/npm/html/api/install.html
    	deps/npm/html/api/link.html
    	deps/npm/html/api/load.html
    	deps/npm/html/api/ls.html
    	deps/npm/html/api/npm.html
    	deps/npm/html/api/outdated.html
    	deps/npm/html/api/owner.html
    	deps/npm/html/api/pack.html
    	deps/npm/html/api/prefix.html
    	deps/npm/html/api/prune.html
    	deps/npm/html/api/publish.html
    	deps/npm/html/api/rebuild.html
    	deps/npm/html/api/restart.html
    	deps/npm/html/api/root.html
    	deps/npm/html/api/run-script.html
    	deps/npm/html/api/search.html
    	deps/npm/html/api/shrinkwrap.html
    	deps/npm/html/api/start.html
    	deps/npm/html/api/stop.html
    	deps/npm/html/api/submodule.html
    	deps/npm/html/api/tag.html
    	deps/npm/html/api/test.html
    	deps/npm/html/api/uninstall.html
    	deps/npm/html/api/unpublish.html
    	deps/npm/html/api/update.html
    	deps/npm/html/api/version.html
    	deps/npm/html/api/view.html
    	deps/npm/html/api/whoami.html
    	deps/npm/html/doc/README.html
    	deps/npm/html/doc/adduser.html
    	deps/npm/html/doc/bin.html
    	deps/npm/html/doc/bugs.html
    	deps/npm/html/doc/build.html
    	deps/npm/html/doc/bundle.html
    	deps/npm/html/doc/cache.html
    	deps/npm/html/doc/changelog.html
    	deps/npm/html/doc/coding-style.html
    	deps/npm/html/doc/completion.html
    	deps/npm/html/doc/config.html
    	deps/npm/html/doc/dedupe.html
    	deps/npm/html/doc/deprecate.html
    	deps/npm/html/doc/developers.html
    	deps/npm/html/doc/disputes.html
    	deps/npm/html/doc/docs.html
    	deps/npm/html/doc/edit.html
    	deps/npm/html/doc/explore.html
    	deps/npm/html/doc/faq.html
    	deps/npm/html/doc/folders.html
    	deps/npm/html/doc/global.html
    	deps/npm/html/doc/help-search.html
    	deps/npm/html/doc/help.html
    	deps/npm/html/doc/index.html
    	deps/npm/html/doc/init.html
    	deps/npm/html/doc/install.html
    	deps/npm/html/doc/json.html
    	deps/npm/html/doc/link.html
    	deps/npm/html/doc/ls.html
    	deps/npm/html/doc/npm.html
    	deps/npm/html/doc/outdated.html
    	deps/npm/html/doc/owner.html
    	deps/npm/html/doc/pack.html
    	deps/npm/html/doc/prefix.html
    	deps/npm/html/doc/prune.html
    	deps/npm/html/doc/publish.html
    	deps/npm/html/doc/rebuild.html
    	deps/npm/html/doc/registry.html
    	deps/npm/html/doc/removing-npm.html
    	deps/npm/html/doc/restart.html
    	deps/npm/html/doc/rm.html
    	deps/npm/html/doc/root.html
    	deps/npm/html/doc/run-script.html
    	deps/npm/html/doc/scripts.html
    	deps/npm/html/doc/search.html
    	deps/npm/html/doc/semver.html
    	deps/npm/html/doc/shrinkwrap.html
    	deps/npm/html/doc/star.html
    	deps/npm/html/doc/start.html
    	deps/npm/html/doc/stop.html
    	deps/npm/html/doc/submodule.html
    	deps/npm/html/doc/tag.html
    	deps/npm/html/doc/test.html
    	deps/npm/html/doc/uninstall.html
    	deps/npm/html/doc/unpublish.html
    	deps/npm/html/doc/update.html
    	deps/npm/html/doc/version.html
    	deps/npm/html/doc/view.html
    	deps/npm/html/doc/whoami.html
    	deps/npm/man/man1/global.1
    	deps/npm/man/man1/ls.1
    	deps/npm/man/man1/npm.1
    	deps/npm/man/man1/rm.1
    	deps/npm/man/man3/npm.3
    	deps/npm/node_modules/glob/glob.js
    	deps/npm/node_modules/glob/package.json
    	deps/npm/node_modules/node-gyp/package.json
    	deps/npm/node_modules/npm-registry-client/package.json
    	deps/npm/node_modules/npmconf/package.json
    	deps/npm/node_modules/read-installed/package.json
    	deps/npm/node_modules/rimraf/package.json
    	deps/npm/node_modules/rimraf/rimraf.js
    	deps/npm/package.json
    	deps/uv/src/win/error.c
    	doc/api/crypto.markdown
    	lib/zlib.js
    	src/node_version.h
    	src/node_zlib.cc
    	test/simple/test-buffer.js
Commits on Feb 2, 2013
  1. @bnoordhuis

    buffer: optimize Buffer.prototype.write(s, 'hex')

    bnoordhuis authored
    Move the implementation to C++ land. This is similar to commit 3f65916
    but this time for the write() function and the Buffer(s, 'hex')
    constructor.
    
    Speeds up the benchmark below about 24x (2.6s vs 1:02m).
    
      var s = 'f';
      for (var i = 0; i < 26; ++i) s += s;  // 64 MB
      Buffer(s, 'hex');
Commits on Feb 1, 2013
  1. @bnoordhuis

    buffer: optimize Buffer.prototype.toString('hex')

    bnoordhuis authored
    Move the implementation to C++ land. The old JS implementation used
    string concatenation, was dog slow and consumed copious amounts of
    memory for large buffers. Example:
    
      var buf = Buffer(0x1000000);  // 16 MB
      buf.toString('hex')           // Used 3+ GB of memory.
    
    The new implementation operates in O(n) time and space.
    
    Fixes #4700.
Commits on Jan 27, 2013
  1. @bnoordhuis

    buffer: fix Buffer::Copy regression from 00b4b7b

    bnoordhuis authored
    If the end argument is omitted or not a number, make it default to
    the end of the buffer, not zero.
    
    Ideally, it should not matter what it defaults to because the JS shim
    in lib/buffer.js should handle that but there are still several places
    in node.js core that secrete SlowBuffers, hence Buffer::Copy() gets
    called without going through Buffer.prototype.copy() first.
Commits on Jan 25, 2013
  1. @bnoordhuis

    buffer: remove minor Buffer::Copy deoptimizations

    bnoordhuis authored
    * Omit ToObject() call. Buffer::Data() and Buffer::Length() know how
      to deal with Values.
    
    * Don't check if the argument is undefined because it realistically
      never is and undefined->integer coercion achieves the same thing.
  2. @trevnorris @TooTallNate

    buffer: slow buffer copy compatibility fix

    trevnorris authored TooTallNate committed
    Fix issue where SlowBuffers couldn't be passed as target to Buffer
    copy().
    
    Also included checks to see if Argument parameters are defined before
    assigning their values. This offered ~3x's performance gain.
    
    Backport of 16bbecc from master branch. Closes #4633.
  3. @trevnorris @bnoordhuis

    buffer: error and misc cleanup

    trevnorris authored bnoordhuis committed
    Changed types of errors thrown to be more indicative of what the error
    represents. Also removed a few unnecessary uses of the v8 fully
    quantified typename.
  4. @trevnorris @bnoordhuis

    buffer: slow buffer copy compatibility fix

    trevnorris authored bnoordhuis committed
    Fix issue where SlowBuffers couldn't be passed as target to Buffer
    copy().
    
    Also included checks to see if Argument parameters are defined before
    assigning their values. This offered ~3x's performance gain.
Commits on Jan 23, 2013
  1. @trevnorris @bnoordhuis

    buffer: remove float write range checks

    trevnorris authored bnoordhuis committed
    Removed range checks when writing float values, and removed a few
    includes and defines. Also updated api docs to reflect that invalid 32
    bit float is an unspecified behavior.
Commits on Jan 18, 2013
  1. @isaacs

    Merge remote-tracking branch 'ry/v0.8' into master

    isaacs authored
    Conflicts:
    	AUTHORS
    	ChangeLog
    	src/node_version.h
    	test/simple/test-buffer.js
  2. @isaacs
Commits on Jan 17, 2013
  1. @bnoordhuis

    buffer: reject negative SlowBuffer offsets

    bnoordhuis authored
    Reject negative offsets in SlowBuffer::MakeFastBuffer(), it allows
    the creation of buffers that point to arbitrary addresses.
    
    Reported by Trevor Norris.
Commits on Jan 16, 2013
  1. @trevnorris @isaacs

    buffer: floating point read/write improvements

    trevnorris authored isaacs committed
    Improvements:
    * floating point operations are approx 4x's faster
    * Now write quiet NaN's
    * all read/write on floating point now done in C, so no more need for
      lib/buffer_ieee754.js
    * float values have more accurate min/max value checks
    * add additional benchmarks for buffers read/write
    * created benchmark/_bench_timer.js which is a simple library that
      can be included into any benchmark and provides an intelligent tracker
      for sync and async tests
    * add benchmarks for DataView set methods
    * add checks and tests to make sure offset is greater than 0
Commits on Jan 7, 2013
  1. @bnoordhuis
  2. @bnoordhuis
  3. @bnoordhuis
Commits on Dec 28, 2012
  1. @bnoordhuis

    buffer: speed up base64 encoding by 20%

    bnoordhuis authored
    Remove a lot of branches from the inner loop. Speeds up buf.toString('base64')
    by about 20%.
    
    Before:
    
      $ time out/Release/node benchmark/buffer-base64-encode.js
      real    0m6.607s
      user    0m5.508s
      sys     0m1.088s
    
    After:
    
      $ time out/Release/node benchmark/buffer-base64-encode.js
      real    0m5.520s
      user    0m4.520s
      sys     0m0.992s
Commits on Dec 17, 2012
  1. @isaacs

    Revert "buffer: allocate memory with mmap()"

    isaacs authored
    Also Revert "buffer: use MAP_ANON, fix OS X build"
    
    This reverts commit ddb1560.
    This reverts commit 2433ec8.
  2. @bnoordhuis
Commits on Dec 16, 2012
  1. @bnoordhuis

    buffer: allocate memory with mmap()

    bnoordhuis authored
    Work around an issue with the glibc malloc() implementation where memory blocks
    are never returned to the operating system when they are allocated with brk()
    and have overlapping lifecycles.
    
    Fixes #4283.
Commits on Dec 6, 2012
  1. @bnoordhuis
Commits on Oct 13, 2012
  1. @TooTallNate

    Merge remote-tracking branch 'origin/v0.8'

    TooTallNate authored
    Conflicts:
    	AUTHORS
    	ChangeLog
    	deps/uv/test/runner-win.c
    	doc/api/process.markdown
    	lib/repl.js
    	src/node_crypto.cc
    	src/node_version.h
Commits on Oct 10, 2012
  1. @bnoordhuis

    buffer: report proper retained size in profiler

    bnoordhuis authored
    Make buffers report the proper retained size in heap snapshots.
    
    Before this commit, Buffer objects would show up in the heap profiler as being
    only a few hundred bytes large, even if the actual buffer was many megabytes.
Commits on Sep 13, 2012
  1. @langpavel @bnoordhuis

    buffer: update constructor prototype

    langpavel authored bnoordhuis committed
    Change Buffer::New(char*, size_t) to Buffer::New(const char*, size_t).
Commits on Aug 16, 2012
  1. @piscisaureus
Commits on Apr 17, 2012
  1. @isaacs
Commits on Mar 30, 2012
  1. @bnoordhuis
Commits on Mar 23, 2012
  1. @bnoordhuis

    Avoiding unnecessary ToString() calls

    ssuda authored bnoordhuis committed
    String::Utf8Value and String::AsciiValue constructors take Handle<Value>
    So no need to convert to Handle<String>
Commits on Mar 9, 2012
  1. @bnoordhuis
  2. @bnoordhuis

    buffer: throw from constructor if length > kMaxLength

    bnoordhuis authored
    Throw, don't abort. `new Buffer(0x3fffffff + 1)` used to bring down the process
    with the following error message:
    
      FATAL ERROR: v8::Object::SetIndexedPropertiesToExternalArrayData() length
      exceeds max acceptable value
    
    Fixes #2280.
Commits on Feb 23, 2012
  1. @bnoordhuis

    Remove unused variables.

    bnoordhuis authored
Commits on Feb 21, 2012
  1. @bnoordhuis
Commits on Feb 6, 2012
  1. @isaacs

    Merge remote-tracking branch 'ry/v0.6'

    isaacs authored
    Conflicts:
    	ChangeLog
    	deps/v8/src/version.cc
    	deps/v8/tools/gyp/v8.gyp
    	doc/about/index.html
    	doc/community/index.html
    	doc/index.html
    	doc/logos/index.html
    	doc/template.html
    	lib/path.js
    	lib/querystring.js
    	src/node_version.h
Something went wrong with that request. Please try again.