13 #ifdef MINGW_HAS_SECURE_API
14 #undef MINGW_HAS_SECURE_API
35 int strncasecmp(
const char*
s1,
const char*
s2,
int n) {
36 return _strnicmp(
s1,
s2, n);
47 #ifndef __MINGW64_VERSION_MAJOR
54 __asm__ __volatile__(
"xchgl %%eax,%0 ":
"=r" (barrier));
60 int localtime_s(tm* out_tm,
const time_t* time) {
61 tm* posix_local_time_struct = localtime(time);
62 if (posix_local_time_struct ==
NULL)
return 1;
63 *out_tm = *posix_local_time_struct;
68 int fopen_s(FILE** pFile,
const char* filename,
const char*
mode) {
69 *pFile = fopen(filename,
mode);
70 return *pFile !=
NULL ? 0 : 1;
73 int _vsnprintf_s(
char* buffer,
size_t sizeOfBuffer,
size_t count,
74 const char* format, va_list argptr) {
75 DCHECK(count == _TRUNCATE);
76 return _vsnprintf(buffer, sizeOfBuffer, format, argptr);
80 int strncpy_s(
char* dest,
size_t dest_size,
const char* source,
size_t count) {
85 if (count == _TRUNCATE) {
86 while (dest_size > 0 && *source != 0) {
87 *(dest++) = *(source++);
95 while (dest_size > 0 && count > 0 && *source != 0) {
96 *(dest++) = *(source++);
135 if (GetTimeZoneInformation(&
tzinfo_) == TIME_ZONE_ID_INVALID) {
138 tzinfo_.StandardDate.wMonth = 10;
140 tzinfo_.StandardDate.wHour = 3;
142 tzinfo_.DaylightDate.wMonth = 3;
144 tzinfo_.DaylightDate.wHour = 2;
149 WideCharToMultiByte(CP_UTF8, 0,
tzinfo_.StandardName, -1,
152 WideCharToMultiByte(CP_UTF8, 0,
tzinfo_.DaylightName, -1,
177 static const int kHour = 60;
179 case -9*kHour:
return "Alaska";
180 case -8*kHour:
return "Pacific";
181 case -7*kHour:
return "Mountain";
182 case -6*kHour:
return "Central";
183 case -5*kHour:
return "Eastern";
184 case -4*kHour:
return "Atlantic";
185 case 0*kHour:
return "GMT";
186 case +1*kHour:
return "Central Europe";
187 case +2*kHour:
return "Eastern Europe";
188 case +3*kHour:
return "Russia";
189 case +5*kHour + 30:
return "India";
190 case +8*kHour:
return "China";
191 case +9*kHour:
return "Japan";
192 case +12*kHour:
return "New Zealand";
193 default:
return "Local";
219 Win32Time(
int year,
int mon,
int day,
int hour,
int min,
int sec);
294 st.wMilliseconds = 0;
295 SystemTimeToFileTime(&st, &
ft());
324 static bool initialized =
false;
326 static DWORD init_ticks;
327 static const int64_t kHundredNanosecondsPerSecond = 10000000;
328 static const int64_t kMaxClockElapsedTime =
329 60*kHundredNanosecondsPerSecond;
332 bool needs_resync = !initialized;
336 GetSystemTimeAsFileTime(&time_now.
ft_);
337 DWORD ticks_now = timeGetTime();
340 needs_resync |= ticks_now < init_ticks;
343 needs_resync |= (time_now.
t_ - init_time.
t_) > kMaxClockElapsedTime;
346 needs_resync |= time_now.
t_ < init_time.
t_;
350 GetSystemTimeAsFileTime(&init_time.
ft_);
351 init_ticks = ticks_now = timeGetTime();
356 DWORD elapsed = ticks_now - init_ticks;
357 this->
time_.
t_ = init_time.
t_ + (
static_cast<int64_t
>(elapsed) * 10000);
370 rounded_to_second.
t() = rounded_to_second.
t() / 1000 /
kTimeScaler *
378 double unchecked_posix_time = rounded_to_second.
ToJSTime() / 1000;
379 if (unchecked_posix_time > INT_MAX || unchecked_posix_time < 0) {
383 time_t posix_time =
static_cast<time_t
>(unchecked_posix_time);
386 tm posix_local_time_struct;
387 if (localtime_s(&posix_local_time_struct, &posix_time))
return 0;
389 if (posix_local_time_struct.tm_isdst > 0) {
391 }
else if (posix_local_time_struct.tm_isdst == 0) {
405 if (cache->
tzinfo_.StandardDate.wMonth != 0 ||
406 cache->
tzinfo_.DaylightDate.wMonth != 0) {
417 in_dst = offset == dstofs;
445 if (!GetThreadTimes(GetCurrentThread(), &dummy, &dummy, &dummy,
446 reinterpret_cast<FILETIME*
>(&usertime)))
return -1;
452 *secs =
static_cast<uint32_t>(usertime / 1000000);
453 *usecs =
static_cast<uint32_t>(usertime % 1000000);
461 return Time::Now().ToJsTime();
466 return new TimezoneCache();
483 return Win32Time(time).LocalTimezone(cache);
493 return static_cast<double>(t.LocalOffset(cache) -
494 t.DaylightSavingsOffset(cache));
501 int64_t offset = Win32Time(time).DaylightSavingsOffset(cache);
502 return static_cast<double>(offset);
507 return ::GetLastError();
551 if (GetStdHandle(STD_OUTPUT_HANDLE) != INVALID_HANDLE_VALUE &&
552 GetFileType(GetStdHandle(STD_OUTPUT_HANDLE)) != FILE_TYPE_UNKNOWN)
561 static void VPrintHelper(FILE* stream,
const char* format, va_list args) {
562 if ((stream == stdout || stream == stderr) && !
HasConsole()) {
568 OutputDebugStringA(buffer);
570 vfprintf(stream, format, args);
577 if (fopen_s(&result, path,
mode) == 0) {
586 return (DeleteFileA(path) != 0);
592 char tempPathBuffer[MAX_PATH];
593 DWORD path_result = 0;
594 path_result = GetTempPathA(MAX_PATH, tempPathBuffer);
595 if (path_result > MAX_PATH || path_result == 0)
return NULL;
596 UINT name_result = 0;
597 char tempNameBuffer[MAX_PATH];
598 name_result = GetTempFileNameA(tempPathBuffer,
"", 0, tempNameBuffer);
599 if (name_result == 0)
return NULL;
600 FILE* result =
FOpen(tempNameBuffer,
"w+");
601 if (result !=
NULL) {
613 void OS::Print(
const char* format, ...) {
615 va_start(args, format);
621 void OS::VPrint(
const char* format, va_list args) {
626 void OS::FPrint(FILE* out,
const char* format, ...) {
628 va_start(args, format);
634 void OS::VFPrint(FILE* out,
const char* format, va_list args) {
642 va_start(args, format);
653 int OS::SNPrintF(
char* str,
int length,
const char* format, ...) {
655 va_start(args, format);
656 int result =
VSNPrintF(str, length, format, args);
662 int OS::VSNPrintF(
char* str,
int length,
const char* format, va_list args) {
663 int n = _vsnprintf_s(str, length, _TRUNCATE, format, args);
666 if (n < 0 || n >= length) {
668 str[length - 1] =
'\0';
677 return const_cast<char*
>(strchr(str, c));
681 void OS::StrNCpy(
char* dest,
int length,
const char* src,
size_t n) {
683 size_t buffer_size =
static_cast<size_t>(length);
684 if (n + 1 > buffer_size)
686 int result = strncpy_s(dest, length, src, n);
688 DCHECK(result == 0 || (n == _TRUNCATE && result == STRUNCATE));
700 static size_t page_size = 0;
701 if (page_size == 0) {
703 GetSystemInfo(&info);
713 static size_t allocate_alignment = 0;
714 if (allocate_alignment == 0) {
716 GetSystemInfo(&info);
717 allocate_alignment = info.dwAllocationGranularity;
719 return allocate_alignment;
728 const char*
const gc_fake_mmap) {
742 #ifdef V8_HOST_ARCH_64_BIT
743 static const intptr_t kAllocationRandomAddressMin = 0x0000000080000000;
744 static const intptr_t kAllocationRandomAddressMax = 0x000003FFFFFF0000;
746 static const intptr_t kAllocationRandomAddressMin = 0x04000000;
747 static const intptr_t kAllocationRandomAddressMax = 0x3FFF0000;
751 kAllocationRandomAddressMin;
752 address &= kAllocationRandomAddressMax;
753 return reinterpret_cast<void *
>(address);
760 if (protection == PAGE_EXECUTE_READWRITE || protection == PAGE_NOACCESS) {
762 for (
size_t attempts = 0; base ==
NULL && attempts < 3; ++attempts) {
768 if (base ==
NULL) base = VirtualAlloc(
NULL,
size, action, protection);
776 bool is_executable) {
781 int prot = is_executable ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE;
784 MEM_COMMIT | MEM_RESERVE,
798 VirtualFree(address, 0, MEM_RELEASE);
810 VirtualProtect(address,
size, PAGE_EXECUTE_READ, &old_protect);
816 VirtualProtect(address,
size, PAGE_NOACCESS, &oldprotect);
870 FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL, OPEN_EXISTING, 0,
NULL);
871 if (
file == INVALID_HANDLE_VALUE)
return NULL;
878 if (file_mapping ==
NULL)
return NULL;
881 void*
memory = MapViewOfFile(file_mapping, FILE_MAP_ALL_ACCESS, 0, 0,
size);
890 FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL, OPEN_ALWAYS, 0,
NULL);
895 if (file_mapping ==
NULL)
return NULL;
897 void* memory = MapViewOfFile(file_mapping, FILE_MAP_ALL_ACCESS, 0, 0,
size);
898 if (memory) memmove(memory, initial,
size);
899 return new Win32MemoryMappedFile(
file, file_mapping, memory,
size);
905 UnmapViewOfFile(memory_);
906 CloseHandle(file_mapping_);
918 #define DBGHELP_FUNCTION_LIST(V) \
922 V(SymGetSearchPath) \
925 V(SymGetSymFromAddr64) \
926 V(SymGetLineFromAddr64) \
927 V(SymFunctionTableAccess64) \
928 V(SymGetModuleBase64)
931 #define TLHELP32_FUNCTION_LIST(V) \
932 V(CreateToolhelp32Snapshot) \
938 #define DLL_FUNC_TYPE(name) _##name##_
939 #define DLL_FUNC_VAR(name) _##name
1006 LPMODULEENTRY32W
lpme);
1012 #define DEF_DLL_FUNCTION(name) DLL_FUNC_TYPE(name) DLL_FUNC_VAR(name) = NULL;
1015 #undef DEF_DLL_FUNCTION
1021 static bool dbghelp_loaded =
false;
1023 if (dbghelp_loaded)
return true;
1028 module = LoadLibrary(TEXT(
"dbghelp.dll"));
1029 if (module ==
NULL) {
1033 #define LOAD_DLL_FUNC(name) \
1034 DLL_FUNC_VAR(name) = \
1035 reinterpret_cast<DLL_FUNC_TYPE(name)>(GetProcAddress(module, #name));
1039 #undef LOAD_DLL_FUNC
1043 module = LoadLibrary(TEXT(
"kernel32.dll"));
1044 if (module ==
NULL) {
1048 #define LOAD_DLL_FUNC(name) \
1049 DLL_FUNC_VAR(name) = \
1050 reinterpret_cast<DLL_FUNC_TYPE(name)>(GetProcAddress(module, #name));
1054 #undef LOAD_DLL_FUNC
1058 #define DLL_FUNC_LOADED(name) (DLL_FUNC_VAR(name) != NULL) &&
1063 #undef DLL_FUNC_LOADED
1066 dbghelp_loaded = result;
1072 #undef DBGHELP_FUNCTION_LIST
1073 #undef TLHELP32_FUNCTION_LIST
1075 #undef DLL_FUNC_TYPE
1081 static std::vector<OS::SharedLibraryAddress> result;
1083 static bool symbols_loaded =
false;
1085 if (symbols_loaded)
return result;
1090 ok = _SymInitialize(process_handle,
1093 if (!ok)
return result;
1095 DWORD options = _SymGetOptions();
1096 options |= SYMOPT_LOAD_LINES;
1097 options |= SYMOPT_FAIL_CRITICAL_ERRORS;
1098 options = _SymSetOptions(options);
1111 if (
snapshot == INVALID_HANDLE_VALUE)
return result;
1112 MODULEENTRY32W module_entry;
1113 module_entry.dwSize =
sizeof(module_entry);
1119 base = _SymLoadModule64(
1122 reinterpret_cast<PSTR
>(module_entry.szExePath),
1123 reinterpret_cast<PSTR
>(module_entry.szModule),
1124 reinterpret_cast<DWORD64>(module_entry.modBaseAddr),
1125 module_entry.modBaseSize);
1128 if (err != ERROR_MOD_NOT_FOUND &&
1129 err != ERROR_INVALID_HANDLE) {
1134 int lib_name_length = WideCharToMultiByte(
1135 CP_UTF8, 0, module_entry.szExePath, -1,
NULL, 0,
NULL,
NULL);
1136 std::string lib_name(lib_name_length, 0);
1137 WideCharToMultiByte(CP_UTF8, 0, module_entry.szExePath, -1, &lib_name[0],
1140 lib_name,
reinterpret_cast<unsigned int>(module_entry.modBaseAddr),
1141 reinterpret_cast<unsigned int>(module_entry.modBaseAddr +
1142 module_entry.modBaseSize)));
1143 cont = _Module32NextW(
snapshot, &module_entry);
1147 symbols_loaded =
true;
1158 HANDLE process_handle = GetCurrentProcess();
1169 return std::vector<OS::SharedLibraryAddress>();
1179 return std::numeric_limits<double>::quiet_NaN();
1189 #elif defined(__MINGW32__)
1202 VirtualMemory::VirtualMemory(
size_t size)
1203 : address_(ReserveRegion(
size)), size_(
size) { }
1206 VirtualMemory::VirtualMemory(
size_t size,
size_t alignment)
1207 : address_(
NULL), size_(0) {
1211 void* address = ReserveRegion(request_size);
1212 if (address ==
NULL)
return;
1213 uint8_t* base =
RoundUp(
static_cast<uint8_t*
>(address), alignment);
1215 bool result = ReleaseRegion(address, request_size);
1218 address = VirtualAlloc(base,
size, MEM_RESERVE, PAGE_NOACCESS);
1219 if (address !=
NULL) {
1220 request_size =
size;
1221 DCHECK(base ==
static_cast<uint8_t*
>(address));
1224 address = ReserveRegion(request_size);
1225 if (address ==
NULL)
return;
1228 size_ = request_size;
1232 VirtualMemory::~VirtualMemory() {
1234 bool result = ReleaseRegion(address(),
size());
1241 bool VirtualMemory::IsReserved() {
1242 return address_ !=
NULL;
1246 void VirtualMemory::Reset() {
1252 bool VirtualMemory::Commit(
void* address,
size_t size,
bool is_executable) {
1253 return CommitRegion(address,
size, is_executable);
1257 bool VirtualMemory::Uncommit(
void* address,
size_t size) {
1259 return UncommitRegion(address,
size);
1263 bool VirtualMemory::Guard(
void* address) {
1264 if (
NULL == VirtualAlloc(address,
1265 OS::CommitPageSize(),
1274 void* VirtualMemory::ReserveRegion(
size_t size) {
1279 bool VirtualMemory::CommitRegion(
void* base,
size_t size,
bool is_executable) {
1280 int prot = is_executable ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE;
1281 if (
NULL == VirtualAlloc(base,
size, MEM_COMMIT, prot)) {
1288 bool VirtualMemory::UncommitRegion(
void* base,
size_t size) {
1289 return VirtualFree(base,
size, MEM_DECOMMIT) != 0;
1293 bool VirtualMemory::ReleaseRegion(
void* base,
size_t size) {
1294 return VirtualFree(base, 0, MEM_RELEASE) != 0;
1298 bool VirtualMemory::HasLazyCommits() {
1321 class Thread::PlatformData {
1332 Thread::Thread(
const Options& options)
1333 : stack_size_(options.stack_size()),
1334 start_semaphore_(
NULL) {
1358 _beginthreadex(
NULL,
1376 DWORD result = TlsAlloc();
1377 DCHECK(result != TLS_OUT_OF_INDEXES);
1383 BOOL result = TlsFree(
static_cast<DWORD>(key));
1390 return TlsGetValue(
static_cast<DWORD>(key));
1395 BOOL result = TlsSetValue(
static_cast<DWORD>(key), value);
static MemoryMappedFile * create(const char *name, int size, void *initial)
virtual void * memory()=0
static MemoryMappedFile * open(const char *name)
static void VPrintError(const char *format, va_list args)
static double DaylightSavingsOffset(double time, TimezoneCache *cache)
static void * GetRandomMmapAddr()
static size_t AllocateAlignment()
static void SignalCodeMovingGC()
static double nan_value()
static void VPrint(const char *format, va_list args)
static void Initialize(int64_t random_seed, bool hard_abort, const char *const gc_fake_mmap)
static intptr_t CommitPageSize()
static void ClearTimezoneCache(TimezoneCache *cache)
static const char *const LogFileOpenMode
static const int kStackWalkMaxNameLen
static void Guard(void *address, const size_t size)
static void Sleep(const int milliseconds)
static int GetLastError()
static void * Allocate(const size_t requested, size_t *allocated, bool is_executable)
static FILE * OpenTemporaryFile()
static FILE * FOpen(const char *path, const char *mode)
static int GetCurrentProcessId()
static const char * LocalTimezone(double time, TimezoneCache *cache)
static std::vector< SharedLibraryAddress > GetSharedLibraryAddresses()
static void Print(const char *format,...)
static void StrNCpy(char *dest, int length, const char *src, size_t n)
static double LocalTimeOffset(TimezoneCache *cache)
static void PrintError(const char *format,...)
static int GetUserTime(uint32_t *secs, uint32_t *usecs)
static int GetCurrentThreadId()
static int ActivationFrameAlignment()
static char * StrChr(char *str, int c)
static void VFPrint(FILE *out, const char *format, va_list args)
static void ProtectCode(void *address, const size_t size)
static void Free(void *address, const size_t size)
static TimezoneCache * CreateTimezoneCache()
static double TimeCurrentMillis()
static void DisposeTimezoneCache(TimezoneCache *cache)
static int SNPrintF(char *str, int length, const char *format,...)
static int VSNPrintF(char *str, int length, const char *format, va_list args)
static void FPrint(FILE *out, const char *format,...)
static bool Remove(const char *path)
const char * name() const
static void DeleteThreadLocalKey(LocalStorageKey key)
const char * name() const
static LocalStorageKey CreateThreadLocalKey()
static void * GetThreadLocal(LocalStorageKey key)
void set_name(const char *name)
char name_[kMaxThreadNameLength]
void NotifyStartedAndRun()
static void SetThreadLocal(LocalStorageKey key, void *value)
char std_tz_name_[kTzNameSize]
void InitializeIfNeeded()
char dst_tz_name_[kTzNameSize]
static const int kTzNameSize
const char * GuessTimezoneNameFromBias(int bias)
TIME_ZONE_INFORMATION tzinfo_
virtual ~Win32MemoryMappedFile()
Win32MemoryMappedFile(HANDLE file, HANDLE file_mapping, void *memory, int size)
static const int64_t kTimeScaler
static const bool kShortTzNames
int64_t LocalOffset(TimezoneCache *cache)
int64_t DaylightSavingsOffset(TimezoneCache *cache)
char * LocalTimezone(TimezoneCache *cache)
static const int64_t kMsPerMinute
static const int64_t kTimeEpoc
bool InDST(TimezoneCache *cache)
enable harmony numeric enable harmony object literal extensions Optimize object size
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in name
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long mode(MIPS only)") DEFINE_BOOL(enable_always_align_csp
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in only print modified registers Trace simulator debug messages Implied by trace sim abort randomize hashes to avoid predictable hash Fixed seed to use to hash property Print the time it takes to deserialize the snapshot A filename with extra code to be included in the A file to write the raw snapshot bytes A file to write the raw context snapshot bytes Write V8 startup blob file(mksnapshot only)") DEFINE_BOOL(profile_hydrogen_code_stub_compilation
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in only print modified registers Trace simulator debug messages Implied by trace sim abort randomize hashes to avoid predictable hash Fixed seed to use to hash property Print the time it takes to deserialize the snapshot A filename with extra code to be included in the snapshot(mksnapshot only)") DEFINE_STRING(raw_file
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
#define LAZY_INSTANCE_INITIALIZER
#define DCHECK(condition)
#define V8_IMMEDIATE_CRASH()
T RoundUp(T x, intptr_t m)
uint32_t RoundUpToPowerOfTwo32(uint32_t value)
IN HANDLE IN PSTR IN PSTR IN DWORD64 IN DWORD SizeOfDll
typedef HANDLE(__stdcall *DLL_FUNC_TYPE(CreateToolhelp32Snapshot))(DWORD dwFlags
IN DWORD64 OUT PDWORD OUT PIMAGEHLP_LINE64 Line64
static void * ThreadEntry(void *arg)
IN HANDLE IN PSTR IN PSTR ModuleName
OUT PSTR IN DWORD SearchPathLength
HANDLE HANDLE LPSTACKFRAME64 PVOID PREAD_PROCESS_MEMORY_ROUTINE64 PFUNCTION_TABLE_ACCESS_ROUTINE64 FunctionTableAccessRoutine
static std::vector< OS::SharedLibraryAddress > LoadSymbols(HANDLE process_handle)
static LazyInstance< RandomNumberGenerator >::type platform_random_number_generator
static unsigned int __stdcall ThreadEntry(void *arg)
IN DWORD64 OUT PDWORD64 pdwDisplacement
static bool LoadDbgHelpAndTlHelp32()
typedef DWORD(__stdcall *DLL_FUNC_TYPE(SymGetOptions))(VOID)
IN HANDLE IN PSTR IN PSTR IN DWORD64 BaseOfDll
HANDLE HANDLE LPSTACKFRAME64 PVOID PREAD_PROCESS_MEMORY_ROUTINE64 PFUNCTION_TABLE_ACCESS_ROUTINE64 PGET_MODULE_BASE_ROUTINE64 PTRANSLATE_ADDRESS_ROUTINE64 TranslateAddress
HANDLE HANDLE LPSTACKFRAME64 PVOID ContextRecord
typedef BOOL(__stdcall *DLL_FUNC_TYPE(SymInitialize))(IN HANDLE hProcess
static const HANDLE kNoThread
HANDLE HANDLE LPSTACKFRAME64 PVOID PREAD_PROCESS_MEMORY_ROUTINE64 PFUNCTION_TABLE_ACCESS_ROUTINE64 PGET_MODULE_BASE_ROUTINE64 GetModuleBaseRoutine
HANDLE HANDLE LPSTACKFRAME64 StackFrame
typedef DWORD64(__stdcall *DLL_FUNC_TYPE(SymLoadModule64))(IN HANDLE hProcess
IN DWORD64 OUT PDWORD64 OUT PIMAGEHLP_SYMBOL64 Symbol
typedef PVOID(__stdcall *DLL_FUNC_TYPE(SymFunctionTableAccess64))(HANDLE hProcess
static size_t GetPageSize()
static OutputMode output_mode
static const pthread_t kNoThread
IN HANDLE IN PSTR ImageName
static void VPrintHelper(FILE *stream, const char *format, va_list args)
static void * RandomizedVirtualAlloc(size_t size, int action, int protection)
HANDLE HANDLE LPSTACKFRAME64 PVOID PREAD_PROCESS_MEMORY_ROUTINE64 ReadMemoryRoutine
IN PSTR IN BOOL fInvadeProcess
static int min(int a, int b)
Debugger support for the V8 JavaScript engine.
LazyStaticInstance< T, CreateTrait, InitOnceTrait, DestroyTrait >::type type