v8.h   v8.h 
skipping to change at line 2874 skipping to change at line 2874
* \param return_addr_location points to a location on stack where the mach ine * \param return_addr_location points to a location on stack where the mach ine
* return address resides. This can be used to identify the caller of * return address resides. This can be used to identify the caller of
* \p function, and/or modified to divert execution when \p function exi ts. * \p function, and/or modified to divert execution when \p function exi ts.
* *
* \note the entry hook must not cause garbage collection. * \note the entry hook must not cause garbage collection.
*/ */
typedef void (*FunctionEntryHook)(uintptr_t function, typedef void (*FunctionEntryHook)(uintptr_t function,
uintptr_t return_addr_location); uintptr_t return_addr_location);
/** /**
* A JIT code event is issued each time code is added, moved or removed.
*
* \note removal events are not currently issued.
*/
struct JitCodeEvent {
enum EventType {
CODE_ADDED,
CODE_MOVED,
CODE_REMOVED
};
// Type of event.
EventType type;
// Start of the instructions.
void* code_start;
// Size of the instructions.
size_t code_len;
union {
// Only valid for CODE_ADDED.
struct {
// Name of the object associated with the code, note that the string
is
// not zero-terminated.
const char* str;
// Number of chars in str.
size_t len;
} name;
// New location of instructions. Only valid for CODE_MOVED.
void* new_code_start;
};
};
/**
* Option flags passed to the SetJitCodeEventHandler function.
*/
enum JitCodeEventOptions {
kJitCodeEventDefault = 0,
// Generate callbacks for already existent code.
kJitCodeEventEnumExisting = 1
};
/**
* Callback function passed to SetJitCodeEventHandler.
*
* \param event code add, move or removal event.
*/
typedef void (*JitCodeEventHandler)(const JitCodeEvent* event);
/**
* Interface for iterating though all external resources in the heap. * Interface for iterating though all external resources in the heap.
*/ */
class V8EXPORT ExternalResourceVisitor { // NOLINT class V8EXPORT ExternalResourceVisitor { // NOLINT
public: public:
virtual ~ExternalResourceVisitor() {} virtual ~ExternalResourceVisitor() {}
virtual void VisitExternalString(Handle<String> string) {} virtual void VisitExternalString(Handle<String> string) {}
}; };
/** /**
* Container class for static utility functions. * Container class for static utility functions.
skipping to change at line 3147 skipping to change at line 3196
* *
* \param entry_hook a function that will be invoked on entry to every * \param entry_hook a function that will be invoked on entry to every
* V8-generated function. * V8-generated function.
* \returns true on success on supported platforms, false on failure. * \returns true on success on supported platforms, false on failure.
* \note Setting a new entry hook function when one is already active wil l * \note Setting a new entry hook function when one is already active wil l
* fail. * fail.
*/ */
static bool SetFunctionEntryHook(FunctionEntryHook entry_hook); static bool SetFunctionEntryHook(FunctionEntryHook entry_hook);
/** /**
* Allows the host application to provide the address of a function that
is
* notified each time code is added, moved or removed.
*
* \param options options for the JIT code event handler.
* \param event_handler the JIT code event handler, which will be invoked
* each time code is added, moved or removed.
* \note \p event_handler won't get notified of existent code.
* \note since code removal notifications are not currently issued, the
* \p event_handler may get notifications of code that overlaps earli
er
* code notifications. This happens when code areas are reused, and t
he
* earlier overlapping code areas should therefore be discarded.
* \note the events passed to \p event_handler and the strings they point
to
* are not guaranteed to live past each call. The \p event_handler mu
st
* copy strings and other parameters it needs to keep around.
* \note the set of events declared in JitCodeEvent::EventType is expecte
d to
* grow over time, and the JitCodeEvent structure is expected to accr
ue
* new members. The \p event_handler function must ignore event codes
* it does not recognize to maintain future compatibility.
*/
static void SetJitCodeEventHandler(JitCodeEventOptions options,
JitCodeEventHandler event_handler);
/**
* Adjusts the amount of registered external memory. Used to give * Adjusts the amount of registered external memory. Used to give
* V8 an indication of the amount of externally allocated memory * V8 an indication of the amount of externally allocated memory
* that is kept alive by JavaScript objects. V8 uses this to decide * that is kept alive by JavaScript objects. V8 uses this to decide
* when to perform global garbage collections. Registering * when to perform global garbage collections. Registering
* externally allocated memory will trigger global garbage * externally allocated memory will trigger global garbage
* collections more often than otherwise in an attempt to garbage * collections more often than otherwise in an attempt to garbage
* collect the JavaScript objects keeping the externally allocated * collect the JavaScript objects keeping the externally allocated
* memory alive. * memory alive.
* *
* \param change_in_bytes the change in externally allocated memory * \param change_in_bytes the change in externally allocated memory
skipping to change at line 3885 skipping to change at line 3957
static const int kFullStringRepresentationMask = 0x07; static const int kFullStringRepresentationMask = 0x07;
static const int kExternalTwoByteRepresentationTag = 0x02; static const int kExternalTwoByteRepresentationTag = 0x02;
static const int kIsolateStateOffset = 0; static const int kIsolateStateOffset = 0;
static const int kIsolateEmbedderDataOffset = 1 * kApiPointerSize; static const int kIsolateEmbedderDataOffset = 1 * kApiPointerSize;
static const int kIsolateRootsOffset = 3 * kApiPointerSize; static const int kIsolateRootsOffset = 3 * kApiPointerSize;
static const int kUndefinedValueRootIndex = 5; static const int kUndefinedValueRootIndex = 5;
static const int kNullValueRootIndex = 7; static const int kNullValueRootIndex = 7;
static const int kTrueValueRootIndex = 8; static const int kTrueValueRootIndex = 8;
static const int kFalseValueRootIndex = 9; static const int kFalseValueRootIndex = 9;
static const int kEmptySymbolRootIndex = 112; static const int kEmptySymbolRootIndex = 114;
static const int kJSObjectType = 0xaa; static const int kJSObjectType = 0xaa;
static const int kFirstNonstringType = 0x80; static const int kFirstNonstringType = 0x80;
static const int kOddballType = 0x82; static const int kOddballType = 0x82;
static const int kForeignType = 0x85; static const int kForeignType = 0x85;
static const int kUndefinedOddballKind = 5; static const int kUndefinedOddballKind = 5;
static const int kNullOddballKind = 3; static const int kNullOddballKind = 3;
static inline bool HasHeapObjectTag(internal::Object* value) { static inline bool HasHeapObjectTag(internal::Object* value) {
 End of changes. 3 change blocks. 
1 lines changed or deleted 81 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/