v8
3.14.5(node0.10.28)
V8 is Google's open source JavaScript engine
|
#include <stdlib.h>
#include <string.h>
#include <climits>
#include "globals.h"
#include "checks.h"
#include "allocation.h"
Go to the source code of this file.
Data Structures | |
struct | DivMagicNumbers |
class | Handle< T > |
class | BitField< T, shift, size > |
class | StaticResource< T > |
class | Access< T > |
class | Vector< T > |
class | SetOncePointer< T > |
class | EmbeddedVector< T, kSize > |
class | ScopedVector< T > |
class | Collector< T, growth_factor, max_growth > |
class | SequenceCollector< T, growth_factor, max_growth > |
struct | BitCastHelper< Dest, Source > |
struct | BitCastHelper< Dest, Source * > |
class | EmbeddedContainer< ElementType, NumElements > |
class | EmbeddedContainer< ElementType, 0 > |
class | SimpleStringBuilder |
class | EnumSet< E, T > |
class | TypeFeedbackId |
class | BailoutId |
Namespaces | |
v8 | |
v8::internal | |
Macros | |
#define | IS_POWER_OF_TWO(x) (((x) & ((x) - 1)) == 0) |
Functions | |
template<typename T > | |
bool | IsPowerOf2 (T x) |
int | WhichPowerOf2 (uint32_t x) |
const DivMagicNumbers | DivMagicNumberFor (int32_t divisor) |
int | ArithmeticShiftRight (int x, int s) |
template<typename T > | |
intptr_t | OffsetFrom (T x) |
template<typename T > | |
T | AddressFrom (intptr_t x) |
template<typename T > | |
T | RoundDown (T x, intptr_t m) |
template<typename T > | |
T | RoundUp (T x, intptr_t m) |
template<typename T > | |
int | Compare (const T &a, const T &b) |
template<typename T > | |
int | PointerValueCompare (const T *a, const T *b) |
template<typename T > | |
int | HandleObjectPointerCompare (const Handle< T > *a, const Handle< T > *b) |
uint32_t | RoundUpToPowerOf2 (uint32_t x) |
uint32_t | RoundDownToPowerOf2 (uint32_t x) |
template<typename T , typename U > | |
bool | IsAligned (T value, U alignment) |
bool | IsAddressAligned (Address addr, intptr_t alignment, int offset=0) |
template<typename T > | |
T | Max (T a, T b) |
template<typename T > | |
T | Min (T a, T b) |
int | StrLength (const char *string) |
uint32_t | ComputeIntegerHash (uint32_t key, uint32_t seed) |
uint32_t | ComputeLongHash (uint64_t key) |
uint32_t | ComputePointerHash (void *ptr) |
Vector< const char > | CStrVector (const char *data) |
Vector< char > | MutableCStrVector (char *data) |
Vector< char > | MutableCStrVector (char *data, int max) |
template<typename lchar , typename rchar > | |
int | CompareChars (const lchar *lhs, const rchar *rhs, int chars) |
int | TenToThe (int exponent) |
template<class Dest , class Source > | |
INLINE (Dest BitCast(const Source &source)) | |
template<class Dest , class Source > | |
Dest | BitCast (const Source &source) |
Variables | |
const DivMagicNumbers | InvalidDivMagicNumber = {0, 0} |
const DivMagicNumbers | DivMagicNumberFor3 = {0x55555556, 0} |
const DivMagicNumbers | DivMagicNumberFor5 = {0x66666667, 1} |
const DivMagicNumbers | DivMagicNumberFor7 = {0x92492493, 2} |
const DivMagicNumbers | DivMagicNumberFor9 = {0x38e38e39, 1} |
const DivMagicNumbers | DivMagicNumberFor11 = {0x2e8ba2e9, 1} |
const DivMagicNumbers | DivMagicNumberFor25 = {0x51eb851f, 3} |
const DivMagicNumbers | DivMagicNumberFor125 = {0x10624dd3, 3} |
const DivMagicNumbers | DivMagicNumberFor625 = {0x68db8bad, 8} |
#define IS_POWER_OF_TWO | ( | x | ) | (((x) & ((x) - 1)) == 0) |
Definition at line 45 of file utils.h.
Referenced by HashTable< Shape, Key >::Allocate(), and v8::internal::IsPowerOf2().