From e3f86103fa94e6d25f5214e43c50fe29e64dbcbb Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 2 Jan 2015 17:00:27 +0100 Subject: [PATCH 1/8] build: don't run make recursively For targets that need the binary: don't invoke `make all` as part of the recipe, just depend on the $(NODE_EXE) target. PR-URL: https://github.com/iojs/io.js/pull/262 Reviewed-By: Bert Belder --- Makefile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 25864c5bfb6fe3..337779bcb2dbf8 100644 --- a/Makefile +++ b/Makefile @@ -105,19 +105,17 @@ test-http1: all test-valgrind: all $(PYTHON) tools/test.py --mode=release --valgrind sequential parallel message -test/gc/node_modules/weak/build/Release/weakref.node: - @if [ ! -f $(NODE_EXE) ]; then make all; fi +test/gc/node_modules/weak/build/Release/weakref.node: $(NODE_EXE) ./$(NODE_EXE) deps/npm/node_modules/node-gyp/bin/node-gyp rebuild \ --directory="$(shell pwd)/test/gc/node_modules/weak" \ --nodedir="$(shell pwd)" -build-addons: - @if [ ! -f node ]; then make all; fi +build-addons: $(NODE_EXE) rm -rf test/addons/doc-*/ - ./node tools/doc/addon-verify.js + ./$(NODE_EXE) tools/doc/addon-verify.js $(foreach dir, \ $(sort $(dir $(wildcard test/addons/*/*.gyp))), \ - ./node deps/npm/node_modules/node-gyp/bin/node-gyp rebuild \ + ./$(NODE_EXE) deps/npm/node_modules/node-gyp/bin/node-gyp rebuild \ --directory="$(shell pwd)/$(dir)" \ --nodedir="$(shell pwd)" && ) echo "build done" From 73b9323488a3e5bdd9a2b22dcb5d6daa497c8282 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 2 Jan 2015 17:03:03 +0100 Subject: [PATCH 2/8] build: remove upload targets from makefile The targets upload to nodejs.org but that is the joyent/node website. PR-URL: https://github.com/iojs/io.js/pull/262 Reviewed-By: Bert Belder --- Makefile | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/Makefile b/Makefile index 337779bcb2dbf8..d8d24070886a54 100644 --- a/Makefile +++ b/Makefile @@ -222,16 +222,6 @@ email.md: ChangeLog tools/email-footer.md blog.html: email.md cat $< | ./$(NODE_EXE) tools/doc/node_modules/.bin/marked > $@ -website-upload: doc - rsync -r out/doc/ node@nodejs.org:~/web/nodejs.org/ - ssh node@nodejs.org '\ - rm -f ~/web/nodejs.org/dist/latest &&\ - ln -s $(VERSION) ~/web/nodejs.org/dist/latest &&\ - rm -f ~/web/nodejs.org/docs/latest &&\ - ln -s $(VERSION) ~/web/nodejs.org/docs/latest &&\ - rm -f ~/web/nodejs.org/dist/node-latest.tar.gz &&\ - ln -s $(VERSION)/node-$(VERSION).tar.gz ~/web/nodejs.org/dist/node-latest.tar.gz' - docopen: out/doc/api/all.html -google-chrome out/doc/api/all.html @@ -362,11 +352,6 @@ $(PKGSRC): release-only pkgsrc: $(PKGSRC) -dist-upload: $(TARBALL) $(PKG) - ssh node@nodejs.org mkdir -p web/nodejs.org/dist/$(VERSION) - scp $(TARBALL) node@nodejs.org:~/web/nodejs.org/dist/$(VERSION)/$(TARBALL) - scp $(PKG) node@nodejs.org:~/web/nodejs.org/dist/$(VERSION)/$(TARNAME).pkg - wrkclean: $(MAKE) -C tools/wrk/ clean rm tools/wrk/wrk From 3f8b76ebd5599737ba99b00cfd54b5751c40b512 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 2 Jan 2015 17:07:43 +0100 Subject: [PATCH 3/8] doc: rename node.1 -> iojs.1 PR-URL: https://github.com/iojs/io.js/pull/262 Reviewed-By: Bert Belder --- Makefile | 2 +- doc/{node.1 => iojs.1} | 8 ++++---- tools/install.py | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) rename doc/{node.1 => iojs.1} (99%) diff --git a/Makefile b/Makefile index d8d24070886a54..27ffb114dfb471 100644 --- a/Makefile +++ b/Makefile @@ -314,7 +314,7 @@ $(PKG): release-only $(TARBALL): release-only $(NODE_EXE) doc git archive --format=tar --prefix=$(TARNAME)/ HEAD | tar xf - mkdir -p $(TARNAME)/doc/api - cp doc/node.1 $(TARNAME)/doc/node.1 + cp doc/iojs.1 $(TARNAME)/doc/iojs.1 cp -r out/doc/api/* $(TARNAME)/doc/api/ rm -rf $(TARNAME)/deps/v8/test # too big rm -rf $(TARNAME)/doc/images # too big diff --git a/doc/node.1 b/doc/iojs.1 similarity index 99% rename from doc/node.1 rename to doc/iojs.1 index a381dcf3345c96..3388c562ffa656 100644 --- a/doc/node.1 +++ b/doc/iojs.1 @@ -107,7 +107,7 @@ If set to 1 then colors will not be used in the REPL. --crankshaft (use crankshaft) type: bool default: true --hydrogen_filter (optimization filter) - type: string default: + type: string default: --use_range (use hydrogen range analysis) type: bool default: true --eliminate_dead_phis (eliminate dead phis) @@ -385,9 +385,9 @@ If set to 1 then colors will not be used in the REPL. --debugger_port (Port to use for remote debugging) type: int default: 5858 --map_counters (Map counters to a file) - type: string default: + type: string default: --js_arguments (Pass all remaining arguments to the script. Alias for "--".) - type: arguments default: + type: arguments default: --debug_compile_events (Enable debugger compile events) type: bool default: true --debug_script_collected_events (Enable debugger script collected events) @@ -399,7 +399,7 @@ If set to 1 then colors will not be used in the REPL. --gdbjit_dump (dump elf objects with debug info to disk) type: bool default: false --gdbjit_dump_filter (dump only objects containing this substring) - type: string default: + type: string default: --force_marking_deque_overflows (force overflows of marking deque by reducing its size to 64 words) type: bool default: false --stress_compaction (stress the GC compactor to flush out bugs (implies --force_marking_deque_overflows)) diff --git a/tools/install.py b/tools/install.py index c99dc1579bfeb0..77e6d0cbd10c4c 100755 --- a/tools/install.py +++ b/tools/install.py @@ -137,9 +137,9 @@ def files(action): action(['src/node.stp'], 'share/systemtap/tapset/') if 'freebsd' in sys.platform or 'openbsd' in sys.platform: - action(['doc/node.1'], 'man/man1/') + action(['doc/iojs.1'], 'man/man1/') else: - action(['doc/node.1'], 'share/man/man1/') + action(['doc/iojs.1'], 'share/man/man1/') if 'true' == variables.get('node_install_npm'): npm_files(action) From 62bd7110d20bbabc3b6244c38b35022253710be6 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 2 Jan 2015 17:09:45 +0100 Subject: [PATCH 4/8] doc: s/node/iojs/ in iojs.1 The binary is about to be renamed from `node` to `iojs`; preemptively update the man page. PR-URL: https://github.com/iojs/io.js/pull/262 Reviewed-By: Bert Belder --- doc/iojs.1 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/iojs.1 b/doc/iojs.1 index 3388c562ffa656..010bbce3aefdf6 100644 --- a/doc/iojs.1 +++ b/doc/iojs.1 @@ -1,13 +1,13 @@ -.TH NODE.JS "1" "2010" "" "" +.TH IO.JS "1" "2010" "" "" .SH "NAME" -node \- Server-side JavaScript +iojs \- Server-side JavaScript .SH SYNOPSIS -.B node +.B iojs [ .B \-v ] @@ -35,7 +35,7 @@ Execute without arguments to start the REPL. .SH DESCRIPTION -Node is a set of libraries for javascript which allows +io.js is a set of libraries for javascript which allows it to be used outside of the browser. It is primarily focused on creating simple, easy to build network clients and servers. @@ -43,7 +43,7 @@ and servers. .SH OPTIONS - -v, --version print node's version + -v, --version print iojs's version -e, --eval script evaluate script @@ -441,8 +441,8 @@ If set to 1 then colors will not be used in the REPL. .SH RESOURCES AND DOCUMENTATION -See the website for documentation http://nodejs.org/ +See the website for documentation http://iojs.org/ Mailing list: http://groups.google.com/group/nodejs -IRC: irc.freenode.net #node.js +IRC: irc.freenode.net #io.js From 57a2cab76953269c0807dc3964004a9c968c27fe Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 8 Jan 2015 13:54:45 +0100 Subject: [PATCH 5/8] doc: update v8 options in man page Update the outdated list of V8 options in the man page. PR-URL: https://github.com/iojs/io.js/pull/262 Reviewed-By: Bert Belder --- doc/iojs.1 | 448 +++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 367 insertions(+), 81 deletions(-) diff --git a/doc/iojs.1 b/doc/iojs.1 index 010bbce3aefdf6..ef1a04d7aeeb88 100644 --- a/doc/iojs.1 +++ b/doc/iojs.1 @@ -78,28 +78,68 @@ If set to 1 then colors will not be used in the REPL. --use_strict (enforce strict mode) type: bool default: false - --es5_readonly (activate correct semantics for inheriting readonliness) + --es_staging (enable all completed harmony features) type: bool default: false - --es52_globals (activate new semantics for global var declarations) + --harmony (enable all completed harmony features) type: bool default: false - --harmony_typeof (enable harmony semantics for typeof) + --harmony_shipping (enable all shipped harmony fetaures) + type: bool default: true + --harmony_modules (enable "harmony modules (implies block scoping)" (in progress)) + type: bool default: false + --harmony_arrays (enable "harmony array methods" (in progress)) + type: bool default: false + --harmony_array_includes (enable "harmony Array.prototype.includes" (in progress)) + type: bool default: false + --harmony_regexps (enable "harmony regular expression extensions" (in progress)) + type: bool default: false + --harmony_arrow_functions (enable "harmony arrow functions" (in progress)) + type: bool default: false + --harmony_proxies (enable "harmony proxies" (in progress)) type: bool default: false - --harmony_scoping (enable harmony block scoping) + --harmony_sloppy (enable "harmony features in sloppy mode" (in progress)) type: bool default: false - --harmony_modules (enable harmony modules (implies block scoping)) + --harmony_unicode (enable "harmony unicode escapes" (in progress)) type: bool default: false - --harmony_proxies (enable harmony proxies) + --harmony_tostring (enable "harmony toString") + type: bool default: false + --harmony_numeric_literals (enable "harmony numeric literals") + type: bool default: true + --harmony_strings (enable "harmony string methods") + type: bool default: true + --harmony_scoping (enable "harmony block scoping") + type: bool default: true + --harmony_classes (enable "harmony classes (implies block scoping & object literal extension)") + type: bool default: true + --harmony_object_literals (enable "harmony object literal extensions") + type: bool default: true + --harmony_templates (enable "harmony template literals") + type: bool default: true + --compiled_keyed_generic_loads (use optimizing compiler to generate keyed generic load stubs) type: bool default: false - --harmony_collections (enable harmony collections (sets, maps, and weak maps)) + --pretenuring_call_new (pretenure call new) type: bool default: false - --harmony (enable all harmony features (except typeof)) + --allocation_site_pretenuring (pretenure with allocation sites) + type: bool default: true + --trace_pretenuring (trace pretenuring decisions of HAllocate instructions) type: bool default: false - --packed_arrays (optimizes arrays that have no holes) + --trace_pretenuring_statistics (trace allocation site pretenuring statistics) type: bool default: false - --smi_only_arrays (tracks arrays with only smi values) + --track_fields (track fields with only smi values) + type: bool default: true + --track_double_fields (track fields with double values) + type: bool default: true + --track_heap_object_fields (track fields with heap values) + type: bool default: true + --track_computed_fields (track computed boilerplate fields) type: bool default: true - --clever_optimizations (Optimize object size, Array shift, DOM strings and string +) + --track_field_types (track field types) type: bool default: true + --smi_binop (support smi representation in binary operations) + type: bool default: true + --vector_ics (support vector-based ics) + type: bool default: false + --optimize_for_size (Enables optimizations which favor memory size over execution speed.) + type: bool default: false --unbox_double_arrays (automatically unbox arrays of doubles) type: bool default: true --string_slices (use string slices) @@ -107,35 +147,57 @@ If set to 1 then colors will not be used in the REPL. --crankshaft (use crankshaft) type: bool default: true --hydrogen_filter (optimization filter) - type: string default: - --use_range (use hydrogen range analysis) - type: bool default: true - --eliminate_dead_phis (eliminate dead phis) - type: bool default: true + type: string default: * --use_gvn (use hydrogen global value numbering) type: bool default: true + --gvn_iterations (maximum number of GVN fix-point iterations) + type: int default: 3 --use_canonicalizing (use hydrogen instruction canonicalizing) type: bool default: true --use_inlining (use function inlining) type: bool default: true + --use_escape_analysis (use hydrogen escape analysis) + type: bool default: true + --use_allocation_folding (use allocation folding) + type: bool default: true + --use_local_allocation_folding (only fold in basic blocks) + type: bool default: false + --use_write_barrier_elimination (eliminate write barriers targeting allocations in optimized code) + type: bool default: true + --max_inlining_levels (maximum number of inlining levels) + type: int default: 5 --max_inlined_source_size (maximum source size in bytes considered for a single inlining) type: int default: 600 --max_inlined_nodes (maximum number of AST nodes considered for a single inlining) type: int default: 196 --max_inlined_nodes_cumulative (maximum cumulative number of AST nodes considered for inlining) - type: int default: 196 + type: int default: 400 --loop_invariant_code_motion (loop invariant code motion) type: bool default: true + --fast_math (faster (but maybe less accurate) math functions) + type: bool default: true --collect_megamorphic_maps_from_stub_cache (crankshaft harvests type feedback from stub cache) type: bool default: true --hydrogen_stats (print statistics for hydrogen) type: bool default: false + --trace_check_elimination (trace check elimination phase) + type: bool default: false --trace_hydrogen (trace generated hydrogen to file) type: bool default: false + --trace_hydrogen_filter (hydrogen tracing filter) + type: string default: * + --trace_hydrogen_stubs (trace generated hydrogen for stubs) + type: bool default: false + --trace_hydrogen_file (trace hydrogen to given file name) + type: string default: NULL --trace_phase (trace generated IR for specified phases) - type: string default: Z + type: string default: HLZ --trace_inlining (trace inlining decisions) type: bool default: false + --trace_load_elimination (trace load elimination) + type: bool default: false + --trace_store_elimination (trace store elimination) + type: bool default: false --trace_alloc (trace register allocator) type: bool default: false --trace_all_uses (trace all use positions) @@ -146,14 +208,32 @@ If set to 1 then colors will not be used in the REPL. type: bool default: false --trace_representation (trace representation types) type: bool default: false + --trace_removable_simulates (trace removable simulates) + type: bool default: false + --trace_escape_analysis (trace hydrogen escape analysis) + type: bool default: false + --trace_allocation_folding (trace allocation folding) + type: bool default: false + --trace_track_allocation_sites (trace the tracking of allocation sites) + type: bool default: false + --trace_migration (trace object migration) + type: bool default: false + --trace_generalization (trace map generalization) + type: bool default: false --stress_pointer_maps (pointer map for every instruction) type: bool default: false --stress_environments (environment for every instruction) type: bool default: false --deopt_every_n_times (deoptimize every n times a deopt point is passed) type: int default: 0 + --deopt_every_n_garbage_collections (deoptimize every n garbage collections) + type: int default: 0 + --print_deopt_stress (print number of possible deopt points) + type: bool default: false --trap_on_deopt (put a break point before deoptimizing) type: bool default: false + --trap_on_stub_deopt (put a break point before deoptimizing a stub) + type: bool default: false --deoptimize_uncommon_cases (deoptimize uncommon cases) type: bool default: true --polymorphic_inlining (polymorphic inlining) @@ -161,45 +241,123 @@ If set to 1 then colors will not be used in the REPL. --use_osr (use on-stack replacement) type: bool default: true --array_bounds_checks_elimination (perform array bounds checks elimination) + type: bool default: true + --trace_bce (trace array bounds check elimination) + type: bool default: false + --array_bounds_checks_hoisting (perform array bounds checks hoisting) type: bool default: false --array_index_dehoisting (perform array index dehoisting) + type: bool default: true + --analyze_environment_liveness (analyze liveness of environment slots and zap dead values) + type: bool default: true + --load_elimination (use load elimination) + type: bool default: true + --check_elimination (use check elimination) + type: bool default: true + --store_elimination (use store elimination) type: bool default: false + --dead_code_elimination (use dead code elimination) + type: bool default: true + --fold_constants (use constant folding) + type: bool default: true + --trace_dead_code_elimination (trace dead code elimination) + type: bool default: false + --unreachable_code_elimination (eliminate unreachable code) + type: bool default: true --trace_osr (trace on-stack replacement) type: bool default: false --stress_runs (number of stress runs) type: int default: 0 - --optimize_closures (optimize closures) + --lookup_sample_by_shared (when picking a function to optimize, watch for shared function info, not JSFunction itself) + type: bool default: true + --cache_optimized_code (cache optimized code for closures) + type: bool default: true + --flush_optimized_code_cache (flushes the cache of optimized code for closures on every GC) type: bool default: true --inline_construct (inline constructor calls) type: bool default: true --inline_arguments (inline functions with arguments object) type: bool default: true - --loop_weight (loop weight for representation inference) - type: int default: 1 + --inline_accessors (inline JavaScript accessors) + type: bool default: true + --escape_analysis_iterations (maximum number of escape analysis fix-point iterations) + type: int default: 2 --optimize_for_in (optimize functions containing for-in loops) type: bool default: true - --experimental_profiler (enable all profiler experiments) + --concurrent_recompilation (optimizing hot functions asynchronously on a separate thread) type: bool default: true - --watch_ic_patching (profiler considers IC stability) + --job_based_recompilation (post tasks to v8::Platform instead of using a thread for concurrent recompilation) type: bool default: false - --frame_count (number of stack frames inspected by the profiler) - type: int default: 1 - --self_optimization (primitive functions trigger their own optimization) + --trace_concurrent_recompilation (track concurrent recompilation) type: bool default: false - --direct_self_opt (call recompile stub directly when self-optimizing) + --concurrent_recompilation_queue_length (the length of the concurrent compilation queue) + type: int default: 8 + --concurrent_recompilation_delay (artificial compilation delay in ms) + type: int default: 0 + --block_concurrent_recompilation (block queued jobs until released) type: bool default: false - --retry_self_opt (re-try self-optimization if it failed) + --concurrent_osr (concurrent on-stack replacement) + type: bool default: true + --omit_map_checks_for_leaf_maps (do not emit check maps for constant values that have a leaf map, deoptimize the optimized code if the layout of the maps changes.) + type: bool default: true + --turbo_filter (optimization filter for TurboFan compiler) + type: string default: ~ + --trace_turbo (trace generated TurboFan IR) + type: bool default: false + --trace_turbo_graph (trace generated TurboFan graphs) type: bool default: false - --count_based_interrupts (trigger profiler ticks based on counting instead of timing) + --trace_turbo_cfg_file (trace turbo cfg graph (for C1 visualizer) to a given file name) + type: string default: NULL + --trace_turbo_types (trace TurboFan's types) + type: bool default: true + --trace_turbo_scheduler (trace TurboFan's scheduler) type: bool default: false - --interrupt_at_exit (insert an interrupt check at function exit) + --trace_turbo_reduction (trace TurboFan's various reducers) type: bool default: false - --weighted_back_edges (weight back edges by jump distance for interrupt triggering) + --trace_turbo_jt (trace TurboFan's jump threading) type: bool default: false + --turbo_asm (enable TurboFan for asm.js code) + type: bool default: true + --turbo_verify (verify TurboFan graphs at each phase) + type: bool default: false + --turbo_stats (print TurboFan statistics) + type: bool default: false + --turbo_types (use typed lowering in TurboFan) + type: bool default: true + --turbo_source_positions (track source code positions when building TurboFan IR) + type: bool default: false + --context_specialization (enable context specialization in TurboFan) + type: bool default: false + --turbo_deoptimization (enable deoptimization in TurboFan) + type: bool default: false + --turbo_inlining (enable inlining in TurboFan) + type: bool default: false + --turbo_inlining_intrinsics (enable inlining of intrinsics in TurboFan) + type: bool default: false + --trace_turbo_inlining (trace TurboFan inlining) + type: bool default: false + --loop_assignment_analysis (perform loop assignment analysis) + type: bool default: true + --turbo_profiling (enable profiling in TurboFan) + type: bool default: false + --turbo_reuse_spill_slots (reuse spill slots in TurboFan) + type: bool default: true + --turbo_delay_ssa_decon (delay ssa deconstruction in TurboFan register allocator) + type: bool default: false + --turbo_move_optimization (optimize gap moves in TurboFan) + type: bool default: true + --turbo_jt (enable jump threading) + type: bool default: true + --typed_array_max_size_in_heap (threshold for in-heap typed array) + type: int default: 64 + --frame_count (number of stack frames inspected by the profiler) + type: int default: 1 --interrupt_budget (execution budget before interrupt is triggered) - type: int default: 5900 + type: int default: 6144 --type_info_threshold (percentage of ICs that must have type info to allow optimization) - type: int default: 15 + type: int default: 25 + --generic_ic_threshold (max percentage of megamorphic/generic ICs to allow optimization) + type: int default: 30 --self_opt_count (call count before self-optimization) type: int default: 130 --trace_opt_verbose (extra verbose compilation tracing) @@ -208,32 +366,52 @@ If set to 1 then colors will not be used in the REPL. type: bool default: false --code_comments (emit comments in code disassembly) type: bool default: false - --enable_sse2 (enable use of SSE2 instructions if available) - type: bool default: true --enable_sse3 (enable use of SSE3 instructions if available) type: bool default: true --enable_sse4_1 (enable use of SSE4.1 instructions if available) type: bool default: true - --enable_cmov (enable use of CMOV instruction if available) + --enable_sahf (enable use of SAHF instruction if available (X64 only)) type: bool default: true - --enable_rdtsc (enable use of RDTSC instruction if available) + --enable_avx (enable use of AVX instructions if available) type: bool default: true - --enable_sahf (enable use of SAHF instruction if available (X64 only)) + --enable_fma3 (enable use of FMA3 instructions if available) type: bool default: true - --enable_vfp3 (enable use of VFP3 instructions if available - this implies enabling ARMv7 instructions (ARM only)) + --enable_vfp3 (enable use of VFP3 instructions if available) type: bool default: true --enable_armv7 (enable use of ARMv7 instructions if available (ARM only)) type: bool default: true - --enable_fpu (enable use of MIPS FPU instructions if available (MIPS only)) + --enable_armv8 (enable use of ARMv8 instructions if available (ARM 32-bit only)) type: bool default: true + --enable_neon (enable use of NEON instructions if available (ARM only)) + type: bool default: true + --enable_sudiv (enable use of SDIV and UDIV instructions if available (ARM only)) + type: bool default: true + --enable_mls (enable use of MLS instructions if available (ARM only)) + type: bool default: true + --enable_movw_movt (enable loading 32-bit constant by means of movw/movt instruction pairs (ARM only)) + type: bool default: false + --enable_unaligned_accesses (enable unaligned accesses for ARMv7 (ARM only)) + type: bool default: true + --enable_32dregs (enable use of d16-d31 registers on ARM - this requires VFP3) + type: bool default: true + --enable_vldr_imm (enable use of constant pools for double immediate (ARM only)) + type: bool default: false + --force_long_branches (force all emitted branches to be in long mode (MIPS only)) + type: bool default: false --expose_natives_as (expose natives in global object) type: string default: NULL --expose_debug_as (expose debug in global object) type: string default: NULL + --expose_free_buffer (expose freeBuffer extension) + type: bool default: false --expose_gc (expose gc extension) type: bool default: false + --expose_gc_as (expose gc extension under the specified name) + type: string default: NULL --expose_externalize_string (expose externalize string extension) type: bool default: false + --expose_trigger_failure (expose trigger-failure extension) + type: bool default: false --stack_trace_limit (number of stack frames to capture) type: int default: 10 --builtins_in_stack_traces (show built-in functions in stack traces) @@ -242,8 +420,8 @@ If set to 1 then colors will not be used in the REPL. type: bool default: false --inline_new (use fast inline allocation) type: bool default: true - --stack_trace_on_abort (print a stack trace if an assertion failure occurs) - type: bool default: true + --trace_codegen (print name of functions for which code is generated) + type: bool default: false --trace (trace function calls) type: bool default: false --mask_constants_with_cookie (use random jit cookie to mask large constants) @@ -258,27 +436,41 @@ If set to 1 then colors will not be used in the REPL. type: bool default: true --always_opt (always try to optimize functions) type: bool default: false + --always_osr (always try to OSR functions) + type: bool default: false --prepare_always_opt (prepare for turning on always opt) type: bool default: false - --trace_deopt (trace deoptimization) + --trace_deopt (trace optimize function deoptimization) type: bool default: false - --min_preparse_length (minimum length for automatic enable preparsing) - type: int default: 1024 - --always_full_compiler (try to use the dedicated run-once backend for all code) + --trace_stub_failures (trace deoptimization of generated code stubs) type: bool default: false - --trace_bailout (print reasons for falling back to using the classic V8 backend) + --serialize_toplevel (enable caching of toplevel scripts) + type: bool default: true + --serialize_inner (enable caching of inner functions) type: bool default: false + --trace_serializer (print code serializer trace) + type: bool default: false + --min_preparse_length (minimum length for automatic enable preparsing) + type: int default: 1024 + --max_opt_count (maximum number of optimization attempts before giving up.) + type: int default: 10 --compilation_cache (enable compilation cache) type: bool default: true --cache_prototype_transitions (cache prototype transitions) type: bool default: true + --cpu_profiler_sampling_interval (CPU profiler sampling interval in microseconds) + type: int default: 1000 --trace_debug_json (trace debugging JSON request/response) type: bool default: false - --debugger_auto_break (automatically set the debug break flag when debugger commands are in the queue) - type: bool default: true + --trace_js_array_abuse (trace out-of-bounds accesses to JS arrays) + type: bool default: false + --trace_external_array_abuse (trace out-of-bounds-accesses to external arrays) + type: bool default: false + --trace_array_abuse (trace out-of-bounds accesses to all arrays) + type: bool default: false --enable_liveedit (enable liveedit experimental feature) type: bool default: true - --break_on_abort (always cause a debug break before aborting) + --hard_abort (abort by crashing) type: bool default: true --stack_size (default size of stack region v8 is allowed to use (in kBytes)) type: int default: 984 @@ -286,9 +478,19 @@ If set to 1 then colors will not be used in the REPL. type: int default: 300 --always_inline_smi_code (always inline smi code in non-opt code) type: bool default: false - --max_new_space_size (max size of the new generation (in kBytes)) + --min_semi_space_size (min size of a semi-space (in MBytes), the new space consists of twosemi-spaces) type: int default: 0 - --max_old_space_size (max size of the old generation (in Mbytes)) + --target_semi_space_size (target size of a semi-space (in MBytes) before triggering a GC) + type: int default: 0 + --max_semi_space_size (max size of a semi-space (in MBytes), the new space consists of twosemi-spaces) + type: int default: 0 + --semi_space_growth_factor (factor by which to grow the new space) + type: int default: 2 + --experimental_new_space_growth_heuristic (Grow the new space based on the percentage of survivors instead of their absolute value.) + type: bool default: false + --max_old_space_size (max size of the old space (in Mbytes)) + type: int default: 0 + --initial_old_space_size (initial old space size (in Mbytes)) type: int default: 0 --max_executable_size (max size of executable memory (in Mbytes)) type: int default: 0 @@ -300,98 +502,142 @@ If set to 1 then colors will not be used in the REPL. type: bool default: false --trace_gc_nvp (print one detailed trace line in name=value format after each garbage collection) type: bool default: false + --trace_gc_ignore_scavenger (do not print trace line after scavenger collection) + type: bool default: false + --trace_idle_notification (print one trace line following each idle notification) + type: bool default: false + --trace_idle_notification_verbose (prints the heap state used by the idle notification) + type: bool default: false --print_cumulative_gc_stat (print cumulative GC statistics in name=value format on exit) type: bool default: false + --print_max_heap_committed (print statistics of the maximum memory committed for the heap in name=value format on exit) + type: bool default: false --trace_gc_verbose (print more details following each garbage collection) type: bool default: false --trace_fragmentation (report fragmentation for old pointer and data pages) type: bool default: false --collect_maps (garbage collect maps from which no objects can be reached) type: bool default: true - --flush_code (flush code that we expect not to use again before full gc) + --weak_embedded_maps_in_optimized_code (make maps embedded in optimized code weak) + type: bool default: true + --weak_embedded_objects_in_optimized_code (make objects embedded in optimized code weak) + type: bool default: true + --flush_code (flush code that we expect not to use again (during full gc)) + type: bool default: true + --flush_code_incrementally (flush code that we expect not to use again (incrementally)) + type: bool default: true + --trace_code_flushing (trace code flushing progress) + type: bool default: false + --age_code (track un-executed functions to age code and flush only old code (required for code flushing)) type: bool default: true --incremental_marking (use incremental marking) type: bool default: true --incremental_marking_steps (do incremental marking steps) type: bool default: true + --concurrent_sweeping (use concurrent sweeping) + type: bool default: true --trace_incremental_marking (trace progress of the incremental marking) type: bool default: false + --track_gc_object_stats (track object counts and memory usage) + type: bool default: false + --heap_profiler_trace_objects (Dump heap object allocations/movements/size_updates) + type: bool default: false --use_idle_notification (Use idle notification to reduce memory footprint.) type: bool default: true - --send_idle_notification (Send idle notification between stress runs.) - type: bool default: false --use_ic (use inline caching) type: bool default: true + --trace_ic (trace inline cache state transitions) + type: bool default: false --native_code_counters (generate extra code for manipulating stats counters) type: bool default: false --always_compact (Perform compaction on every full GC) type: bool default: false - --lazy_sweeping (Use lazy sweeping for old pointer and data spaces) - type: bool default: true --never_compact (Never perform compaction on full GC - testing only) type: bool default: false --compact_code_space (Compact code space on full non-incremental collections) type: bool default: true + --incremental_code_compaction (Compact code space on full incremental collections) + type: bool default: true --cleanup_code_caches_at_gc (Flush inline caches prior to mark compact collection and flush code caches in maps during mark compact cycle.) type: bool default: true + --use_marking_progress_bar (Use a progress bar to scan large objects in increments when incremental marking is active.) + type: bool default: true + --zap_code_space (Zap free memory in code space with 0xCC while sweeping.) + type: bool default: true --random_seed (Default seed for initializing random generator (0, the default, means to use system random).) type: int default: 0 + --trace_weak_arrays (trace WeakFixedArray usage) + type: bool default: false + --track_prototype_users (keep track of which maps refer to a given prototype object) + type: bool default: false --use_verbose_printer (allows verbose printing) type: bool default: true --allow_natives_syntax (allow natives syntax) type: bool default: false + --trace_parse (trace parsing and preparsing) + type: bool default: false --trace_sim (Trace simulator execution) type: bool default: false + --debug_sim (Enable debugging the simulator) + type: bool default: false --check_icache (Check icache flushes in ARM and MIPS simulator) type: bool default: false --stop_sim_at (Simulator stop after x number of instructions) type: int default: 0 - --sim_stack_alignment (Stack alignment in bytes in simulator (4 or 8, 8 is default)) + --sim_stack_alignment (Stack alingment in bytes in simulator (4 or 8, 8 is default)) type: int default: 8 - --trace_exception (print stack trace when throwing exceptions) + --sim_stack_size (Stack size of the ARM64 and MIPS64 simulator in kBytes (default is 2 MB)) + type: int default: 2048 + --log_regs_modified (When logging register values, only print modified registers.) + type: bool default: true + --log_colour (When logging, try to use coloured output.) + type: bool default: true + --ignore_asm_unimplemented_break (Don't break for ASM_UNIMPLEMENTED_BREAK macros.) + type: bool default: false + --trace_sim_messages (Trace simulator debug messages. Implied by --trace-sim.) + type: bool default: false + --stack_trace_on_illegal (print stack trace when an illegal exception is thrown) type: bool default: false - --preallocate_message_memory (preallocate some memory to build stack traces.) + --abort_on_uncaught_exception (abort program (dump core) when an uncaught exception is thrown) type: bool default: false --randomize_hashes (randomize hashes to avoid predictable hash collisions (with snapshots this option cannot override the baked-in seed)) type: bool default: true --hash_seed (Fixed seed to use to hash property keys (0 means random)(with snapshots this option cannot override the baked-in seed)) type: int default: 0 - --preemption (activate a 100ms timer that switches between V8 threads) + --profile_deserialization (Print the time it takes to deserialize the snapshot.) type: bool default: false --regexp_optimization (generate optimized regexp code) type: bool default: true --testing_bool_flag (testing_bool_flag) type: bool default: true + --testing_maybe_bool_flag (testing_maybe_bool_flag) + type: maybe_bool default: unset --testing_int_flag (testing_int_flag) type: int default: 13 --testing_float_flag (float-flag) - type: float default: 2.500000 + type: float default: 2.5 --testing_string_flag (string-flag) type: string default: Hello, world! --testing_prng_seed (Seed used for threading test randomness) type: int default: 42 --testing_serialization_file (file in which to serialize heap) type: string default: /tmp/serdes + --startup_blob (Write V8 startup blob file. (mksnapshot only)) + type: string default: NULL + --profile_hydrogen_code_stub_compilation (Print the time it takes to lazily compile hydrogen code stubs.) + type: bool default: false + --predictable (enable predictable mode) + type: bool default: false --help (Print usage message, including flags, on console) type: bool default: true --dump_counters (Dump counters on exit) type: bool default: false --debugger (Enable JavaScript debugger) type: bool default: false - --remote_debugger (Connect JavaScript debugger to the debugger agent in another process) - type: bool default: false - --debugger_agent (Enable debugger agent) - type: bool default: false - --debugger_port (Port to use for remote debugging) - type: int default: 5858 --map_counters (Map counters to a file) type: string default: --js_arguments (Pass all remaining arguments to the script. Alias for "--".) type: arguments default: - --debug_compile_events (Enable debugger compile events) - type: bool default: true - --debug_script_collected_events (Enable debugger script collected events) - type: bool default: true --gdbjit (enable GDBJIT interface (disables compacting GC)) type: bool default: false --gdbjit_full (enable GDBJIT interface for all code objects) @@ -400,7 +646,7 @@ If set to 1 then colors will not be used in the REPL. type: bool default: false --gdbjit_dump_filter (dump only objects containing this substring) type: string default: - --force_marking_deque_overflows (force overflows of marking deque by reducing its size to 64 words) + --force_marking_deque_overflows (force overflows of marking deque by reducing it's size to 64 words) type: bool default: false --stress_compaction (stress the GC compactor to flush out bugs (implies --force_marking_deque_overflows)) type: bool default: false @@ -408,8 +654,6 @@ If set to 1 then colors will not be used in the REPL. type: bool default: false --log_all (Log all events to the log file.) type: bool default: false - --log_runtime (Activate runtime system %Log call.) - type: bool default: false --log_api (Log API events to the log file.) type: bool default: false --log_code (Log code events to the log file without profiling.) @@ -424,20 +668,62 @@ If set to 1 then colors will not be used in the REPL. type: bool default: false --prof (Log statistical profiling information (implies --log-code).) type: bool default: false - --prof_auto (Used with --prof, starts profiling automatically) - type: bool default: true - --prof_lazy (Used with --prof, only does sampling and logging when profiler is active (implies --noprof_auto).) - type: bool default: false --prof_browser_mode (Used with --prof, turns on browser-compatible mode for profiling.) type: bool default: true --log_regexp (Log regular expression execution.) type: bool default: false - --sliding_state_window (Update sliding state window counters.) - type: bool default: false --logfile (Specify the name of the log file.) type: string default: v8.log + --logfile_per_isolate (Separate log files for each isolate.) + type: bool default: true --ll_prof (Enable low-level linux profiler.) type: bool default: false + --perf_basic_prof (Enable perf linux profiler (basic support).) + type: bool default: false + --perf_jit_prof (Enable perf linux profiler (experimental annotate support).) + type: bool default: false + --gc_fake_mmap (Specify the name of the file for fake gc mmap used in ll_prof) + type: string default: /tmp/__v8_gc__ + --log_internal_timer_events (Time internal events.) + type: bool default: false + --log_timer_events (Time events including external callbacks.) + type: bool default: false + --log_instruction_stats (Log AArch64 instruction statistics.) + type: bool default: false + --log_instruction_file (AArch64 instruction statistics log file.) + type: string default: arm64_inst.csv + --log_instruction_period (AArch64 instruction statistics logging period.) + type: int default: 4194304 + --redirect_code_traces (output deopt information and disassembly into file code--.asm) + type: bool default: false + --redirect_code_traces_to (output deopt information and disassembly into the given file) + type: string default: NULL + --hydrogen_track_positions (track source code positions when building IR) + type: bool default: false + --trace_elements_transitions (trace elements transitions) + type: bool default: false + --trace_creation_allocation_sites (trace the creation of allocation sites) + type: bool default: false + --print_code_stubs (print code stubs) + type: bool default: false + --test_secondary_stub_cache (test secondary stub cache by disabling the primary one) + type: bool default: false + --test_primary_stub_cache (test primary stub cache by disabling the secondary one) + type: bool default: false + --print_code (print generated code) + type: bool default: false + --print_opt_code (print optimized code) + type: bool default: false + --print_unopt_code (print unoptimized code before printing optimized code based on it) + type: bool default: false + --print_code_verbose (print more information for code) + type: bool default: false + --print_builtin_code (print generated code for builtins) + type: bool default: false + --sodium (print generated code output suitable for use with the Sodium code viewer) + type: bool default: false + --print_all_code (enable all flags related to printing code) + type: bool default: false .SH RESOURCES AND DOCUMENTATION From 3e7a25dd95194269fd112aa5677fc5e6d4156135 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 8 Jan 2015 13:37:32 +0100 Subject: [PATCH 6/8] test: remove --use-http1 test runner flag The flag was used for a short while during the v0.5 development cycle, four years ago. Remove it, it's long overdue. PR-URL: https://github.com/iojs/io.js/pull/262 Reviewed-By: Bert Belder --- Makefile | 6 ------ tools/test.py | 7 ------- 2 files changed, 13 deletions(-) diff --git a/Makefile b/Makefile index 27ffb114dfb471..ec22487081d6af 100644 --- a/Makefile +++ b/Makefile @@ -99,9 +99,6 @@ test: all test-parallel: all $(PYTHON) tools/test.py --mode=release parallel -J -test-http1: all - $(PYTHON) tools/test.py --mode=release --use-http1 sequential parallel message - test-valgrind: all $(PYTHON) tools/test.py --mode=release --valgrind sequential parallel message @@ -128,9 +125,6 @@ test-all: test-build test/gc/node_modules/weak/build/Release/weakref.node $(PYTHON) tools/test.py --mode=debug,release make test-npm -test-all-http1: test-build - $(PYTHON) tools/test.py --mode=debug,release --use-http1 - test-all-valgrind: test-build $(PYTHON) tools/test.py --mode=debug,release --valgrind diff --git a/tools/test.py b/tools/test.py index 7241f162d7a28b..b24ca9ba53c46a 100755 --- a/tools/test.py +++ b/tools/test.py @@ -1235,8 +1235,6 @@ def BuildOptions(): result.add_option("--snapshot", help="Run the tests with snapshot turned on", default=False, action="store_true") result.add_option("--special-command", default=None) - result.add_option("--use-http1", help="Pass --use-http1 switch to node", - default=False, action="store_true") result.add_option("--valgrind", help="Run tests through valgrind", default=False, action="store_true") result.add_option("--cat", help="Print the source of the tests", @@ -1397,11 +1395,6 @@ def Main(): buildspace = dirname(shell) processor = GetSpecialCommandProcessor(options.special_command) - if options.use_http1: - def wrap(processor): - return lambda args: processor(args[:1] + ['--use-http1'] + args[1:]) - processor = wrap(processor) - context = Context(workspace, buildspace, VERBOSE, From f17f473af5e28f4ec00a518f97a84b69c426309e Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 8 Jan 2015 14:00:43 +0100 Subject: [PATCH 7/8] build: rename binary from node to iojs * rename the build targets * update the test runner to use `out/{Debug,Release}/iojs` * update the installer to install the iojs binary * update one test that explicitly checks for the binary name PR-URL: https://github.com/iojs/io.js/pull/262 Reviewed-By: Bert Belder --- .gitignore | 4 ++-- Makefile | 22 +++++++++++----------- node.gyp | 2 +- test/parallel/test-process-argv-0.js | 4 ++-- tools/install.py | 8 ++++---- tools/test.py | 10 +++++----- 6 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.gitignore b/.gitignore index 4ed758e7a3e6d2..7f6cb17cbc087c 100644 --- a/.gitignore +++ b/.gitignore @@ -10,8 +10,8 @@ tags doc/api.xml tmp/ test/tmp*/ -node -node_g +iojs +iojs_g *.swp .benchmark_reports /.project diff --git a/Makefile b/Makefile index ec22487081d6af..cc07eee6c7fa00 100644 --- a/Makefile +++ b/Makefile @@ -11,9 +11,9 @@ PREFIX ?= /usr/local EXEEXT := $(shell $(PYTHON) -c \ "import sys; print('.exe' if sys.platform == 'win32' else '')") -NODE ?= ./node$(EXEEXT) -NODE_EXE = node$(EXEEXT) -NODE_G_EXE = node_g$(EXEEXT) +NODE ?= ./iojs$(EXEEXT) +NODE_EXE = iojs$(EXEEXT) +NODE_G_EXE = iojs_g$(EXEEXT) # Default to verbose builds. # To do quiet/pretty builds, run `make V=` to set V to an empty string, @@ -240,10 +240,10 @@ else ARCH=x86 endif endif -TARNAME=node-$(VERSION) +TARNAME=iojs-$(VERSION) ifdef NIGHTLY TAG = nightly-$(NIGHTLY) -TARNAME=node-$(VERSION)-$(TAG) +TARNAME=iojs-$(VERSION)-$(TAG) endif TARBALL=$(TARNAME).tar.gz BINARYNAME=$(TARNAME)-$(PLATFORM)-$(ARCH) @@ -251,9 +251,9 @@ BINARYTAR=$(BINARYNAME).tar.gz PKG=out/$(TARNAME).pkg packagemaker=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker -PKGSRC=nodejs-$(DESTCPU)-$(RAWVER).tgz +PKGSRC=iojs-$(DESTCPU)-$(RAWVER).tgz ifdef NIGHTLY -PKGSRC=nodejs-$(DESTCPU)-$(RAWVER)-$(TAG).tgz +PKGSRC=iojs-$(DESTCPU)-$(RAWVER)-$(TAG).tgz endif dist: doc $(TARBALL) $(PKG) @@ -293,11 +293,11 @@ $(PKG): release-only $(PYTHON) ./configure --without-snapshot --dest-cpu=x64 --tag=$(TAG) $(MAKE) install V=$(V) DESTDIR=$(PKGDIR) SIGN="$(APP_SIGN)" PKGDIR="$(PKGDIR)" bash tools/osx-codesign.sh - lipo $(PKGDIR)/32/usr/local/bin/node \ - $(PKGDIR)/usr/local/bin/node \ - -output $(PKGDIR)/usr/local/bin/node-universal \ + lipo $(PKGDIR)/32/usr/local/bin/iojs \ + $(PKGDIR)/usr/local/bin/iojs \ + -output $(PKGDIR)/usr/local/bin/iojs-universal \ -create - mv $(PKGDIR)/usr/local/bin/node-universal $(PKGDIR)/usr/local/bin/node + mv $(PKGDIR)/usr/local/bin/iojs-universal $(PKGDIR)/usr/local/bin/iojs rm -rf $(PKGDIR)/32 $(packagemaker) \ --id "org.nodejs.Node" \ diff --git a/node.gyp b/node.gyp index 30a1bdf7ebc191..43622958ec8dae 100644 --- a/node.gyp +++ b/node.gyp @@ -73,7 +73,7 @@ 'targets': [ { - 'target_name': 'node', + 'target_name': 'iojs', 'type': 'executable', 'dependencies': [ diff --git a/test/parallel/test-process-argv-0.js b/test/parallel/test-process-argv-0.js index 0c38f6ac7bbf87..d528faa50e6d09 100644 --- a/test/parallel/test-process-argv-0.js +++ b/test/parallel/test-process-argv-0.js @@ -28,7 +28,7 @@ console.error('argv=%j', process.argv); console.error('exec=%j', process.execPath); if (process.argv[2] !== "child") { - var child = spawn('./node', [__filename, "child"], { + var child = spawn('./iojs', [__filename, "child"], { cwd: path.dirname(process.execPath) }); @@ -44,7 +44,7 @@ if (process.argv[2] !== "child") { console.error('CHILD: %s', childErr.trim().split('\n').join('\nCHILD: ')); if (process.platform === 'win32') { // On Windows argv[0] is not expanded into full path - assert.equal(childArgv0, './node'); + assert.equal(childArgv0, './iojs'); } else { assert.equal(childArgv0, process.execPath); } diff --git a/tools/install.py b/tools/install.py index 77e6d0cbd10c4c..affce2265ce776 100755 --- a/tools/install.py +++ b/tools/install.py @@ -108,12 +108,12 @@ def npm_files(action): if os.environ.get('PORTABLE'): # This crazy hack is necessary to make the shebang execute the copy # of node relative to the same directory as the npm script. The precompiled - # binary tarballs use a prefix of "/" which gets translated to "/bin/node" + # binary tarballs use a prefix of "/" which gets translated to "/bin/iojs" # in the regular shebang modifying logic, which is incorrect since the # precompiled bundle should be able to be extracted anywhere and "just work" - shebang = '/bin/sh\n// 2>/dev/null; exec "`dirname "$0"`/node" "$0" "$@"' + shebang = '/bin/sh\n// 2>/dev/null; exec "`dirname "$0"`/iojs" "$0" "$@"' else: - shebang = os.path.join(node_prefix or '/', 'bin/node') + shebang = os.path.join(node_prefix or '/', 'bin/iojs') update_shebang(link_path, shebang) else: assert(0) # unhandled action type @@ -128,7 +128,7 @@ def subdir_files(path, dest, action): def files(action): exeext = '.exe' if sys.platform == 'win32' else '' - action(['out/Release/node' + exeext], 'bin/node' + exeext) + action(['out/Release/iojs' + exeext], 'bin/iojs' + exeext) if 'true' == variables.get('node_use_dtrace'): action(['out/Release/node.d'], 'lib/dtrace/node.d') diff --git a/tools/test.py b/tools/test.py index b24ca9ba53c46a..563555ed95a59f 100755 --- a/tools/test.py +++ b/tools/test.py @@ -742,20 +742,20 @@ def __init__(self, workspace, buildspace, verbose, vm, timeout, processor, suppr def GetVm(self, arch, mode): if arch == 'none': - name = 'out/Debug/node' if mode == 'debug' else 'out/Release/node' + name = 'out/Debug/iojs' if mode == 'debug' else 'out/Release/iojs' else: - name = 'out/%s.%s/node' % (arch, mode) + name = 'out/%s.%s/iojs' % (arch, mode) # Currently GYP does not support output_dir for MSVS. # http://code.google.com/p/gyp/issues/detail?id=40 - # It will put the builds into Release/node.exe or Debug/node.exe + # It will put the builds into Release/iojs.exe or Debug/iojs.exe if utils.IsWindows(): out_dir = os.path.join(dirname(__file__), "..", "out") if not exists(out_dir): if mode == 'debug': - name = os.path.abspath('Debug/node.exe') + name = os.path.abspath('Debug/iojs.exe') else: - name = os.path.abspath('Release/node.exe') + name = os.path.abspath('Release/iojs.exe') else: name = os.path.abspath(name + '.exe') From 72f1b348b021269f98783aee2f0e89500a20231c Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 8 Jan 2015 14:21:26 +0100 Subject: [PATCH 8/8] install: install iojs -> node compat symlink Install a symlink for compatibility with scripts that expect a binary called `node` or have a /path/to/node shebang. Only done on UNIX platforms because symlinks on Windows require elevated privileges. PR-URL: https://github.com/iojs/io.js/pull/262 Reviewed-By: Bert Belder --- tools/install.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tools/install.py b/tools/install.py index affce2265ce776..5cf78b52814683 100755 --- a/tools/install.py +++ b/tools/install.py @@ -127,9 +127,22 @@ def subdir_files(path, dest, action): action(files, subdir + '/') def files(action): - exeext = '.exe' if sys.platform == 'win32' else '' + is_windows = sys.platform == 'win32' + + exeext = '.exe' if is_windows else '' action(['out/Release/iojs' + exeext], 'bin/iojs' + exeext) + if not is_windows: + # Install iojs -> node compatibility symlink. + link_target = 'bin/node' + link_path = abspath(install_path, link_target) + if action == uninstall: + action([link_path], link_target) + elif action == install: + try_symlink('iojs', link_path) + else: + assert(0) # Unhandled action type. + if 'true' == variables.get('node_use_dtrace'): action(['out/Release/node.d'], 'lib/dtrace/node.d')