v8-profiler.h | v8-profiler.h | |||
---|---|---|---|---|
skipping to change at line 64 | skipping to change at line 64 | |||
/** | /** | |||
* Returns the number, 1-based, of the line where the function originates . | * Returns the number, 1-based, of the line where the function originates . | |||
* kNoLineNumberInfo if no line number information is available. | * kNoLineNumberInfo if no line number information is available. | |||
*/ | */ | |||
int GetLineNumber() const; | int GetLineNumber() const; | |||
/** | /** | |||
* Returns total (self + children) execution time of the function, | * Returns total (self + children) execution time of the function, | |||
* in milliseconds, estimated by samples count. | * in milliseconds, estimated by samples count. | |||
*/ | */ | |||
double GetTotalTime() const; | V8_DEPRECATED(double GetTotalTime() const); | |||
/** | /** | |||
* Returns self execution time of the function, in milliseconds, | * Returns self execution time of the function, in milliseconds, | |||
* estimated by samples count. | * estimated by samples count. | |||
*/ | */ | |||
double GetSelfTime() const; | V8_DEPRECATED(double GetSelfTime() const); | |||
/** Returns the count of samples where function exists. */ | /** Returns the count of samples where function exists. */ | |||
double GetTotalSamplesCount() const; | V8_DEPRECATED(double GetTotalSamplesCount() const); | |||
/** Returns the count of samples where function was currently executing. | /** DEPRECATED. Please use GetHitCount instead. | |||
*/ | * Returns the count of samples where function was currently executing. | |||
*/ | ||||
double GetSelfSamplesCount() const; | double GetSelfSamplesCount() const; | |||
/** | ||||
* Returns the count of samples where the function was currently executi | ||||
ng. | ||||
*/ | ||||
unsigned GetHitCount() const; | ||||
/** Returns function entry UID. */ | /** Returns function entry UID. */ | |||
unsigned GetCallUid() const; | unsigned GetCallUid() const; | |||
/** Returns id of the node. The id is unique within the tree */ | /** Returns id of the node. The id is unique within the tree */ | |||
unsigned GetNodeId() const; | unsigned GetNodeId() const; | |||
/** Returns child nodes count of the node. */ | /** Returns child nodes count of the node. */ | |||
int GetChildrenCount() const; | int GetChildrenCount() const; | |||
/** Retrieves a child node by index. */ | /** Retrieves a child node by index. */ | |||
skipping to change at line 193 | skipping to change at line 200 | |||
*/ | */ | |||
const CpuProfile* StopCpuProfiling(Handle<String> title); | const CpuProfile* StopCpuProfiling(Handle<String> title); | |||
/** | /** | |||
* Deletes all existing profiles, also cancelling all profiling | * Deletes all existing profiles, also cancelling all profiling | |||
* activity. All previously returned pointers to profiles and their | * activity. All previously returned pointers to profiles and their | |||
* contents become invalid after this call. | * contents become invalid after this call. | |||
*/ | */ | |||
void DeleteAllCpuProfiles(); | void DeleteAllCpuProfiles(); | |||
/** | ||||
* Tells the profiler whether the embedder is idle. | ||||
*/ | ||||
void SetIdle(bool is_idle); | ||||
private: | private: | |||
CpuProfiler(); | CpuProfiler(); | |||
~CpuProfiler(); | ~CpuProfiler(); | |||
CpuProfiler(const CpuProfiler&); | CpuProfiler(const CpuProfiler&); | |||
CpuProfiler& operator=(const CpuProfiler&); | CpuProfiler& operator=(const CpuProfiler&); | |||
}; | }; | |||
class HeapGraphNode; | class HeapGraphNode; | |||
/** | /** | |||
End of changes. 6 change blocks. | ||||
5 lines changed or deleted | 17 lines changed or added | |||
v8.h | v8.h | |||
---|---|---|---|---|
skipping to change at line 1259 | skipping to change at line 1259 | |||
*/ | */ | |||
bool IsConstructor() const; | bool IsConstructor() const; | |||
}; | }; | |||
/** | /** | |||
* A JSON Parser. | * A JSON Parser. | |||
*/ | */ | |||
class V8_EXPORT JSON { | class V8_EXPORT JSON { | |||
public: | public: | |||
/** | /** | |||
* Tries to parse the string |json_string| and returns it as object if | * Tries to parse the string |json_string| and returns it as value if | |||
* successful. | * successful. | |||
* | * | |||
* \param json_string The string to parse. | * \param json_string The string to parse. | |||
* \return The corresponding object if successfully parsed. | * \return The corresponding value if successfully parsed. | |||
*/ | */ | |||
static Local<Object> Parse(Local<String> json_string); | static Local<Value> Parse(Local<String> json_string); | |||
}; | }; | |||
// --- Value --- | // --- Value --- | |||
/** | /** | |||
* The superclass of all JavaScript values and objects. | * The superclass of all JavaScript values and objects. | |||
*/ | */ | |||
class V8_EXPORT Value : public Data { | class V8_EXPORT Value : public Data { | |||
public: | public: | |||
/** | /** | |||
skipping to change at line 5429 | skipping to change at line 5429 | |||
return SmiValue(ReadField<O*>(obj, kOddballKindOffset)); | return SmiValue(ReadField<O*>(obj, kOddballKindOffset)); | |||
} | } | |||
V8_INLINE(static bool IsExternalTwoByteString(int instance_type)) { | V8_INLINE(static bool IsExternalTwoByteString(int instance_type)) { | |||
int representation = (instance_type & kFullStringRepresentationMask); | int representation = (instance_type & kFullStringRepresentationMask); | |||
return representation == kExternalTwoByteRepresentationTag; | return representation == kExternalTwoByteRepresentationTag; | |||
} | } | |||
V8_INLINE(static uint8_t GetNodeFlag(internal::Object** obj, int shift)) { | V8_INLINE(static uint8_t GetNodeFlag(internal::Object** obj, int shift)) { | |||
uint8_t* addr = reinterpret_cast<uint8_t*>(obj) + kNodeFlagsOffset; | uint8_t* addr = reinterpret_cast<uint8_t*>(obj) + kNodeFlagsOffset; | |||
return *addr & (1 << shift); | return *addr & static_cast<uint8_t>(1U << shift); | |||
} | } | |||
V8_INLINE(static void UpdateNodeFlag(internal::Object** obj, | V8_INLINE(static void UpdateNodeFlag(internal::Object** obj, | |||
bool value, int shift)) { | bool value, int shift)) { | |||
uint8_t* addr = reinterpret_cast<uint8_t*>(obj) + kNodeFlagsOffset; | uint8_t* addr = reinterpret_cast<uint8_t*>(obj) + kNodeFlagsOffset; | |||
uint8_t mask = 1 << shift; | uint8_t mask = static_cast<uint8_t>(1 << shift); | |||
*addr = (*addr & ~mask) | (value << shift); | *addr = static_cast<uint8_t>((*addr & ~mask) | (value << shift)); | |||
} | } | |||
V8_INLINE(static uint8_t GetNodeState(internal::Object** obj)) { | V8_INLINE(static uint8_t GetNodeState(internal::Object** obj)) { | |||
uint8_t* addr = reinterpret_cast<uint8_t*>(obj) + kNodeFlagsOffset; | uint8_t* addr = reinterpret_cast<uint8_t*>(obj) + kNodeFlagsOffset; | |||
return *addr & kNodeStateMask; | return *addr & kNodeStateMask; | |||
} | } | |||
V8_INLINE(static void UpdateNodeState(internal::Object** obj, | V8_INLINE(static void UpdateNodeState(internal::Object** obj, | |||
uint8_t value)) { | uint8_t value)) { | |||
uint8_t* addr = reinterpret_cast<uint8_t*>(obj) + kNodeFlagsOffset; | uint8_t* addr = reinterpret_cast<uint8_t*>(obj) + kNodeFlagsOffset; | |||
*addr = (*addr & ~kNodeStateMask) | value; | *addr = static_cast<uint8_t>((*addr & ~kNodeStateMask) | value); | |||
} | } | |||
V8_INLINE(static void SetEmbedderData(v8::Isolate* isolate, void* data)) { | V8_INLINE(static void SetEmbedderData(v8::Isolate* isolate, void* data)) { | |||
uint8_t* addr = reinterpret_cast<uint8_t*>(isolate) + | uint8_t* addr = reinterpret_cast<uint8_t*>(isolate) + | |||
kIsolateEmbedderDataOffset; | kIsolateEmbedderDataOffset; | |||
*reinterpret_cast<void**>(addr) = data; | *reinterpret_cast<void**>(addr) = data; | |||
} | } | |||
V8_INLINE(static void* GetEmbedderData(v8::Isolate* isolate)) { | V8_INLINE(static void* GetEmbedderData(v8::Isolate* isolate)) { | |||
uint8_t* addr = reinterpret_cast<uint8_t*>(isolate) + | uint8_t* addr = reinterpret_cast<uint8_t*>(isolate) + | |||
skipping to change at line 5786 | skipping to change at line 5786 | |||
return; | return; | |||
} | } | |||
Set(Integer::New(i, GetIsolate())); | Set(Integer::New(i, GetIsolate())); | |||
} | } | |||
template<typename T> | template<typename T> | |||
void ReturnValue<T>::Set(uint32_t i) { | void ReturnValue<T>::Set(uint32_t i) { | |||
TYPE_CHECK(T, Integer); | TYPE_CHECK(T, Integer); | |||
typedef internal::Internals I; | typedef internal::Internals I; | |||
// Can't simply use INT32_MAX here for whatever reason. | // Can't simply use INT32_MAX here for whatever reason. | |||
bool fits_into_int32_t = (i & (1 << 31)) == 0; | bool fits_into_int32_t = (i & (1U << 31)) == 0; | |||
if (V8_LIKELY(fits_into_int32_t)) { | if (V8_LIKELY(fits_into_int32_t)) { | |||
Set(static_cast<int32_t>(i)); | Set(static_cast<int32_t>(i)); | |||
return; | return; | |||
} | } | |||
Set(Integer::NewFromUnsigned(i, GetIsolate())); | Set(Integer::NewFromUnsigned(i, GetIsolate())); | |||
} | } | |||
template<typename T> | template<typename T> | |||
void ReturnValue<T>::Set(bool value) { | void ReturnValue<T>::Set(bool value) { | |||
TYPE_CHECK(T, Boolean); | TYPE_CHECK(T, Boolean); | |||
End of changes. 7 change blocks. | ||||
8 lines changed or deleted | 8 lines changed or added | |||