v8.h   v8.h 
skipping to change at line 2641 skipping to change at line 2636
kUncompressed, kUncompressed,
kBZip2 kBZip2
}; };
const char* data; const char* data;
int compressed_size; int compressed_size;
int raw_size; int raw_size;
}; };
/** /**
* A helper class for driving V8 startup data decompression. It is based o
n
* "CompressedStartupData" API functions from the V8 class. It isn't manda
tory
* 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. * Container class for static utility functions.
*/ */
class V8EXPORT V8 { class V8EXPORT V8 {
public: public:
/** Set the callback to invoke in case of fatal errors. */ /** Set the callback to invoke in case of fatal errors. */
static void SetFatalErrorHandler(FatalErrorCallback that); static void SetFatalErrorHandler(FatalErrorCallback that);
/** /**
* Set the callback to invoke to check if code generation from * Set the callback to invoke to check if code generation from
* strings should be allowed. * strings should be allowed.
skipping to change at line 2689 skipping to change at line 2708
* *
* This is how interaction with V8 should look like: * This is how interaction with V8 should look like:
* int compressed_data_count = v8::V8::GetCompressedStartupDataCount(); * int compressed_data_count = v8::V8::GetCompressedStartupDataCount();
* v8::StartupData* compressed_data = * v8::StartupData* compressed_data =
* new v8::StartupData[compressed_data_count]; * new v8::StartupData[compressed_data_count];
* v8::V8::GetCompressedStartupData(compressed_data); * v8::V8::GetCompressedStartupData(compressed_data);
* ... decompress data (compressed_data can be updated in-place) ... * ... decompress data (compressed_data can be updated in-place) ...
* v8::V8::SetDecompressedStartupData(compressed_data); * v8::V8::SetDecompressedStartupData(compressed_data);
* ... now V8 can be initialized * ... now V8 can be initialized
* ... make sure the decompressed data stays valid until V8 shutdown * ... 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 GetCompressedStartupDataAlgorith m(); static StartupData::CompressionAlgorithm GetCompressedStartupDataAlgorith m();
static int GetCompressedStartupDataCount(); static int GetCompressedStartupDataCount();
static void GetCompressedStartupData(StartupData* compressed_data); static void GetCompressedStartupData(StartupData* compressed_data);
static void SetDecompressedStartupData(StartupData* decompressed_data); static void SetDecompressedStartupData(StartupData* decompressed_data);
/** /**
* Adds a message listener. * Adds a message listener.
* *
* The same message listener can be added more than once and in that * The same message listener can be added more than once and in that
skipping to change at line 3171 skipping to change at line 3193
void SetVerbose(bool value); void SetVerbose(bool value);
/** /**
* Set whether or not this TryCatch should capture a Message object * Set whether or not this TryCatch should capture a Message object
* which holds source information about where the exception * which holds source information about where the exception
* occurred. True by default. * occurred. True by default.
*/ */
void SetCaptureMessage(bool value); void SetCaptureMessage(bool value);
private: private:
v8::internal::Isolate* isolate_;
void* next_; void* next_;
void* exception_; void* exception_;
void* message_; void* message_;
bool is_verbose_ : 1; bool is_verbose_ : 1;
bool can_continue_ : 1; bool can_continue_ : 1;
bool capture_message_ : 1; bool capture_message_ : 1;
bool rethrow_ : 1; bool rethrow_ : 1;
friend class v8::internal::Isolate; friend class v8::internal::Isolate;
}; };
skipping to change at line 3629 skipping to change at line 3651
static const int kHeapObjectMapOffset = 0; static const int kHeapObjectMapOffset = 0;
static const int kMapInstanceTypeOffset = 1 * kApiPointerSize + kApiIntSi ze; static const int kMapInstanceTypeOffset = 1 * kApiPointerSize + kApiIntSi ze;
static const int kStringResourceOffset = static const int kStringResourceOffset =
InternalConstants<kApiPointerSize>::kStringResourceOffset; InternalConstants<kApiPointerSize>::kStringResourceOffset;
static const int kForeignAddressOffset = kApiPointerSize; static const int kForeignAddressOffset = kApiPointerSize;
static const int kJSObjectHeaderSize = 3 * kApiPointerSize; static const int kJSObjectHeaderSize = 3 * kApiPointerSize;
static const int kFullStringRepresentationMask = 0x07; static const int kFullStringRepresentationMask = 0x07;
static const int kExternalTwoByteRepresentationTag = 0x02; static const int kExternalTwoByteRepresentationTag = 0x02;
static const int kJSObjectType = 0xa1; static const int kJSObjectType = 0xa2;
static const int kFirstNonstringType = 0x80; static const int kFirstNonstringType = 0x80;
static const int kForeignType = 0x85; static const int kForeignType = 0x85;
static inline bool HasHeapObjectTag(internal::Object* value) { static inline bool HasHeapObjectTag(internal::Object* value) {
return ((reinterpret_cast<intptr_t>(value) & kHeapObjectTagMask) == return ((reinterpret_cast<intptr_t>(value) & kHeapObjectTagMask) ==
kHeapObjectTag); kHeapObjectTag);
} }
static inline bool HasSmiTag(internal::Object* value) { static inline bool HasSmiTag(internal::Object* value) {
return ((reinterpret_cast<intptr_t>(value) & kSmiTagMask) == kSmiTag); return ((reinterpret_cast<intptr_t>(value) & kSmiTagMask) == kSmiTag);
 End of changes. 4 change blocks. 
1 lines changed or deleted 33 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/