This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Merge remote branch 'origin/master'

Conflicts:
	src/node_net.cc
	src/node_os.cc
  • Loading branch information...
2 parents 86518c3 + b563717 commit 33118df8f98f7c81c36653563b2b58e44bcc4c6f @piscisaureus piscisaureus committed Jan 2, 2011
Showing with 3,374 additions and 1,382 deletions.
  1. +6 −0 Makefile
  2. +3 −2 Makefile.cmake
  3. +12 −0 README.cmake
  4. +22 −0 cmake/codesourcery-arm-toolchain.cmake
  5. +0 −10 cmake/configure.cmake
  6. +6 −1 cmake/libs.cmake
  7. +17 −3 cmake/node_build.cmake
  8. +3 −2 cmake/v8_build.cmake
  9. +11 −0 deps/v8/ChangeLog
  10. +10 −3 deps/v8/SConstruct
  11. +15 −0 deps/v8/include/v8.h
  12. +2 −1 deps/v8/src/SConscript
  13. +29 −0 deps/v8/src/api.cc
  14. +60 −43 deps/v8/src/arm/code-stubs-arm.cc
  15. +8 −1 deps/v8/src/arm/lithium-arm.cc
  16. +10 −5 deps/v8/src/arm/lithium-codegen-arm.cc
  17. +38 −0 deps/v8/src/arm/macro-assembler-arm.cc
  18. +13 −0 deps/v8/src/arm/macro-assembler-arm.h
  19. +53 −16 deps/v8/src/array.js
  20. +12 −11 deps/v8/src/assembler.cc
  21. +1 −1 deps/v8/src/assembler.h
  22. +43 −18 deps/v8/src/builtins.cc
  23. +1 −2 deps/v8/src/code-stubs.h
  24. +11 −2 deps/v8/src/codegen.cc
  25. +3 −0 deps/v8/src/counters.h
  26. +33 −0 deps/v8/src/date.js
  27. +1 −1 deps/v8/src/debug.cc
  28. +1 −1 deps/v8/src/deoptimizer.cc
  29. +1 −1 deps/v8/src/deoptimizer.h
  30. +5 −0 deps/v8/src/flag-definitions.h
  31. +6 −3 deps/v8/src/full-codegen.cc
  32. +2 −2 deps/v8/src/heap-profiler.cc
  33. +84 −13 deps/v8/src/heap.cc
  34. +9 −7 deps/v8/src/heap.h
  35. +7 −0 deps/v8/src/hydrogen-instructions.cc
  36. +6 −0 deps/v8/src/hydrogen-instructions.h
  37. +13 −7 deps/v8/src/hydrogen.cc
  38. +5 −5 deps/v8/src/hydrogen.h
  39. +119 −185 deps/v8/src/ia32/code-stubs-ia32.cc
  40. +10 −21 deps/v8/src/ia32/code-stubs-ia32.h
  41. +6 −3 deps/v8/src/ia32/codegen-ia32.cc
  42. +6 −3 deps/v8/src/ia32/full-codegen-ia32.cc
  43. +26 −2 deps/v8/src/ia32/lithium-codegen-ia32.cc
  44. +2 −0 deps/v8/src/ia32/lithium-codegen-ia32.h
  45. +1 −1 deps/v8/src/ia32/lithium-ia32.cc
  46. +482 −340 deps/v8/src/objects-debug.cc
  47. +66 −65 deps/v8/src/objects.cc
  48. +286 −57 deps/v8/src/objects.h
  49. +3 −3 deps/v8/src/parser.cc
  50. +13 −0 deps/v8/src/platform-nullos.cc
  51. +28 −1 deps/v8/src/platform-posix.cc
  52. +15 −1 deps/v8/src/platform-win32.cc
  53. +4 −0 deps/v8/src/platform.h
  54. +3 −5 deps/v8/src/profile-generator.cc
  55. +31 −31 deps/v8/src/property.cc
  56. +4 −4 deps/v8/src/property.h
  57. +15 −12 deps/v8/src/regexp.js
  58. +1 −1 deps/v8/src/runtime.cc
  59. +25 −28 deps/v8/src/spaces.cc
  60. +7 −8 deps/v8/src/spaces.h
  61. +3 −3 deps/v8/src/string-stream.cc
  62. +2 −1 deps/v8/src/string-stream.h
  63. +29 −38 deps/v8/src/string.js
  64. +10 −2 deps/v8/src/utils.cc
  65. +2 −0 deps/v8/src/v8-counters.h
  66. +9 −1 deps/v8/src/v8utils.h
  67. +2 −2 deps/v8/src/version.cc
  68. +2 −2 deps/v8/src/x64/codegen-x64.cc
  69. +63 −1 deps/v8/test/cctest/test-heap.cc
  70. +13 −0 deps/v8/test/mjsunit/array-slice.js
  71. +16 −1 deps/v8/test/mjsunit/array-sort.js
  72. +43 −0 deps/v8/test/mjsunit/with-readonly.js
  73. +2 −1 deps/v8/tools/gyp/v8.gyp
  74. +3 −0 deps/v8/tools/v8.xcodeproj/project.pbxproj
  75. +1 −1 deps/v8/tools/visual_studio/debug.vsprops
  76. +2 −2 doc/api/addons.markdown
  77. +1 −1 doc/api/appendix_1.markdown
  78. +2 −2 doc/api/assert.markdown
  79. +96 −1 doc/api/os.markdown
  80. +9 −8 doc/api/process.markdown
  81. +2 −2 doc/api/repl.markdown
  82. +10 −47 doc/api/streams.markdown
  83. +4 −4 doc/index.html
  84. +6 −5 lib/assert.js
  85. +11 −5 lib/console.js
  86. +2 −0 lib/events.js
  87. +8 −1 lib/os.js
  88. +31 −3 lib/readline.js
  89. +55 −28 lib/repl.js
  90. +2 −41 lib/stream.js
  91. +25 −8 src/node.cc
  92. +20 −11 src/node.js
  93. +3 −3 src/node_crypto.cc
  94. +67 −44 src/node_net.cc
  95. +94 −2 src/node_os.cc
  96. +194 −89 src/node_script.cc
  97. +0 −48 src/node_script.h
  98. +8 −1 src/platform.h
  99. +118 −6 src/platform_cygwin.cc
  100. +125 −6 src/platform_darwin.cc
  101. +1 −1 src/platform_darwin_proctitle.cc
  102. +134 −5 src/platform_freebsd.cc
  103. +121 −7 src/platform_linux.cc
  104. +201 −0 src/platform_openbsd.cc
  105. +36 −5 src/platform_sunos.cc
  106. +16 −2 test/simple/test-assert.js
  107. +3 −1 test/simple/test-buffer.js
  108. +0 −5 test/simple/test-os-hostname.js
  109. +12 −0 test/simple/test-os.js
  110. +3 −1 test/simple/test-repl.js
  111. +6 −0 test/simple/test-tls-client-verify.js
  112. +5 −0 test/simple/test-tls-junk-closes-server.js
  113. +10 −0 test/simple/test-tls-securepair-client.js
  114. +6 −0 test/simple/test-tls-securepair-server.js
  115. +5 −0 test/simple/test-tls-server-verify.js
  116. +5 −2 wscript
View
@@ -25,9 +25,15 @@ uninstall:
test: all
python tools/test.py --mode=release simple message
+test-valgrind: all
+ python tools/test.py --mode=release --valgrind simple message
+
test-all: all
python tools/test.py --mode=debug,release
+test-all-valgrind: all
+ python tools/test.py --mode=debug,release --valgrind
+
test-release: all
python tools/test.py --mode=release
View
@@ -2,12 +2,13 @@ BUILD?=build
VERBOSE?=0
PARALLEL_JOBS?=1
CMAKE?=cmake
+TOOLCHAIN_FILE=#./cmake/codesourcery-arm-toolchain.cmake
-all: doc package
+all: package
$(BUILD)/Makefile:
mkdir $(BUILD) || exit 0
- cd $(BUILD) && $(CMAKE) -DCMAKE_VERBOSE_MAKEFILE=$(VERBOSE) ..
+ cd $(BUILD) && $(CMAKE) -DCMAKE_VERBOSE_MAKEFILE=$(VERBOSE) -DCMAKE_TOOLCHAIN_FILE=$(TOOLCHAIN_FILE) ..
build: $(BUILD)/Makefile
cd $(BUILD) && make -j $(PARALLEL_JOBS)
View
@@ -38,6 +38,18 @@ To submit valgrind test results:
make -f Makefile.cmake cdash-mem
+Cross-compiling:
+ An example toolchain file for the CodeSourcery ARM toolchain is included in
+ the cmake directory: codesourcery-arm-toolchain.cmake.
+
+ Install the CodeSourcery toolchain, set the path to the toolchain in
+ cmake/codesourcery-arm-toolchain.cmake, and uncomment the TOOLCHAIN_FILE
+ variable in Makefile.cmake to use it.
+
+ If you are using cmake directly, just add the flag
+ "-DCMAKE_TOOLCHAIN_FILE=/path/to/toolchain-file" when
+ running cmake.
+
Using cmake directly:
cd ~/your-node-source-dir
mkdir name-of-build-dir (can be anything)
@@ -0,0 +1,22 @@
+set(toolchain_dir #SET THIS TO YOUR TOOLCHAIN PATH)
+set(toolchain_bin_dir ${toolchain_dir}/bin)
+set(toolchain_libc_dir ${toolchain_dir}/arm-none-linux-gnueabi/libc)
+set(toolchain_inc_dir ${toolchain_libc_dir}/include)
+set(toolchain_lib_dir ${toolchain_libc_dir}/usr/lib)
+
+set(CMAKE_SYSTEM_NAME Linux CACHE INTERNAL "system name")
+set(CMAKE_SYSTEM_PROCESSOR arm CACHE INTERNAL "processor")
+set(CMAKE_C_COMPILER ${toolchain_bin_dir}/arm-none-linux-gnueabi-gcc)
+set(CMAKE_CXX_COMPILER ${toolchain_bin_dir}/arm-none-linux-gnueabi-g++)
+set(CMAKE_C_FLAGS "-isystem ${toolchain_inc_dir}" CACHE INTERNAL "c compiler flags")
+set(CMAKE_CXX_FLAGS "-isystem ${toolchain_inc_dir}" CACHE INTERNAL "cxx compiler flags")
+
+set(link_flags -L${toolchain_lib_dir})
+
+set(CMAKE_EXE_LINKER_FLAGS ${link_flags} CACHE INTERNAL "exe link flags")
+set(CMAKE_MODULE_LINKER_FLAGS ${link_flags} CACHE INTERNAL "module link flags")
+set(CMAKE_SHARED_LINKER_FLAGS ${link_flags} CACHE INTERNAL "shared lnk flags")
+set(CMAKE_FIND_ROOT_PATH ${toolchain_libc_dir} CACHE INTERNAL "cross root directory")
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH CACHE INTERNAL "")
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY CACHE INTERNAL "")
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY CACHE INTERNAL "")
View
@@ -80,13 +80,3 @@ file(GLOB js2c_files ${PROJECT_SOURCE_DIR}/lib/*.js)
set(js2c_files ${PROJECT_SOURCE_DIR}/src/node.js ${js2c_files})
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/src)
-set(PREFIX ${CMAKE_INSTALL_PREFIX})
-if(${CMAKE_BUILD_TYPE} MATCHES Debug)
- set(CCFLAGS "${CMAKE_C_FLAGS_DEBUG} ${CMAKE_C_FLAGS}")
-else()
- set(CCFLAGS "${CMAKE_C_FLAGS_RELEASE} ${CMAKE_C_FLAGS}")
-endif()
-get_directory_property(compile_defs COMPILE_DEFINITIONS)
-foreach(def ${compile_defs})
- set(CPPFLAGS "${CPPFLAGS} -D${def}")
-endforeach()
View
@@ -13,6 +13,7 @@ find_library(RT rt)
find_library(DL dl)
check_library_exists(socket socket "" HAVE_SOCKET_LIB)
check_library_exists(nsl gethostbyname "" HAVE_NSL_LIB)
+check_library_exists(util openpty "" HAVE_UTIL_LIB)
if(RT)
set(extra_libs ${extra_libs} ${RT})
@@ -35,7 +36,11 @@ if(${HAVE_NSL_LIB})
set(extra_libs ${extra_libs} nsl)
endif()
-if(${OPENSSL_FOUND} MATCHES True)
+if(HAVE_UTIL_LIB)
+ set(extra_libs ${extra_libs} util)
+endif()
+
+if(OPENSSL_FOUND)
add_definitions(-DHAVE_OPENSSL=1)
set(HAVE_OPENSSL True)
set(node_extra_src ${node_extra_src} src/node_crypto.cc)
View
@@ -7,10 +7,12 @@ add_custom_command(
COMMAND ${PYTHON_EXECUTABLE} tools/js2c.py ${PROJECT_BINARY_DIR}/src/node_natives.h ${js2c_files}
DEPENDS ${js2c_files})
-set(node_extra_src "src/platform_${node_platform}.cc")
+set(node_platform_src "src/platform_${node_platform}.cc")
-if(NOT EXISTS ${CMAKE_SOURCE_DIR}/${node_extra_src})
- set(node_extra_src "src/platform_none.cc")
+if(NOT EXISTS ${CMAKE_SOURCE_DIR}/${node_platform_src})
+ set(node_extra_src ${node_extra_src} "src/platform_none.cc")
+else()
+ set(node_extra_src ${node_extra_src} ${node_platform_src})
endif()
set(node_sources
@@ -36,6 +38,18 @@ set(node_sources
src/node_natives.h
${node_extra_src})
+# Set up PREFIX, CCFLAGS, and CPPFLAGS for node_config.h
+set(PREFIX ${CMAKE_INSTALL_PREFIX})
+if(${CMAKE_BUILD_TYPE} MATCHES Debug)
+ set(CCFLAGS "${CMAKE_C_FLAGS_DEBUG} ${CMAKE_C_FLAGS}")
+else()
+ set(CCFLAGS "${CMAKE_C_FLAGS_RELEASE} ${CMAKE_C_FLAGS}")
+endif()
+get_directory_property(compile_defs COMPILE_DEFINITIONS)
+foreach(def ${compile_defs})
+ set(CPPFLAGS "${CPPFLAGS} -D${def}")
+endforeach()
+
configure_file(src/node_config.h.in ${PROJECT_BINARY_DIR}/src/node_config.h)
configure_file(config.h.cmake ${PROJECT_BINARY_DIR}/config.h)
View
@@ -38,6 +38,7 @@ if(NOT SHARED_V8)
set_property(TARGET v8
PROPERTY IMPORTED_LOCATION ${PROJECT_BINARY_DIR}/deps/v8/${v8_fn})
+ set(compile_env_vars "CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} AR=${CMAKE_AR} RANLIB=${CMAKE_RANLIB} CFLAGS=\"${CMAKE_C_FLAGS}\" CXXFLAGS=\"${CMAKE_CXX_FLAGS}\" LDFLAGS=\"${CMAKE_EXE_LINKER_FLAGS}\"")
if(CMAKE_VERSION VERSION_GREATER 2.8 OR CMAKE_VERSION VERSION_EQUAL 2.8)
# use ExternalProject for CMake >2.8
@@ -47,7 +48,7 @@ if(NOT SHARED_V8)
URL ${PROJECT_SOURCE_DIR}/deps/v8
BUILD_IN_SOURCE True
- BUILD_COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_BINARY_DIR}/tools/scons/scons.py library=static visibility=default ${v8snapshot} mode=${v8mode} verbose=on arch=${v8arch} -j ${parallel_jobs}
+ BUILD_COMMAND sh -c "${compile_env_vars} ${PYTHON_EXECUTABLE} ${PROJECT_BINARY_DIR}/tools/scons/scons.py library=static visibility=default ${v8snapshot} mode=${v8mode} verbose=on arch=${v8arch} -j ${parallel_jobs}"
SOURCE_DIR ${PROJECT_BINARY_DIR}/deps/v8
# ignore this stuff, it's not needed for building v8 but ExternalProject
@@ -78,7 +79,7 @@ if(NOT SHARED_V8)
add_custom_command(
OUTPUT ${PROJECT_BINARY_DIR}/deps/v8/${v8_fn}
- COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_BINARY_DIR}/tools/scons/scons.py library=static visibility=default ${v8snapshot} mode=${v8mode} verbose=on arch=${v8arch} -j ${parallel_jobs}
+ COMMAND sh -c "${compile_env_vars} ${PYTHON_EXECUTABLE} ${PROJECT_BINARY_DIR}/tools/scons/scons.py library=static visibility=default ${v8snapshot} mode=${v8mode} verbose=on arch=${v8arch} -j ${parallel_jobs}"
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/deps/v8/
DEPENDS ${v8_sources_dest}
)
View
@@ -1,3 +1,14 @@
+2010-12-21: Version 3.0.4
+
+ Added Date::ResetCache() to the API so that the cached values in the
+ Date object can be reset to allow live DST / timezone changes.
+
+ Extended existing support for printing (while debugging) the contents
+ of objects. Added support for printing objects from release builds.
+
+ Fixed V8 issues 989, 1006, and 1007.
+
+
2010-12-17: Version 3.0.3
Reapplied all changes for version 3.0.1.
View
@@ -108,11 +108,14 @@ LIBRARY_FLAGS = {
'CPPDEFINES': ['V8_INTERPRETED_REGEXP']
},
'mode:debug': {
- 'CPPDEFINES': ['V8_ENABLE_CHECKS']
+ 'CPPDEFINES': ['V8_ENABLE_CHECKS', 'OBJECT_PRINT']
},
'vmstate:on': {
'CPPDEFINES': ['ENABLE_VMSTATE_TRACKING'],
},
+ 'objectprint:on': {
+ 'CPPDEFINES': ['OBJECT_PRINT'],
+ },
'protectheap:on': {
'CPPDEFINES': ['ENABLE_VMSTATE_TRACKING', 'ENABLE_HEAP_PROTECTION'],
},
@@ -225,8 +228,7 @@ LIBRARY_FLAGS = {
'LINKFLAGS': ['-m64'],
},
'prof:oprofile': {
- 'CPPDEFINES': ['ENABLE_OPROFILE_AGENT'],
- 'LIBS': ['opagent', 'bfd']
+ 'CPPDEFINES': ['ENABLE_OPROFILE_AGENT']
}
},
'msvc': {
@@ -711,6 +713,11 @@ SIMPLE_OPTIONS = {
'default': 'off',
'help': 'enable VM state tracking'
},
+ 'objectprint': {
+ 'values': ['on', 'off'],
+ 'default': 'off',
+ 'help': 'enable object printing'
+ },
'protectheap': {
'values': ['on', 'off'],
'default': 'off',
View
@@ -1355,6 +1355,21 @@ class Date : public Value {
V8EXPORT double NumberValue() const;
static inline Date* Cast(v8::Value* obj);
+
+ /**
+ * Notification that the embedder has changed the time zone,
+ * daylight savings time, or other date / time configuration
+ * parameters. V8 keeps a cache of various values used for
+ * date / time computation. This notification will reset
+ * those cached values for the current context so that date /
+ * time configuration changes would be reflected in the Date
+ * object.
+ *
+ * This API should not be called more than needed as it will
+ * negatively impact the performance of date operations.
+ */
+ V8EXPORT static void DateTimeConfigurationChangeNotification();
+
private:
V8EXPORT static void CheckCast(v8::Value* obj);
};
View
@@ -231,7 +231,8 @@ SOURCES = {
'mode:release': [],
'mode:debug': [
'objects-debug.cc', 'prettyprinter.cc', 'regexp-macro-assembler-tracer.cc'
- ]
+ ],
+ 'objectprint:on': ['objects-debug.cc']
}
View
@@ -3802,6 +3802,35 @@ double v8::Date::NumberValue() const {
}
+void v8::Date::DateTimeConfigurationChangeNotification() {
+ ON_BAILOUT("v8::Date::DateTimeConfigurationChangeNotification()", return);
+ LOG_API("Date::DateTimeConfigurationChangeNotification");
+ ENTER_V8;
+
+ HandleScope scope;
+
+ // Get the function ResetDateCache (defined in date-delay.js).
+ i::Handle<i::String> func_name_str =
+ i::Factory::LookupAsciiSymbol("ResetDateCache");
+ i::MaybeObject* result = i::Top::builtins()->GetProperty(*func_name_str);
+ i::Object* object_func;
+ if (!result->ToObject(&object_func)) {
+ return;
+ }
+
+ if (object_func->IsJSFunction()) {
+ i::Handle<i::JSFunction> func =
+ i::Handle<i::JSFunction>(i::JSFunction::cast(object_func));
+
+ // Call ResetDateCache(0 but expect no exceptions:
+ bool caught_exception = false;
+ i::Handle<i::Object> result =
+ i::Execution::TryCall(func, i::Top::builtins(), 0, NULL,
+ &caught_exception);
+ }
+}
+
+
static i::Handle<i::String> RegExpFlagsToString(RegExp::Flags flags) {
char flags_buf[3];
int num_flags = 0;
Oops, something went wrong.

0 comments on commit 33118df

Please sign in to comment.