Permalink
Browse files

Merge commit 'v0.1.99'

  • Loading branch information...
Herbert Vojčík
Herbert Vojčík committed Jun 25, 2010
2 parents 2ebd649 + a620b72 commit 5ce9bd4d98b3a111d881c572c15c1a76824599c7
Showing with 6,615 additions and 2,161 deletions.
  1. +5 −0 AUTHORS
  2. +19 −2 ChangeLog
  3. +4 −1 Makefile
  4. +23 −2 deps/v8/ChangeLog
  5. +5 −0 deps/v8/SConstruct
  6. +139 −0 deps/v8/include/v8-profiler.h
  7. +13 −49 deps/v8/include/v8.h
  8. +288 −15 deps/v8/src/api.cc
  9. +53 −5 deps/v8/src/arm/assembler-arm.cc
  10. +24 −0 deps/v8/src/arm/assembler-arm.h
  11. +10 −10 deps/v8/src/arm/builtins-arm.cc
  12. +260 −124 deps/v8/src/arm/codegen-arm.cc
  13. +21 −0 deps/v8/src/arm/codegen-arm.h
  14. +37 −20 deps/v8/src/arm/full-codegen-arm.cc
  15. +331 −117 deps/v8/src/arm/ic-arm.cc
  16. +69 −0 deps/v8/src/arm/macro-assembler-arm.cc
  17. +19 −3 deps/v8/src/arm/macro-assembler-arm.h
  18. +20 −0 deps/v8/src/arm/stub-cache-arm.cc
  19. +1 −0 deps/v8/src/arm/virtual-frame-arm.cc
  20. +2 −3 deps/v8/src/arm/virtual-frame-arm.h
  21. +34 −0 deps/v8/src/debug.cc
  22. +3 −0 deps/v8/src/debug.h
  23. +2 −0 deps/v8/src/flag-definitions.h
  24. +1 −1 deps/v8/src/full-codegen.cc
  25. +1 −1 deps/v8/src/full-codegen.h
  26. +3 −6 deps/v8/src/heap-inl.h
  27. +70 −1 deps/v8/src/heap-profiler.cc
  28. +24 −1 deps/v8/src/heap-profiler.h
  29. +4 −2 deps/v8/src/heap.cc
  30. +2 −2 deps/v8/src/heap.h
  31. +83 −86 deps/v8/src/ia32/codegen-ia32.cc
  32. +10 −0 deps/v8/src/ia32/codegen-ia32.h
  33. +3 −3 deps/v8/src/ia32/full-codegen-ia32.cc
  34. +287 −124 deps/v8/src/ia32/ic-ia32.cc
  35. +25 −16 deps/v8/src/ic.cc
  36. +1 −1 deps/v8/src/ic.h
  37. +1 −1 deps/v8/src/mips/full-codegen-mips.cc
  38. +46 −4 deps/v8/src/mirror-debugger.js
  39. +5 −12 deps/v8/src/objects.cc
  40. +10 −5 deps/v8/src/objects.h
  41. +11 −0 deps/v8/src/profile-generator-inl.h
  42. +800 −2 deps/v8/src/profile-generator.cc
  43. +309 −0 deps/v8/src/profile-generator.h
  44. +72 −10 deps/v8/src/runtime.cc
  45. +32 −20 deps/v8/src/serialize.cc
  46. +27 −0 deps/v8/src/spaces-inl.h
  47. +1 −0 deps/v8/src/spaces.h
  48. +16 −17 deps/v8/src/stub-cache.cc
  49. +35 −0 deps/v8/src/utils.h
  50. +8 −0 deps/v8/src/v8-counters.h
  51. +4 −0 deps/v8/src/v8.cc
  52. +1 −1 deps/v8/src/version.cc
  53. +3 −1 deps/v8/src/virtual-frame-light-inl.h
  54. +108 −69 deps/v8/src/x64/codegen-x64.cc
  55. +16 −0 deps/v8/src/x64/codegen-x64.h
  56. +47 −21 deps/v8/src/x64/full-codegen-x64.cc
  57. +366 −110 deps/v8/src/x64/ic-x64.cc
  58. +21 −0 deps/v8/src/x64/stub-cache-x64.cc
  59. +19 −0 deps/v8/src/x64/virtual-frame-x64.cc
  60. +2 −0 deps/v8/src/x64/virtual-frame-x64.h
  61. +60 −12 deps/v8/test/cctest/test-api.cc
  62. +0 −2 deps/v8/test/cctest/test-debug.cc
  63. +0 −2 deps/v8/test/cctest/test-decls.cc
  64. +39 −0 deps/v8/test/cctest/test-disasm-arm.cc
  65. +175 −0 deps/v8/test/cctest/test-heap-profiler.cc
  66. +2 −0 deps/v8/test/cctest/test-heap.cc
  67. +4 −4 deps/v8/test/cctest/test-serialize.cc
  68. +163 −0 deps/v8/test/mjsunit/debug-return-value.js
  69. +113 −0 deps/v8/test/mjsunit/keyed-call-generic.js
  70. +153 −0 deps/v8/test/mjsunit/object-define-property.js
  71. +2 −3 deps/v8/test/mjsunit/{bugs/bug-619.js → regress/regress-619.js}
  72. +23 −23 doc/api.markdown
  73. +1 −1 doc/api_header.html
  74. +4 −4 doc/index.html
  75. +3 −3 lib/crypto.js
  76. +214 −0 lib/dgram.js
  77. +13 −23 lib/fs.js
  78. +45 −28 lib/http.js
  79. +31 −28 lib/net.js
  80. +9 −0 lib/path.js
  81. +11 −23 lib/querystring.js
  82. +3 −0 lib/repl.js
  83. +24 −21 lib/{utf8decoder.js → string_decoder.js}
  84. +1 −1 lib/sys.js
  85. +0 −5 lib/uri.js
  86. +6 −206 src/node.cc
  87. +1 −0 src/node_constants.cc
  88. +453 −772 src/node_crypto.cc
  89. +83 −0 src/node_http_parser.cc
  90. +173 −0 src/node_net.cc
  91. +1 −1 src/node_script.cc
  92. +2 −0 src/node_stdio.cc
  93. +13 −0 src/platform.h
  94. +29 −0 src/platform_darwin.cc
  95. +45 −0 src/platform_freebsd.cc
  96. +92 −0 src/platform_linux.cc
  97. +16 −0 src/platform_none.cc
  98. +52 −0 src/platform_sunos.cc
  99. +48 −0 test/message/2100bytes.js
  100. +42 −0 test/message/2100bytes.out
  101. +3 −0 test/message/hello_world.js
  102. +1 −0 test/message/hello_world.out
  103. +135 −0 test/message/testcfg.py
  104. +11 −0 test/message/undefined_reference_in_new_context.js
  105. +14 −0 test/message/undefined_reference_in_new_context.out
  106. +1 −1 test/pummel/test-http-client-reconnect-bug.js
  107. +1 −2 test/pummel/test-keep-alive.js
  108. +1 −2 test/pummel/{test-tcp-many-clients.js → test-net-many-clients.js}
  109. 0 test/pummel/{test-tcp-pause.js → test-net-pause.js}
  110. 0 test/pummel/{test-tcp-pingpong-delay.js → test-net-pingpong-delay.js}
  111. 0 test/pummel/{test-tcp-pingpong.js → test-net-pingpong.js}
  112. 0 test/pummel/{test-tcp-throttle.js → test-net-throttle.js}
  113. +3 −2 test/pummel/{test-tcp-timeout.js → test-net-timeout.js}
  114. 0 test/pummel/{test-tcp-tls.js → test-net-tls.js}
  115. +2 −1 test/simple/test-child-process-custom-fds.js
  116. +25 −18 test/simple/test-crypto.js
  117. +88 −0 test/simple/test-dgram-pingpong.js
  118. +55 −0 test/simple/test-fs-write-file.js
  119. +2 −5 test/simple/test-http-304.js
  120. +1 −2 test/simple/test-http-cat.js
  121. +3 −3 test/simple/test-http-client-race-2.js
  122. +2 −2 test/simple/test-http-client-race.js
  123. +0 −1 test/simple/test-http-client-upload.js
  124. +14 −12 test/simple/test-http-exceptions.js
  125. +1 −2 test/simple/test-http-full-response.js
  126. +2 −3 test/simple/test-http-head-request.js
  127. +6 −7 test/simple/test-http-proxy.js
  128. +36 −0 test/simple/test-http-server-multiheaders.js
  129. +1 −3 test/simple/test-http-set-timeout.js
  130. +79 −0 test/simple/test-http-upgrade-client.js
  131. +14 −14 test/simple/{test-http-upgrade.js → test-http-upgrade-server.js}
  132. +1 −4 test/simple/{test-http-upgrade2.js → test-http-upgrade-server2.js}
  133. +1 −2 test/simple/test-http-write-empty-string.js
  134. +1 −1 test/simple/test-http.js
  135. +34 −0 test/simple/test-listen-fd.js
  136. 0 test/simple/{test-tcp-binary.js → test-net-binary.js}
  137. 0 test/simple/{test-tcp-keepalive.js → test-net-keepalive.js}
  138. +2 −3 test/simple/test-net-pingpong.js
  139. +1 −3 test/simple/{test-tcp-reconnect.js → test-net-reconnect.js}
  140. 0 test/simple/{test-tcp-tls.js → test-net-tls.js}
  141. +2 −0 test/simple/test-path.js
  142. +3 −1 test/simple/test-querystring.js
  143. +1 −2 test/simple/test-repl.js
  144. +16 −0 test/simple/test-script-new.js
  145. +21 −29 test/simple/{test-utf8-decoder.js → test-string-decoder.js}
  146. +1 −1 tools/test.py
  147. +3 −0 tools/wafadmin/Tools/node_addon.py
  148. +22 −5 wscript
View
@@ -85,3 +85,8 @@ Aapo Laitinen <aapo.laitinen@iki.fi>
Sam Hughes <sam@samuelhughes.com>
Orlando Vazquez <ovazquez@gmail.com>
Raffaele Sena <raff367@gmail.com>
+Brian McKenna <brian@brianmckenna.org>
+Paul Querna <pquerna@apache.org>
+Ben Lowery <ben@blowery.org>
+Peter Dekkers <soderblom.peter@gmail.com>
+David Siegel <david@artcom.de>
View
@@ -1,4 +1,21 @@
-2010.06.11, Version 0.1.98
+2010.06.21, Version 0.1.99
+
+* Datagram sockets (Paul Querna)
+
+* fs.writeFile could not handle utf8 (Felix Geisendörfer)
+ and now accepts Buffers (Aaron Heckmann)
+
+* Fix crypto memory leaks.
+
+* A replacement for decodeURIComponent that doesn't throw.
+ (Isaac Schlueter)
+
+* Only concatenate some incoming HTTP headers. (Peter Griess)
+
+* Upgrade V8 to 2.2.18
+
+
+2010.06.11, Version 0.1.98, 10d8adb08933d1d4cea60192c2a31c56d896733d
* Port to Windows/Cygwin (Raffaele Sena)
@@ -8,7 +25,7 @@
executing "node" without arguments.
* Add a parameter to spawn() that sets the child's stdio file
- descriptors.
+ descriptors. (Orlando Vazquez)
* Upgrade V8 to 2.2.16, http-parser fixes, upgrade c-ares to 1.7.3.
View
@@ -13,7 +13,7 @@ uninstall:
@$(WAF) uninstall
test: all
- python tools/test.py --mode=release simple
+ python tools/test.py --mode=release simple message
test-all: all
python tools/test.py --mode=debug,release
@@ -24,6 +24,9 @@ test-release: all
test-debug: all
python tools/test.py --mode=debug
+test-message: all
+ python tools/test.py message
+
test-simple: all
python tools/test.py simple
View
@@ -1,6 +1,27 @@
-2010-06-07: Version 2.2.16
+2010-06-16: Version 2.2.18
- Remove the SetExternalStringDiposeCallback API. Changed the
+ Added API functions to retrieve information on indexed properties
+ managed by the embedding layer. Fixes bug 737.
+
+ Make ES5 Object.defineProperty support array elements. Fixes bug 619.
+
+ Add heap profiling to the API.
+
+ Remove old named property query from the API.
+
+ Incremental performance improvements.
+
+
+2010-06-14: Version 2.2.17
+
+ Improved debugger support for stepping out of functions.
+
+ Incremental performance improvements.
+
+
+2010-06-09: Version 2.2.16
+
+ Removed the SetExternalStringDiposeCallback API. Changed the
disposal of external string resources to call a virtual Dispose
method on the resource.
View
@@ -781,6 +781,7 @@ def GetOptions():
result = Options()
result.Add('mode', 'compilation mode (debug, release)', 'release')
result.Add('sample', 'build sample (shell, process, lineprocessor)', '')
+ result.Add('cache', 'directory to use for scons build cache', '')
result.Add('env', 'override environment settings (NAME0:value0,NAME1:value1,...)', '')
result.Add('importenv', 'import environment settings (NAME0,NAME1,...)', '')
for (name, option) in SIMPLE_OPTIONS.iteritems():
@@ -862,6 +863,8 @@ def VerifyOptions(env):
Abort("Shared Object soname not applicable for static library.")
if env['os'] != 'win32' and env['pgo'] != 'off':
Abort("Profile guided optimization only supported on Windows.")
+ if env['cache'] and not os.path.isdir(env['cache']):
+ Abort("The specified cache directory does not exist.")
if not (env['arch'] == 'arm' or env['simulator'] == 'arm') and ('unalignedaccesses' in ARGUMENTS):
print env['arch']
print env['simulator']
@@ -1130,6 +1133,8 @@ def Build():
else:
env.Default('library')
+ if env['cache']:
+ CacheDir(env['cache'])
# We disable deprecation warnings because we need to be able to use
# env.Copy without getting warnings for compatibility with older
@@ -184,6 +184,145 @@ class V8EXPORT CpuProfiler {
};
+class HeapGraphNode;
+
+
+/**
+ * HeapSnapshotEdge represents a directed connection between heap
+ * graph nodes: from retaners to retained nodes.
+ */
+class V8EXPORT HeapGraphEdge {
+ public:
+ enum Type {
+ CONTEXT_VARIABLE = 0, // A variable from a function context.
+ ELEMENT = 1, // An element of an array.
+ PROPERTY = 2 // A named object property.
+ };
+
+ /** Returns edge type (see HeapGraphEdge::Type). */
+ Type GetType() const;
+
+ /**
+ * Returns edge name. This can be a variable name, an element index, or
+ * a property name.
+ */
+ Handle<Value> GetName() const;
+
+ /** Returns origin node. */
+ const HeapGraphNode* GetFromNode() const;
+
+ /** Returns destination node. */
+ const HeapGraphNode* GetToNode() const;
+};
+
+
+class V8EXPORT HeapGraphPath {
+ public:
+ /** Returns the number of edges in the path. */
+ int GetEdgesCount() const;
+
+ /** Returns an edge from the path. */
+ const HeapGraphEdge* GetEdge(int index) const;
+
+ /** Returns origin node. */
+ const HeapGraphNode* GetFromNode() const;
+
+ /** Returns destination node. */
+ const HeapGraphNode* GetToNode() const;
+};
+
+
+/**
+ * HeapGraphNode represents a node in a heap graph.
+ */
+class V8EXPORT HeapGraphNode {
+ public:
+ enum Type {
+ INTERNAL = 0, // Internal node, a virtual one, for housekeeping.
+ ARRAY = 1, // An array of elements.
+ STRING = 2, // A string.
+ OBJECT = 3, // A JS object (except for arrays and strings).
+ CODE = 4, // Compiled code.
+ CLOSURE = 5 // Function closure.
+ };
+
+ /** Returns node type (see HeapGraphNode::Type). */
+ Type GetType() const;
+
+ /**
+ * Returns node name. Depending on node's type this can be the name
+ * of the constructor (for objects), the name of the function (for
+ * closures), string value, or an empty string (for compiled code).
+ */
+ Handle<String> GetName() const;
+
+ /** Returns node's own size, in bytes. */
+ int GetSelfSize() const;
+
+ /** Returns node's network (self + reachable nodes) size, in bytes. */
+ int GetTotalSize() const;
+
+ /**
+ * Returns node's private size, in bytes. That is, the size of memory
+ * that will be reclaimed having this node collected.
+ */
+ int GetPrivateSize() const;
+
+ /** Returns child nodes count of the node. */
+ int GetChildrenCount() const;
+
+ /** Retrieves a child by index. */
+ const HeapGraphEdge* GetChild(int index) const;
+
+ /** Returns retainer nodes count of the node. */
+ int GetRetainersCount() const;
+
+ /** Returns a retainer by index. */
+ const HeapGraphEdge* GetRetainer(int index) const;
+
+ /** Returns the number of simple retaining paths from the root to the node. */
+ int GetRetainingPathsCount() const;
+
+ /** Returns a retaining path by index. */
+ const HeapGraphPath* GetRetainingPath(int index) const;
+};
+
+
+/**
+ * HeapSnapshots record the state of the JS heap at some moment.
+ */
+class V8EXPORT HeapSnapshot {
+ public:
+ /** Returns heap snapshot UID (assigned by the profiler.) */
+ unsigned GetUid() const;
+
+ /** Returns heap snapshot title. */
+ Handle<String> GetTitle() const;
+
+ /** Returns the root node of the heap graph. */
+ const HeapGraphNode* GetHead() const;
+};
+
+
+/**
+ * Interface for controlling heap profiling.
+ */
+class V8EXPORT HeapProfiler {
+ public:
+ /** Returns the number of snapshots taken. */
+ static int GetSnapshotsCount();
+
+ /** Returns a snapshot by index. */
+ static const HeapSnapshot* GetSnapshot(int index);
+
+ /** Returns a profile by uid. */
+ static const HeapSnapshot* FindSnapshot(unsigned uid);
+
+ /** Takes a heap snapshot and returns it. Title may be an empty string. */
+ static const HeapSnapshot* TakeSnapshot(Handle<String> title);
+};
+
+
} // namespace v8
View
@@ -1570,6 +1570,9 @@ class V8EXPORT Object : public Value {
* the backing store is preserved while V8 has a reference.
*/
void SetIndexedPropertiesToPixelData(uint8_t* data, int length);
+ bool HasIndexedPropertiesInPixelData();
+ uint8_t* GetIndexedPropertiesPixelData();
+ int GetIndexedPropertiesPixelDataLength();
/**
* Set the backing store of the indexed properties to be managed by the
@@ -1581,6 +1584,10 @@ class V8EXPORT Object : public Value {
void SetIndexedPropertiesToExternalArrayData(void* data,
ExternalArrayType array_type,
int number_of_elements);
+ bool HasIndexedPropertiesInExternalArrayData();
+ void* GetIndexedPropertiesExternalArrayData();
+ ExternalArrayType GetIndexedPropertiesExternalArrayDataType();
+ int GetIndexedPropertiesExternalArrayDataLength();
static Local<Object> New();
static inline Object* Cast(Value* obj);
@@ -1761,20 +1768,11 @@ typedef Handle<Value> (*NamedPropertySetter)(Local<String> property,
/**
* Returns a non-empty handle if the interceptor intercepts the request.
- * The result is either boolean (true if property exists and false
- * otherwise) or an integer encoding property attributes.
+ * The result is an integer encoding property attributes (like v8::None,
+ * v8::DontEnum, etc.)
*/
-#ifdef USE_NEW_QUERY_CALLBACKS
typedef Handle<Integer> (*NamedPropertyQuery)(Local<String> property,
const AccessorInfo& info);
-#else
-typedef Handle<Boolean> (*NamedPropertyQuery)(Local<String> property,
- const AccessorInfo& info);
-#endif
-
-typedef Handle<Value> (*NamedPropertyQueryImpl)(Local<String> property,
- const AccessorInfo& info);
-
/**
@@ -2026,16 +2024,7 @@ class V8EXPORT FunctionTemplate : public Template {
NamedPropertyQuery query,
NamedPropertyDeleter remover,
NamedPropertyEnumerator enumerator,
- Handle<Value> data) {
- NamedPropertyQueryImpl casted =
- reinterpret_cast<NamedPropertyQueryImpl>(query);
- SetNamedInstancePropertyHandlerImpl(getter,
- setter,
- casted,
- remover,
- enumerator,
- data);
- }
+ Handle<Value> data);
void SetIndexedInstancePropertyHandler(IndexedPropertyGetter getter,
IndexedPropertySetter setter,
IndexedPropertyQuery query,
@@ -2047,13 +2036,6 @@ class V8EXPORT FunctionTemplate : public Template {
friend class Context;
friend class ObjectTemplate;
- private:
- void SetNamedInstancePropertyHandlerImpl(NamedPropertyGetter getter,
- NamedPropertySetter setter,
- NamedPropertyQueryImpl query,
- NamedPropertyDeleter remover,
- NamedPropertyEnumerator enumerator,
- Handle<Value> data);
};
@@ -2111,7 +2093,8 @@ class V8EXPORT ObjectTemplate : public Template {
*
* \param getter The callback to invoke when getting a property.
* \param setter The callback to invoke when setting a property.
- * \param query The callback to invoke to check if an object has a property.
+ * \param query The callback to invoke to check if a property is present,
+ * and if present, get its attributes.
* \param deleter The callback to invoke when deleting a property.
* \param enumerator The callback to invoke to enumerate all the named
* properties of an object.
@@ -2123,26 +2106,7 @@ class V8EXPORT ObjectTemplate : public Template {
NamedPropertyQuery query = 0,
NamedPropertyDeleter deleter = 0,
NamedPropertyEnumerator enumerator = 0,
- Handle<Value> data = Handle<Value>()) {
- NamedPropertyQueryImpl casted =
- reinterpret_cast<NamedPropertyQueryImpl>(query);
- SetNamedPropertyHandlerImpl(getter,
- setter,
- casted,
- deleter,
- enumerator,
- data);
- }
-
- private:
- void SetNamedPropertyHandlerImpl(NamedPropertyGetter getter,
- NamedPropertySetter setter,
- NamedPropertyQueryImpl query,
- NamedPropertyDeleter deleter,
- NamedPropertyEnumerator enumerator,
- Handle<Value> data);
-
- public:
+ Handle<Value> data = Handle<Value>());
/**
* Sets an indexed property handler on the object template.
Oops, something went wrong.

0 comments on commit 5ce9bd4

Please sign in to comment.