V8 Project
utils.h File Reference
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <cmath>
#include "include/v8.h"
#include "src/allocation.h"
#include "src/base/bits.h"
#include "src/base/logging.h"
#include "src/base/macros.h"
#include "src/base/platform/platform.h"
#include "src/globals.h"
#include "src/list.h"
#include "src/vector.h"
+ Include dependency graph for utils.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  v8::internal::make_unsigned< T >
 
struct  v8::internal::make_unsigned< int32_t >
 
struct  v8::internal::make_unsigned< int64_t >
 
class  v8::internal::BitFieldBase< T, shift, size, U >
 
class  v8::internal::BitField< T, shift, size >
 
class  v8::internal::BitField64< T, shift, size >
 
class  v8::internal::StaticResource< T >
 
class  v8::internal::Access< T >
 
class  v8::internal::SetOncePointer< T >
 
class  v8::internal::EmbeddedVector< T, kSize >
 
class  v8::internal::Collector< T, growth_factor, max_growth >
 
class  v8::internal::SequenceCollector< T, growth_factor, max_growth >
 
class  v8::internal::EmbeddedContainer< ElementType, NumElements >
 
class  v8::internal::EmbeddedContainer< ElementType, 0 >
 
class  v8::internal::SimpleStringBuilder
 
class  v8::internal::EnumSet< E, T >
 
class  v8::internal::TypeFeedbackId
 
class  v8::internal::BailoutId
 
class  v8::internal::ContainerPointerWrapper< C >
 
class  v8::internal::StringBuilder
 

Namespaces

 v8
 Debugger support for the V8 JavaScript engine.
 
 v8::internal
 

Macros

#define INT_1_TO_63_LIST(V)
 
#define DECLARE_IS_INT_N(N)   inline bool is_int##N(int64_t x) { return is_intn(x, N); }
 
#define DECLARE_IS_UINT_N(N)
 
#define DECLARE_TRUNCATE_TO_INT_N(N)
 
#define PRINTF_CHECKING
 
#define FPRINTF_CHECKING
 
#define PRINTF_METHOD_CHECKING
 
#define FPRINTF_METHOD_CHECKING
 

Functions

bool v8::internal::CStringEquals (const char *s1, const char *s2)
 
int v8::internal::WhichPowerOf2 (uint32_t x)
 
int v8::internal::MostSignificantBit (uint32_t x)
 
int v8::internal::ArithmeticShiftRight (int x, int s)
 
template<typename T >
int v8::internal::Compare (const T &a, const T &b)
 
template<typename T >
int v8::internal::PointerValueCompare (const T *a, const T *b)
 
template<typename T >
int v8::internal::HandleObjectPointerCompare (const Handle< T > *a, const Handle< T > *b)
 
template<typename T , typename U >
bool v8::internal::IsAligned (T value, U alignment)
 
bool v8::internal::IsAddressAligned (Address addr, intptr_t alignment, int offset=0)
 
template<typename T >
T v8::internal::Max (T a, T b)
 
template<typename T >
T v8::internal::Min (T a, T b)
 
template<typename T >
T v8::internal::Abs (T a)
 
double v8::internal::Floor (double x)
 
int32_t v8::internal::WhichPowerOf2Abs (int32_t x)
 
uint32_t v8::internal::ComputeIntegerHash (uint32_t key, uint32_t seed)
 
uint32_t v8::internal::ComputeLongHash (uint64_t key)
 
uint32_t v8::internal::ComputePointerHash (void *ptr)
 
void v8::internal::init_memcopy_functions ()
 
void v8::internal::MemCopy (void *dest, const void *src, size_t size)
 
void v8::internal::MemMove (void *dest, const void *src, size_t size)
 
template<typename lchar , typename rchar >
int v8::internal::CompareCharsUnsigned (const lchar *lhs, const rchar *rhs, int chars)
 
template<typename lchar , typename rchar >
int v8::internal::CompareChars (const lchar *lhs, const rchar *rhs, int chars)
 
int v8::internal::TenToThe (int exponent)
 
uint32_t v8::internal::unsigned_bitextract_32 (int msb, int lsb, uint32_t x)
 
uint64_t v8::internal::unsigned_bitextract_64 (int msb, int lsb, uint64_t x)
 
int32_t v8::internal::signed_bitextract_32 (int msb, int lsb, int32_t x)
 
int v8::internal::signed_bitextract_64 (int msb, int lsb, int x)
 
bool v8::internal::is_intn (int64_t x, unsigned n)
 
bool v8::internal::is_uintn (int64_t x, unsigned n)
 
template<class T >
T v8::internal::truncate_to_intn (T x, unsigned n)
 
void v8::internal::PrintF (const char *format,...)
 
void v8::internal::PrintF (FILE *out, const char *format,...)
 
void v8::internal::PrintPID (const char *format,...)
 
int v8::internal::SNPrintF (Vector< char > str, const char *format,...)
 
int v8::internal::VSNPrintF (Vector< char > str, const char *format, va_list args)
 
void v8::internal::StrNCpy (Vector< char > dest, const char *src, size_t n)
 
void v8::internal::Flush (FILE *out)
 
void v8::internal::Flush ()
 
char * v8::internal::ReadLine (const char *prompt)
 
byte * v8::internal::ReadBytes (const char *filename, int *size, bool verbose)
 
int v8::internal::AppendChars (const char *filename, const char *str, int size, bool verbose)
 
int v8::internal::WriteChars (const char *filename, const char *str, int size, bool verbose)
 
int v8::internal::WriteBytes (const char *filename, const byte *bytes, int size, bool verbose)
 
int v8::internal::WriteAsCFile (const char *filename, const char *varname, const char *str, int size, bool verbose=true)
 
template<typename T >
Vector< Handle< Object > > v8::internal::HandleVector (v8::internal::Handle< T > *elms, int length)
 
template<typename T >
void v8::internal::CopyWords (T *dst, const T *src, size_t num_words)
 
template<typename T >
void v8::internal::MoveWords (T *dst, const T *src, size_t num_words)
 
template<typename T >
void v8::internal::CopyBytes (T *dst, const T *src, size_t num_bytes)
 
template<typename T , typename U >
void v8::internal::MemsetPointer (T **dest, U *value, int counter)
 
Vector< const char > v8::internal::ReadFile (const char *filename, bool *exists, bool verbose)
 
Vector< const char > v8::internal::ReadFile (FILE *file, bool *exists, bool verbose)
 
template<typename sourcechar , typename sinkchar >
 v8::internal::INLINE (static void CopyCharsUnsigned(sinkchar *dest, const sourcechar *src, int chars))
 
template<typename sourcechar , typename sinkchar >
 v8::internal::INLINE (void CopyChars(sinkchar *dest, const sourcechar *src, int chars))
 
template<typename sourcechar , typename sinkchar >
void v8::internal::CopyChars (sinkchar *dest, const sourcechar *src, int chars)
 
template<typename sourcechar , typename sinkchar >
void v8::internal::CopyCharsUnsigned (sinkchar *dest, const sourcechar *src, int chars)
 
bool v8::internal::DoubleToBoolean (double d)
 
template<typename Stream >
bool v8::internal::StringToArrayIndex (Stream *stream, uint32_t *index)
 
DISABLE_ASAN uintptr_t v8::internal::GetCurrentStackPosition ()
 

Variables

static const uint32_t v8::internal::kZeroHashSeed = 0
 
const int v8::internal::kMinComplexMemCopy = 16 * kPointerSize
 

Macro Definition Documentation

◆ DECLARE_IS_INT_N

#define DECLARE_IS_INT_N (   N)    inline bool is_int##N(int64_t x) { return is_intn(x, N); }

Definition at line 925 of file utils.h.

◆ DECLARE_IS_UINT_N

#define DECLARE_IS_UINT_N (   N)
Value:
template <class T> \
inline bool is_uint##N(T x) { return is_uintn(x, N); }
bool is_uintn(int64_t x, unsigned n)
Definition: utils.h:904
#define T(name, string, precedence)
Definition: token.cc:25

Definition at line 927 of file utils.h.

◆ DECLARE_TRUNCATE_TO_INT_N

#define DECLARE_TRUNCATE_TO_INT_N (   N)
Value:
template <class T> \
inline T truncate_to_int##N(T x) { return truncate_to_intn(x, N); }
T truncate_to_intn(T x, unsigned n)
Definition: utils.h:910

Definition at line 930 of file utils.h.

◆ FPRINTF_CHECKING

#define FPRINTF_CHECKING

Definition at line 1026 of file utils.h.

◆ FPRINTF_METHOD_CHECKING

#define FPRINTF_METHOD_CHECKING

Definition at line 1028 of file utils.h.

◆ INT_1_TO_63_LIST

#define INT_1_TO_63_LIST (   V)
Value:
V(1) V(2) V(3) V(4) V(5) V(6) V(7) V(8) \
V(9) V(10) V(11) V(12) V(13) V(14) V(15) V(16) \
V(17) V(18) V(19) V(20) V(21) V(22) V(23) V(24) \
V(25) V(26) V(27) V(28) V(29) V(30) V(31) V(32) \
V(33) V(34) V(35) V(36) V(37) V(38) V(39) V(40) \
V(41) V(42) V(43) V(44) V(45) V(46) V(47) V(48) \
V(49) V(50) V(51) V(52) V(53) V(54) V(55) V(56) \
V(57) V(58) V(59) V(60) V(61) V(62) V(63)
#define V(NAME, Name, id)
Definition: execution.h:170

Definition at line 915 of file utils.h.

◆ PRINTF_CHECKING

#define PRINTF_CHECKING

Definition at line 1025 of file utils.h.

◆ PRINTF_METHOD_CHECKING

#define PRINTF_METHOD_CHECKING

Definition at line 1027 of file utils.h.