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: Add missing using v8::MaybeLocal (v5.x) #5974

Closed
wants to merge 37 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
18db2af
buffer: faster case for create buffer from empty string
JacksonTian Dec 18, 2015
6e4d9b3
build: enable compilation for linuxOne
mhdawson Mar 28, 2016
f56d6ad
build: add missing `openssl_fips%` to common.gypi
indutny Mar 27, 2016
09dc4cc
build: add script to create Android .mk files
robertchiras Mar 3, 2016
882fa25
build: add suport for x86 architecture
robertchiras Mar 3, 2016
459a7d6
child_process: refactor self=this in socket_list
benjamingr Mar 23, 2016
37f4df4
deps: backport 8d00c2c from v8 upstream
bnoordhuis Mar 6, 2016
648e0c3
dns: Use object without protoype for map
benjamingr Mar 22, 2016
4916fff
dns: Refactor forEach to map
benjamingr Mar 22, 2016
715ba18
doc: fix doc for Buffer.readInt32LE()
ghaiklor Mar 24, 2016
0da59ef
doc: add instructions to only sign a release
Fishrock123 Mar 23, 2016
b9682af
doc: fix order of end tags of list after heading
Mar 3, 2016
fc6513d
doc: use consistent event name parameter
benjamingr Mar 22, 2016
93638e1
doc: explain path.format expected properties
eversojk Mar 19, 2016
9e5fe2b
doc: typo: interal->internal.
kosak Mar 22, 2016
8df627e
etw: fix descriptors of events 9 and 23
joaocgreis Mar 16, 2016
1490a45
fs: add the fs.mkdtemp() function.
ralt Feb 24, 2016
f275176
http: speed up checkIsHttpToken
JacksonTian Jan 21, 2016
1d4c751
zlib: Fix handling of gzip magic bytes mid-file
addaleax Mar 23, 2016
5b5cb7e
win,build: build and test add-ons on test-ci
Mar 24, 2016
dddd365
tools: fix json doc generation
firedfox Mar 29, 2016
cebb8d7
timers: fixing API refs to use safe internal refs
getify Aug 22, 2015
cc85dd7
test: fix test-debugger-client.js
Trott Mar 22, 2016
ee8de3f
test: fix flaky test-http-set-timeout
Trott Mar 23, 2016
42903cc
test: move dns test to test/internet
bnoordhuis Mar 25, 2016
25244c1
test: fix flaky test-net-socket-timeout
mscdex Mar 24, 2016
f616adb
test: confirm globals not used internally
Trott Mar 24, 2016
5dc8df2
test: exclude new fs watch test for AIX
mhdawson Mar 28, 2016
5822f47
test: remove the use of curl in the test suite
santigimeno Mar 16, 2016
b8415ad
test: add test for piping large input from stdin
addaleax Mar 29, 2016
3f6fbaf
src: override v8 thread defaults using cli options
tomgco Dec 18, 2015
58de768
repl: support standalone blocks
princejwesley Mar 7, 2016
6ea6b64
querystring: don't stringify bad surrogate pair
mscdex Mar 23, 2016
d1483f0
net: emit host in lookup event
entertainyou Mar 8, 2016
8982d09
deps: upgrade npm to 3.8.3
othiym23 Mar 30, 2016
a7710b0
lib: refactor code with startsWith/endsWith
JacksonTian Mar 17, 2016
8bd81b2
src: Add missing `using v8::MaybeLocal`
addaleax Mar 31, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -332,12 +332,20 @@ else
ifeq ($(DESTCPU),ppc)
ARCH=ppc
else
ifeq ($(DESTCPU),s390)
ARCH=s390
else
ifeq ($(DESTCPU),s390x)
ARCH=s390x
else
ARCH=x86
endif
endif
endif
endif
endif
endif
endif

# node and v8 use different arch names (e.g. node 'x86' vs v8 'ia32').
# pass the proper v8 arch name to $V8_ARCH based on user-specified $DESTCPU.
Expand Down
47 changes: 39 additions & 8 deletions android-configure
Original file line number Diff line number Diff line change
@@ -1,18 +1,49 @@
#!/bin/bash

if [ -z "$2" ]; then
ARCH=arm
else
ARCH="$2"
fi

CC_VER="4.9"
case $ARCH in
arm)
DEST_CPU="$ARCH"
SUFFIX="$ARCH-linux-androideabi"
TOOLCHAIN_NAME="$SUFFIX"
;;
x86)
DEST_CPU="ia32"
SUFFIX="i686-linux-android"
TOOLCHAIN_NAME="$ARCH"
;;
x86_64)
DEST_CPU="ia32"
SUFFIX="$ARCH-linux-android"
TOOLCHAIN_NAME="$ARCH"
;;
*)
echo "Unsupported architecture provided: $ARCH"
exit 1
;;
esac

export TOOLCHAIN=$PWD/android-toolchain
mkdir -p $TOOLCHAIN
$1/build/tools/make-standalone-toolchain.sh \
--toolchain=arm-linux-androideabi-4.9 \
--arch=arm \
--toolchain=$TOOLCHAIN_NAME-$CC_VER \
--arch=$ARCH \
--install-dir=$TOOLCHAIN \
--platform=android-21
export PATH=$TOOLCHAIN/bin:$PATH
export AR=$TOOLCHAIN/bin/arm-linux-androideabi-ar
export CC=$TOOLCHAIN/bin/arm-linux-androideabi-gcc
export CXX=$TOOLCHAIN/bin/arm-linux-androideabi-g++
export LINK=$TOOLCHAIN/bin/arm-linux-androideabi-g++
export AR=$TOOLCHAIN/bin/$SUFFIX-ar
export CC=$TOOLCHAIN/bin/$SUFFIX-gcc
export CXX=$TOOLCHAIN/bin/$SUFFIX-g++
export LINK=$TOOLCHAIN/bin/$SUFFIX-g++

./configure \
--dest-cpu=arm \
--dest-os=android
--dest-cpu=$DEST_CPU \
--dest-os=android \
--without-snapshot \
--openssl-no-asm
15 changes: 10 additions & 5 deletions benchmark/buffers/buffer_zero.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,21 @@
const common = require('../common.js');

const bench = common.createBenchmark(main, {
n: [1024]
n: [1024],
type: ['buffer', 'string']
});

const zero = new Buffer(0);
const zeroBuffer = Buffer.alloc(0);
const zeroString = '';

function main(conf) {
var n = +conf.n;
bench.start();
for (let i = 0; i < n * 1024; i++) {
new Buffer(zero);
}

if (conf.type === 'buffer')
for (let i = 0; i < n * 1024; i++) Buffer.from(zeroBuffer);
else if (conf.type === 'string')
for (let i = 0; i < n * 1024; i++) Buffer.from(zeroString);

bench.end(n);
}
52 changes: 52 additions & 0 deletions benchmark/http/check_is_http_token.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
'use strict';

const common = require('../common.js');
const _checkIsHttpToken = require('_http_common')._checkIsHttpToken;

const bench = common.createBenchmark(main, {
key: [
'TCN',
'ETag',
'date',
'Vary',
'server',
'Server',
'status',
'version',
'Expires',
'alt-svc',
'location',
'Connection',
'Keep-Alive',
'content-type',
'Content-Type',
'Cache-Control',
'Last-Modified',
'Accept-Ranges',
'content-length',
'x-frame-options',
'x-xss-protection',
'Content-Encoding',
'Content-Location',
'Transfer-Encoding',
'alternate-protocol',
':', // invalid input
'@@',
'中文呢', // unicode
'((((())))', // invalid
':alternate-protocol', // fast bailout
'alternate-protocol:' // slow bailout
],
n: [1e6],
});

function main(conf) {
var n = +conf.n;
var key = conf.key;

bench.start();
for (var i = 0; i < n; i++) {
_checkIsHttpToken(key);
}
bench.end(n);
}
18 changes: 18 additions & 0 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
'node_tag%': '',
'uv_library%': 'static_library',

'openssl_fips%': '',

# Default to -O0 for debug builds.
'v8_optimized_debug%': 0,

Expand Down Expand Up @@ -68,6 +70,10 @@
'cflags': [ '-gxcoff' ],
'ldflags': [ '-Wl,-bbigtoc' ],
}],
['OS == "android"', {
'cflags': [ '-fPIE' ],
'ldflags': [ '-fPIE', '-pie' ]
}]
],
'msvs_settings': {
'VCCLCompilerTool': {
Expand Down Expand Up @@ -101,6 +107,10 @@
['OS!="mac" and OS!="win"', {
'cflags': [ '-fno-omit-frame-pointer' ],
}],
['OS == "android"', {
'cflags': [ '-fPIE' ],
'ldflags': [ '-fPIE', '-pie' ]
}]
],
'msvs_settings': {
'VCCLCompilerTool': {
Expand Down Expand Up @@ -254,6 +264,14 @@
'cflags': [ '-m64', '-mminimal-toc' ],
'ldflags': [ '-m64' ],
}],
[ 'target_arch=="s390"', {
'cflags': [ '-m31' ],
'ldflags': [ '-m31' ],
}],
[ 'target_arch=="s390x"', {
'cflags': [ '-m64' ],
'ldflags': [ '-m64' ],
}],
[ 'OS=="solaris"', {
'cflags': [ '-pthreads' ],
'ldflags': [ '-pthreads' ],
Expand Down
7 changes: 5 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ parser = optparse.OptionParser()
valid_os = ('win', 'mac', 'solaris', 'freebsd', 'openbsd', 'linux',
'android', 'aix')
valid_arch = ('arm', 'arm64', 'ia32', 'mips', 'mipsel', 'ppc', 'ppc64', 'x32',
'x64', 'x86')
'x64', 'x86', 's390', 's390x')
valid_arm_float_abi = ('soft', 'softfp', 'hard')
valid_arm_fpu = ('vfp', 'vfpv3', 'vfpv3-d16', 'neon')
valid_mips_arch = ('loongson', 'r1', 'r2', 'r6', 'rx')
Expand Down Expand Up @@ -601,14 +601,17 @@ def host_arch_cc():
'__PPC64__' : 'ppc64',
'__PPC__' : 'ppc',
'__x86_64__' : 'x64',
'__s390__' : 's390',
'__s390x__' : 's390x',
}

rtn = 'ia32' # default

for i in matchup:
if i in k and k[i] != '0':
rtn = matchup[i]
break
if rtn != 's390':
break

return rtn

Expand Down
2 changes: 2 additions & 0 deletions deps/npm/.mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Forbes Lindesay <forbes@lindesay.co.uk>
Forrest L Norvell <ogd@aoaioxxysz.net> <forrest@npmjs.com>
Gabriel Barros <descartavel1@gmail.com>
Geoff Flarity <geoff.flarity@gmail.com> <gflarity@raptvm-x02.(none)>
Ifeanyi Oraelosi <ifeanyioraelosi@gmail.com>
Isaac Z. Schlueter <i@izs.me> <i@foohack.com>
Isaac Z. Schlueter <i@izs.me> isaacs <i@izs.me>
Jake Verbaten <raynos2@gmail.com>
Expand Down Expand Up @@ -59,3 +60,4 @@ Will Elwood <w.elwood08@gmail.com>
Wout Mertens <Wout.Mertens@gmail.com>
Yeonghoon Park <sola92@gmail.com>
Zeke Sikelianos <zeke@sikelianos.com>
Zoujie Wzj <zoujie.wzj@alibaba-inc.com>
1 change: 1 addition & 0 deletions deps/npm/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ npm-debug.log
/test/packages/npm-test-depends-on-spark/which-spark.log
/test/packages/test-package/random-data.txt
/test/root
/test/npm_cache
node_modules/marked
node_modules/ronn
node_modules/tap
Expand Down
2 changes: 1 addition & 1 deletion deps/npm/.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ before_install:
- "node . install -g ."
- "mkdir -p /var/run/couchdb"
sudo: false
script: "npm run-script test-all"
script: "npm test"
notifications:
slack: npm-inc:kRqQjto7YbINqHPb1X6nS3g8
18 changes: 18 additions & 0 deletions deps/npm/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -364,3 +364,21 @@ Jan Schär <jscissr@gmail.com>
Xcat Liu <xcatliu@gmail.com>
harryh <Aourin@users.noreply.github.com>
Prayag Verma <prayag.verma@gmail.com>
Neil Kistner <neil.kistner@gmail.com>
Zoujie Wzj <zoujie.wzj@alibaba-inc.com>
Ryan Hendrickson <ryan.hendrickson@alum.mit.edu>
Arturo Coronel <aoitsu3@gmail.com>
Hutson Betts <hbetts@factset.com>
Lewis Cowper <lewis.cowper@googlemail.com>
Adam Byrne <misterbyrne@gmail.com>
Ifeanyi Oraelosi <ifeanyioraelosi@gmail.com>
Robert Ludwig <rob.ludwig@rideamigos.com>
Chris Warren <chris@ixalon.net>
Scott Plumlee <scott@plumlee.org>
Daniel Pedersen <daniel@scandinav.se>
rhgb <kaiserdaemon@gmail.com>
doug.wade <doug.wade@redfin.com>
Zac <zdoege@gm.slc.edu>
GriffinSchneider <griffinschneider@gmail.com>
Andres Kalle <mjomble@gmail.com>
thefourtheye <thefourtheye@users.noreply.github.com>
Loading