Version 3.4.3
Clear the global thread table when an isolate is disposed (issue 1433).
Converted time zone name to UTF8 on Windows (issue 1290).
Limited the number of arguments in a function call to 32766 (issue 1413).
Compress sources of JS libraries in addition to the snapshot.
Fixed a bug in Lithium environment iteration.
Performance improvements on all platforms.
git-svn-id: http://v8.googlecode.com/svn/trunk@8218 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
diff --git a/include/v8.h b/include/v8.h
index 3ce6b87..eb677aa 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -165,7 +165,6 @@
*/
template <class T> class Handle {
public:
-
/**
* Creates an empty handle.
*/
@@ -312,7 +311,6 @@
*/
template <class T> class Persistent : public Handle<T> {
public:
-
/**
* Creates an empty persistent handle that doesn't point to any
* storage cell.
@@ -586,7 +584,6 @@
*/
class V8EXPORT Script {
public:
-
/**
* Compiles the specified script (context-independent).
*
@@ -858,7 +855,6 @@
*/
class Value : public Data {
public:
-
/**
* Returns true if this value is the undefined value. See ECMA-262
* 4.3.10.
@@ -990,7 +986,6 @@
*/
class String : public Primitive {
public:
-
/**
* Returns the number of characters in this string.
*/
@@ -1640,6 +1635,7 @@
V8EXPORT static Local<Object> New();
static inline Object* Cast(Value* obj);
+
private:
V8EXPORT Object();
V8EXPORT static void CheckCast(Value* obj);
@@ -2682,7 +2678,6 @@
void* GetData();
private:
-
Isolate();
Isolate(const Isolate&);
~Isolate();
@@ -2704,6 +2699,31 @@
int raw_size;
};
+
+/**
+ * A helper class for driving V8 startup data decompression. It is based on
+ * "CompressedStartupData" API functions from the V8 class. It isn't mandatory
+ * for an embedder to use this class, instead, API functions can be used
+ * directly.
+ *
+ * For an example of the class usage, see the "shell.cc" sample application.
+ */
+class V8EXPORT StartupDataDecompressor { // NOLINT
+ public:
+ StartupDataDecompressor();
+ virtual ~StartupDataDecompressor();
+ int Decompress();
+
+ protected:
+ virtual int DecompressData(char* raw_data,
+ int* raw_data_size,
+ const char* compressed_data,
+ int compressed_data_size) = 0;
+
+ private:
+ char** raw_data;
+};
+
/**
* Container class for static utility functions.
*/
@@ -2753,6 +2773,10 @@
* v8::V8::SetDecompressedStartupData(compressed_data);
* ... now V8 can be initialized
* ... make sure the decompressed data stays valid until V8 shutdown
+ *
+ * A helper class StartupDataDecompressor is provided. It implements
+ * the protocol of the interaction described above, and can be used in
+ * most cases instead of calling these API functions directly.
*/
static StartupData::CompressionAlgorithm GetCompressedStartupDataAlgorithm();
static int GetCompressedStartupDataCount();
@@ -3144,7 +3168,6 @@
*/
class V8EXPORT TryCatch {
public:
-
/**
* Creates a new try/catch block and registers it with v8.
*/
@@ -3236,6 +3259,7 @@
void SetCaptureMessage(bool value);
private:
+ v8::internal::Isolate* isolate_;
void* next_;
void* exception_;
void* message_;
@@ -3690,7 +3714,6 @@
*/
class Internals {
public:
-
// These values match non-compiler-dependent values defined within
// the implementation of v8.
static const int kHeapObjectMapOffset = 0;
@@ -3703,7 +3726,7 @@
static const int kFullStringRepresentationMask = 0x07;
static const int kExternalTwoByteRepresentationTag = 0x02;
- static const int kJSObjectType = 0xa1;
+ static const int kJSObjectType = 0xa2;
static const int kFirstNonstringType = 0x80;
static const int kForeignType = 0x85;