Permalink
Browse files

Upgrade V8 to 2.2.3.1

  • Loading branch information...
1 parent 760bba5 commit 41ef1717e096a9e1761efa0df97c395f59c51f16 @ry ry committed Apr 14, 2010
Showing with 9,197 additions and 4,789 deletions.
  1. +23 −0 deps/v8/ChangeLog
  2. +32 −5 deps/v8/SConstruct
  3. +176 −0 deps/v8/include/v8-profiler.h
  4. +16 −11 deps/v8/include/v8.h
  5. +32 −10 deps/v8/samples/lineprocessor.cc
  6. +8 −2 deps/v8/src/SConscript
  7. +157 −14 deps/v8/src/api.cc
  8. +3 −5 deps/v8/src/arm/codegen-arm-inl.h
  9. +1,101 −566 deps/v8/src/arm/codegen-arm.cc
  10. +88 −10 deps/v8/src/arm/codegen-arm.h
  11. +11 −10 deps/v8/src/arm/constants-arm.h
  12. +15 −0 deps/v8/src/arm/debug-arm.cc
  13. +42 −19 deps/v8/src/arm/disasm-arm.cc
  14. +2 −2 deps/v8/src/arm/full-codegen-arm.cc
  15. +23 −0 deps/v8/src/arm/ic-arm.cc
  16. +59 −0 deps/v8/src/arm/macro-assembler-arm.cc
  17. +25 −0 deps/v8/src/arm/macro-assembler-arm.h
  18. +8 −43 deps/v8/src/arm/regexp-macro-assembler-arm.cc
  19. +0 −16 deps/v8/src/arm/regexp-macro-assembler-arm.h
  20. +0 −3 deps/v8/src/arm/register-allocator-arm-inl.h
  21. +2 −1 deps/v8/src/arm/register-allocator-arm.h
  22. +99 −44 deps/v8/src/arm/simulator-arm.cc
  23. +284 −66 deps/v8/src/arm/virtual-frame-arm.cc
  24. +176 −175 deps/v8/src/arm/virtual-frame-arm.h
  25. +70 −38 deps/v8/src/array.js
  26. +8 −2 deps/v8/src/assembler.cc
  27. +2 −1 deps/v8/src/assembler.h
  28. +13 −121 deps/v8/src/ast.cc
  29. +11 −61 deps/v8/src/ast.h
  30. +117 −1 deps/v8/src/bootstrapper.cc
  31. +123 −53 deps/v8/src/builtins.cc
  32. +3 −1 deps/v8/src/builtins.h
  33. +2 −1 deps/v8/src/circular-queue-inl.h
  34. +4 −2 deps/v8/src/circular-queue.cc
  35. +2 −0 deps/v8/src/circular-queue.h
  36. +1 −1 deps/v8/src/code-stubs.cc
  37. +1 −2 deps/v8/src/codegen.cc
  38. +9 −4 deps/v8/src/codegen.h
  39. +24 −56 deps/v8/src/compiler.cc
  40. +1 −4 deps/v8/src/compiler.h
  41. +2 −0 deps/v8/src/contexts.h
  42. +319 −213 deps/v8/src/conversions.cc
  43. +1 −2 deps/v8/src/conversions.h
  44. +51 −3 deps/v8/src/cpu-profiler-inl.h
  45. +295 −2 deps/v8/src/cpu-profiler.cc
  46. +122 −30 deps/v8/src/cpu-profiler.h
  47. +18 −0 deps/v8/src/d8-posix.cc
  48. +1 −0 deps/v8/src/d8.h
  49. +35 −35 deps/v8/src/d8.js
  50. +36 −828 deps/v8/src/data-flow.cc
  51. +0 −59 deps/v8/src/data-flow.h
  52. +19 −4 deps/v8/src/date.js
  53. +42 −16 deps/v8/src/debug-debugger.js
  54. +15 −2 deps/v8/src/debug.cc
  55. +11 −0 deps/v8/src/debug.h
  56. +8 −13 deps/v8/src/execution.cc
  57. +16 −4 deps/v8/src/execution.h
  58. +2 −0 deps/v8/src/flag-definitions.h
  59. +453 −278 deps/v8/src/flow-graph.cc
  60. +85 −284 deps/v8/src/flow-graph.h
  61. +53 −0 deps/v8/src/frames.cc
  62. +19 −1 deps/v8/src/frames.h
  63. +4 −3 deps/v8/src/globals.h
  64. +2 −2 deps/v8/src/handles.cc
  65. +18 −10 deps/v8/src/heap-inl.h
  66. +53 −47 deps/v8/src/heap.cc
  67. +41 −13 deps/v8/src/heap.h
  68. +2 −2 deps/v8/src/ia32/assembler-ia32.cc
  69. +452 −213 deps/v8/src/ia32/codegen-ia32.cc
  70. +12 −13 deps/v8/src/ia32/codegen-ia32.h
  71. +50 −0 deps/v8/src/ia32/debug-ia32.cc
  72. +1 −1 deps/v8/src/ia32/regexp-macro-assembler-ia32.cc
  73. +19 −0 deps/v8/src/ia32/virtual-frame-ia32.cc
  74. +4 −0 deps/v8/src/ia32/virtual-frame-ia32.h
  75. +5 −22 deps/v8/src/ic.cc
  76. +2 −15 deps/v8/src/jump-target-light.cc
  77. +157 −41 deps/v8/src/liveedit-debugger.js
  78. +345 −22 deps/v8/src/liveedit.cc
  79. +17 −4 deps/v8/src/liveedit.h
  80. +17 −80 deps/v8/src/log-inl.h
  81. +23 −25 deps/v8/src/log.cc
  82. +19 −37 deps/v8/src/log.h
  83. +304 −105 deps/v8/src/mark-compact.cc
  84. +14 −14 deps/v8/src/mark-compact.h
  85. +1 −1 deps/v8/src/math.js
  86. +26 −2 deps/v8/src/messages.js
  87. +1 −1 deps/v8/src/mips/codegen-mips.cc
  88. +1 −1 deps/v8/src/mips/codegen-mips.h
  89. +16 −0 deps/v8/src/mips/debug-mips.cc
  90. +19 −43 deps/v8/src/mirror-debugger.js
  91. +27 −0 deps/v8/src/objects.h
  92. +1 −1 deps/v8/src/platform-freebsd.cc
  93. +23 −18 deps/v8/src/platform-linux.cc
  94. +14 −13 deps/v8/src/platform-macos.cc
  95. +1 −1 deps/v8/src/platform-openbsd.cc
  96. +1 −1 deps/v8/src/platform-solaris.cc
  97. +17 −16 deps/v8/src/platform-win32.cc
  98. +4 −4 deps/v8/src/platform.h
  99. +48 −6 deps/v8/src/profile-generator-inl.h
  100. +194 −53 deps/v8/src/profile-generator.cc
  101. +83 −21 deps/v8/src/profile-generator.h
  102. +94 −67 deps/v8/src/regexp.js
  103. +5 −1 deps/v8/src/register-allocator.h
  104. +805 −134 deps/v8/src/runtime.cc
  105. +8 −3 deps/v8/src/runtime.h
  106. +3 −3 deps/v8/src/runtime.js
  107. +7 −2 deps/v8/src/serialize.cc
  108. +12 −0 deps/v8/src/spaces.h
  109. +130 −116 deps/v8/src/string.js
  110. +39 −37 deps/v8/src/stub-cache.cc
  111. +2 −0 deps/v8/src/type-info.cc
  112. +5 −0 deps/v8/src/type-info.h
  113. +6 −6 deps/v8/src/uri.js
  114. +22 −1 deps/v8/src/utils.h
  115. +27 −7 deps/v8/src/v8.cc
  116. +3 −1 deps/v8/src/v8.h
  117. +8 −5 deps/v8/src/v8natives.js
  118. +2 −2 deps/v8/src/version.cc
  119. +16 −0 deps/v8/src/virtual-frame-heavy-inl.h
  120. +14 −0 deps/v8/src/virtual-frame-heavy.cc
  121. +0 −21 deps/v8/src/virtual-frame-inl.h
  122. +8 −34 deps/v8/src/virtual-frame-light-inl.h
  123. +3 −6 deps/v8/src/virtual-frame-light.cc
  124. +0 −15 deps/v8/src/virtual-frame.cc
  125. +134 −0 deps/v8/src/vm-state-inl.h
  126. +39 −0 deps/v8/src/vm-state.cc
  127. +75 −0 deps/v8/src/vm-state.h
  128. +24 −2 deps/v8/src/x64/assembler-x64.cc
  129. +7 −2 deps/v8/src/x64/assembler-x64.h
  130. +1 −1 deps/v8/src/x64/builtins-x64.cc
  131. +449 −89 deps/v8/src/x64/codegen-x64.cc
  132. +8 −1 deps/v8/src/x64/codegen-x64.h
  133. +15 −0 deps/v8/src/x64/debug-x64.cc
  134. +30 −17 deps/v8/src/x64/disasm-x64.cc
  135. +26 −1 deps/v8/src/x64/ic-x64.cc
  136. +12 −3 deps/v8/src/x64/macro-assembler-x64.cc
  137. +4 −0 deps/v8/src/x64/macro-assembler-x64.h
  138. +1 −1 deps/v8/src/x64/regexp-macro-assembler-x64.cc
  139. +1 −1 deps/v8/src/x64/register-allocator-x64-inl.h
  140. +19 −0 deps/v8/src/x64/virtual-frame-x64.cc
  141. +4 −0 deps/v8/src/x64/virtual-frame-x64.h
  142. +69 −40 deps/v8/test/cctest/test-cpu-profiler.cc
  143. +10 −0 deps/v8/test/cctest/test-disasm-arm.cc
  144. +6 −5 deps/v8/test/cctest/test-heap.cc
  145. +4 −4 deps/v8/test/cctest/test-log-stack-tracer.cc
  146. +1 −0 deps/v8/test/cctest/test-log.cc
  147. 0 deps/v8/test/cctest/test-parsing.cc
  148. +51 −26 deps/v8/test/cctest/test-profile-generator.cc
  149. +4 −29 deps/v8/test/cctest/test-strings.cc
  150. 0 deps/v8/test/mjsunit/array-reduce.js
  151. +94 −37 deps/v8/test/mjsunit/debug-liveedit-check-stack.js
  152. +47 −0 deps/v8/test/mjsunit/debug-liveedit-newsource.js
  153. +22 −1 deps/v8/test/mjsunit/debug-setbreakpoint.js
  154. +9 −0 deps/v8/test/mjsunit/fuzz-natives.js
  155. +2 −2 deps/v8/test/mjsunit/mirror-regexp.js
  156. +4 −0 deps/v8/test/mjsunit/mjsunit.status
  157. +2 −0 deps/v8/test/mjsunit/number-tostring.js
  158. +19 −1 deps/v8/test/mjsunit/parse-int-float.js
  159. +48 −0 deps/v8/test/mjsunit/regexp.js
  160. 0 deps/v8/test/mjsunit/regress/regress-485.js
  161. +26 −1 deps/v8/test/mjsunit/str-to-num.js
  162. +21 −0 deps/v8/test/mjsunit/string-index.js
  163. 0 deps/v8/test/mjsunit/string-match.js
  164. +12 −1 deps/v8/test/mjsunit/string-replace.js
  165. +27 −1 deps/v8/tools/gyp/v8.gyp
  166. 0 deps/v8/tools/linux-tick-processor
  167. 0 deps/v8/tools/oprofile/annotate
  168. 0 deps/v8/tools/oprofile/common
  169. 0 deps/v8/tools/oprofile/dump
  170. 0 deps/v8/tools/oprofile/report
  171. 0 deps/v8/tools/oprofile/reset
  172. 0 deps/v8/tools/oprofile/run
  173. 0 deps/v8/tools/oprofile/shutdown
  174. 0 deps/v8/tools/oprofile/start
  175. +180 −78 deps/v8/tools/v8.xcodeproj/project.pbxproj
  176. +1 −1 deps/v8/tools/visual_studio/common.vsprops
  177. +16 −0 deps/v8/tools/visual_studio/v8_base.vcproj
  178. +16 −0 deps/v8/tools/visual_studio/v8_base_arm.vcproj
  179. +16 −0 deps/v8/tools/visual_studio/v8_base_x64.vcproj
  180. 0 deps/v8/tools/windows-tick-processor.bat
  181. +3 −4 src/node.cc
  182. +5 −4 src/node_buffer.cc
View
@@ -1,3 +1,26 @@
+2010-04-14: Version 2.2.3
+
+ Added stack command and mem command to ARM simulator debugger.
+
+ Fixed scons snapshot and ARM build, and Windows X64 build issues.
+
+ Performance improvements on all platforms.
+
+
+2010-04-12: Version 2.2.2
+
+ Introduced new profiler API.
+
+ Fixed random number generator to produce full 32 random bits.
+
+
+2010-04-06: Version 2.2.1
+
+ Debugger improvements.
+
+ Fixed minor bugs.
+
+
2010-03-29: Version 2.2.0
Fixed a few minor bugs.
View
@@ -1,4 +1,4 @@
-# Copyright 2008 the V8 project authors. All rights reserved.
+# Copyright 2010 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:
@@ -52,9 +52,10 @@ else:
GCC_EXTRA_CCFLAGS = []
GCC_DTOA_EXTRA_CCFLAGS = []
-ANDROID_FLAGS = ['-march=armv5te',
- '-mtune=xscale',
- '-msoft-float',
+ANDROID_FLAGS = ['-march=armv7-a',
+ '-mtune=cortex-a8',
+ '-mfloat-abi=softfp',
+ '-mfpu=vfp',
'-fpic',
'-mthumb-interwork',
'-funwind-tables',
@@ -69,6 +70,8 @@ ANDROID_FLAGS = ['-march=armv5te',
'-fomit-frame-pointer',
'-fno-strict-aliasing',
'-finline-limit=64',
+ '-DCAN_USE_VFP_INSTRUCTIONS=1',
+ '-DCAN_USE_ARMV7_INSTRUCTIONS=1',
'-MD']
ANDROID_INCLUDES = [ANDROID_TOP + '/bionic/libc/arch-arm/include',
@@ -102,8 +105,17 @@ LIBRARY_FLAGS = {
'mode:debug': {
'CPPDEFINES': ['V8_ENABLE_CHECKS']
},
+ 'vmstate:on': {
+ 'CPPDEFINES': ['ENABLE_VMSTATE_TRACKING'],
+ },
+ 'protectheap:on': {
+ 'CPPDEFINES': ['ENABLE_VMSTATE_TRACKING', 'ENABLE_HEAP_PROTECTION'],
+ },
'profilingsupport:on': {
- 'CPPDEFINES': ['ENABLE_LOGGING_AND_PROFILING'],
+ 'CPPDEFINES': ['ENABLE_VMSTATE_TRACKING', 'ENABLE_LOGGING_AND_PROFILING'],
+ },
+ 'cppprofilesprocessor:on': {
+ 'CPPDEFINES': ['ENABLE_CPP_PROFILES_PROCESSOR'],
},
'debuggersupport:on': {
'CPPDEFINES': ['ENABLE_DEBUGGER_SUPPORT'],
@@ -668,11 +680,26 @@ SIMPLE_OPTIONS = {
'default': 'static',
'help': 'the type of library to produce'
},
+ 'vmstate': {
+ 'values': ['on', 'off'],
+ 'default': 'off',
+ 'help': 'enable VM state tracking'
+ },
+ 'protectheap': {
+ 'values': ['on', 'off'],
+ 'default': 'off',
+ 'help': 'enable heap protection'
+ },
'profilingsupport': {
'values': ['on', 'off'],
'default': 'on',
'help': 'enable profiling of JavaScript code'
},
+ 'cppprofilesprocessor': {
+ 'values': ['on', 'off'],
+ 'default': 'on',
+ 'help': 'enable C++ profiles processor'
+ },
'debuggersupport': {
'values': ['on', 'off'],
'default': 'on',
@@ -0,0 +1,176 @@
+// Copyright 2010 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.
+
+#ifndef V8_V8_PROFILER_H_
+#define V8_V8_PROFILER_H_
+
+#include "v8.h"
+
+#ifdef _WIN32
+// Setup for Windows DLL export/import. See v8.h in this directory for
+// information on how to build/use V8 as a DLL.
+#if defined(BUILDING_V8_SHARED) && defined(USING_V8_SHARED)
+#error both BUILDING_V8_SHARED and USING_V8_SHARED are set - please check the\
+ build configuration to ensure that at most one of these is set
+#endif
+
+#ifdef BUILDING_V8_SHARED
+#define V8EXPORT __declspec(dllexport)
+#elif USING_V8_SHARED
+#define V8EXPORT __declspec(dllimport)
+#else
+#define V8EXPORT
+#endif
+
+#else // _WIN32
+
+// Setup for Linux shared library export. See v8.h in this directory for
+// information on how to build/use V8 as shared library.
+#if defined(__GNUC__) && (__GNUC__ >= 4) && defined(V8_SHARED)
+#define V8EXPORT __attribute__ ((visibility("default")))
+#else // defined(__GNUC__) && (__GNUC__ >= 4)
+#define V8EXPORT
+#endif // defined(__GNUC__) && (__GNUC__ >= 4)
+
+#endif // _WIN32
+
+
+/**
+ * Profiler support for the V8 JavaScript engine.
+ */
+namespace v8 {
+
+
+/**
+ * CpuProfileNode represents a node in a call graph.
+ */
+class V8EXPORT CpuProfileNode {
+ public:
+ /** Returns function name (empty string for anonymous functions.) */
+ Handle<String> GetFunctionName() const;
+
+ /** Returns resource name for script from where the function originates. */
+ Handle<String> GetScriptResourceName() const;
+
+ /**
+ * Returns the number, 1-based, of the line where the function originates.
+ * kNoLineNumberInfo if no line number information is available.
+ */
+ int GetLineNumber() const;
+
+ /**
+ * Returns total (self + children) execution time of the function,
+ * in milliseconds, estimated by samples count.
+ */
+ double GetTotalTime() const;
+
+ /**
+ * Returns self execution time of the function, in milliseconds,
+ * estimated by samples count.
+ */
+ double GetSelfTime() const;
+
+ /** Returns the count of samples where function exists. */
+ double GetTotalSamplesCount() const;
+
+ /** Returns the count of samples where function was currently executing. */
+ double GetSelfSamplesCount() const;
+
+ /** Returns function entry UID. */
+ unsigned GetCallUid() const;
+
+ /** Returns child nodes count of the node. */
+ int GetChildrenCount() const;
+
+ /** Retrieves a child node by index. */
+ const CpuProfileNode* GetChild(int index) const;
+
+ static const int kNoLineNumberInfo = 0;
+};
+
+
+/**
+ * CpuProfile contains a CPU profile in a form of two call trees:
+ * - top-down (from main() down to functions that do all the work);
+ * - bottom-up call graph (in backward direction).
+ */
+class V8EXPORT CpuProfile {
+ public:
+ /** Returns CPU profile UID (assigned by the profiler.) */
+ unsigned GetUid() const;
+
+ /** Returns CPU profile title. */
+ Handle<String> GetTitle() const;
+
+ /** Returns the root node of the bottom up call tree. */
+ const CpuProfileNode* GetBottomUpRoot() const;
+
+ /** Returns the root node of the top down call tree. */
+ const CpuProfileNode* GetTopDownRoot() const;
+};
+
+
+/**
+ * Interface for controlling CPU profiling.
+ */
+class V8EXPORT CpuProfiler {
+ public:
+ /**
+ * Returns the number of profiles collected (doesn't include
+ * profiles that are being collected at the moment of call.)
+ */
+ static int GetProfilesCount();
+
+ /** Returns a profile by index. */
+ static const CpuProfile* GetProfile(int index);
+
+ /** Returns a profile by uid. */
+ static const CpuProfile* FindProfile(unsigned uid);
+
+ /**
+ * Starts collecting CPU profile. Title may be an empty string. It
+ * is allowed to have several profiles being collected at
+ * once. Attempts to start collecting several profiles with the same
+ * title are silently ignored.
+ */
+ static void StartProfiling(Handle<String> title);
+
+ /**
+ * Stops collecting CPU profile with a given title and returns it.
+ * If the title given is empty, finishes the last profile started.
+ */
+ static const CpuProfile* StopProfiling(Handle<String> title);
+};
+
+
+} // namespace v8
+
+
+#undef V8EXPORT
+
+
+#endif // V8_V8_PROFILER_H_
View
@@ -855,22 +855,27 @@ class V8EXPORT String : public Primitive {
* \param start The starting position within the string at which
* copying begins.
* \param length The number of bytes to copy from the string.
- * \param nchars The number of characters written.
+ * \param nchars_ref The number of characters written, can be NULL.
* \return The number of bytes copied to the buffer
* excluding the NULL terminator.
*/
- int Write(uint16_t* buffer, int start = 0, int length = -1) const; // UTF-16
- int WriteAscii(char* buffer, int start = 0, int length = -1) const; // ASCII
+ enum WriteHints {
+ NO_HINTS = 0,
+ HINT_MANY_WRITES_EXPECTED = 1
+ };
+
+ int Write(uint16_t* buffer,
+ int start = 0,
+ int length = -1,
+ WriteHints hints = NO_HINTS) const; // UTF-16
+ int WriteAscii(char* buffer,
+ int start = 0,
+ int length = -1,
+ WriteHints hints = NO_HINTS) const; // ASCII
int WriteUtf8(char* buffer,
int length = -1,
- int* nchars = NULL) const; // UTF-8
-
- /**
- * Flatten internal memory. Operations on the string tend to run faster
- * after flattening especially if the string is a concatenation of many
- * others.
- */
- void Flatten();
+ int* nchars_ref = NULL,
+ WriteHints hints = NO_HINTS) const; // UTF-8
/**
* A zero length string.
Oops, something went wrong.

0 comments on commit 41ef171

Please sign in to comment.