Skip to content

Commit

Permalink
Upgrade V8 to 2.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Sep 17, 2010
1 parent d2de8ba commit 431e430
Show file tree
Hide file tree
Showing 66 changed files with 4,721 additions and 1,328 deletions.
5 changes: 3 additions & 2 deletions deps/v8/AUTHORS
Expand Up @@ -9,6 +9,8 @@ ARM Ltd.

Alexander Botero-Lowry <alexbl@FreeBSD.org>
Alexandre Vassalotti <avassalotti@gmail.com>
Andreas Anyuru <andreas.anyuru@gmail.com>
Burcu Dogan <burcujdogan@gmail.com>
Craig Schlenter <craig.schlenter@gmail.com>
Daniel Andersson <kodandersson@gmail.com>
Daniel James <dnljms@gmail.com>
Expand All @@ -21,13 +23,12 @@ John Jozwiak <jjozwiak@codeaurora.org>
Kun Zhang <zhangk@codeaurora.org>
Matt Hanselman <mjhanselman@gmail.com>
Martyn Capewell <martyn.capewell@arm.com>
Michael Smith <mike@w3.org>
Paolo Giarrusso <p.giarrusso@gmail.com>
Patrick Gansterer <paroga@paroga.com>
Rafal Krypa <rafal@krypa.net>
Rene Rebe <rene@exactcode.de>
Rodolph Perfetta <rodolph.perfetta@arm.com>
Ryan Dahl <coldredlemur@gmail.com>
Subrato K De <subratokde@codeaurora.org>
Burcu Dogan <burcujdogan@gmail.com>
Vlad Burlik <vladbph@gmail.com>

18 changes: 18 additions & 0 deletions deps/v8/ChangeLog
@@ -1,3 +1,21 @@
2010-09-15: Version 2.4.4

Fix bug with hangs on very large sparse arrays.

Try harder to free up memory when running out of space.

Add heap snapshots to JSON format to API.

Recalibrate benchmarks.


2010-09-13: Version 2.4.3

Made Date.parse properly handle TZ offsets (issue 857).

Performance improvements on all platforms.


2010-09-08: Version 2.4.2

Fixed GC crash bug.
Expand Down
2 changes: 1 addition & 1 deletion deps/v8/benchmarks/crypto.js
Expand Up @@ -31,7 +31,7 @@


// The code has been adapted for use as a benchmark by Google.
var Crypto = new BenchmarkSuite('Crypto', 110465, [
var Crypto = new BenchmarkSuite('Crypto', 266181, [
new Benchmark("Encrypt", encrypt),
new Benchmark("Decrypt", decrypt)
]);
Expand Down
2 changes: 1 addition & 1 deletion deps/v8/benchmarks/deltablue.js
Expand Up @@ -23,7 +23,7 @@
// more like a JavaScript program.


var DeltaBlue = new BenchmarkSuite('DeltaBlue', 30282, [
var DeltaBlue = new BenchmarkSuite('DeltaBlue', 66118, [
new Benchmark('DeltaBlue', deltaBlue)
]);

Expand Down
2 changes: 1 addition & 1 deletion deps/v8/benchmarks/earley-boyer.js
@@ -1,7 +1,7 @@
// This file is automatically generated by scheme2js, except for the
// benchmark harness code at the beginning and end of the file.

var EarleyBoyer = new BenchmarkSuite('EarleyBoyer', 280581, [
var EarleyBoyer = new BenchmarkSuite('EarleyBoyer', 666463, [
new Benchmark("Earley", function () { BgL_earleyzd2benchmarkzd2(); }),
new Benchmark("Boyer", function () { BgL_nboyerzd2benchmarkzd2(); })
]);
Expand Down
2 changes: 1 addition & 1 deletion deps/v8/benchmarks/raytrace.js
Expand Up @@ -8,7 +8,7 @@
// untouched. This file also contains a copy of parts of the Prototype
// JavaScript framework which is used by the ray tracer.

var RayTrace = new BenchmarkSuite('RayTrace', 533115, [
var RayTrace = new BenchmarkSuite('RayTrace', 739989, [
new Benchmark('RayTrace', renderScene)
]);

Expand Down
2 changes: 1 addition & 1 deletion deps/v8/benchmarks/regexp.js
Expand Up @@ -35,7 +35,7 @@
// letters in the data are encoded using ROT13 in a way that does not
// affect how the regexps match their input.

var RegRxp = new BenchmarkSuite('RegExp', 601250, [
var RegRxp = new BenchmarkSuite('RegExp', 910985, [
new Benchmark("RegExp", runRegExpBenchmark)
]);

Expand Down
2 changes: 1 addition & 1 deletion deps/v8/benchmarks/richards.js
Expand Up @@ -35,7 +35,7 @@
// Martin Richards.


var Richards = new BenchmarkSuite('Richards', 20687, [
var Richards = new BenchmarkSuite('Richards', 35302, [
new Benchmark("Richards", runRichards)
]);

Expand Down
2 changes: 1 addition & 1 deletion deps/v8/benchmarks/splay.js
Expand Up @@ -33,7 +33,7 @@
// also has to deal with a lot of changes to the large tree object
// graph.

var Splay = new BenchmarkSuite('Splay', 21915, [
var Splay = new BenchmarkSuite('Splay', 81491, [
new Benchmark("Splay", SplayRun, SplaySetup, SplayTearDown)
]);

Expand Down
29 changes: 28 additions & 1 deletion deps/v8/include/v8-profiler.h
Expand Up @@ -323,7 +323,10 @@ class V8EXPORT HeapSnapshot {
enum Type {
kFull = 0, // Heap snapshot with all instances and references.
kAggregated = 1 // Snapshot doesn't contain individual heap entries,
//instead they are grouped by constructor name.
// instead they are grouped by constructor name.
};
enum SerializationFormat {
kJSON = 0 // See format description near 'Serialize' method.
};

/** Returns heap snapshot type. */
Expand All @@ -343,6 +346,30 @@ class V8EXPORT HeapSnapshot {
* of the same type can be compared.
*/
const HeapSnapshotsDiff* CompareWith(const HeapSnapshot* snapshot) const;

/**
* Prepare a serialized representation of the snapshot. The result
* is written into the stream provided in chunks of specified size.
* The total length of the serialized snapshot is unknown in
* advance, it is can be roughly equal to JS heap size (that means,
* it can be really big - tens of megabytes).
*
* For the JSON format, heap contents are represented as an object
* with the following structure:
*
* {
* snapshot: {title: "...", uid: nnn},
* nodes: [
* meta-info (JSON string),
* nodes themselves
* ],
* strings: [strings]
* }
*
* Outgoing node links are stored after each node. Nodes reference strings
* and other nodes by their indexes in corresponding arrays.
*/
void Serialize(OutputStream* stream, SerializationFormat format) const;
};


Expand Down
28 changes: 28 additions & 0 deletions deps/v8/include/v8.h
Expand Up @@ -3196,6 +3196,34 @@ class V8EXPORT Locker {
};


/**
* An interface for exporting data from V8, using "push" model.
*/
class V8EXPORT OutputStream {
public:
enum OutputEncoding {
kAscii = 0 // 7-bit ASCII.
};
enum WriteResult {
kContinue = 0,
kAbort = 1
};
virtual ~OutputStream() {}
/** Notify about the end of stream. */
virtual void EndOfStream() = 0;
/** Get preferred output chunk size. Called only once. */
virtual int GetChunkSize() { return 1024; }
/** Get preferred output encoding. Called only once. */
virtual OutputEncoding GetOutputEncoding() { return kAscii; }
/**
* Writes the next chunk of snapshot data into the stream. Writing
* can be stopped by returning kAbort as function result. EndOfStream
* will not be called in case writing was aborted.
*/
virtual WriteResult WriteAsciiChunk(char* data, int size) = 0;
};



// --- I m p l e m e n t a t i o n ---

Expand Down
17 changes: 17 additions & 0 deletions deps/v8/src/api.cc
Expand Up @@ -4739,6 +4739,23 @@ const HeapSnapshotsDiff* HeapSnapshot::CompareWith(
}


void HeapSnapshot::Serialize(OutputStream* stream,
HeapSnapshot::SerializationFormat format) const {
IsDeadCheck("v8::HeapSnapshot::Serialize");
ApiCheck(format == kJSON,
"v8::HeapSnapshot::Serialize",
"Unknown serialization format");
ApiCheck(stream->GetOutputEncoding() == OutputStream::kAscii,
"v8::HeapSnapshot::Serialize",
"Unsupported output encoding");
ApiCheck(stream->GetChunkSize() > 0,
"v8::HeapSnapshot::Serialize",
"Invalid stream chunk size");
i::HeapSnapshotJSONSerializer serializer(ToInternal(this));
serializer.Serialize(stream);
}


int HeapProfiler::GetSnapshotsCount() {
IsDeadCheck("v8::HeapProfiler::GetSnapshotsCount");
return i::HeapProfiler::GetSnapshotsCount();
Expand Down

0 comments on commit 431e430

Please sign in to comment.