This is a big upgrade of the node pkg.

tl;dr 0.4.7 -> 0.7.9 (RC0)
tl;dr * fix do-configure
tl;dr * lockf, flock, and shlock mess

---

It takes us to a pre-release version instead of a very old verion. :)

Many of our patchss have been accepted upstream by v8, libuv, and node.

uv/src/unix/netbsd.c DEFINITELY needs some extra work as it's just hacked.

There is an undelcared dependency on flock, which shlock could replace, but
it needs to be handled more cleanly.
(I hoped mine from freebsd and made a symlink)

Not sure if libexecinfo is still needed, but I kept it in there.  I was able
to build without it locally.

this is obviously the biggest hack:
do-configure:
        cd ${WRKSRC} && export GYP_DEFINES="OS=netbsd"; ./configure ${CONFIGURE_ARGS}

but it got me working on netbsd so I'll take it.
This commit is contained in:
Matthew Sporleder 2012-05-27 21:28:14 +00:00 committed by Thomas Klausner
parent ac4e575ffe
commit ad80f23ad9
30 changed files with 994 additions and 1985 deletions

View file

@ -1,10 +1,12 @@
# $NetBSD: Makefile,v 1.4 2011/06/25 12:44:55 genolopolis Exp $
# $NetBSD: Makefile,v 1.5 2012/05/27 21:28:14 genolopolis Exp $
#
DISTNAME= node-v0.4.7
DISTNAME= node-v0.7.9-RC0
CATEGORIES= wip
MASTER_SITES= http://nodejs.org/dist/
MASTER_SITES= http://nodejs.org/dist/v0.7.9/
PKGNAME= ${DISTNAME:S/-v/js-/}
#needed because of -RC0
WRKSRC= ${WRKDIR}/node-v0.7.9
MAINTAINER= msporleder@gmail.com
HOMEPAGE= http://nodejs.org/
@ -12,18 +14,19 @@ COMMENT= V8 JavaScript for clients and servers
LICENSE= mit
PKG_DESTDIR_SUPPORT= user-destdir
CHECK_INTERPRETER= no
HAS_CONFIGURE= yes
USE_TOOLS+= pkg-config
USE_TOOLS+= gmake
USE_LANGUAGES= c c++
CONFIGURE_ARGS+= "--prefix=${PREFIX}"
PKGCONFIG_OVERRIDE+= tools/nodejs.pc.in
.include "../../mk/bsd.prefs.mk"
.include "options.mk"
DEPENDS+= libexecinfo>=1:../../wip/libexecinfo
BUILD_DEPENDS+= scons>=1:../../devel/scons
PYTHON_FOR_BUILD_ONLY= yes
NODE_USER?= node
NODE_GROUP?= node
@ -37,14 +40,18 @@ PKG_SHELL.${NODE_USER}= ${COMMAND_SHELL}
OWN_DIRS+= ${NODE_HOME}
OWN_DIRS_PERMS+= ${NODE_HOME} ${NODE_USER} ${NODE_GROUP} 0750
post-extract:
cp -r ${WRKSRC}/deps/c-ares/openbsd-x64 ${WRKSRC}/deps/c-ares/netbsd-x64
cp -r ${WRKSRC}/deps/c-ares/openbsd-ia32 ${WRKSRC}/deps/c-ares/netbsd-ia32
#post-extract:
# cp -r ${WRKSRC}/deps/c-ares/openbsd-x64 ${WRKSRC}/deps/c-ares/netbsd-x64
# cp -r ${WRKSRC}/deps/c-ares/openbsd-ia32 ${WRKSRC}/deps/c-ares/netbsd-ia32
do-configure:
cd ${WRKSRC} && export GYP_DEFINES="OS=netbsd"; ./configure ${CONFIGURE_ARGS}
REPLACE_PYTHON+= tools/waf-light
REPLACE_PYTHON+= tools/node-waf
REPLACE_PYTHON+= tools/wafadmin/*.py
REPLACE_PYTHON+= tools/wafadmin/Tools/*.py
REPLACE_PYTHON+= configure
.include "../../lang/python26/buildlink3.mk"
.include "../../lang/python/application.mk"

View file

@ -1,15 +1,20 @@
@comment $NetBSD: PLIST,v 1.2 2011/05/04 02:41:58 genolopolis Exp $
@comment $NetBSD: PLIST,v 1.3 2012/05/27 21:28:14 genolopolis Exp $
bin/node
bin/node-waf
include/node/config.h
include/node/eio.h
include/node/ev.h
bin/npm
include/node/ares.h
include/node/ares_version.h
include/node/node.h
include/node/node_buffer.h
include/node/node_config.h
include/node/node_events.h
include/node/node_object_wrap.h
include/node/node_version.h
include/node/uv-private/eio.h
include/node/uv-private/ev.h
include/node/uv-private/ngx-queue.h
include/node/uv-private/tree.h
include/node/uv-private/uv-unix.h
include/node/uv-private/uv-win.h
include/node/uv.h
include/node/v8-debug.h
include/node/v8-preparser.h
include/node/v8-profiler.h
@ -65,5 +70,702 @@ lib/node/wafadmin/__init__.py
lib/node/wafadmin/ansiterm.py
lib/node/wafadmin/pproc.py
lib/node/wafadmin/py3kfixes.py
lib/pkgconfig/nodejs.pc
share/man/man1/node.1
lib/node_modules/npm/.npmignore
lib/node_modules/npm/.travis.yml
lib/node_modules/npm/AUTHORS
lib/node_modules/npm/LICENSE
lib/node_modules/npm/Makefile
lib/node_modules/npm/README.md
lib/node_modules/npm/bin/node-gyp-bin/node-gyp
lib/node_modules/npm/bin/node-gyp-bin/node-gyp.cmd
lib/node_modules/npm/bin/npm
lib/node_modules/npm/bin/npm-cli.js
lib/node_modules/npm/bin/npm.cmd
lib/node_modules/npm/bin/read-package-json.js
lib/node_modules/npm/cli.js
lib/node_modules/npm/configure
lib/node_modules/npm/doc/api/bin.md
lib/node_modules/npm/doc/api/bugs.md
lib/node_modules/npm/doc/api/commands.md
lib/node_modules/npm/doc/api/config.md
lib/node_modules/npm/doc/api/deprecate.md
lib/node_modules/npm/doc/api/docs.md
lib/node_modules/npm/doc/api/edit.md
lib/node_modules/npm/doc/api/explore.md
lib/node_modules/npm/doc/api/help-search.md
lib/node_modules/npm/doc/api/init.md
lib/node_modules/npm/doc/api/install.md
lib/node_modules/npm/doc/api/link.md
lib/node_modules/npm/doc/api/load.md
lib/node_modules/npm/doc/api/ls.md
lib/node_modules/npm/doc/api/npm.md
lib/node_modules/npm/doc/api/outdated.md
lib/node_modules/npm/doc/api/owner.md
lib/node_modules/npm/doc/api/pack.md
lib/node_modules/npm/doc/api/prefix.md
lib/node_modules/npm/doc/api/prune.md
lib/node_modules/npm/doc/api/publish.md
lib/node_modules/npm/doc/api/rebuild.md
lib/node_modules/npm/doc/api/restart.md
lib/node_modules/npm/doc/api/root.md
lib/node_modules/npm/doc/api/run-script.md
lib/node_modules/npm/doc/api/search.md
lib/node_modules/npm/doc/api/shrinkwrap.md
lib/node_modules/npm/doc/api/start.md
lib/node_modules/npm/doc/api/stop.md
lib/node_modules/npm/doc/api/submodule.md
lib/node_modules/npm/doc/api/tag.md
lib/node_modules/npm/doc/api/test.md
lib/node_modules/npm/doc/api/uninstall.md
lib/node_modules/npm/doc/api/unpublish.md
lib/node_modules/npm/doc/api/update.md
lib/node_modules/npm/doc/api/version.md
lib/node_modules/npm/doc/api/view.md
lib/node_modules/npm/doc/api/whoami.md
lib/node_modules/npm/doc/cli/adduser.md
lib/node_modules/npm/doc/cli/bin.md
lib/node_modules/npm/doc/cli/bugs.md
lib/node_modules/npm/doc/cli/build.md
lib/node_modules/npm/doc/cli/bundle.md
lib/node_modules/npm/doc/cli/cache.md
lib/node_modules/npm/doc/cli/changelog.md
lib/node_modules/npm/doc/cli/coding-style.md
lib/node_modules/npm/doc/cli/completion.md
lib/node_modules/npm/doc/cli/config.md
lib/node_modules/npm/doc/cli/deprecate.md
lib/node_modules/npm/doc/cli/developers.md
lib/node_modules/npm/doc/cli/disputes.md
lib/node_modules/npm/doc/cli/docs.md
lib/node_modules/npm/doc/cli/edit.md
lib/node_modules/npm/doc/cli/explore.md
lib/node_modules/npm/doc/cli/faq.md
lib/node_modules/npm/doc/cli/folders.md
lib/node_modules/npm/doc/cli/help-search.md
lib/node_modules/npm/doc/cli/help.md
lib/node_modules/npm/doc/cli/index.md
lib/node_modules/npm/doc/cli/init.md
lib/node_modules/npm/doc/cli/install.md
lib/node_modules/npm/doc/cli/json.md
lib/node_modules/npm/doc/cli/link.md
lib/node_modules/npm/doc/cli/list.md
lib/node_modules/npm/doc/cli/npm.md
lib/node_modules/npm/doc/cli/outdated.md
lib/node_modules/npm/doc/cli/owner.md
lib/node_modules/npm/doc/cli/pack.md
lib/node_modules/npm/doc/cli/prefix.md
lib/node_modules/npm/doc/cli/prune.md
lib/node_modules/npm/doc/cli/publish.md
lib/node_modules/npm/doc/cli/rebuild.md
lib/node_modules/npm/doc/cli/registry.md
lib/node_modules/npm/doc/cli/removing-npm.md
lib/node_modules/npm/doc/cli/restart.md
lib/node_modules/npm/doc/cli/root.md
lib/node_modules/npm/doc/cli/run-script.md
lib/node_modules/npm/doc/cli/scripts.md
lib/node_modules/npm/doc/cli/search.md
lib/node_modules/npm/doc/cli/semver.md
lib/node_modules/npm/doc/cli/shrinkwrap.md
lib/node_modules/npm/doc/cli/star.md
lib/node_modules/npm/doc/cli/start.md
lib/node_modules/npm/doc/cli/stop.md
lib/node_modules/npm/doc/cli/submodule.md
lib/node_modules/npm/doc/cli/tag.md
lib/node_modules/npm/doc/cli/test.md
lib/node_modules/npm/doc/cli/uninstall.md
lib/node_modules/npm/doc/cli/unpublish.md
lib/node_modules/npm/doc/cli/update.md
lib/node_modules/npm/doc/cli/version.md
lib/node_modules/npm/doc/cli/view.md
lib/node_modules/npm/doc/cli/whoami.md
lib/node_modules/npm/html/api/GubbleBum-Blocky.ttf
lib/node_modules/npm/html/api/author.html
lib/node_modules/npm/html/api/bin.html
lib/node_modules/npm/html/api/bugs.html
lib/node_modules/npm/html/api/commands.html
lib/node_modules/npm/html/api/config.html
lib/node_modules/npm/html/api/deprecate.html
lib/node_modules/npm/html/api/docs.html
lib/node_modules/npm/html/api/edit.html
lib/node_modules/npm/html/api/explore.html
lib/node_modules/npm/html/api/find.html
lib/node_modules/npm/html/api/get.html
lib/node_modules/npm/html/api/help-search.html
lib/node_modules/npm/html/api/home.html
lib/node_modules/npm/html/api/init.html
lib/node_modules/npm/html/api/install.html
lib/node_modules/npm/html/api/link.html
lib/node_modules/npm/html/api/list.html
lib/node_modules/npm/html/api/ln.html
lib/node_modules/npm/html/api/load.html
lib/node_modules/npm/html/api/ls.html
lib/node_modules/npm/html/api/npm.html
lib/node_modules/npm/html/api/outdated.html
lib/node_modules/npm/html/api/owner.html
lib/node_modules/npm/html/api/pack.html
lib/node_modules/npm/html/api/prefix.html
lib/node_modules/npm/html/api/prune.html
lib/node_modules/npm/html/api/publish.html
lib/node_modules/npm/html/api/rebuild.html
lib/node_modules/npm/html/api/restart.html
lib/node_modules/npm/html/api/rm.html
lib/node_modules/npm/html/api/root.html
lib/node_modules/npm/html/api/run-script.html
lib/node_modules/npm/html/api/search.html
lib/node_modules/npm/html/api/set.html
lib/node_modules/npm/html/api/shrinkwrap.html
lib/node_modules/npm/html/api/start.html
lib/node_modules/npm/html/api/stop.html
lib/node_modules/npm/html/api/style.css
lib/node_modules/npm/html/api/submodule.html
lib/node_modules/npm/html/api/tag.html
lib/node_modules/npm/html/api/test.html
lib/node_modules/npm/html/api/uninstall.html
lib/node_modules/npm/html/api/unpublish.html
lib/node_modules/npm/html/api/update.html
lib/node_modules/npm/html/api/version.html
lib/node_modules/npm/html/api/view.html
lib/node_modules/npm/html/api/whoami.html
lib/node_modules/npm/html/doc/GubbleBum-Blocky.ttf
lib/node_modules/npm/html/doc/README.html
lib/node_modules/npm/html/doc/adduser.html
lib/node_modules/npm/html/doc/author.html
lib/node_modules/npm/html/doc/bin.html
lib/node_modules/npm/html/doc/bugs.html
lib/node_modules/npm/html/doc/build.html
lib/node_modules/npm/html/doc/bundle.html
lib/node_modules/npm/html/doc/cache.html
lib/node_modules/npm/html/doc/changelog.html
lib/node_modules/npm/html/doc/coding-style.html
lib/node_modules/npm/html/doc/completion.html
lib/node_modules/npm/html/doc/config.html
lib/node_modules/npm/html/doc/deprecate.html
lib/node_modules/npm/html/doc/developers.html
lib/node_modules/npm/html/doc/disputes.html
lib/node_modules/npm/html/doc/docs.html
lib/node_modules/npm/html/doc/edit.html
lib/node_modules/npm/html/doc/explore.html
lib/node_modules/npm/html/doc/faq.html
lib/node_modules/npm/html/doc/find.html
lib/node_modules/npm/html/doc/folders.html
lib/node_modules/npm/html/doc/get.html
lib/node_modules/npm/html/doc/global.html
lib/node_modules/npm/html/doc/help-search.html
lib/node_modules/npm/html/doc/help.html
lib/node_modules/npm/html/doc/home.html
lib/node_modules/npm/html/doc/index.html
lib/node_modules/npm/html/doc/init.html
lib/node_modules/npm/html/doc/install.html
lib/node_modules/npm/html/doc/json.html
lib/node_modules/npm/html/doc/link.html
lib/node_modules/npm/html/doc/list.html
lib/node_modules/npm/html/doc/ln.html
lib/node_modules/npm/html/doc/ls.html
lib/node_modules/npm/html/doc/npm.html
lib/node_modules/npm/html/doc/outdated.html
lib/node_modules/npm/html/doc/owner.html
lib/node_modules/npm/html/doc/pack.html
lib/node_modules/npm/html/doc/prefix.html
lib/node_modules/npm/html/doc/prune.html
lib/node_modules/npm/html/doc/publish.html
lib/node_modules/npm/html/doc/rebuild.html
lib/node_modules/npm/html/doc/registry.html
lib/node_modules/npm/html/doc/removing-npm.html
lib/node_modules/npm/html/doc/restart.html
lib/node_modules/npm/html/doc/rm.html
lib/node_modules/npm/html/doc/root.html
lib/node_modules/npm/html/doc/run-script.html
lib/node_modules/npm/html/doc/scripts.html
lib/node_modules/npm/html/doc/search.html
lib/node_modules/npm/html/doc/semver.html
lib/node_modules/npm/html/doc/set.html
lib/node_modules/npm/html/doc/shrinkwrap.html
lib/node_modules/npm/html/doc/star.html
lib/node_modules/npm/html/doc/start.html
lib/node_modules/npm/html/doc/stop.html
lib/node_modules/npm/html/doc/style.css
lib/node_modules/npm/html/doc/submodule.html
lib/node_modules/npm/html/doc/tag.html
lib/node_modules/npm/html/doc/test.html
lib/node_modules/npm/html/doc/uninstall.html
lib/node_modules/npm/html/doc/unpublish.html
lib/node_modules/npm/html/doc/update.html
lib/node_modules/npm/html/doc/version.html
lib/node_modules/npm/html/doc/view.html
lib/node_modules/npm/html/doc/whoami.html
lib/node_modules/npm/html/docfoot.html
lib/node_modules/npm/html/dochead.html
lib/node_modules/npm/html/favicon.ico
lib/node_modules/npm/html/index.html
lib/node_modules/npm/html/n-64.png
lib/node_modules/npm/html/n-large.png
lib/node_modules/npm/html/npm-16.png
lib/node_modules/npm/html/npm-256-square.png
lib/node_modules/npm/html/npm-256w.png
lib/node_modules/npm/html/npm-64-square.png
lib/node_modules/npm/html/npm-fin.png
lib/node_modules/npm/html/npm-large.png
lib/node_modules/npm/html/npm.png
lib/node_modules/npm/lib/adduser.js
lib/node_modules/npm/lib/bin.js
lib/node_modules/npm/lib/bugs.js
lib/node_modules/npm/lib/build.js
lib/node_modules/npm/lib/cache.js
lib/node_modules/npm/lib/completion.js
lib/node_modules/npm/lib/config.js
lib/node_modules/npm/lib/deprecate.js
lib/node_modules/npm/lib/docs.js
lib/node_modules/npm/lib/edit.js
lib/node_modules/npm/lib/explore.js
lib/node_modules/npm/lib/faq.js
lib/node_modules/npm/lib/get.js
lib/node_modules/npm/lib/help-search.js
lib/node_modules/npm/lib/help.js
lib/node_modules/npm/lib/init.js
lib/node_modules/npm/lib/install.js
lib/node_modules/npm/lib/link.js
lib/node_modules/npm/lib/ls.js
lib/node_modules/npm/lib/npm.js
lib/node_modules/npm/lib/outdated.js
lib/node_modules/npm/lib/owner.js
lib/node_modules/npm/lib/pack.js
lib/node_modules/npm/lib/prefix.js
lib/node_modules/npm/lib/prune.js
lib/node_modules/npm/lib/publish.js
lib/node_modules/npm/lib/rebuild.js
lib/node_modules/npm/lib/restart.js
lib/node_modules/npm/lib/root.js
lib/node_modules/npm/lib/run-script.js
lib/node_modules/npm/lib/search.js
lib/node_modules/npm/lib/set.js
lib/node_modules/npm/lib/shrinkwrap.js
lib/node_modules/npm/lib/star.js
lib/node_modules/npm/lib/start.js
lib/node_modules/npm/lib/stop.js
lib/node_modules/npm/lib/submodule.js
lib/node_modules/npm/lib/substack.js
lib/node_modules/npm/lib/tag.js
lib/node_modules/npm/lib/test.js
lib/node_modules/npm/lib/unbuild.js
lib/node_modules/npm/lib/uninstall.js
lib/node_modules/npm/lib/unpublish.js
lib/node_modules/npm/lib/update.js
lib/node_modules/npm/lib/utils/cmd-shim.js
lib/node_modules/npm/lib/utils/completion.sh
lib/node_modules/npm/lib/utils/completion/file-completion.js
lib/node_modules/npm/lib/utils/completion/installed-deep.js
lib/node_modules/npm/lib/utils/completion/installed-shallow.js
lib/node_modules/npm/lib/utils/completion/remote-packages.js
lib/node_modules/npm/lib/utils/completion/users.js
lib/node_modules/npm/lib/utils/config-defs.js
lib/node_modules/npm/lib/utils/error-handler.js
lib/node_modules/npm/lib/utils/exec.js
lib/node_modules/npm/lib/utils/fetch.js
lib/node_modules/npm/lib/utils/find-prefix.js
lib/node_modules/npm/lib/utils/find.js
lib/node_modules/npm/lib/utils/gently-rm.js
lib/node_modules/npm/lib/utils/ini.js
lib/node_modules/npm/lib/utils/lifecycle.js
lib/node_modules/npm/lib/utils/link.js
lib/node_modules/npm/lib/utils/load-package-defaults.js
lib/node_modules/npm/lib/utils/log.js
lib/node_modules/npm/lib/utils/npm-registry-client/adduser.js
lib/node_modules/npm/lib/utils/npm-registry-client/get.js
lib/node_modules/npm/lib/utils/npm-registry-client/index.js
lib/node_modules/npm/lib/utils/npm-registry-client/publish.js
lib/node_modules/npm/lib/utils/npm-registry-client/request.js
lib/node_modules/npm/lib/utils/npm-registry-client/star.js
lib/node_modules/npm/lib/utils/npm-registry-client/tag.js
lib/node_modules/npm/lib/utils/npm-registry-client/unpublish.js
lib/node_modules/npm/lib/utils/output.js
lib/node_modules/npm/lib/utils/promise-chain.js
lib/node_modules/npm/lib/utils/read-installed.js
lib/node_modules/npm/lib/utils/read-json.js
lib/node_modules/npm/lib/utils/relativize.js
lib/node_modules/npm/lib/utils/sha.js
lib/node_modules/npm/lib/utils/tar.js
lib/node_modules/npm/lib/version.js
lib/node_modules/npm/lib/view.js
lib/node_modules/npm/lib/whoami.js
lib/node_modules/npm/lib/xmas.js
lib/node_modules/npm/man/man1/README.1
lib/node_modules/npm/man/man1/adduser.1
lib/node_modules/npm/man/man1/author.1
lib/node_modules/npm/man/man1/bin.1
lib/node_modules/npm/man/man1/bugs.1
lib/node_modules/npm/man/man1/build.1
lib/node_modules/npm/man/man1/bundle.1
lib/node_modules/npm/man/man1/cache.1
lib/node_modules/npm/man/man1/changelog.1
lib/node_modules/npm/man/man1/coding-style.1
lib/node_modules/npm/man/man1/completion.1
lib/node_modules/npm/man/man1/config.1
lib/node_modules/npm/man/man1/deprecate.1
lib/node_modules/npm/man/man1/developers.1
lib/node_modules/npm/man/man1/disputes.1
lib/node_modules/npm/man/man1/docs.1
lib/node_modules/npm/man/man1/edit.1
lib/node_modules/npm/man/man1/explore.1
lib/node_modules/npm/man/man1/faq.1
lib/node_modules/npm/man/man1/find.1
lib/node_modules/npm/man/man1/folders.1
lib/node_modules/npm/man/man1/get.1
lib/node_modules/npm/man/man1/global.1
lib/node_modules/npm/man/man1/help-search.1
lib/node_modules/npm/man/man1/help.1
lib/node_modules/npm/man/man1/home.1
lib/node_modules/npm/man/man1/index.1
lib/node_modules/npm/man/man1/init.1
lib/node_modules/npm/man/man1/install.1
lib/node_modules/npm/man/man1/json.1
lib/node_modules/npm/man/man1/link.1
lib/node_modules/npm/man/man1/list.1
lib/node_modules/npm/man/man1/ln.1
lib/node_modules/npm/man/man1/ls.1
lib/node_modules/npm/man/man1/npm.1
lib/node_modules/npm/man/man1/outdated.1
lib/node_modules/npm/man/man1/owner.1
lib/node_modules/npm/man/man1/pack.1
lib/node_modules/npm/man/man1/prefix.1
lib/node_modules/npm/man/man1/prune.1
lib/node_modules/npm/man/man1/publish.1
lib/node_modules/npm/man/man1/rebuild.1
lib/node_modules/npm/man/man1/registry.1
lib/node_modules/npm/man/man1/removing-npm.1
lib/node_modules/npm/man/man1/restart.1
lib/node_modules/npm/man/man1/rm.1
lib/node_modules/npm/man/man1/root.1
lib/node_modules/npm/man/man1/run-script.1
lib/node_modules/npm/man/man1/scripts.1
lib/node_modules/npm/man/man1/search.1
lib/node_modules/npm/man/man1/semver.1
lib/node_modules/npm/man/man1/set.1
lib/node_modules/npm/man/man1/shrinkwrap.1
lib/node_modules/npm/man/man1/star.1
lib/node_modules/npm/man/man1/start.1
lib/node_modules/npm/man/man1/stop.1
lib/node_modules/npm/man/man1/submodule.1
lib/node_modules/npm/man/man1/tag.1
lib/node_modules/npm/man/man1/test.1
lib/node_modules/npm/man/man1/uninstall.1
lib/node_modules/npm/man/man1/unpublish.1
lib/node_modules/npm/man/man1/update.1
lib/node_modules/npm/man/man1/version.1
lib/node_modules/npm/man/man1/view.1
lib/node_modules/npm/man/man1/whoami.1
lib/node_modules/npm/man/man3/author.3
lib/node_modules/npm/man/man3/bin.3
lib/node_modules/npm/man/man3/bugs.3
lib/node_modules/npm/man/man3/commands.3
lib/node_modules/npm/man/man3/config.3
lib/node_modules/npm/man/man3/deprecate.3
lib/node_modules/npm/man/man3/docs.3
lib/node_modules/npm/man/man3/edit.3
lib/node_modules/npm/man/man3/explore.3
lib/node_modules/npm/man/man3/find.3
lib/node_modules/npm/man/man3/get.3
lib/node_modules/npm/man/man3/help-search.3
lib/node_modules/npm/man/man3/home.3
lib/node_modules/npm/man/man3/init.3
lib/node_modules/npm/man/man3/install.3
lib/node_modules/npm/man/man3/link.3
lib/node_modules/npm/man/man3/list.3
lib/node_modules/npm/man/man3/ln.3
lib/node_modules/npm/man/man3/load.3
lib/node_modules/npm/man/man3/ls.3
lib/node_modules/npm/man/man3/npm.3
lib/node_modules/npm/man/man3/outdated.3
lib/node_modules/npm/man/man3/owner.3
lib/node_modules/npm/man/man3/pack.3
lib/node_modules/npm/man/man3/prefix.3
lib/node_modules/npm/man/man3/prune.3
lib/node_modules/npm/man/man3/publish.3
lib/node_modules/npm/man/man3/rebuild.3
lib/node_modules/npm/man/man3/restart.3
lib/node_modules/npm/man/man3/rm.3
lib/node_modules/npm/man/man3/root.3
lib/node_modules/npm/man/man3/run-script.3
lib/node_modules/npm/man/man3/search.3
lib/node_modules/npm/man/man3/set.3
lib/node_modules/npm/man/man3/shrinkwrap.3
lib/node_modules/npm/man/man3/start.3
lib/node_modules/npm/man/man3/stop.3
lib/node_modules/npm/man/man3/submodule.3
lib/node_modules/npm/man/man3/tag.3
lib/node_modules/npm/man/man3/test.3
lib/node_modules/npm/man/man3/uninstall.3
lib/node_modules/npm/man/man3/unpublish.3
lib/node_modules/npm/man/man3/update.3
lib/node_modules/npm/man/man3/version.3
lib/node_modules/npm/man/man3/view.3
lib/node_modules/npm/man/man3/whoami.3
lib/node_modules/npm/node_modules/abbrev/LICENSE
lib/node_modules/npm/node_modules/abbrev/README.md
lib/node_modules/npm/node_modules/abbrev/lib/abbrev.js
lib/node_modules/npm/node_modules/abbrev/package.json
lib/node_modules/npm/node_modules/archy/README.markdown
lib/node_modules/npm/node_modules/archy/index.js
lib/node_modules/npm/node_modules/archy/package.json
lib/node_modules/npm/node_modules/block-stream/README.md
lib/node_modules/npm/node_modules/block-stream/block-stream.js
lib/node_modules/npm/node_modules/block-stream/package.json
lib/node_modules/npm/node_modules/chownr/README.md
lib/node_modules/npm/node_modules/chownr/chownr.js
lib/node_modules/npm/node_modules/chownr/package.json
lib/node_modules/npm/node_modules/fstream-npm/.npmignore
lib/node_modules/npm/node_modules/fstream-npm/README.md
lib/node_modules/npm/node_modules/fstream-npm/fstream-npm.js
lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/.npmignore
lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/README.md
lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/ignore.js
lib/node_modules/npm/node_modules/fstream-npm/node_modules/fstream-ignore/package.json
lib/node_modules/npm/node_modules/fstream-npm/package.json
lib/node_modules/npm/node_modules/fstream/.npmignore
lib/node_modules/npm/node_modules/fstream/.travis.yml
lib/node_modules/npm/node_modules/fstream/LICENCE
lib/node_modules/npm/node_modules/fstream/README.md
lib/node_modules/npm/node_modules/fstream/fstream.js
lib/node_modules/npm/node_modules/fstream/lib/abstract.js
lib/node_modules/npm/node_modules/fstream/lib/collect.js
lib/node_modules/npm/node_modules/fstream/lib/dir-reader.js
lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js
lib/node_modules/npm/node_modules/fstream/lib/file-reader.js
lib/node_modules/npm/node_modules/fstream/lib/file-writer.js
lib/node_modules/npm/node_modules/fstream/lib/get-type.js
lib/node_modules/npm/node_modules/fstream/lib/link-reader.js
lib/node_modules/npm/node_modules/fstream/lib/link-writer.js
lib/node_modules/npm/node_modules/fstream/lib/proxy-reader.js
lib/node_modules/npm/node_modules/fstream/lib/proxy-writer.js
lib/node_modules/npm/node_modules/fstream/lib/reader.js
lib/node_modules/npm/node_modules/fstream/lib/socket-reader.js
lib/node_modules/npm/node_modules/fstream/lib/writer.js
lib/node_modules/npm/node_modules/fstream/package.json
lib/node_modules/npm/node_modules/graceful-fs/.npmignore
lib/node_modules/npm/node_modules/graceful-fs/LICENSE
lib/node_modules/npm/node_modules/graceful-fs/README.md
lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js
lib/node_modules/npm/node_modules/graceful-fs/package.json
lib/node_modules/npm/node_modules/inherits/LICENSE
lib/node_modules/npm/node_modules/inherits/README.md
lib/node_modules/npm/node_modules/inherits/inherits-old.js
lib/node_modules/npm/node_modules/inherits/inherits.js
lib/node_modules/npm/node_modules/inherits/package.json
lib/node_modules/npm/node_modules/ini/LICENSE
lib/node_modules/npm/node_modules/ini/README.md
lib/node_modules/npm/node_modules/ini/ini.js
lib/node_modules/npm/node_modules/ini/package.json
lib/node_modules/npm/node_modules/lru-cache/.npmignore
lib/node_modules/npm/node_modules/lru-cache/LICENSE
lib/node_modules/npm/node_modules/lru-cache/README.md
lib/node_modules/npm/node_modules/lru-cache/lib/lru-cache.js
lib/node_modules/npm/node_modules/lru-cache/package.json
lib/node_modules/npm/node_modules/minimatch/.travis.yml
lib/node_modules/npm/node_modules/minimatch/LICENSE
lib/node_modules/npm/node_modules/minimatch/README.md
lib/node_modules/npm/node_modules/minimatch/minimatch.js
lib/node_modules/npm/node_modules/minimatch/package.json
lib/node_modules/npm/node_modules/mkdirp/LICENSE
lib/node_modules/npm/node_modules/mkdirp/README.markdown
lib/node_modules/npm/node_modules/mkdirp/index.js
lib/node_modules/npm/node_modules/mkdirp/package.json
lib/node_modules/npm/node_modules/node-gyp/.npmignore
lib/node_modules/npm/node_modules/node-gyp/LICENSE
lib/node_modules/npm/node_modules/node-gyp/README.md
lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js
lib/node_modules/npm/node_modules/node-gyp/legacy/common.gypi
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/addon.gypi
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/.npmignore
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/AUTHORS
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/DEPS
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/LICENSE
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/MANIFEST
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/OWNERS
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/PRESUBMIT.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/buildbot/buildbot_run.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/codereview.settings
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/gyp
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/gyp.bat
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/gyp_dummy.c
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/gyptest.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/MSVSNew.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/MSVSProject.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/MSVSSettings.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/MSVSSettings_test.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/MSVSToolFile.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/MSVSUserFile.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/MSVSVersion.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/SCons.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/__init__.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/common.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/easy_xml.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/easy_xml_test.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/generator/__init__.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/generator/dump_dependency_json.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/generator/gypd.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/generator/gypsh.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/generator/make.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/generator/msvs.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/generator/msvs_test.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/generator/ninja.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/generator/ninja_test.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/generator/scons.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/generator/xcode.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/input.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/mac_tool.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/ninja_syntax.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/sun_tool.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/system_test.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/xcode_emulation.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/xcodeproj_file.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/xml_fix.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylintrc
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/samples/samples
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/samples/samples.bat
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/setup.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/tools/README
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/tools/Xcode/README
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/tools/Xcode/Specifications/gyp.pbfilespec
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/tools/Xcode/Specifications/gyp.xclangspec
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/tools/graphviz.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/tools/pretty_gyp.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/tools/pretty_sln.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/tools/pretty_vcproj.py
lib/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp_addon
lib/node_modules/npm/node_modules/node-gyp/lib/build.js
lib/node_modules/npm/node_modules/node-gyp/lib/clean.js
lib/node_modules/npm/node_modules/node-gyp/lib/configure.js
lib/node_modules/npm/node_modules/node-gyp/lib/install.js
lib/node_modules/npm/node_modules/node-gyp/lib/list.js
lib/node_modules/npm/node_modules/node-gyp/lib/node-gyp.js
lib/node_modules/npm/node_modules/node-gyp/lib/rebuild.js
lib/node_modules/npm/node_modules/node-gyp/lib/remove.js
lib/node_modules/npm/node_modules/node-gyp/lib/util/mkdirp.js
lib/node_modules/npm/node_modules/node-gyp/node_modules/ansi/.npmignore
lib/node_modules/npm/node_modules/node-gyp/node_modules/ansi/README.md
lib/node_modules/npm/node_modules/node-gyp/node_modules/ansi/lib/ansi.js
lib/node_modules/npm/node_modules/node-gyp/node_modules/ansi/nodejs.png
lib/node_modules/npm/node_modules/node-gyp/node_modules/ansi/package.json
lib/node_modules/npm/node_modules/node-gyp/node_modules/ansi/server.js
lib/node_modules/npm/node_modules/node-gyp/node_modules/glob/.npmignore
lib/node_modules/npm/node_modules/node-gyp/node_modules/glob/.travis.yml
lib/node_modules/npm/node_modules/node-gyp/node_modules/glob/LICENCE
lib/node_modules/npm/node_modules/node-gyp/node_modules/glob/README.md
lib/node_modules/npm/node_modules/node-gyp/node_modules/glob/glob.js
lib/node_modules/npm/node_modules/node-gyp/node_modules/glob/package.json
lib/node_modules/npm/node_modules/node-gyp/package.json
lib/node_modules/npm/node_modules/node-gyp/updateLegacy.sh
lib/node_modules/npm/node_modules/node-uuid/.npmignore
lib/node_modules/npm/node_modules/node-uuid/LICENSE.md
lib/node_modules/npm/node_modules/node-uuid/README.md
lib/node_modules/npm/node_modules/node-uuid/package.json
lib/node_modules/npm/node_modules/node-uuid/uuid.js
lib/node_modules/npm/node_modules/nopt/.npmignore
lib/node_modules/npm/node_modules/nopt/LICENSE
lib/node_modules/npm/node_modules/nopt/README.md
lib/node_modules/npm/node_modules/nopt/bin/nopt.js
lib/node_modules/npm/node_modules/nopt/lib/nopt.js
lib/node_modules/npm/node_modules/nopt/package.json
lib/node_modules/npm/node_modules/proto-list/LICENSE
lib/node_modules/npm/node_modules/proto-list/README.md
lib/node_modules/npm/node_modules/proto-list/package.json
lib/node_modules/npm/node_modules/proto-list/proto-list.js
lib/node_modules/npm/node_modules/read/LICENCE
lib/node_modules/npm/node_modules/read/README.md
lib/node_modules/npm/node_modules/read/lib/read.js
lib/node_modules/npm/node_modules/read/package.json
lib/node_modules/npm/node_modules/request/LICENSE
lib/node_modules/npm/node_modules/request/README.md
lib/node_modules/npm/node_modules/request/forever.js
lib/node_modules/npm/node_modules/request/main.js
lib/node_modules/npm/node_modules/request/mimetypes.js
lib/node_modules/npm/node_modules/request/oauth.js
lib/node_modules/npm/node_modules/request/package.json
lib/node_modules/npm/node_modules/request/tunnel.js
lib/node_modules/npm/node_modules/request/uuid.js
lib/node_modules/npm/node_modules/request/vendor/cookie/index.js
lib/node_modules/npm/node_modules/request/vendor/cookie/jar.js
lib/node_modules/npm/node_modules/rimraf/AUTHORS
lib/node_modules/npm/node_modules/rimraf/LICENSE
lib/node_modules/npm/node_modules/rimraf/README.md
lib/node_modules/npm/node_modules/rimraf/package.json
lib/node_modules/npm/node_modules/rimraf/rimraf.js
lib/node_modules/npm/node_modules/semver/LICENSE
lib/node_modules/npm/node_modules/semver/README.md
lib/node_modules/npm/node_modules/semver/bin/semver
lib/node_modules/npm/node_modules/semver/package.json
lib/node_modules/npm/node_modules/semver/semver.js
lib/node_modules/npm/node_modules/slide/.npmignore
lib/node_modules/npm/node_modules/slide/LICENSE
lib/node_modules/npm/node_modules/slide/README.md
lib/node_modules/npm/node_modules/slide/index.js
lib/node_modules/npm/node_modules/slide/lib/async-map-ordered.js
lib/node_modules/npm/node_modules/slide/lib/async-map.js
lib/node_modules/npm/node_modules/slide/lib/bind-actor.js
lib/node_modules/npm/node_modules/slide/lib/chain.js
lib/node_modules/npm/node_modules/slide/lib/slide.js
lib/node_modules/npm/node_modules/slide/package.json
lib/node_modules/npm/node_modules/tar/.npmignore
lib/node_modules/npm/node_modules/tar/.travis.yml
lib/node_modules/npm/node_modules/tar/README.md
lib/node_modules/npm/node_modules/tar/lib/buffer-entry.js
lib/node_modules/npm/node_modules/tar/lib/entry-writer.js
lib/node_modules/npm/node_modules/tar/lib/entry.js
lib/node_modules/npm/node_modules/tar/lib/extended-header-writer.js
lib/node_modules/npm/node_modules/tar/lib/extended-header.js
lib/node_modules/npm/node_modules/tar/lib/extract.js
lib/node_modules/npm/node_modules/tar/lib/global-header-writer.js
lib/node_modules/npm/node_modules/tar/lib/header.js
lib/node_modules/npm/node_modules/tar/lib/pack.js
lib/node_modules/npm/node_modules/tar/lib/parse.js
lib/node_modules/npm/node_modules/tar/package.json
lib/node_modules/npm/node_modules/tar/tar.js
lib/node_modules/npm/node_modules/uid-number/README.md
lib/node_modules/npm/node_modules/uid-number/get-uid-gid.js
lib/node_modules/npm/node_modules/uid-number/package.json
lib/node_modules/npm/node_modules/uid-number/uid-number.js
lib/node_modules/npm/node_modules/which/LICENSE
lib/node_modules/npm/node_modules/which/README.md
lib/node_modules/npm/node_modules/which/bin/which
lib/node_modules/npm/node_modules/which/package.json
lib/node_modules/npm/node_modules/which/which.js
lib/node_modules/npm/package.json
lib/node_modules/npm/scripts/clean-old.sh
lib/node_modules/npm/scripts/doc-build.sh
lib/node_modules/npm/scripts/index-build.js
lib/node_modules/npm/scripts/install.sh
lib/node_modules/npm/scripts/release.sh
lib/node_modules/npm/test/common.js
lib/node_modules/npm/test/packages/npm-test-blerg/package.json
lib/node_modules/npm/test/packages/npm-test-blerg/test.js
lib/node_modules/npm/test/packages/npm-test-bundled-git/minimatch-expected.json
lib/node_modules/npm/test/packages/npm-test-bundled-git/package.json
lib/node_modules/npm/test/packages/npm-test-bundled-git/test.js
lib/node_modules/npm/test/packages/npm-test-env-reader/package.json
lib/node_modules/npm/test/packages/npm-test-env-reader/test.js
lib/node_modules/npm/test/packages/npm-test-files/.npmignore
lib/node_modules/npm/test/packages/npm-test-files/include4
lib/node_modules/npm/test/packages/npm-test-files/package.json
lib/node_modules/npm/test/packages/npm-test-files/sub/include
lib/node_modules/npm/test/packages/npm-test-files/sub/include2
lib/node_modules/npm/test/packages/npm-test-files/sub/include4
lib/node_modules/npm/test/packages/npm-test-files/test.sh
lib/node_modules/npm/test/packages/npm-test-ignore/.npmignore
lib/node_modules/npm/test/packages/npm-test-ignore/include4
lib/node_modules/npm/test/packages/npm-test-ignore/package.json
lib/node_modules/npm/test/packages/npm-test-ignore/sub/include
lib/node_modules/npm/test/packages/npm-test-ignore/sub/include2
lib/node_modules/npm/test/packages/npm-test-ignore/sub/include4
lib/node_modules/npm/test/packages/npm-test-ignore/test.sh
lib/node_modules/npm/test/packages/npm-test-missing-bindir/package.json
lib/node_modules/npm/test/packages/npm-test-missing-bindir/test.js
lib/node_modules/npm/test/packages/npm-test-optional-deps/package.json
lib/node_modules/npm/test/packages/npm-test-optional-deps/test.js
lib/node_modules/npm/test/packages/npm-test-platform-all/package.json
lib/node_modules/npm/test/packages/npm-test-platform/package.json
lib/node_modules/npm/test/packages/npm-test-private/package.json
lib/node_modules/npm/test/packages/npm-test-shrinkwrap/npm-shrinkwrap.json
lib/node_modules/npm/test/packages/npm-test-shrinkwrap/package.json
lib/node_modules/npm/test/packages/npm-test-shrinkwrap/test.sh
lib/node_modules/npm/test/packages/npm-test-test-package/package.json
lib/node_modules/npm/test/packages/npm-test-url-dep/package.json
lib/node_modules/npm/test/run.js
lib/node_modules/npm/test/update-test.sh

View file

@ -1,27 +1,9 @@
$NetBSD: distinfo,v 1.7 2011/06/25 12:44:55 genolopolis Exp $
$NetBSD: distinfo,v 1.8 2012/05/27 21:28:14 genolopolis Exp $
SHA1 (node-v0.4.7.tar.gz) = 514c8fff800070752739b2872eed18750c202c78
RMD160 (node-v0.4.7.tar.gz) = 73307e90c941274390454e544ee914a1e7bfe01d
Size (node-v0.4.7.tar.gz) = 5011520 bytes
SHA1 (patch-aa) = f94b5b03e9fd72e0bb0fb20f03c3b889ae3aecbb
SHA1 (patch-ab) = ef8823b44dabae1e5c7832e84a2fae306b0d1dbf
SHA1 (patch-ac) = d341d95b91a982601cae6ab00b13244e223deaa9
SHA1 (patch-ad) = 918516f12dcafe5b99f8e0a0b3f9778dc4b367cd
SHA1 (patch-ae) = bc2ecebd287def411c227e35cf2c3609a69b92da
SHA1 (patch-af) = efa0c8279e3d57e435077fe78e35f926cb6bd359
SHA1 (patch-ag) = 8fb85d4826c72d8b70c336b4bdfa716000ca439f
SHA1 (patch-ah) = 4ad762dbb8279b7bbb02cfdcc338efe6a447c67b
SHA1 (patch-ai) = 6431ae391c5980a247ae83c24b1b91a4b223b832
SHA1 (patch-aj) = 873b536088d132faadd877b6346b6ff68dcffc4d
SHA1 (patch-ak) = 14ac1c68d4b59f3148b8875af4ddc9f288f12697
SHA1 (patch-tools_scons_scons-local-1.2.0_SCons_Tool_sunar.py) = 9287af5da99d782fe86cf0d442c56aeae6b20433
SHA1 (patch-tools_scons_scons-local-1.2.0_SCons_Tool_suncc.py) = 9630c1dbc4406897becbe4fa8e2624f773061671
SHA1 (patch-v8_src_platform-netbsd.cc) = 40ccfbe0a36ee78ba6b398327eef728f83e3ac04
SHA1 (patch-v8_src_platform-openbsd.cc) = 041e7ad3c5f7e8489a6c56811d7edd7502b6f3f2
SHA1 (patch-v8_src_x64_code-stubs-x64.cc) = e4672a78cd27efac04ca1fe136fb0a67a70b8369
SHA1 (patch-v8_src_x64_codegen-x64.cc) = 4810b0aaedd3477d5a447168da70d43eec4b93e4
SHA1 (patch-v8_src_x64_full-codegen-x64.cc) = 6c5f9407283b172fcdd67aa3e0fa2ce4d73a8bcc
SHA1 (patch-v8_src_x64_lithium-codegen-x64.cc) = 5995e75d9aa5ea8fec9e195b8e0b1ae3a057d389
SHA1 (patch-v8_src_x64_macro-assembler-x64.cc) = da5a9f92a7f64636a792d7f7ed7de6fed080dea3
SHA1 (patch-v8_src_x64_macro-assembler-x64.h) = c0de48fbf18caef50e54598b6ed9de4ed2de5846
SHA1 (patch-v8_tools_gyp_v8.gyp) = 58e3503957d5006c2d2c53c8755a45b8f185ed0f
SHA1 (node-v0.7.9-RC0.tar.gz) = 6f408d5dacdc50d2c0b980898d8063d0ca9e2305
RMD160 (node-v0.7.9-RC0.tar.gz) = b017a236435836926d73743aa04ae9b54ae457c6
Size (node-v0.7.9-RC0.tar.gz) = 12078334 bytes
SHA1 (patch-common.gypi) = c07353f616f4fbd8306be118c1ab2360b1b3c442
SHA1 (patch-deps_uv_common.gypi) = f607e2ee94ca9f381add11444e5f5d1a9ea1a343
SHA1 (patch-deps_uv_src_unix_netbsd.c) = bb6583152b2c378d05a79ad9afad84470cab98c7
SHA1 (patch-deps_uv_uv.gyp) = 2780bdb8c3f7f9dd60234e1fc55e493545f65ce2

View file

@ -1,4 +1,4 @@
# $NetBSD: options.mk,v 1.1 2011/06/25 12:46:03 genolopolis Exp $
# $NetBSD: options.mk,v 1.2 2012/05/27 21:28:14 genolopolis Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.node
PKG_SUPPORTED_OPTIONS= openssl dtrace
@ -16,3 +16,7 @@ PLIST.dtrace= yes
.else
CONFIGURE_ARGS+= --without-openssl
.endif
.if empty(PKG_OPTIONS:Msnapshot)
CONFIGURE_ARGS+= --without-snapshot
.endif

View file

@ -1,65 +0,0 @@
$NetBSD: patch-aa,v 1.1.1.1 2011/05/03 19:53:18 genolopolis Exp $
--- deps/v8/SConstruct.orig 2011-04-23 00:06:25.000000000 +0000
+++ deps/v8/SConstruct
@@ -184,6 +184,10 @@ LIBRARY_FLAGS = {
'LIBPATH' : ['/usr/local/lib'],
'CCFLAGS': ['-ansi'],
},
+ 'os:netbsd': {
+ 'CPPPATH' : ['/usr/local/include'],
+ 'LIBPATH' : ['/usr/local/lib'],
+ },
'os:solaris': {
# On Solaris, to get isinf, INFINITY, fpclassify and other macros one
# needs to define __C99FEATURES__.
@@ -370,6 +374,9 @@ MKSNAPSHOT_EXTRA_FLAGS = {
'os:openbsd': {
'LIBS': ['execinfo', 'pthread']
},
+ 'os:netbsd': {
+ 'LIBS': ['execinfo', 'pthread']
+ },
'os:win32': {
'LIBS': ['winmm', 'ws2_32'],
},
@@ -422,6 +429,9 @@ CCTEST_EXTRA_FLAGS = {
'os:openbsd': {
'LIBS': ['execinfo', 'pthread']
},
+ 'os:netbsd': {
+ 'LIBS': ['execinfo', 'pthread']
+ },
'os:win32': {
'LIBS': ['winmm', 'ws2_32']
},
@@ -489,6 +499,10 @@ SAMPLE_FLAGS = {
'LIBPATH' : ['/usr/local/lib'],
'LIBS': ['execinfo', 'pthread']
},
+ 'os:netbsd': {
+ 'LIBPATH' : ['/usr/local/lib'],
+ 'LIBS': ['execinfo', 'pthread']
+ },
'os:win32': {
'LIBS': ['winmm', 'ws2_32']
},
@@ -623,6 +637,9 @@ D8_FLAGS = {
'os:openbsd': {
'LIBS': ['pthread'],
},
+ 'os:netbsd': {
+ 'LIBS': ['pthread'],
+ },
'os:android': {
'LIBPATH': [ANDROID_TOP + '/out/target/product/generic/obj/lib',
ANDROID_TOP + '/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/lib/gcc/arm-eabi/4.4.0/interwork'],
@@ -706,7 +723,7 @@ SIMPLE_OPTIONS = {
'help': 'the toolchain to use'
},
'os': {
- 'values': ['freebsd', 'linux', 'macos', 'win32', 'android', 'openbsd', 'solaris', 'cygwin'],
+ 'values': ['freebsd', 'linux', 'macos', 'win32', 'android', 'openbsd', 'solaris', 'cygwin', 'netbsd'],
'guess': GuessOS,
'help': 'the os to build for'
},

View file

@ -1,13 +0,0 @@
$NetBSD: patch-ab,v 1.1.1.1 2011/05/03 19:53:18 genolopolis Exp $
--- deps/v8/tools/utils.py.orig 2011-05-03 02:06:37.000000000 +0000
+++ deps/v8/tools/utils.py
@@ -59,6 +59,8 @@ def GuessOS():
return 'freebsd'
elif id == 'OpenBSD':
return 'openbsd'
+ elif id == 'NetBSD':
+ return 'netbsd'
elif id == 'SunOS':
return 'solaris'
else:

View file

@ -1,13 +0,0 @@
$NetBSD: patch-ac,v 1.1.1.1 2011/05/03 19:53:18 genolopolis Exp $
--- deps/v8/tools/linux-tick-processor.orig 2011-05-03 02:13:03.000000000 +0000
+++ deps/v8/tools/linux-tick-processor
@@ -8,7 +8,7 @@ fi
[ "$D8_PATH" ] || D8_PATH=$tools_path/..
d8_exec=$D8_PATH/d8
-if [ "$1" == "--no-build" ]; then
+if [ "$1" = "--no-build" ]; then
shift
else
# compile d8 if it doesn't exist, assuming this script

View file

@ -1,68 +0,0 @@
$NetBSD: patch-ad,v 1.1 2011/05/03 21:00:14 genolopolis Exp $
--- Makefile.orig 2011-05-03 20:36:45.000000000 +0000
+++ Makefile
@@ -1,4 +1,4 @@
-WAF=python tools/waf-light
+WAF=python2.6 tools/waf-light
web_root = ryan@nodejs.org:~/web/nodejs.org/
@@ -23,34 +23,34 @@ uninstall:
@$(WAF) uninstall
test: all
- python tools/test.py --mode=release simple message
+ python2.6 tools/test.py --mode=release simple message
test-valgrind: all
- python tools/test.py --mode=release --valgrind simple message
+ python2.6 tools/test.py --mode=release --valgrind simple message
test-all: all
- python tools/test.py --mode=debug,release
+ python2.6 tools/test.py --mode=debug,release
test-all-valgrind: all
- python tools/test.py --mode=debug,release --valgrind
+ python2.6 tools/test.py --mode=debug,release --valgrind
test-release: all
- python tools/test.py --mode=release
+ python2.6 tools/test.py --mode=release
test-debug: all
- python tools/test.py --mode=debug
+ python2.6 tools/test.py --mode=debug
test-message: all
- python tools/test.py message
+ python2.6 tools/test.py message
test-simple: all
- python tools/test.py simple
+ python2.6 tools/test.py simple
test-pummel: all
- python tools/test.py pummel
+ python2.6 tools/test.py pummel
test-internet: all
- python tools/test.py internet
+ python2.6 tools/test.py internet
build/default/node: all
@@ -132,10 +132,10 @@ bench-idle:
./node benchmark/idle_clients.js &
jslint:
- PYTHONPATH=tools/closure_linter/ python tools/closure_linter/closure_linter/gjslint.py --unix_mode --strict --nojsdoc -r lib/ -r src/ -r test/
+ PYTHONPATH=tools/closure_linter/ python2.6 tools/closure_linter/closure_linter/gjslint.py --unix_mode --strict --nojsdoc -r lib/ -r src/ -r test/
cpplint:
- @python tools/cpplint.py $(wildcard src/*.cc src/*.h src/*.c)
+ @python2.6 tools/cpplint.py $(wildcard src/*.cc src/*.h src/*.c)
lint: jslint cpplint

View file

@ -1,22 +0,0 @@
$NetBSD: patch-ae,v 1.1 2011/05/03 23:53:48 genolopolis Exp $
--- deps/v8/src/SConscript.orig 2011-04-23 00:06:25.000000000 +0000
+++ deps/v8/src/SConscript
@@ -231,6 +231,7 @@ SOURCES = {
'simulator:mips': ['mips/simulator-mips.cc'],
'os:freebsd': ['platform-freebsd.cc', 'platform-posix.cc'],
'os:openbsd': ['platform-openbsd.cc', 'platform-posix.cc'],
+ 'os:netbsd': ['platform-netbsd.cc', 'platform-posix.cc'],
'os:linux': ['platform-linux.cc', 'platform-posix.cc'],
'os:android': ['platform-linux.cc', 'platform-posix.cc'],
'os:macos': ['platform-macos.cc', 'platform-posix.cc'],
@@ -261,6 +262,9 @@ D8_FILES = {
'os:freebsd': [
'd8-posix.cc'
],
+ 'os:netbsd': [
+ 'd8-posix.cc'
+ ],
'os:openbsd': [
'd8-posix.cc'
],

View file

@ -1,13 +0,0 @@
$NetBSD: patch-af,v 1.1 2011/05/03 23:53:48 genolopolis Exp $
--- src/node_child_process.cc.orig 2011-04-23 00:06:25.000000000 +0000
+++ src/node_child_process.cc
@@ -31,7 +31,7 @@
#include <sys/types.h>
#include <pwd.h> /* getpwnam() */
#include <grp.h> /* getgrnam() */
-#if defined(__FreeBSD__ ) || defined(__OpenBSD__)
+#if defined(__FreeBSD__ ) || defined(__OpenBSD__) || defined(__NetBSD__)
#include <sys/wait.h>
#endif

View file

@ -1,13 +0,0 @@
$NetBSD: patch-ag,v 1.1 2011/05/03 23:53:48 genolopolis Exp $
--- src/node_stdio.cc.orig 2011-04-23 00:06:25.000000000 +0000
+++ src/node_stdio.cc
@@ -26,7 +26,7 @@
#include <fcntl.h>
#include <string.h>
#include <errno.h>
-#if defined(__APPLE__) || defined(__OpenBSD__)
+#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__NetBSD__)
# include <util.h>
#elif __FreeBSD__
# include <libutil.h>

View file

@ -1,228 +0,0 @@
$NetBSD: patch-ah,v 1.1 2011/05/04 02:42:50 genolopolis Exp $
--- src/platform_netbsd.cc.orig 2011-05-04 01:55:13.000000000 +0000
+++ src/platform_netbsd.cc
@@ -0,0 +1,223 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+#include "node.h"
+#include "platform.h"
+
+#include <v8.h>
+
+#include <stdlib.h>
+#include <kvm.h>
+#include <sys/param.h>
+#include <sys/sysctl.h>
+#include <sys/user.h>
+#include <sys/dkstat.h>
+#include <uvm/uvm_param.h>
+#include <string.h>
+#include <paths.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <time.h>
+
+#include <stdio.h>
+namespace node {
+
+using namespace v8;
+
+static char *process_title;
+
+char** Platform::SetupArgs(int argc, char *argv[]) {
+ process_title = argc ? strdup(argv[0]) : NULL;
+ return argv;
+}
+
+
+void Platform::SetProcessTitle(char *title) {
+ if (process_title) free(process_title);
+ process_title = strdup(title);
+ setproctitle(title);
+}
+
+const char* Platform::GetProcessTitle(int *len) {
+ if (process_title) {
+ *len = strlen(process_title);
+ return process_title;
+ }
+ *len = 0;
+ return NULL;
+}
+
+int Platform::GetMemory(size_t *rss, size_t *vsize) {
+ kvm_t *kd = NULL;
+ struct kinfo_proc2 *kinfo = NULL;
+ pid_t pid;
+ int nprocs, max_size = sizeof(struct kinfo_proc2);
+ size_t page_size = getpagesize();
+
+ pid = getpid();
+
+ kd = kvm_open(NULL, _PATH_MEM, NULL, O_RDONLY, "kvm_open");
+ if (kd == NULL) goto error;
+
+ kinfo = kvm_getproc2(kd, KERN_PROC_PID, pid, max_size, &nprocs);
+ if (kinfo == NULL) goto error;
+
+ *rss = kinfo->p_vm_rssize * page_size;
+ *vsize = kinfo->p_uru_ixrss;
+
+ kvm_close(kd);
+
+ return 0;
+
+error:
+ if (kd) kvm_close(kd);
+ return -1;
+}
+
+
+int Platform::GetExecutablePath(char* buffer, size_t* size) {
+ *size = 0;
+ return -1;
+}
+
+int Platform::GetCPUInfo(Local<Array> *cpus) {
+ Local<Object> cpuinfo;
+ Local<Object> cputimes;
+ unsigned int ticks = (unsigned int)sysconf(_SC_CLK_TCK),
+ multiplier = ((uint64_t)1000L / ticks), cpuspeed, maxcpus,
+ cur = 0;
+ uint64_t info[CPUSTATES];
+ char model[512];
+ int numcpus = 1;
+ size_t size;
+
+ size = sizeof(model);
+ if (sysctlbyname("hw.model", &model, &size, NULL, 0) < 0) {
+ return -1;
+ }
+ size = sizeof(numcpus);
+ if (sysctlbyname("hw.ncpu", &numcpus, &size, NULL, 0) < 0) {
+ return -1;
+ }
+
+ *cpus = Array::New(numcpus);
+
+ size = sizeof(cpuspeed);
+ if (sysctlbyname("hw.clockrate", &cpuspeed, &size, NULL, 0) < 0) {
+ return -1;
+ }
+ size = sizeof(maxcpus);
+ if (sysctlbyname("kern.smp.maxcpus", &maxcpus, &size, NULL, 0) < 0) {
+ return -1;
+ }
+ size = maxcpus * CPUSTATES * sizeof(long);
+ long cp_times[size];
+ if (sysctlbyname("kern.cp_times", &cp_times, &size, NULL, 0) < 0) {
+ return -1;
+ }
+ for (int i = 0; i < numcpus; i++) {
+ cpuinfo = Object::New();
+ cputimes = Object::New();
+ cputimes->Set(String::New("user"),
+ Number::New((uint64_t)(cp_times[CP_USER+cur]) * multiplier));
+ cputimes->Set(String::New("nice"),
+ Number::New((uint64_t)(cp_times[CP_NICE+cur]) * multiplier));
+ cputimes->Set(String::New("sys"),
+ Number::New((uint64_t)(cp_times[CP_SYS+cur]) * multiplier));
+ cputimes->Set(String::New("idle"),
+ Number::New((uint64_t)(cp_times[CP_IDLE+cur]) * multiplier));
+ cputimes->Set(String::New("irq"),
+ Number::New((uint64_t)(cp_times[CP_INTR+cur]) * multiplier));
+
+ cpuinfo->Set(String::New("model"), String::New(model));
+ cpuinfo->Set(String::New("speed"), Number::New(cpuspeed));
+
+ cpuinfo->Set(String::New("times"), cputimes);
+ (*cpus)->Set(i, cpuinfo);
+ cur+=CPUSTATES;
+ }
+
+ return 0;
+}
+
+double Platform::GetFreeMemory() {
+ double pagesize = static_cast<double>(sysconf(_SC_PAGESIZE));
+ struct uvmexp info;
+ size_t size = sizeof(info);
+ static int which[] = {CTL_VM, VM_UVMEXP};
+
+ if (sysctl(which, 2, &info, &size, NULL, 0) < 0) {
+ return -1;
+ }
+
+ return static_cast<double>(info.free) * pagesize;
+}
+
+double Platform::GetTotalMemory() {
+#if defined(HW_PHYSMEM64)
+ uint64_t info;
+ static int which[] = {CTL_HW, HW_PHYSMEM64};
+#else
+ unsigned int info;
+ static int which[] = {CTL_HW, HW_PHYSMEM};
+#endif
+ size_t size = sizeof(info);
+
+ if (sysctl(which, 2, &info, &size, NULL, 0) < 0) {
+ return -1;
+ }
+
+ return static_cast<double>(info);
+}
+
+double Platform::GetUptime() {
+ time_t now;
+ struct timeval info;
+ size_t size = sizeof(info);
+ static int which[] = {CTL_KERN, KERN_BOOTTIME};
+
+ if (sysctl(which, 2, &info, &size, NULL, 0) < 0) {
+ return -1;
+ }
+ now = time(NULL);
+
+ return static_cast<double>(now - info.tv_sec);
+}
+
+int Platform::GetLoadAvg(Local<Array> *loads) {
+ struct loadavg info;
+ size_t size = sizeof(info);
+ static int which[] = {CTL_VM, VM_LOADAVG};
+
+ if (sysctl(which, 2, &info, &size, NULL, 0) < 0) {
+ return -1;
+ }
+ (*loads)->Set(0, Number::New(static_cast<double>(info.ldavg[0])
+ / static_cast<double>(info.fscale)));
+ (*loads)->Set(1, Number::New(static_cast<double>(info.ldavg[1])
+ / static_cast<double>(info.fscale)));
+ (*loads)->Set(2, Number::New(static_cast<double>(info.ldavg[2])
+ / static_cast<double>(info.fscale)));
+
+ return 0;
+}
+
+} // namespace node

View file

@ -1,13 +0,0 @@
$NetBSD: patch-ai,v 1.1 2011/05/04 02:42:50 genolopolis Exp $
--- src/node_crypto.cc.orig 2011-05-04 01:35:07.000000000 +0000
+++ src/node_crypto.cc
@@ -31,7 +31,7 @@
#include <errno.h>
-#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+#if OPENSSL_VERSION_NUMBER >= 0x00909000L
# define OPENSSL_CONST const
#else
# define OPENSSL_CONST

View file

@ -1,13 +0,0 @@
$NetBSD: patch-aj,v 1.1 2011/05/04 02:42:50 genolopolis Exp $
--- wscript.orig 2011-05-04 01:48:27.000000000 +0000
+++ wscript
@@ -263,7 +263,7 @@ def configure(conf):
conf.env.append_value("CCFLAGS", "-rdynamic")
conf.env.append_value("LINKFLAGS_DL", "-rdynamic")
- if sys.platform.startswith("freebsd") or sys.platform.startswith("openbsd"):
+ if sys.platform.startswith("freebsd") or sys.platform.startswith("openbsd") or sys.platform.startswith("netbsd"):
conf.check(lib='kvm', uselib_store='KVM')
#if Options.options.debug:

View file

@ -1,115 +0,0 @@
$NetBSD: patch-ak,v 1.2 2011/05/07 20:32:15 genolopolis Exp $
--- deps/libev/wscript.orig 2011-04-23 00:06:25.000000000 +0000
+++ deps/libev/wscript
@@ -1,7 +1,7 @@
import Options
import platform
-PLATFORM_IS_DARWIN = platform.platform().find('Darwin') == 0
+#PLATFORM_IS_DARWIN = platform.platform().find('Darwin') == 0
PLATFORM_IS_WIN32 = platform.platform().find('Win') >= 0
def set_options(opt):
@@ -16,58 +16,68 @@ def configure(conf):
# the other is to define HAVE_EPOLL_CTL
# Yes, WAF is a piece of shit.
- if conf.check_cc(header_name="sys/inotify.h"):
+ if conf.check(header_name="sys/inotify.h"):
conf.check_cc(header_name="sys/inotify.h", function_name="inotify_init")
- if conf.check_cc(header_name="sys/epoll.h"):
+ if conf.check(header_name="sys/epoll.h"):
conf.check_cc(header_name="sys/epoll.h", function_name="epoll_ctl")
- if conf.check_cc(header_name="port.h"):
+ if conf.check(header_name="port.h"):
conf.check_cc(header_name="port.h", function_name="port_create")
- if conf.check_cc(header_name="poll.h"):
+ if conf.check(header_name="poll.h"):
conf.check_cc(header_name="poll.h", function_name="poll")
- conf.check_cc(header_name="sys/event.h")
- conf.check_cc(header_name="sys/queue.h")
- if PLATFORM_IS_DARWIN:
+ if conf.check(header_name="sys/event.h"):
conf.check_cc(header_name="sys/event.h", function_name="kqueue")
- else:
- conf.check_cc(header_name="sys/queue.h", function_name="kqueue")
+
+# conf.check_cc(header_name="sys/event.h")
+# conf.check_cc(header_name="sys/queue.h")
+
+# ??? kqueue appears to be under sys/event.h under all platform man pages
+# if PLATFORM_IS_DARWIN:
+# conf.check_cc(header_name="sys/event.h", function_name="kqueue")
+# else:
+# conf.check_cc(header_name="sys/queue.h", function_name="kqueue")
if PLATFORM_IS_WIN32:
# Windows has sys/select.h and select but this config line doesn't detect it properly
conf.define('HAVE_SYS_SELECT_H', 1);
conf.define('HAVE_SELECT', 1);
else:
- if conf.check_cc(header_name="sys/select.h"):
+ if conf.check(header_name="sys/select.h"):
conf.check_cc(header_name="sys/select.h", function_name="select")
- if conf.check_cc(header_name="sys/eventfd.h"):
+ if conf.check(header_name="sys/eventfd.h"):
conf.check_cc(header_name="sys/eventfd.h", function_name="eventfd")
-
- code = """
- #include <syscall.h>
- #include <time.h>
- #include <stdio.h>
-
- int main() {
- struct timespec ts;
- int status = syscall(SYS_clock_gettime, CLOCK_REALTIME, &ts);
- return 0;
- }
- """
- conf.check_cc(fragment=code, define_name="HAVE_CLOCK_SYSCALL", execute=True,
- msg="Checking for SYS_clock_gettime")
-
- have_librt = conf.check(lib='rt', uselib_store='RT')
- if have_librt:
- conf.check_cc(lib="rt", header_name="time.h", function_name="clock_gettime")
- if PLATFORM_IS_DARWIN:
- conf.check_cc(header_name="time.h", function_name="nanosleep")
- elif have_librt:
- conf.check_cc(lib="rt", header_name="time.h", function_name="nanosleep")
+ if conf.check(header_name="syscall.h"):
+ code = """
+ #include <syscall.h>
+ #include <time.h>
+ #include <stdio.h>
+
+ int main() {
+ struct timespec ts;
+ int status = syscall(SYS_clock_gettime, CLOCK_REALTIME, &ts);
+ return 0;
+ }
+ """
+ conf.check_cc(fragment=code, define_name="HAVE_CLOCK_SYSCALL", execute=True,
+ msg="Checking for SYS_clock_gettime")
+
+ have_clock_gettime = 0
+ have_nanosleep = 0
+
+ if conf.check(header_name="time.h"):
+ have_clock_gettime = conf.check_cc(header_name="time.h", function_name="clock_gettime")
+ have_nanosleep = conf.check_cc(header_name="time.h", function_name="nanosleep")
+
+ if conf.check(lib='rt', uselib_store='RT'):
+ if have_clock_gettime == 0:
+ conf.check_cc(lib="rt", header_name="time.h", function_name="clock_gettime")
+ if have_nanosleep == 0:
+ conf.check_cc(lib="rt", header_name="time.h", function_name="nanosleep")
conf.check_cc(lib="m", header_name="math.h", function_name="ceil")

View file

@ -0,0 +1,13 @@
diff --git a/common.gypi b/common.gypi
index 8b3e7c2..8c2166c 100644
--- common.gypi
+++ common.gypi
@@ -136,7 +136,7 @@
'_FILE_OFFSET_BITS=64',
],
}],
- [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
+ [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" or OS=="netbsd"', {
'cflags': [ '-Wall', '-pthread', ],
'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
'ldflags': [ '-pthread', ],

View file

@ -0,0 +1,19 @@
diff --git a/deps/uv/common.gypi b/deps/uv/common.gypi
index c2df528..5d9633a 100644
--- deps/uv/common.gypi
+++ deps/uv/common.gypi
@@ -113,11 +113,12 @@
'_CRT_NONSTDC_NO_DEPRECATE',
],
}],
- [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
+ [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" or OS=="netbsd"', {
'variables': {
'gcc_version%': '<!(python build/gcc_version.py)>)',
},
- 'cflags': [ '-Wall' ],
+ 'cflags': [ '-Wall -pthread' ],
+ 'ldflags': [ '-pthread' ],
'cflags_cc': [ '-fno-rtti', '-fno-exceptions' ],
'conditions': [
[ 'host_arch != target_arch and target_arch=="ia32"', {

View file

@ -0,0 +1,200 @@
diff --git a/deps/uv/src/unix/netbsd.c b/deps/uv/src/unix/netbsd.c
index 2fedc94..12fc8f9 100644
--- deps/uv/src/unix/netbsd.c
+++ deps/uv/src/unix/netbsd.c
@@ -19,10 +19,14 @@
*/
#include "uv.h"
+#include "internal.h"
#include <assert.h>
#include <string.h>
#include <errno.h>
+#include <kvm.h>
+#include <paths.h>
+#include <fcntl.h>
#include <sys/resource.h>
#include <sys/types.h>
@@ -106,3 +110,180 @@ uint64_t uv_get_total_memory(void) {
return (uint64_t) info;
}
+
+/* new from openbsd.c */
+static char *process_title;
+
+uv_err_t uv_set_process_title(const char* title) {
+ if (process_title) free(process_title);
+ process_title = strdup(title);
+ setproctitle(title);
+ return uv_ok_;
+}
+
+uv_err_t uv_get_process_title(char* buffer, size_t size) {
+ if (process_title) {
+ strncpy(buffer, process_title, size);
+ } else {
+ if (size > 0) {
+ buffer[0] = '\0';
+ }
+ }
+
+ return uv_ok_;
+}
+
+uv_err_t uv_uptime(double* uptime) {
+ time_t now;
+ struct timeval info;
+ size_t size = sizeof(info);
+ static int which[] = {CTL_KERN, KERN_BOOTTIME};
+
+ if (sysctl(which, 2, &info, &size, NULL, 0) < 0) {
+ return uv__new_sys_error(errno);
+ }
+
+ now = time(NULL);
+
+ *uptime = (double)(now - info.tv_sec);
+ return uv_ok_;
+}
+
+void uv_free_cpu_info(uv_cpu_info_t* cpu_infos, int count) {
+ int i;
+
+ for (i = 0; i < count; i++) {
+ free(cpu_infos[i].model);
+ }
+
+ free(cpu_infos);
+}
+
+
+uv_err_t uv_interface_addresses(uv_interface_address_t** addresses,
+ int* count) {
+ /* TODO: implement */
+ *addresses = NULL;
+ *count = 0;
+ return uv_ok_;
+}
+
+
+void uv_free_interface_addresses(uv_interface_address_t* addresses,
+ int count) {
+}
+
+uv_err_t uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) {
+ unsigned int ticks = (unsigned int)sysconf(_SC_CLK_TCK),
+ multiplier = ((uint64_t)1000L / ticks), cpuspeed, maxcpus,
+ cur = 0;
+ uv_cpu_info_t* cpu_info;
+ char model[512];
+ long* cp_times;
+ int numcpus;
+ size_t size;
+ int i;
+
+ size = sizeof(model);
+ if (sysctlbyname("hw.model", &model, &size, NULL, 0) < 0) {
+ return uv__new_sys_error(errno);
+ }
+ size = sizeof(numcpus);
+ if (sysctlbyname("hw.ncpu", &numcpus, &size, NULL, 0) < 0) {
+ return uv__new_sys_error(errno);
+ }
+
+ *cpu_infos = (uv_cpu_info_t*)malloc(numcpus * sizeof(uv_cpu_info_t));
+ if (!(*cpu_infos)) {
+ return uv__new_artificial_error(UV_ENOMEM);
+ }
+
+ *count = numcpus;
+
+ size = sizeof(cpuspeed);
+ if (sysctlbyname("hw.clockrate", &cpuspeed, &size, NULL, 0) < 0) {
+ free(*cpu_infos);
+ return uv__new_sys_error(errno);
+ }
+ /* kern.cp_times on FreeBSD i386 gives an array up to maxcpus instead of ncpu */
+ size = sizeof(maxcpus);
+#ifdef __DragonFly__
+ if (sysctlbyname("hw.ncpu", &maxcpus, &size, NULL, 0) < 0) {
+ free(*cpu_infos);
+ return uv__new_sys_error(errno);
+ }
+#else
+ if (sysctlbyname("kern.smp.maxcpus", &maxcpus, &size, NULL, 0) < 0) {
+ free(*cpu_infos);
+ return uv__new_sys_error(errno);
+ }
+#endif
+
+ size = maxcpus * CPUSTATES * sizeof(long);
+
+ cp_times = malloc(size);
+ if (cp_times == NULL) {
+ free(*cpu_infos);
+ return uv__new_sys_error(ENOMEM);
+ }
+
+ if (sysctlbyname("kern.cp_times", &cp_times, &size, NULL, 0) < 0) {
+ free(cp_times);
+ free(*cpu_infos);
+ return uv__new_sys_error(errno);
+ }
+
+ for (i = 0; i < numcpus; i++) {
+ cpu_info = &(*cpu_infos)[i];
+
+ cpu_info->cpu_times.user = (uint64_t)(cp_times[CP_USER+cur]) * multiplier;
+ cpu_info->cpu_times.nice = (uint64_t)(cp_times[CP_NICE+cur]) * multiplier;
+ cpu_info->cpu_times.sys = (uint64_t)(cp_times[CP_SYS+cur]) * multiplier;
+ cpu_info->cpu_times.idle = (uint64_t)(cp_times[CP_IDLE+cur]) * multiplier;
+ cpu_info->cpu_times.irq = (uint64_t)(cp_times[CP_INTR+cur]) * multiplier;
+
+ cpu_info->model = strdup(model);
+ cpu_info->speed = cpuspeed;
+
+ cur+=CPUSTATES;
+ }
+
+ free(cp_times);
+ return uv_ok_;
+}
+
+uv_err_t uv_resident_set_memory(size_t* rss) {
+ kvm_t *kd = NULL;
+ struct kinfo_proc2 *kinfo = NULL;
+ pid_t pid;
+ int nprocs;
+ size_t page_size = getpagesize();
+
+ pid = getpid();
+
+ kd = kvm_open(NULL, _PATH_DEVNULL, NULL, O_RDONLY, "kvm_open");
+ if (kd == NULL) goto error;
+
+ kinfo = kvm_getprocs(kd, KERN_PROC_PID, pid, &nprocs);
+ if (kinfo == NULL) goto error;
+
+#ifdef __DragonFly__
+ *rss = kinfo->kp_vm_rssize * page_size;
+#else
+ *rss = kinfo->p_vm_rssize * page_size;
+#endif
+
+ kvm_close(kd);
+
+ return uv_ok_;
+
+error:
+ if (kd) kvm_close(kd);
+ return uv__new_sys_error(errno);
+}
+
+char** uv_setup_args(int argc, char** argv) {
+ process_title = argc ? strdup(argv[0]) : NULL;
+ return argv;
+}
+

View file

@ -0,0 +1,24 @@
diff --git a/deps/uv/uv.gyp b/deps/uv/uv.gyp
index f53e18e..ff5a55b 100644
--- deps/uv/uv.gyp
+++ deps/uv/uv.gyp
@@ -279,6 +279,19 @@
'EIO_CONFIG_H="config_openbsd.h"',
],
}],
+ [ 'OS=="netbsd"', {
+ 'include_dirs': [ 'src/ares/config_netbsd' ],
+ 'sources': [ 'src/unix/netbsd.c' ],
+ 'defines': [
+ 'EV_CONFIG_H="config_netbsd.h"',
+ 'EIO_CONFIG_H="config_netbsd.h"',
+ ],
+ 'direct_dependent_settings': {
+ 'libraries': [
+ '-lkvm',
+ ],
+ },
+ }],
[ 'OS=="mac" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', {
'sources': [ 'src/unix/kqueue.c' ],
}],

View file

@ -1,13 +0,0 @@
$NetBSD: patch-tools_scons_scons-local-1.2.0_SCons_Tool_sunar.py,v 1.1 2011/06/25 12:46:03 genolopolis Exp $
--- tools/scons/scons-local-1.2.0/SCons/Tool/sunar.py.orig 2011-04-23 00:06:25.000000000 +0000
+++ tools/scons/scons-local-1.2.0/SCons/Tool/sunar.py
@@ -42,7 +42,7 @@ def generate(env):
"""Add Builders and construction variables for ar to an Environment."""
SCons.Tool.createStaticLibBuilder(env)
- if env.Detect('CC'):
+ if env.Detect('CC') and env['CC'] != 'gcc':
env['AR'] = 'CC'
env['ARFLAGS'] = SCons.Util.CLVar('-xar')
env['ARCOM'] = '$AR $ARFLAGS -o $TARGET $SOURCES'

View file

@ -1,19 +0,0 @@
$NetBSD: patch-tools_scons_scons-local-1.2.0_SCons_Tool_suncc.py,v 1.1 2011/06/25 12:46:03 genolopolis Exp $
Avoid Sun toolchain assumed if CC set to gcc.
--- tools/scons/scons-local-1.2.0/SCons/Tool/suncc.py.orig 2011-03-03 06:10:26.000000000 +0000
+++ tools/scons/scons-local-1.2.0/SCons/Tool/suncc.py
@@ -35,6 +35,7 @@ __revision__ = "src/engine/SCons/Tool/su
import SCons.Util
import cc
+import os
def generate(env):
"""
@@ -49,4 +50,4 @@ def generate(env):
env['SHOBJSUFFIX'] = '.o'
def exists(env):
- return env.Detect('CC')
+ return env.Detect('CC') and os.environ['CC'] != 'gcc'

View file

@ -1,691 +0,0 @@
$NetBSD: patch-v8_src_platform-netbsd.cc,v 1.1.1.1 2011/05/03 19:53:18 genolopolis Exp $
--- deps/v8/src/platform-netbsd.cc.orig 2011-04-26 05:17:25.000000000 +0000
+++ deps/v8/src/platform-netbsd.cc
@@ -0,0 +1,686 @@
+// Copyright 2006-2009 the V8 project authors. All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials provided
+// with the distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived
+// from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Platform specific code for NetBSD goes here. For the POSIX comaptible parts
+// the implementation is in platform-posix.cc.
+
+#include <pthread.h>
+#include <semaphore.h>
+#include <signal.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <sys/types.h>
+#include <sys/ucontext.h>
+#include <stdlib.h>
+
+#include <sys/types.h> // mmap & munmap
+#include <sys/mman.h> // mmap & munmap
+#include <sys/stat.h> // open
+#include <sys/fcntl.h> // open
+#include <unistd.h> // getpagesize
+#include <strings.h> // index
+#include <errno.h>
+#include <stdarg.h>
+#include <limits.h>
+
+#undef MAP_TYPE
+
+#include "v8.h"
+
+#include "platform.h"
+#include "vm-state-inl.h"
+
+
+namespace v8 {
+namespace internal {
+
+// 0 is never a valid thread id on NetBSD since tids and pids share a
+// name space and pid 0 is used to kill the group (see man 2 kill).
+static const pthread_t kNoThread = (pthread_t) 0;
+
+
+double ceiling(double x) {
+ // Correct as on OS X
+ if (-1.0 < x && x < 0.0) {
+ return -0.0;
+ } else {
+ return ceil(x);
+ }
+}
+
+
+void OS::Setup() {
+ // Seed the random number generator.
+ // Convert the current time to a 64-bit integer first, before converting it
+ // to an unsigned. Going directly can cause an overflow and the seed to be
+ // set to all ones. The seed will be identical for different instances that
+ // call this setup code within the same millisecond.
+ uint64_t seed = static_cast<uint64_t>(TimeCurrentMillis());
+ srandom(static_cast<unsigned int>(seed));
+}
+
+
+void OS::ReleaseStore(volatile AtomicWord* ptr, AtomicWord value) {
+ __asm__ __volatile__("" : : : "memory");
+ *ptr = value;
+}
+
+
+uint64_t OS::CpuFeaturesImpliedByPlatform() {
+ return 0; // NetBSD runs on anything.
+}
+
+
+int OS::ActivationFrameAlignment() {
+ // 16 byte alignment on NetBSD
+ return 16;
+}
+
+
+const char* OS::LocalTimezone(double time) {
+ if (isnan(time)) return "";
+ time_t tv = static_cast<time_t>(floor(time/msPerSecond));
+ struct tm* t = localtime(&tv);
+ if (NULL == t) return "";
+ return t->tm_zone;
+}
+
+
+double OS::LocalTimeOffset() {
+ time_t tv = time(NULL);
+ struct tm* t = localtime(&tv);
+ // tm_gmtoff includes any daylight savings offset, so subtract it.
+ return static_cast<double>(t->tm_gmtoff * msPerSecond -
+ (t->tm_isdst > 0 ? 3600 * msPerSecond : 0));
+}
+
+
+// We keep the lowest and highest addresses mapped as a quick way of
+// determining that pointers are outside the heap (used mostly in assertions
+// and verification). The estimate is conservative, ie, not all addresses in
+// 'allocated' space are actually allocated to our heap. The range is
+// [lowest, highest), inclusive on the low and and exclusive on the high end.
+static void* lowest_ever_allocated = reinterpret_cast<void*>(-1);
+static void* highest_ever_allocated = reinterpret_cast<void*>(0);
+
+
+static void UpdateAllocatedSpaceLimits(void* address, int size) {
+ lowest_ever_allocated = Min(lowest_ever_allocated, address);
+ highest_ever_allocated =
+ Max(highest_ever_allocated,
+ reinterpret_cast<void*>(reinterpret_cast<char*>(address) + size));
+}
+
+
+bool OS::IsOutsideAllocatedSpace(void* address) {
+ return address < lowest_ever_allocated || address >= highest_ever_allocated;
+}
+
+
+size_t OS::AllocateAlignment() {
+ return getpagesize();
+}
+
+
+void* OS::Allocate(const size_t requested,
+ size_t* allocated,
+ bool executable) {
+ const size_t msize = RoundUp(requested, getpagesize());
+ int prot = PROT_READ | PROT_WRITE | (executable ? PROT_EXEC : 0);
+ void* mbase = mmap(NULL, msize, prot, MAP_PRIVATE | MAP_ANON, -1, 0);
+
+ if (mbase == MAP_FAILED) {
+ LOG(StringEvent("OS::Allocate", "mmap failed"));
+ return NULL;
+ }
+ *allocated = msize;
+ UpdateAllocatedSpaceLimits(mbase, msize);
+ return mbase;
+}
+
+
+void OS::Free(void* buf, const size_t length) {
+ // TODO(1240712): munmap has a return value which is ignored here.
+ int result = munmap(buf, length);
+ USE(result);
+ ASSERT(result == 0);
+}
+
+
+#ifdef ENABLE_HEAP_PROTECTION
+
+void OS::Protect(void* address, size_t size) {
+ UNIMPLEMENTED();
+}
+
+
+void OS::Unprotect(void* address, size_t size, bool is_executable) {
+ UNIMPLEMENTED();
+}
+
+#endif
+
+
+void OS::Sleep(int milliseconds) {
+ unsigned int ms = static_cast<unsigned int>(milliseconds);
+ usleep(1000 * ms);
+}
+
+
+void OS::Abort() {
+ // Redirect to std abort to signal abnormal program termination.
+ abort();
+}
+
+
+void OS::DebugBreak() {
+ asm("int $3");
+}
+
+
+class PosixMemoryMappedFile : public OS::MemoryMappedFile {
+ public:
+ PosixMemoryMappedFile(FILE* file, void* memory, int size)
+ : file_(file), memory_(memory), size_(size) { }
+ virtual ~PosixMemoryMappedFile();
+ virtual void* memory() { return memory_; }
+ virtual int size() { return size_; }
+ private:
+ FILE* file_;
+ void* memory_;
+ int size_;
+};
+
+
+OS::MemoryMappedFile* OS::MemoryMappedFile::open(const char* name) {
+ FILE* file = fopen(name, "w+");
+ if (file == NULL) return NULL;
+
+ fseek(file, 0, SEEK_END);
+ int size = ftell(file);
+
+ void* memory =
+ mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fileno(file), 0);
+ return new PosixMemoryMappedFile(file, memory, size);
+}
+
+
+OS::MemoryMappedFile* OS::MemoryMappedFile::create(const char* name, int size,
+ void* initial) {
+ FILE* file = fopen(name, "w+");
+ if (file == NULL) return NULL;
+ int result = fwrite(initial, size, 1, file);
+ if (result < 1) {
+ fclose(file);
+ return NULL;
+ }
+ void* memory =
+ mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fileno(file), 0);
+ return new PosixMemoryMappedFile(file, memory, size);
+}
+
+
+PosixMemoryMappedFile::~PosixMemoryMappedFile() {
+ if (memory_) munmap(memory_, size_);
+ fclose(file_);
+}
+
+
+#ifdef ENABLE_LOGGING_AND_PROFILING
+static unsigned StringToLong(char* buffer) {
+ return static_cast<unsigned>(strtol(buffer, NULL, 16)); // NOLINT
+}
+#endif
+
+
+void OS::LogSharedLibraryAddresses() {
+#ifdef ENABLE_LOGGING_AND_PROFILING
+ static const int MAP_LENGTH = 1024;
+ int fd = open("/proc/self/maps", O_RDONLY);
+ if (fd < 0) return;
+ while (true) {
+ char addr_buffer[11];
+ addr_buffer[0] = '0';
+ addr_buffer[1] = 'x';
+ addr_buffer[10] = 0;
+ int result = read(fd, addr_buffer + 2, 8);
+ if (result < 8) break;
+ unsigned start = StringToLong(addr_buffer);
+ result = read(fd, addr_buffer + 2, 1);
+ if (result < 1) break;
+ if (addr_buffer[2] != '-') break;
+ result = read(fd, addr_buffer + 2, 8);
+ if (result < 8) break;
+ unsigned end = StringToLong(addr_buffer);
+ char buffer[MAP_LENGTH];
+ int bytes_read = -1;
+ do {
+ bytes_read++;
+ if (bytes_read >= MAP_LENGTH - 1)
+ break;
+ result = read(fd, buffer + bytes_read, 1);
+ if (result < 1) break;
+ } while (buffer[bytes_read] != '\n');
+ buffer[bytes_read] = 0;
+ // Ignore mappings that are not executable.
+ if (buffer[3] != 'x') continue;
+ char* start_of_path = index(buffer, '/');
+ // There may be no filename in this line. Skip to next.
+ if (start_of_path == NULL) continue;
+ buffer[bytes_read] = 0;
+ LOG(SharedLibraryEvent(start_of_path, start, end));
+ }
+ close(fd);
+#endif
+}
+
+
+void OS::SignalCodeMovingGC() {
+}
+
+
+int OS::StackWalk(Vector<OS::StackFrame> frames) {
+ UNIMPLEMENTED();
+ return 1;
+}
+
+
+// Constants used for mmap.
+static const int kMmapFd = -1;
+static const int kMmapFdOffset = 0;
+
+
+VirtualMemory::VirtualMemory(size_t size) {
+ address_ = mmap(NULL, size, PROT_NONE,
+ MAP_PRIVATE | MAP_ANON | MAP_NORESERVE,
+ kMmapFd, kMmapFdOffset);
+ size_ = size;
+}
+
+
+VirtualMemory::~VirtualMemory() {
+ if (IsReserved()) {
+ if (0 == munmap(address(), size())) address_ = MAP_FAILED;
+ }
+}
+
+
+bool VirtualMemory::IsReserved() {
+ return address_ != MAP_FAILED;
+}
+
+
+bool VirtualMemory::Commit(void* address, size_t size, bool executable) {
+ int prot = PROT_READ | PROT_WRITE | (executable ? PROT_EXEC : 0);
+ if (MAP_FAILED == mmap(address, size, prot,
+ MAP_PRIVATE | MAP_ANON | MAP_FIXED,
+ kMmapFd, kMmapFdOffset)) {
+ return false;
+ }
+
+ UpdateAllocatedSpaceLimits(address, size);
+ return true;
+}
+
+
+bool VirtualMemory::Uncommit(void* address, size_t size) {
+ return mmap(address, size, PROT_NONE,
+ MAP_PRIVATE | MAP_ANON | MAP_NORESERVE,
+ kMmapFd, kMmapFdOffset) != MAP_FAILED;
+}
+
+
+class ThreadHandle::PlatformData : public Malloced {
+ public:
+ explicit PlatformData(ThreadHandle::Kind kind) {
+ Initialize(kind);
+ }
+
+ void Initialize(ThreadHandle::Kind kind) {
+ switch (kind) {
+ case ThreadHandle::SELF: thread_ = pthread_self(); break;
+ case ThreadHandle::INVALID: thread_ = kNoThread; break;
+ }
+ }
+ pthread_t thread_; // Thread handle for pthread.
+};
+
+
+ThreadHandle::ThreadHandle(Kind kind) {
+ data_ = new PlatformData(kind);
+}
+
+
+void ThreadHandle::Initialize(ThreadHandle::Kind kind) {
+ data_->Initialize(kind);
+}
+
+
+ThreadHandle::~ThreadHandle() {
+ delete data_;
+}
+
+
+bool ThreadHandle::IsSelf() const {
+ return pthread_equal(data_->thread_, pthread_self());
+}
+
+
+bool ThreadHandle::IsValid() const {
+ return data_->thread_ != kNoThread;
+}
+
+
+Thread::Thread() : ThreadHandle(ThreadHandle::INVALID) {
+ set_name("v8:<unknown>");
+}
+
+
+Thread::Thread(const char* name) : ThreadHandle(ThreadHandle::INVALID) {
+ set_name(name);
+}
+
+
+Thread::~Thread() {
+}
+
+
+static void* ThreadEntry(void* arg) {
+ Thread* thread = reinterpret_cast<Thread*>(arg);
+ // This is also initialized by the first argument to pthread_create() but we
+ // don't know which thread will run first (the original thread or the new
+ // one) so we initialize it here too.
+ thread->thread_handle_data()->thread_ = pthread_self();
+ ASSERT(thread->IsValid());
+ thread->Run();
+ return NULL;
+}
+
+
+void Thread::set_name(const char* name) {
+ strncpy(name_, name, sizeof(name_));
+ name_[sizeof(name_) - 1] = '\0';
+}
+
+
+void Thread::Start() {
+ pthread_create(&thread_handle_data()->thread_, NULL, ThreadEntry, this);
+ ASSERT(IsValid());
+}
+
+
+void Thread::Join() {
+ pthread_join(thread_handle_data()->thread_, NULL);
+}
+
+
+Thread::LocalStorageKey Thread::CreateThreadLocalKey() {
+ pthread_key_t key;
+ int result = pthread_key_create(&key, NULL);
+ USE(result);
+ ASSERT(result == 0);
+ return static_cast<LocalStorageKey>(key);
+}
+
+
+void Thread::DeleteThreadLocalKey(LocalStorageKey key) {
+ pthread_key_t pthread_key = static_cast<pthread_key_t>(key);
+ int result = pthread_key_delete(pthread_key);
+ USE(result);
+ ASSERT(result == 0);
+}
+
+
+void* Thread::GetThreadLocal(LocalStorageKey key) {
+ pthread_key_t pthread_key = static_cast<pthread_key_t>(key);
+ return pthread_getspecific(pthread_key);
+}
+
+
+void Thread::SetThreadLocal(LocalStorageKey key, void* value) {
+ pthread_key_t pthread_key = static_cast<pthread_key_t>(key);
+ pthread_setspecific(pthread_key, value);
+}
+
+
+void Thread::YieldCPU() {
+ sched_yield();
+}
+
+
+class NetBSDMutex : public Mutex {
+ public:
+
+ NetBSDMutex() {
+ pthread_mutexattr_t attrs;
+ int result = pthread_mutexattr_init(&attrs);
+ ASSERT(result == 0);
+ result = pthread_mutexattr_settype(&attrs, PTHREAD_MUTEX_RECURSIVE);
+ ASSERT(result == 0);
+ result = pthread_mutex_init(&mutex_, &attrs);
+ ASSERT(result == 0);
+ }
+
+ virtual ~NetBSDMutex() { pthread_mutex_destroy(&mutex_); }
+
+ virtual int Lock() {
+ int result = pthread_mutex_lock(&mutex_);
+ return result;
+ }
+
+ virtual int Unlock() {
+ int result = pthread_mutex_unlock(&mutex_);
+ return result;
+ }
+
+ virtual bool TryLock() {
+ int result = pthread_mutex_trylock(&mutex_);
+ // Return false if the lock is busy and locking failed.
+ if (result == EBUSY) {
+ return false;
+ }
+ ASSERT(result == 0); // Verify no other errors.
+ return true;
+ }
+
+ private:
+ pthread_mutex_t mutex_; // Pthread mutex for POSIX platforms.
+};
+
+
+Mutex* OS::CreateMutex() {
+ return new NetBSDMutex();
+}
+
+
+class NetBSDSemaphore : public Semaphore {
+ public:
+ explicit NetBSDSemaphore(int count) { sem_init(&sem_, 0, count); }
+ virtual ~NetBSDSemaphore() { sem_destroy(&sem_); }
+
+ virtual void Wait();
+ virtual bool Wait(int timeout);
+ virtual void Signal() { sem_post(&sem_); }
+ private:
+ sem_t sem_;
+};
+
+
+void NetBSDSemaphore::Wait() {
+ while (true) {
+ int result = sem_wait(&sem_);
+ if (result == 0) return; // Successfully got semaphore.
+ CHECK(result == -1 && errno == EINTR); // Signal caused spurious wakeup.
+ }
+}
+
+
+bool NetBSDSemaphore::Wait(int timeout) {
+ const long kOneSecondMicros = 1000000; // NOLINT
+
+ // Split timeout into second and nanosecond parts.
+ struct timeval delta;
+ delta.tv_usec = timeout % kOneSecondMicros;
+ delta.tv_sec = timeout / kOneSecondMicros;
+
+ struct timeval current_time;
+ // Get the current time.
+ if (gettimeofday(&current_time, NULL) == -1) {
+ return false;
+ }
+
+ // Calculate time for end of timeout.
+ struct timeval end_time;
+ timeradd(&current_time, &delta, &end_time);
+
+ struct timespec ts;
+ TIMEVAL_TO_TIMESPEC(&end_time, &ts);
+ while (true) {
+ int result = sem_trywait(&sem_);
+ if (result == 0) return true; // Successfully got semaphore.
+ if (result == -1 && errno == ETIMEDOUT) return false; // Timeout.
+ CHECK(result == -1 && errno == EINTR); // Signal caused spurious wakeup.
+ }
+}
+
+
+Semaphore* OS::CreateSemaphore(int count) {
+ return new NetBSDSemaphore(count);
+}
+
+
+#ifdef ENABLE_LOGGING_AND_PROFILING
+
+static Sampler* active_sampler_ = NULL;
+static pthread_t vm_tid_ = 0;
+
+static void ProfilerSignalHandler(int signal, siginfo_t* info, void* context) {
+ USE(info);
+ if (signal != SIGPROF) return;
+ if (active_sampler_ == NULL || !active_sampler_->IsActive()) return;
+ if (vm_tid_ != pthread_self()) return;
+
+ TickSample sample_obj;
+ TickSample* sample = CpuProfiler::TickSampleEvent();
+ if (sample == NULL) sample = &sample_obj;
+
+ // We always sample the VM state.
+ sample->state = Top::current_vm_state();
+
+ // If profiling, we extract the current pc and sp.
+ if (active_sampler_->IsProfiling()) {
+ // Extracting the sample from the context is extremely machine dependent.
+ ucontext_t* ucontext = reinterpret_cast<ucontext_t*>(context);
+ mcontext_t& mcontext = ucontext->uc_mcontext;
+#if V8_HOST_ARCH_IA32
+ sample->pc = reinterpret_cast<Address>(mcontext.__gregs[_REG_EIP]);
+ sample->sp = reinterpret_cast<Address>(mcontext.__gregs[_REG_ESP]);
+ sample->fp = reinterpret_cast<Address>(mcontext.__gregs[_REG_EBP]);
+#elif V8_HOST_ARCH_X64
+ sample->pc = reinterpret_cast<Address>(mcontext.__gregs[_REG_RIP]);
+ sample->sp = reinterpret_cast<Address>(mcontext.__gregs[_REG_RSP]);
+ sample->fp = reinterpret_cast<Address>(mcontext.__gregs[_REG_RBP]);
+#elif V8_HOST_ARCH_ARM
+ UNIMPLEMENTED();
+#endif
+ active_sampler_->SampleStack(sample);
+ }
+
+ active_sampler_->Tick(sample);
+}
+
+
+class Sampler::PlatformData : public Malloced {
+ public:
+ PlatformData() {
+ signal_handler_installed_ = false;
+ }
+
+ bool signal_handler_installed_;
+ struct sigaction old_signal_handler_;
+ struct itimerval old_timer_value_;
+};
+
+
+Sampler::Sampler(int interval)
+ : interval_(interval),
+ profiling_(false),
+ active_(false),
+ samples_taken_(0) {
+ data_ = new PlatformData();
+}
+
+
+Sampler::~Sampler() {
+ delete data_;
+}
+
+
+void Sampler::Start() {
+ // There can only be one active sampler at the time on POSIX
+ // platforms.
+ if (active_sampler_ != NULL) return;
+ vm_tid_ = pthread_self();
+
+ // Request profiling signals.
+ struct sigaction sa;
+ sa.sa_sigaction = ProfilerSignalHandler;
+ sigemptyset(&sa.sa_mask);
+ sa.sa_flags = SA_SIGINFO;
+ if (sigaction(SIGPROF, &sa, &data_->old_signal_handler_) != 0) return;
+ data_->signal_handler_installed_ = true;
+
+ // Set the itimer to generate a tick for each interval.
+ itimerval itimer;
+ itimer.it_interval.tv_sec = interval_ / 1000;
+ itimer.it_interval.tv_usec = (interval_ % 1000) * 1000;
+ itimer.it_value.tv_sec = itimer.it_interval.tv_sec;
+ itimer.it_value.tv_usec = itimer.it_interval.tv_usec;
+ setitimer(ITIMER_PROF, &itimer, &data_->old_timer_value_);
+
+ // Set this sampler as the active sampler.
+ active_sampler_ = this;
+ active_ = true;
+}
+
+
+void Sampler::Stop() {
+ // Restore old signal handler
+ if (data_->signal_handler_installed_) {
+ setitimer(ITIMER_PROF, &data_->old_timer_value_, NULL);
+ sigaction(SIGPROF, &data_->old_signal_handler_, 0);
+ data_->signal_handler_installed_ = false;
+ }
+
+ // This sampler is no longer the active sampler.
+ active_sampler_ = NULL;
+ active_ = false;
+}
+
+#endif // ENABLE_LOGGING_AND_PROFILING
+
+} } // namespace v8::internal

View file

@ -1,129 +0,0 @@
$NetBSD: patch-v8_src_platform-openbsd.cc,v 1.1.1.1 2011/05/03 19:53:18 genolopolis Exp $
--- deps/v8/src/platform-openbsd.cc.orig 2011-04-13 08:24:41.000000000 +0000
+++ deps/v8/src/platform-openbsd.cc
@@ -164,6 +164,7 @@ void* OS::Allocate(const size_t requeste
void OS::Free(void* buf, const size_t length) {
+ // TODO(1240712): munmap has a return value which is ignored here.
int result = munmap(buf, length);
USE(result);
ASSERT(result == 0);
@@ -197,13 +198,7 @@ void OS::Abort() {
void OS::DebugBreak() {
-#if (defined(__arm__) || defined(__thumb__))
-# if defined(CAN_USE_ARMV5_INSTRUCTIONS)
- asm("bkpt 0");
-# endif
-#else
asm("int $3");
-#endif
}
@@ -309,8 +304,30 @@ void OS::SignalCodeMovingGC() {
int OS::StackWalk(Vector<OS::StackFrame> frames) {
- UNIMPLEMENTED();
- return 1;
+ int frames_size = frames.length();
+ ScopedVector<void*> addresses(frames_size);
+
+ int frames_count = backtrace(addresses.start(), frames_size);
+
+ char** symbols = backtrace_symbols(addresses.start(), frames_count);
+ if (symbols == NULL) {
+ return kStackWalkError;
+ }
+
+ for (int i = 0; i < frames_count; i++) {
+ frames[i].address = addresses[i];
+ // Format a text representation of the frame based on the information
+ // available.
+ SNPrintF(MutableCStrVector(frames[i].text, kStackWalkMaxTextLen),
+ "%s",
+ symbols[i]);
+ // Make sure line termination is in place.
+ frames[i].text[kStackWalkMaxTextLen - 1] = '\0';
+ }
+
+ free(symbols);
+
+ return frames_count;
}
@@ -502,6 +519,16 @@ class OpenBSDMutex : public Mutex {
return result;
}
+ virtual bool TryLock() {
+ int result = pthread_mutex_trylock(&mutex_);
+ // Return false if the lock is busy and locking failed.
+ if (result == EBUSY) {
+ return false;
+ }
+ ASSERT(result == 0); // Verify no other errors.
+ return true;
+ }
+
private:
pthread_mutex_t mutex_; // Pthread mutex for POSIX platforms.
};
@@ -571,18 +598,37 @@ Semaphore* OS::CreateSemaphore(int count
#ifdef ENABLE_LOGGING_AND_PROFILING
static Sampler* active_sampler_ = NULL;
+static pthread_t vm_tid_ = 0;
+
+typedef struct sigcontext ucontext_t;
static void ProfilerSignalHandler(int signal, siginfo_t* info, void* context) {
USE(info);
if (signal != SIGPROF) return;
- if (active_sampler_ == NULL) return;
-
- TickSample sample;
+ if (active_sampler_ == NULL || !active_sampler_->IsActive()) return;
+ if (vm_tid_ != pthread_self()) return;
- // We always sample the VM state.
- sample.state = VMState::current_state();
-
- active_sampler_->Tick(&sample);
+ TickSample sample_obj;
+ TickSample* sample = CpuProfiler::TickSampleEvent();
+ if (sample == NULL) sample = &sample_obj;
+
+ // Extracting the sample from the context is extremely machine dependent.
+ ucontext_t* ucontext = reinterpret_cast<ucontext_t*>(context);
+ sample->state = Top::current_vm_state();
+
+#if V8_HOST_ARCH_IA32
+ sample->pc = reinterpret_cast<Address>(ucontext->sc_eip);
+ sample->sp = reinterpret_cast<Address>(ucontext->sc_esp);
+ sample->fp = reinterpret_cast<Address>(ucontext->sc_ebp);
+#elif V8_HOST_ARCH_X64
+ sample->pc = reinterpret_cast<Address>(ucontext->sc_rip);
+ sample->sp = reinterpret_cast<Address>(ucontext->sc_rsp);
+ sample->fp = reinterpret_cast<Address>(ucontext->sc_rbp);
+#else
+ UNIMPLEMENTED();
+#endif
+ active_sampler_->SampleStack(sample);
+ active_sampler_->Tick(sample);
}
@@ -616,6 +662,7 @@ void Sampler::Start() {
// There can only be one active sampler at the time on POSIX
// platforms.
if (active_sampler_ != NULL) return;
+ vm_tid_ = pthread_self();
// Request profiling signals.
struct sigaction sa;

View file

@ -1,99 +0,0 @@
$NetBSD: patch-v8_src_x64_code-stubs-x64.cc,v 1.1.1.1 2011/05/03 19:53:18 genolopolis Exp $
--- deps/v8/src/x64/code-stubs-x64.cc.orig 2011-04-13 08:24:39.000000000 +0000
+++ deps/v8/src/x64/code-stubs-x64.cc
@@ -1699,11 +1699,14 @@ void ArgumentsAccessStub::GenerateReadEl
Label slow;
__ JumpIfNotSmi(rdx, &slow);
- // Check if the calling frame is an arguments adaptor frame.
+ // Check if the calling frame is an arguments adaptor frame. We look at the
+ // context offset, and if the frame is not a regular one, then we find a
+ // Smi instead of the context. We can't use SmiCompare here, because that
+ // only works for comparing two smis.
Label adaptor;
__ movq(rbx, Operand(rbp, StandardFrameConstants::kCallerFPOffset));
- __ SmiCompare(Operand(rbx, StandardFrameConstants::kContextOffset),
- Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR));
+ __ Cmp(Operand(rbx, StandardFrameConstants::kContextOffset),
+ Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR));
__ j(equal, &adaptor);
// Check index against formal parameters count limit passed in
@@ -1758,8 +1761,8 @@ void ArgumentsAccessStub::GenerateNewObj
// Check if the calling frame is an arguments adaptor frame.
Label adaptor_frame, try_allocate, runtime;
__ movq(rdx, Operand(rbp, StandardFrameConstants::kCallerFPOffset));
- __ SmiCompare(Operand(rdx, StandardFrameConstants::kContextOffset),
- Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR));
+ __ Cmp(Operand(rdx, StandardFrameConstants::kContextOffset),
+ Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR));
__ j(equal, &adaptor_frame);
// Get the length from the frame.
@@ -3518,8 +3521,8 @@ void StringAddStub::Generate(MacroAssemb
// Look at the length of the result of adding the two strings.
STATIC_ASSERT(String::kMaxLength <= Smi::kMaxValue / 2);
__ SmiAdd(rbx, rbx, rcx);
- // Use the runtime system when adding two one character strings, as it
- // contains optimizations for this specific case using the symbol table.
+ // Use the symbol table when adding two one character strings, as it
+ // helps later optimizations to return a symbol here.
__ SmiCompare(rbx, Smi::FromInt(2));
__ j(not_equal, &longer_than_two);
@@ -3823,15 +3826,14 @@ void StringHelper::GenerateTwoCharacterS
FieldOperand(symbol_table, SymbolTable::kCapacityOffset));
__ decl(mask);
- Register undefined = scratch4;
- __ LoadRoot(undefined, Heap::kUndefinedValueRootIndex);
+ Register map = scratch4;
// Registers
// chars: two character string, char 1 in byte 0 and char 2 in byte 1.
// hash: hash of two character string (32-bit int)
// symbol_table: symbol table
// mask: capacity mask (32-bit int)
- // undefined: undefined value
+ // map: -
// scratch: -
// Perform a number of probes in the symbol table.
@@ -3846,7 +3848,7 @@ void StringHelper::GenerateTwoCharacterS
}
__ andl(scratch, mask);
- // Load the entry from the symble table.
+ // Load the entry from the symbol table.
Register candidate = scratch; // Scratch register contains candidate.
STATIC_ASSERT(SymbolTable::kEntrySize == 1);
__ movq(candidate,
@@ -3856,8 +3858,16 @@ void StringHelper::GenerateTwoCharacterS
SymbolTable::kElementsStartOffset));
// If entry is undefined no string with this hash can be found.
- __ cmpq(candidate, undefined);
+ NearLabel is_string;
+ __ CmpObjectType(candidate, ODDBALL_TYPE, map);
+ __ j(not_equal, &is_string);
+
+ __ CompareRoot(candidate, Heap::kUndefinedValueRootIndex);
__ j(equal, not_found);
+ // Must be null (deleted entry).
+ __ jmp(&next_probe[i]);
+
+ __ bind(&is_string);
// If length is not 2 the string is not a candidate.
__ SmiCompare(FieldOperand(candidate, String::kLengthOffset),
@@ -3869,8 +3879,7 @@ void StringHelper::GenerateTwoCharacterS
Register temp = kScratchRegister;
// Check that the candidate is a non-external ascii string.
- __ movq(temp, FieldOperand(candidate, HeapObject::kMapOffset));
- __ movzxbl(temp, FieldOperand(temp, Map::kInstanceTypeOffset));
+ __ movzxbl(temp, FieldOperand(map, Map::kInstanceTypeOffset));
__ JumpIfInstanceTypeIsNotSequentialAscii(
temp, temp, &next_probe[i]);

View file

@ -1,165 +0,0 @@
$NetBSD: patch-v8_src_x64_codegen-x64.cc,v 1.1.1.1 2011/05/03 19:53:18 genolopolis Exp $
--- deps/v8/src/x64/codegen-x64.cc.orig 2011-04-13 08:24:39.000000000 +0000
+++ deps/v8/src/x64/codegen-x64.cc
@@ -760,7 +760,7 @@ void CodeGenerator::ToBoolean(ControlDes
__ AbortIfNotNumber(value.reg());
}
// Smi => false iff zero.
- __ SmiCompare(value.reg(), Smi::FromInt(0));
+ __ Cmp(value.reg(), Smi::FromInt(0));
if (value.is_smi()) {
value.Unuse();
dest->Split(not_zero);
@@ -788,7 +788,7 @@ void CodeGenerator::ToBoolean(ControlDes
dest->false_target()->Branch(equal);
// Smi => false iff zero.
- __ SmiCompare(value.reg(), Smi::FromInt(0));
+ __ Cmp(value.reg(), Smi::FromInt(0));
dest->false_target()->Branch(equal);
Condition is_smi = masm_->CheckSmi(value.reg());
dest->true_target()->Branch(is_smi);
@@ -1030,7 +1030,7 @@ void CodeGenerator::GenericBinaryOperati
true, overwrite_mode);
} else {
// Set the flags based on the operation, type and loop nesting level.
- // Bit operations always assume they likely operate on Smis. Still only
+ // Bit operations always assume they likely operate on smis. Still only
// generate the inline Smi check code if this operation is part of a loop.
// For all other operations only inline the Smi check code for likely smis
// if the operation is part of a loop.
@@ -2102,7 +2102,7 @@ void CodeGenerator::Comparison(AstNode*
if (cc == equal) {
Label comparison_done;
__ SmiCompare(FieldOperand(left_side.reg(), String::kLengthOffset),
- Smi::FromInt(1));
+ Smi::FromInt(1));
__ j(not_equal, &comparison_done);
uint8_t char_value =
static_cast<uint8_t>(String::cast(*right_val)->Get(0));
@@ -2288,7 +2288,7 @@ void CodeGenerator::ConstantSmiCompariso
// CompareStub and the inline code both support all values of cc.
}
// Implement comparison against a constant Smi, inlining the case
- // where both sides are Smis.
+ // where both sides are smis.
left_side->ToRegister();
Register left_reg = left_side->reg();
Smi* constant_smi = Smi::cast(*right_side->handle());
@@ -2298,7 +2298,6 @@ void CodeGenerator::ConstantSmiCompariso
__ AbortIfNotSmi(left_reg);
}
// Test smi equality and comparison by signed int comparison.
- // Both sides are smis, so we can use an Immediate.
__ SmiCompare(left_reg, constant_smi);
left_side->Unuse();
right_side->Unuse();
@@ -2308,7 +2307,7 @@ void CodeGenerator::ConstantSmiCompariso
JumpTarget is_smi;
if (cc == equal) {
// We can do the equality comparison before the smi check.
- __ SmiCompare(left_reg, constant_smi);
+ __ Cmp(left_reg, constant_smi);
dest->true_target()->Branch(equal);
Condition left_is_smi = masm_->CheckSmi(left_reg);
dest->false_target()->Branch(left_is_smi);
@@ -2569,8 +2568,8 @@ void CodeGenerator::CallApplyLazy(Expres
// adaptor frame below it.
Label invoke, adapted;
__ movq(rdx, Operand(rbp, StandardFrameConstants::kCallerFPOffset));
- __ SmiCompare(Operand(rdx, StandardFrameConstants::kContextOffset),
- Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR));
+ __ Cmp(Operand(rdx, StandardFrameConstants::kContextOffset),
+ Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR));
__ j(equal, &adapted);
// No arguments adaptor frame. Copy fixed number of arguments.
@@ -3850,7 +3849,7 @@ void CodeGenerator::VisitForInStatement(
__ movq(rbx, rax);
// If the property has been removed while iterating, we just skip it.
- __ SmiCompare(rbx, Smi::FromInt(0));
+ __ Cmp(rbx, Smi::FromInt(0));
node->continue_target()->Branch(equal);
end_del_check.Bind();
@@ -6182,15 +6181,15 @@ void CodeGenerator::GenerateIsConstructC
// Skip the arguments adaptor frame if it exists.
Label check_frame_marker;
- __ SmiCompare(Operand(fp.reg(), StandardFrameConstants::kContextOffset),
- Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR));
+ __ Cmp(Operand(fp.reg(), StandardFrameConstants::kContextOffset),
+ Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR));
__ j(not_equal, &check_frame_marker);
__ movq(fp.reg(), Operand(fp.reg(), StandardFrameConstants::kCallerFPOffset));
// Check the marker in the calling frame.
__ bind(&check_frame_marker);
- __ SmiCompare(Operand(fp.reg(), StandardFrameConstants::kMarkerOffset),
- Smi::FromInt(StackFrame::CONSTRUCT));
+ __ Cmp(Operand(fp.reg(), StandardFrameConstants::kMarkerOffset),
+ Smi::FromInt(StackFrame::CONSTRUCT));
fp.Unuse();
destination()->Split(equal);
}
@@ -6210,8 +6209,8 @@ void CodeGenerator::GenerateArgumentsLen
// Check if the calling frame is an arguments adaptor frame.
__ movq(fp.reg(), Operand(rbp, StandardFrameConstants::kCallerFPOffset));
- __ SmiCompare(Operand(fp.reg(), StandardFrameConstants::kContextOffset),
- Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR));
+ __ Cmp(Operand(fp.reg(), StandardFrameConstants::kContextOffset),
+ Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR));
__ j(not_equal, &exit);
// Arguments adaptor case: Read the arguments length from the
@@ -6767,8 +6766,8 @@ void CodeGenerator::GenerateSwapElements
// Fetch the map and check if array is in fast case.
// Check that object doesn't require security checks and
// has no indexed interceptor.
- __ CmpObjectType(object.reg(), FIRST_JS_OBJECT_TYPE, tmp1.reg());
- deferred->Branch(below);
+ __ CmpObjectType(object.reg(), JS_ARRAY_TYPE, tmp1.reg());
+ deferred->Branch(not_equal);
__ testb(FieldOperand(tmp1.reg(), Map::kBitFieldOffset),
Immediate(KeyedLoadIC::kSlowCaseBitFieldMask));
deferred->Branch(not_zero);
@@ -6810,7 +6809,7 @@ void CodeGenerator::GenerateSwapElements
Label done;
__ InNewSpace(tmp1.reg(), tmp2.reg(), equal, &done);
- // Possible optimization: do a check that both values are Smis
+ // Possible optimization: do a check that both values are smis
// (or them and test against Smi mask.)
__ movq(tmp2.reg(), tmp1.reg());
@@ -8485,12 +8484,6 @@ Result CodeGenerator::EmitKeyedStore(Sta
__ CmpObjectType(receiver.reg(), JS_ARRAY_TYPE, kScratchRegister);
deferred->Branch(not_equal);
- // Check that the key is within bounds. Both the key and the length of
- // the JSArray are smis. Use unsigned comparison to handle negative keys.
- __ SmiCompare(FieldOperand(receiver.reg(), JSArray::kLengthOffset),
- key.reg());
- deferred->Branch(below_equal);
-
// Get the elements array from the receiver and check that it is not a
// dictionary.
__ movq(tmp.reg(),
@@ -8519,6 +8512,14 @@ Result CodeGenerator::EmitKeyedStore(Sta
kScratchRegister);
deferred->Branch(not_equal);
+ // Check that the key is within bounds. Both the key and the length of
+ // the JSArray are smis (because the fixed array check above ensures the
+ // elements are in fast case). Use unsigned comparison to handle negative
+ // keys.
+ __ SmiCompare(FieldOperand(receiver.reg(), JSArray::kLengthOffset),
+ key.reg());
+ deferred->Branch(below_equal);
+
// Store the value.
SmiIndex index =
masm()->SmiToIndex(kScratchRegister, key.reg(), kPointerSizeLog2);

View file

@ -1,44 +0,0 @@
$NetBSD: patch-v8_src_x64_full-codegen-x64.cc,v 1.1.1.1 2011/05/03 19:53:18 genolopolis Exp $
--- deps/v8/src/x64/full-codegen-x64.cc.orig 2011-04-13 08:24:39.000000000 +0000
+++ deps/v8/src/x64/full-codegen-x64.cc
@@ -865,7 +865,7 @@ void FullCodeGenerator::VisitForInStatem
__ push(rcx); // Enumerable.
__ push(rbx); // Current entry.
__ InvokeBuiltin(Builtins::FILTER_KEY, CALL_FUNCTION);
- __ SmiCompare(rax, Smi::FromInt(0));
+ __ Cmp(rax, Smi::FromInt(0));
__ j(equal, loop_statement.continue_target());
__ movq(rbx, rax);
@@ -2300,15 +2300,15 @@ void FullCodeGenerator::EmitIsConstructC
// Skip the arguments adaptor frame if it exists.
Label check_frame_marker;
- __ SmiCompare(Operand(rax, StandardFrameConstants::kContextOffset),
- Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR));
+ __ Cmp(Operand(rax, StandardFrameConstants::kContextOffset),
+ Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR));
__ j(not_equal, &check_frame_marker);
__ movq(rax, Operand(rax, StandardFrameConstants::kCallerFPOffset));
// Check the marker in the calling frame.
__ bind(&check_frame_marker);
- __ SmiCompare(Operand(rax, StandardFrameConstants::kMarkerOffset),
- Smi::FromInt(StackFrame::CONSTRUCT));
+ __ Cmp(Operand(rax, StandardFrameConstants::kMarkerOffset),
+ Smi::FromInt(StackFrame::CONSTRUCT));
PrepareForBailoutBeforeSplit(TOS_REG, true, if_true, if_false);
Split(equal, if_true, if_false, fall_through);
@@ -2362,8 +2362,8 @@ void FullCodeGenerator::EmitArgumentsLen
// Check if the calling frame is an arguments adaptor frame.
__ movq(rbx, Operand(rbp, StandardFrameConstants::kCallerFPOffset));
- __ SmiCompare(Operand(rbx, StandardFrameConstants::kContextOffset),
- Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR));
+ __ Cmp(Operand(rbx, StandardFrameConstants::kContextOffset),
+ Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR));
__ j(not_equal, &exit);
// Arguments adaptor case: Read the arguments length from the

View file

@ -1,13 +0,0 @@
$NetBSD: patch-v8_src_x64_lithium-codegen-x64.cc,v 1.1.1.1 2011/05/03 19:53:18 genolopolis Exp $
--- deps/v8/src/x64/lithium-codegen-x64.cc.orig 2011-04-13 08:24:39.000000000 +0000
+++ deps/v8/src/x64/lithium-codegen-x64.cc
@@ -786,7 +786,7 @@ void LCodeGen::DoBranch(LBranch* instr)
__ j(equal, true_label);
__ CompareRoot(reg, Heap::kFalseValueRootIndex);
__ j(equal, false_label);
- __ SmiCompare(reg, Smi::FromInt(0));
+ __ Cmp(reg, Smi::FromInt(0));
__ j(equal, false_label);
__ JumpIfSmi(reg, true_label);

View file

@ -1,125 +0,0 @@
$NetBSD: patch-v8_src_x64_macro-assembler-x64.cc,v 1.1.1.1 2011/05/03 19:53:18 genolopolis Exp $
--- deps/v8/src/x64/macro-assembler-x64.cc.orig 2011-04-13 08:24:39.000000000 +0000
+++ deps/v8/src/x64/macro-assembler-x64.cc
@@ -109,7 +109,7 @@ void MacroAssembler::RecordWrite(Registe
ASSERT(!object.is(rsi) && !value.is(rsi) && !index.is(rsi));
// First, check if a write barrier is even needed. The tests below
- // catch stores of Smis and stores into young gen.
+ // catch stores of smis and stores into young gen.
Label done;
JumpIfSmi(value, &done);
@@ -138,7 +138,7 @@ void MacroAssembler::RecordWrite(Registe
ASSERT(!object.is(rsi) && !value.is(rsi) && !address.is(rsi));
// First, check if a write barrier is even needed. The tests below
- // catch stores of Smis and stores into young gen.
+ // catch stores of smis and stores into young gen.
Label done;
JumpIfSmi(value, &done);
@@ -820,12 +820,26 @@ void MacroAssembler::SmiTest(Register sr
}
-void MacroAssembler::SmiCompare(Register dst, Register src) {
- cmpq(dst, src);
+void MacroAssembler::SmiCompare(Register smi1, Register smi2) {
+ if (FLAG_debug_code) {
+ AbortIfNotSmi(smi1);
+ AbortIfNotSmi(smi2);
+ }
+ cmpq(smi1, smi2);
}
void MacroAssembler::SmiCompare(Register dst, Smi* src) {
+ if (FLAG_debug_code) {
+ AbortIfNotSmi(dst);
+ }
+ // Actually, knowing the register is a smi doesn't enable any optimizations
+ // with the current tagging scheme.
+ Cmp(dst, src);
+}
+
+
+void MacroAssembler::Cmp(Register dst, Smi* src) {
ASSERT(!dst.is(kScratchRegister));
if (src->value() == 0) {
testq(dst, dst);
@@ -837,20 +851,41 @@ void MacroAssembler::SmiCompare(Register
void MacroAssembler::SmiCompare(Register dst, const Operand& src) {
+ if (FLAG_debug_code) {
+ AbortIfNotSmi(dst);
+ AbortIfNotSmi(src);
+ }
cmpq(dst, src);
}
void MacroAssembler::SmiCompare(const Operand& dst, Register src) {
+ if (FLAG_debug_code) {
+ AbortIfNotSmi(dst);
+ AbortIfNotSmi(src);
+ }
cmpq(dst, src);
}
void MacroAssembler::SmiCompare(const Operand& dst, Smi* src) {
+ if (FLAG_debug_code) {
+ AbortIfNotSmi(dst);
+ }
cmpl(Operand(dst, kSmiShift / kBitsPerByte), Immediate(src->value()));
}
+void MacroAssembler::Cmp(const Operand& dst, Smi* src) {
+ // The Operand cannot use the smi register, since we may use the scratch
+ // register to get around the lack of 64 bit immediates in the instruction
+ // set.
+ Register smi_reg = GetSmiConstant(src);
+ ASSERT(!dst.AddressUsesRegister(smi_reg));
+ cmpq(dst, smi_reg);
+}
+
+
void MacroAssembler::SmiCompareInteger32(const Operand& dst, Register src) {
cmpl(Operand(dst, kSmiShift / kBitsPerByte), src);
}
@@ -1335,7 +1370,7 @@ void MacroAssembler::Move(const Operand&
void MacroAssembler::Cmp(Register dst, Handle<Object> source) {
if (source->IsSmi()) {
- SmiCompare(dst, Smi::cast(*source));
+ Cmp(dst, Smi::cast(*source));
} else {
Move(kScratchRegister, source);
cmpq(dst, kScratchRegister);
@@ -1345,7 +1380,7 @@ void MacroAssembler::Cmp(Register dst, H
void MacroAssembler::Cmp(const Operand& dst, Handle<Object> source) {
if (source->IsSmi()) {
- SmiCompare(dst, Smi::cast(*source));
+ Cmp(dst, Smi::cast(*source));
} else {
ASSERT(source->IsHeapObject());
movq(kScratchRegister, source, RelocInfo::EMBEDDED_OBJECT);
@@ -1692,7 +1727,12 @@ void MacroAssembler::AbortIfSmi(Register
void MacroAssembler::AbortIfNotSmi(Register object) {
- NearLabel ok;
+ Condition is_smi = CheckSmi(object);
+ Assert(is_smi, "Operand is not a smi");
+}
+
+
+void MacroAssembler::AbortIfNotSmi(const Operand& object) {
Condition is_smi = CheckSmi(object);
Assert(is_smi, "Operand is not a smi");
}

View file

@ -1,33 +0,0 @@
$NetBSD: patch-v8_src_x64_macro-assembler-x64.h,v 1.1.1.1 2011/05/03 19:53:18 genolopolis Exp $
--- deps/v8/src/x64/macro-assembler-x64.h.orig 2011-04-13 08:24:39.000000000 +0000
+++ deps/v8/src/x64/macro-assembler-x64.h
@@ -256,8 +256,9 @@ class MacroAssembler: public Assembler {
int power);
- // Simple comparison of smis.
- void SmiCompare(Register dst, Register src);
+ // Simple comparison of smis. Both sides must be known smis to use these,
+ // otherwise use Cmp.
+ void SmiCompare(Register smi1, Register smi2);
void SmiCompare(Register dst, Smi* src);
void SmiCompare(Register dst, const Operand& src);
void SmiCompare(const Operand& dst, Register src);
@@ -579,6 +580,8 @@ class MacroAssembler: public Assembler {
void Move(const Operand& dst, Handle<Object> source);
void Cmp(Register dst, Handle<Object> source);
void Cmp(const Operand& dst, Handle<Object> source);
+ void Cmp(Register dst, Smi* src);
+ void Cmp(const Operand& dst, Smi* src);
void Push(Handle<Object> source);
// Emit code to discard a non-negative number of pointer-sized elements
@@ -646,6 +649,7 @@ class MacroAssembler: public Assembler {
// Abort execution if argument is not a smi. Used in debug code.
void AbortIfNotSmi(Register object);
+ void AbortIfNotSmi(const Operand& object);
// Abort execution if argument is a string. Used in debug code.
void AbortIfNotString(Register object);

View file

@ -1,35 +0,0 @@
$NetBSD: patch-v8_tools_gyp_v8.gyp,v 1.1.1.1 2011/05/03 19:53:18 genolopolis Exp $
--- deps/v8/tools/gyp/v8.gyp.orig 2011-04-13 08:24:41.000000000 +0000
+++ deps/v8/tools/gyp/v8.gyp
@@ -109,7 +109,7 @@
},
'Release': {
'conditions': [
- ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
+ ['OS=="linux" or OS=="dragonfly" or OS=="freebsd" or OS=="netbsd" or OS=="openbsd"', {
'cflags!': [
'-O2',
'-Os',
@@ -717,7 +717,7 @@
],
}
],
- ['OS=="freebsd"', {
+ ['OS=="freebsd" or OS=="dragonfly"', {
'link_settings': {
'libraries': [
'-L/usr/local/lib -lexecinfo',
@@ -728,6 +728,12 @@
],
}
],
+ ['OS=="netbsd"', {
+ 'sources': [
+ '../../src/platform-netbsd.cc',
+ '../../src/platform-posix.cc'
+ ],
+ }],
['OS=="openbsd"', {
'link_settings': {
'libraries': [