Skip to content
This repository

Feb 25, 2013

  1. Ben Noordhuis

    src, test: downgrade to v8 3.14 api

    authored

Feb 11, 2013

  1. Ben Noordhuis

    typed arrays: make call-as-function work for ctors

    Turn call-as-function calls into constructor calls. Makes the following
    snippet work:
    
      var buf = ArrayBuffer(32);  // no 'new' but does the right thing
    authored

Feb 10, 2013

  1. Ben Noordhuis

    typed arrays: copy Buffer in typed array constructor

    Convert the Buffer to an ArrayBuffer. The typed_array.buffer property
    should be an ArrayBuffer to avoid confusion: a Buffer doesn't have a
    byteLength property and more importantly, its slice() method works
    subtly different.
    
    That means that before this commit:
    
      var buf = new Buffer(1);
      var arr = new Int8Array(buf);
      assert.equal(arr.buffer, buf);
      assert(arr.buffer instanceof Buffer);
    
    And now:
    
      var buf = new Buffer(1);
      var arr = new Int8Array(buf);
      assert.notEqual(arr.buffer, buf);
      assert(arr.buffer instanceof ArrayBuffer);
    authored
  2. Ben Noordhuis

    typed arrays: make DataView throw on non-ArrayBuffer

    Make the DataView constructor throw an exception when the first
    argument is not an ArrayBuffer. Follows the spec and the browsers.
    authored
  3. Ben Noordhuis

    Revert "typed arrays: only share ArrayBuffer backing store"

    We're going to fix this differently. The real bug is that
    Buffer::HasInstance() returns true for typed arrays.
    
    This reverts commit 01ee551.
    authored
  4. Ben Noordhuis

    Revert "typed arrays: copy non-ArrayBuffer in DataView ctor"

    We're going to follow browser behavior here.
    
    This reverts commit 7b0770b.
    authored

Feb 06, 2013

  1. Ben Noordhuis

    typed arrays: copy non-ArrayBuffer in DataView ctor

    This is commit 01ee551, except for the DataView type this time.
    
    Make the behavior of DataView consistent with that of typed arrays:
    make a copy of the backing store.
    authored
  2. Ben Noordhuis

    typed arrays: only share ArrayBuffer backing store

    Follow browser behavior, only share the backing store when it's a
    ArrayBuffer. That is:
    
      var abuf = new ArrayBuffer(32);
      var a = new Int8Array(abuf);
      var b = new Int8Array(abuf);
      a[0] = 0;
      b[0] = 1;
      assert(a[0] === b[0]);  // a and b share memory
    
    But:
    
      var a = new Int8Array(32);
      var b = new Int8Array(a);
      a[0] = 0;
      b[0] = 1;
      assert(a[0] !== b[0]);  // a and b don't share memory
    
    The typed arrays spec allows both `a[0] === b[0]` and `a[0] !=== b[0]`
    but Chrome and Firefox implement the behavior where memory is not
    shared.
    
    Copying the memory is less efficient but let's do it anyway for the
    sake of the Principle of Least Surprise.
    
    Fixes #4714.
    authored

Jan 19, 2013

  1. Ben Noordhuis

    typed arrays: fix DataView endianness regression

    Fix an off-by-one error introduced in 9fe3734 that caused a regression
    in the default endianness used for writes in DataView::setGeneric().
    
    Fixes #4626.
    authored

Jan 16, 2013

  1. Dean McNamee

    TypedArrays: Improve dataview perf without endian param

    V8 seems to be particularly slow converting an undefined value to false
    in BooleanValue.
    
    Revert this when we upgrade to V8 3.17, or whenever the fix discussed
    in http://code.google.com/p/v8/issues/detail?id=2487 lands in V8.
    authored isaacs committed

Jan 11, 2013

  1. Isaac Z. Schlueter

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

    Conflicts:
    	AUTHORS
    	ChangeLog
    	Makefile
    	src/node_version.h
    authored

Jan 09, 2013

  1. Ben Noordhuis

    typed arrays: fix 32 bit size/index overflow

    Fix an out-of-bound read/write bug due to integer wrapping. Reported by
    Dean McNamee.
    authored
  2. Dean McNamee

    typed arrays: implement load and store swizzling

    Implement load and store swizzling operations. This reduces an unneeded
    back and forth between types and additionally keeps the value in the
    swappable type until it is swapped. This is important for correctness
    when dealing with floating point, to avoid the possibility of loading
    the bits of a signaling NaN (because it isn't yet swapped) into the FPU.
    
    This additionally produces better code (comments are mine):
    
    gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
    
    setValue<double>:
      movd  %xmm0, %rax         ; fp reg -> gen reg
      bswapq  %rax              ; 64-bit byte swap
      movq  %rax, (%r15,%r12)   ; store
    authored bnoordhuis committed
  3. Dean McNamee

    typed arrays: swizzle with compiler intrinsics

    Implement swizzling with compiler intrinsics and be aware of the native
    endianness to correctly swap on big endian machines.
    
    This introduces a template function to swap the bytes of a value,
    and macros for the low level swap (taking advantage of gcc and msvc
    intrinsics). This produces code like the following (comments are mine):
    
    gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
    
    setValue<double>:
      movd  %xmm0, %rax         ; fp reg -> gen reg
      bswapq  %rax              ; 64-bit byte swap
      movd  %rax, %xmm0         ; gen reg -> fp reg
      movq  %xmm0, (%r15,%r12)  ; store
    authored bnoordhuis committed
  4. Ben Noordhuis

    typed arrays: undo local changes

    Partially revert 5664dd2, 6573fc3 and 7788a6b to ease landing changes
    from upstream.
    authored

Jan 08, 2013

  1. Dean McNamee

    typed arrays: don't declare as module

    TypedArrays is not a module, it is attached to the global object.
    Don't register it with Node's module system.
    authored bnoordhuis committed
  2. Dean McNamee

    typed arrays: replace switch with templates

    Convert TypedArray's TypeName implementation to template specialization
    instead of a switch() statement.
    authored bnoordhuis committed

Jan 07, 2013

  1. Ben Noordhuis

    src: pass node_isolate to Undefined()

    authored
  2. Ben Noordhuis

    src: pass node_isolate to Integer::New

    authored

Jan 04, 2013

  1. Ben Noordhuis

    src: use static_cast where appropriate

    Use static_cast instead of reinterpret_cast when casting from void*
    to another type.
    
    This is mostly an aesthetic change but may help catch bugs when the
    affected code is modified.
    authored

Jan 02, 2013

  1. Fedor Indutny

    bindings: update to new v8 apis

    GetPointerFromInternalField() is deprecated now, we should use
    GetAlignedPointerFromInternalField().
    authored

Dec 17, 2012

  1. Dean McNamee

    typed arrays: fix missing type in SizeOfArrayElementForType()

    When Mikael Bourges-Sevenier added support for Uint8ClampedArray in 67fc1da,
    the new type was not added to SizeOfArrayElementForType().
    authored bnoordhuis committed
  2. Dean McNamee

    typed arrays: re-export SizeOfArrayElementForType()

    Although it is not used externally by node, it is needed by upstream and Plask.
    
    This effectively reverts:
    
        commit 1444801
        Author: Aaron Jacobs <jacobsa@google.com>
        Date:   Thu Mar 15 13:26:35 2012 +1100
    
            typed arrays: unexport SizeOfArrayElementForType()
    
            It isn't used anywhere else, so made it an implementation detail in
            v8_typed_array.cc.
    authored bnoordhuis committed

Nov 05, 2012

  1. typed arrays: add slice() support to ArrayBuffer

    authored bnoordhuis committed

Oct 23, 2012

  1. Isaac Z. Schlueter

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

    authored
  2. Aaron Jacobs

    typed arrays: use `signed char` for signed int8s

    The C standard allows plain `char` to be unsigned. The build environment
    at Google trips this issue.
    authored bnoordhuis committed

Oct 13, 2012

  1. Dean McNamee

    typed arrays: remove unnecessary special-casing

    Uint32Value() on undefined is equal to 0, no need to special case it.
    authored bnoordhuis committed
  2. Dean McNamee

    typed arrays: simplify typed array get() and set()

    Instead of duplicating V8's logic (including clamping), just simply call into
    V8's Get() and Set() methods, which handles all conversions and typing.
    authored bnoordhuis committed

Apr 18, 2012

  1. Isaac Z. Schlueter

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

    Conflicts:
    	AUTHORS
    	ChangeLog
    	LICENSE
    	Makefile
    	deps/http_parser/test.c
    	deps/npm/AUTHORS
    	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/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/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/list.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/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/lib/npm.js
    	deps/npm/man/man1/npm.1
    	deps/npm/man/man3/npm.3
    	deps/npm/node_modules/fstream-npm/fstream-npm.js
    	deps/npm/node_modules/fstream-npm/node_modules/fstream-ignore/package.json
    	deps/npm/node_modules/fstream-npm/package.json
    	deps/npm/node_modules/node-gyp/LICENSE
    	deps/npm/node_modules/node-gyp/lib/build.js
    	deps/npm/node_modules/node-gyp/lib/install.js
    	deps/npm/node_modules/node-gyp/node_modules/ansi/package.json
    	deps/npm/node_modules/node-gyp/node_modules/glob/package.json
    	deps/npm/node_modules/node-gyp/package.json
    	deps/npm/package.json
    	deps/uv/test/test-fs.c
    	deps/v8/src/regexp-macro-assembler-tracer.cc
    	deps/v8/src/version.cc
    	src/node_version.h
    	src/platform_sunos.cc
    	test/simple/test-net-write-after-close.js
    	wscript
    authored

Apr 12, 2012

  1. Aaron Jacobs

    typed arrays: unexport SizeOfArrayElementForType()

    It isn't used anywhere else, so made it an implementation detail in
    v8_typed_array.cc.
    authored bnoordhuis committed

Apr 06, 2012

  1. Bert Belder

    Please the compiler

    authored

Mar 30, 2012

  1. Ben Noordhuis

    typed arrays: root JS objects in HandleScope with Local<>

    authored

Mar 28, 2012

  1. Erik Lundin

    typed arrays: prevent unaligned typed array views on top of buffers

    authored bnoordhuis committed
  2. m1k3

    typed arrays: add Uint8ClampedArray

    authored bnoordhuis committed

Mar 09, 2012

  1. Ben Noordhuis

    buffer: throw from constructor if length > kMaxLength

    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.
    authored
Something went wrong with that request. Please try again.