diff --git a/.gclient b/.gclient new file mode 100644 index 0000000000..5bbb9aeb2b --- /dev/null +++ b/.gclient @@ -0,0 +1,10 @@ +solutions = [ + { "name" : 'v8', + "url" : 'http://github.com/AuroraEngine/v8', + "deps_file" : 'DEPS', + "managed" : True, + "custom_deps" : { + }, + "custom_vars": {}, + }, +] diff --git a/src/base/compiler-specific.h b/src/base/compiler-specific.h index 49ce128a4a..caaa9aa663 100644 --- a/src/base/compiler-specific.h +++ b/src/base/compiler-specific.h @@ -96,10 +96,12 @@ // do not support adding noexcept to default members. // Disabled on MSVC because constructors of standard containers are not noexcept // there. -#if ((!defined(V8_CC_GNU) && !defined(V8_CC_MSVC) && \ +#if (((!defined(V8_CC_GNU) && !defined(V8_CC_MSVC) && \ !defined(V8_TARGET_ARCH_MIPS) && !defined(V8_TARGET_ARCH_MIPS64) && \ !defined(V8_TARGET_ARCH_PPC) && !defined(V8_TARGET_ARCH_PPC64)) || \ - (defined(__clang__) && __cplusplus > 201300L)) + (defined(__clang__) && __cplusplus > 201300L))\ + \ + && defined(HAVE_LE_GOOGLERS_UNFUCKED_THEIR_API_YET)) #define V8_NOEXCEPT noexcept #else #define V8_NOEXCEPT diff --git a/src/base/debug/stack_trace_win.cc b/src/base/debug/stack_trace_win.cc index f981bec610..16655d51f0 100644 --- a/src/base/debug/stack_trace_win.cc +++ b/src/base/debug/stack_trace_win.cc @@ -81,7 +81,7 @@ bool InitializeSymbols() { } wchar_t exe_path[MAX_PATH]; - GetModuleFileName(nullptr, exe_path, MAX_PATH); + GetModuleFileNameW(nullptr, exe_path, MAX_PATH); std::wstring exe_path_wstring(exe_path); // To get the path without the filename, we just need to remove the final // slash and everything after it. diff --git a/src/base/platform/platform-win32.cc b/src/base/platform/platform-win32.cc index cee24e9876..2021ac3e7d 100644 --- a/src/base/platform/platform-win32.cc +++ b/src/base/platform/platform-win32.cc @@ -888,7 +888,7 @@ bool OS::DiscardSystemPages(void* address, size_t size) { reinterpret_cast(-1)) discard_virtual_memory = reinterpret_cast(GetProcAddress( - GetModuleHandle(L"Kernel32.dll"), "DiscardVirtualMemory")); + GetModuleHandleW(L"Kernel32.dll"), "DiscardVirtualMemory")); // Use DiscardVirtualMemory when available because it releases faster than // MEM_RESET. DiscardVirtualMemoryFunction discard_function = discard_virtual_memory.load(); diff --git a/src/base/win32-headers.h b/src/base/win32-headers.h index 82555463c0..e4a12eb890 100644 --- a/src/base/win32-headers.h +++ b/src/base/win32-headers.h @@ -29,8 +29,12 @@ #endif // Require Windows Vista or higher (this is required for the // QueryThreadCycleTime function to be present). +// Update: unwinding-info-64 depends on Rtl functions which have their typedefs lazily yoinked +// Windows 10s latest SDK requires us to either define something blah blah blah i dont care +// ...or to upgrade to a Windows 8+ target +#define _WIN32_WINNT_WIN8 0x0602 #ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x0600 +#define _WIN32_WINNT _WIN32_WINNT_WIN8 #endif #include diff --git a/src/common/compression_utils_portable.cc b/src/common/compression_utils_portable.cc new file mode 100644 index 0000000000..b6ea906551 --- /dev/null +++ b/src/common/compression_utils_portable.cc @@ -0,0 +1,170 @@ +/* compression_utils_portable.cc + * + * Copyright 2019 The Chromium Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the Chromium source repository LICENSE file. + */ +#include "compression_utils_portable.h" +#include +#include +#include +namespace zlib_internal { +// The difference in bytes between a zlib header and a gzip header. +const size_t kGzipZlibHeaderDifferenceBytes = 16; +// Pass an integer greater than the following get a gzip header instead of a +// zlib header when calling deflateInit2() and inflateInit2(). +const int kWindowBitsToGetGzipHeader = 16; +// This describes the amount of memory zlib uses to compress data. It can go +// from 1 to 9, with 8 being the default. For details, see: +// http://www.zlib.net/manual.html (search for memLevel). +const int kZlibMemoryLevel = 8; +// The expected compressed size is based on the input size factored by +// internal Zlib constants (e.g. window size, etc) plus the wrapper +// header size. +uLongf GzipExpectedCompressedSize(uLongf input_size) { + return kGzipZlibHeaderDifferenceBytes + compressBound(input_size); +} +// The expected decompressed size is stored in the last +// 4 bytes of |input| in LE. See https://tools.ietf.org/html/rfc1952#page-5 +uint32_t GetGzipUncompressedSize(const Bytef* compressed_data, size_t length) { + uint32_t size; + if (length < sizeof(size)) + return 0; + memcpy(&size, &compressed_data[length - sizeof(size)], sizeof(size)); + return size; +} +// The number of window bits determines the type of wrapper to use - see +// https://cs.chromium.org/chromium/src/third_party/zlib/zlib.h?l=566 +inline int ZlibStreamWrapperType(WrapperType type) { + if (type == ZLIB) // zlib DEFLATE stream wrapper + return MAX_WBITS; + if (type == GZIP) // gzip DEFLATE stream wrapper + return MAX_WBITS + kWindowBitsToGetGzipHeader; + if (type == ZRAW) // no wrapper, use raw DEFLATE + return -MAX_WBITS; + return 0; +} +int GzipCompressHelper(Bytef* dest, + uLongf* dest_length, + const Bytef* source, + uLong source_length, + void* (*malloc_fn)(size_t), + void (*free_fn)(void*)) { + return CompressHelper(GZIP, dest, dest_length, source, source_length, + Z_DEFAULT_COMPRESSION, malloc_fn, free_fn); +} +// This code is taken almost verbatim from third_party/zlib/compress.c. The only +// difference is deflateInit2() is called which allows different window bits to +// be set. > 16 causes a gzip header to be emitted rather than a zlib header, +// and negative causes no header to emitted. +// +// Compression level can be a number from 1-9, with 1 being the fastest, 9 being +// the best compression. The default, which the GZIP helper uses, is 6. +int CompressHelper(WrapperType wrapper_type, + Bytef* dest, + uLongf* dest_length, + const Bytef* source, + uLong source_length, + int compression_level, + void* (*malloc_fn)(size_t), + void (*free_fn)(void*)) { + if (compression_level < 0 || compression_level > 9) { + compression_level = Z_DEFAULT_COMPRESSION; + } + z_stream stream; + // FIXME(cavalcantii): z_const is not defined as 'const'. + stream.next_in = static_cast(const_cast(source)); + stream.avail_in = static_cast(source_length); + stream.next_out = dest; + stream.avail_out = static_cast(*dest_length); + if (static_cast(stream.avail_out) != *dest_length) + return Z_BUF_ERROR; + // Cannot convert capturing lambdas to function pointers directly, hence the + // structure. + struct MallocFreeFunctions { + void* (*malloc_fn)(size_t); + void (*free_fn)(void*); + } malloc_free = {malloc_fn, free_fn}; + if (malloc_fn) { + if (!free_fn) + return Z_BUF_ERROR; + auto zalloc = [](void* opaque, uInt items, uInt size) { + return reinterpret_cast(opaque)->malloc_fn(items * + size); + }; + auto zfree = [](void* opaque, void* address) { + return reinterpret_cast(opaque)->free_fn(address); + }; + stream.zalloc = static_cast(zalloc); + stream.zfree = static_cast(zfree); + stream.opaque = static_cast(&malloc_free); + } else { + stream.zalloc = static_cast(0); + stream.zfree = static_cast(0); + stream.opaque = static_cast(0); + } + int err = deflateInit2(&stream, compression_level, Z_DEFLATED, + ZlibStreamWrapperType(wrapper_type), kZlibMemoryLevel, + Z_DEFAULT_STRATEGY); + if (err != Z_OK) + return err; + // This has to exist outside of the if statement to prevent it going off the + // stack before deflate(), which will use this object. + gz_header gzip_header; + if (wrapper_type == GZIP) { + memset(&gzip_header, 0, sizeof(gzip_header)); + err = deflateSetHeader(&stream, &gzip_header); + if (err != Z_OK) + return err; + } + err = deflate(&stream, Z_FINISH); + if (err != Z_STREAM_END) { + deflateEnd(&stream); + return err == Z_OK ? Z_BUF_ERROR : err; + } + *dest_length = stream.total_out; + err = deflateEnd(&stream); + return err; +} +int GzipUncompressHelper(Bytef* dest, + uLongf* dest_length, + const Bytef* source, + uLong source_length) { + return UncompressHelper(GZIP, dest, dest_length, source, source_length); +} +// This code is taken almost verbatim from third_party/zlib/uncompr.c. The only +// difference is inflateInit2() is called which allows different window bits to +// be set. > 16 causes a gzip header to be emitted rather than a zlib header, +// and negative causes no header to emitted. +int UncompressHelper(WrapperType wrapper_type, + Bytef* dest, + uLongf* dest_length, + const Bytef* source, + uLong source_length) { + z_stream stream; + // FIXME(cavalcantii): z_const is not defined as 'const'. + stream.next_in = static_cast(const_cast(source)); + stream.avail_in = static_cast(source_length); + if (static_cast(stream.avail_in) != source_length) + return Z_BUF_ERROR; + stream.next_out = dest; + stream.avail_out = static_cast(*dest_length); + if (static_cast(stream.avail_out) != *dest_length) + return Z_BUF_ERROR; + stream.zalloc = static_cast(0); + stream.zfree = static_cast(0); + int err = inflateInit2(&stream, ZlibStreamWrapperType(wrapper_type)); + if (err != Z_OK) + return err; + err = inflate(&stream, Z_FINISH); + if (err != Z_STREAM_END) { + inflateEnd(&stream); + if (err == Z_NEED_DICT || (err == Z_BUF_ERROR && stream.avail_in == 0)) + return Z_DATA_ERROR; + return err; + } + *dest_length = stream.total_out; + err = inflateEnd(&stream); + return err; +} +} // namespace zlib_internal diff --git a/src/common/compression_utils_portable.h b/src/common/compression_utils_portable.h new file mode 100644 index 0000000000..c08ca79d71 --- /dev/null +++ b/src/common/compression_utils_portable.h @@ -0,0 +1,31 @@ +/* compression_utils_portable.h + * + * Copyright 2019 The Chromium Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the Chromium source repository LICENSE file. + */ +#ifndef THIRD_PARTY_ZLIB_GOOGLE_COMPRESSION_UTILS_PORTABLE_H_ +#define THIRD_PARTY_ZLIB_GOOGLE_COMPRESSION_UTILS_PORTABLE_H_ +#include +#include +namespace zlib_internal { +enum WrapperType { + ZLIB, + GZIP, + ZRAW, +}; +uLongf GzipExpectedCompressedSize(uLongf input_size); +uint32_t GetGzipUncompressedSize(const Bytef* compressed_data, size_t length); +int GzipCompressHelper(Bytef* dest, uLongf* dest_length, const Bytef* source, + uLong source_length, void* (*malloc_fn)(size_t), + void (*free_fn)(void*)); +int CompressHelper(WrapperType wrapper_type, Bytef* dest, uLongf* dest_length, + const Bytef* source, uLong source_length, + int compression_level, void* (*malloc_fn)(size_t), + void (*free_fn)(void*)); +int GzipUncompressHelper(Bytef* dest, uLongf* dest_length, const Bytef* source, + uLong source_length); +int UncompressHelper(WrapperType wrapper_type, Bytef* dest, uLongf* dest_length, + const Bytef* source, uLong source_length); +} // namespace zlib_internal +#endif // THIRD_PARTY_ZLIB_GOOGLE_COMPRESSION_UTILS_PORTABLE_H_ diff --git a/src/diagnostics/unwinding-info-win64.cc b/src/diagnostics/unwinding-info-win64.cc index f3b9a753af..196cd2d97e 100644 --- a/src/diagnostics/unwinding-info-win64.cc +++ b/src/diagnostics/unwinding-info-win64.cc @@ -2,7 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. + #include "src/diagnostics/unwinding-info-win64.h" +#include #include "src/codegen/macro-assembler.h" #include "src/utils/allocation.h" @@ -467,7 +469,7 @@ void LoadNtdllUnwindingFunctions() { base::CallOnce(&load_ntdll_unwinding_functions_once, []() { // Load functions from the ntdll.dll module. HMODULE ntdll_module = - LoadLibraryEx(L"ntdll.dll", nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32); + LoadLibraryExW(L"ntdll.dll", nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32); DCHECK_NOT_NULL(ntdll_module); // This fails on Windows 7. diff --git a/src/heap/base/asm/x64/push_registers_masm.S b/src/heap/base/asm/x64/push_registers_masm.asm similarity index 100% rename from src/heap/base/asm/x64/push_registers_masm.S rename to src/heap/base/asm/x64/push_registers_masm.asm diff --git a/src/objects/js-date-time-format.cc b/src/objects/js-date-time-format.cc index 3e9cff0df8..f4213a7570 100644 --- a/src/objects/js-date-time-format.cc +++ b/src/objects/js-date-time-format.cc @@ -1021,7 +1021,7 @@ std::unique_ptr CreateTimeZone(const char* timezone) { std::string canonicalized = CanonicalizeTimeZoneID(timezone); if (canonicalized.empty()) return std::unique_ptr(); std::unique_ptr tz( - icu::TimeZone::createTimeZone(canonicalized.c_str())); + icu::TimeZone::createTimeZone(icu::UnicodeString(canonicalized.c_str()))); // 18.b If the result of IsValidTimeZoneName(timeZone) is false, then // i. Throw a RangeError exception. if (!IsValidTimeZoneName(*tz)) return std::unique_ptr(); diff --git a/src/objects/js-number-format.cc b/src/objects/js-number-format.cc index daedb2a23a..f6eb77c860 100644 --- a/src/objects/js-number-format.cc +++ b/src/objects/js-number-format.cc @@ -328,17 +328,17 @@ Handle CurrencyDisplayString(Isolate* isolate, const icu::UnicodeString& skeleton) { // Ex: skeleton as // "currency/TWD .00 rounding-mode-half-up unit-width-iso-code" - if (skeleton.indexOf("unit-width-iso-code") >= 0) { + if (skeleton.indexOf(icu::UnicodeString("unit-width-iso-code")) >= 0) { return ReadOnlyRoots(isolate).code_string_handle(); } // Ex: skeleton as // "currency/TWD .00 rounding-mode-half-up unit-width-full-name;" - if (skeleton.indexOf("unit-width-full-name") >= 0) { + if (skeleton.indexOf(icu::UnicodeString("unit-width-full-name")) >= 0) { return ReadOnlyRoots(isolate).name_string_handle(); } // Ex: skeleton as // "currency/TWD .00 rounding-mode-half-up unit-width-narrow; - if (skeleton.indexOf("unit-width-narrow") >= 0) { + if (skeleton.indexOf(icu::UnicodeString("unit-width-narrow")) >= 0) { return ReadOnlyRoots(isolate).narrowSymbol_string_handle(); } // Ex: skeleton as "currency/TWD .00 rounding-mode-half-up" @@ -347,7 +347,7 @@ Handle CurrencyDisplayString(Isolate* isolate, // Return true if there are no "group-off" in the skeleton. bool UseGroupingFromSkeleton(const icu::UnicodeString& skeleton) { - return skeleton.indexOf("group-off") == -1; + return skeleton.indexOf(icu::UnicodeString("group-off")) == -1; } // Parse currency code from skeleton. For example, skeleton as @@ -355,8 +355,8 @@ bool UseGroupingFromSkeleton(const icu::UnicodeString& skeleton) { const icu::UnicodeString CurrencyFromSkeleton( const icu::UnicodeString& skeleton) { const char currency[] = "currency/"; - int32_t index = skeleton.indexOf(currency); - if (index < 0) return ""; + int32_t index = skeleton.indexOf(icu::UnicodeString(currency)); + if (index < 0) return icu::UnicodeString(""); index += static_cast(std::strlen(currency)); return skeleton.tempSubString(index, 3); } @@ -364,11 +364,11 @@ const icu::UnicodeString CurrencyFromSkeleton( const icu::UnicodeString NumberingSystemFromSkeleton( const icu::UnicodeString& skeleton) { const char numbering_system[] = "numbering-system/"; - int32_t index = skeleton.indexOf(numbering_system); - if (index < 0) return "latn"; + int32_t index = skeleton.indexOf(icu::UnicodeString(numbering_system)); + if (index < 0) return icu::UnicodeString("latn"); index += static_cast(std::strlen(numbering_system)); const icu::UnicodeString res = skeleton.tempSubString(index); - index = res.indexOf(" "); + index = res.indexOf(icu::UnicodeString(" ")); if (index < 0) return res; return res.tempSubString(0, index); } @@ -379,7 +379,7 @@ Handle CurrencySignString(Isolate* isolate, // Ex: skeleton as // "currency/TWD .00 rounding-mode-half-up sign-accounting-always" OR // "currency/TWD .00 rounding-mode-half-up sign-accounting-except-zero" - if (skeleton.indexOf("sign-accounting") >= 0) { + if (skeleton.indexOf(icu::UnicodeString(("sign-accounting"))) >= 0) { return ReadOnlyRoots(isolate).accounting_string_handle(); } return ReadOnlyRoots(isolate).standard_string_handle(); @@ -390,12 +390,12 @@ Handle UnitDisplayString(Isolate* isolate, const icu::UnicodeString& skeleton) { // Ex: skeleton as // "unit/length-meter .### rounding-mode-half-up unit-width-full-name" - if (skeleton.indexOf("unit-width-full-name") >= 0) { + if (skeleton.indexOf(icu::UnicodeString("unit-width-full-name")) >= 0) { return ReadOnlyRoots(isolate).long_string_handle(); } // Ex: skeleton as // "unit/length-meter .### rounding-mode-half-up unit-width-narrow". - if (skeleton.indexOf("unit-width-narrow") >= 0) { + if (skeleton.indexOf(icu::UnicodeString("unit-width-narrow")) >= 0) { return ReadOnlyRoots(isolate).narrow_string_handle(); } // Ex: skeleton as @@ -407,18 +407,18 @@ Handle UnitDisplayString(Isolate* isolate, Notation NotationFromSkeleton(const icu::UnicodeString& skeleton) { // Ex: skeleton as // "scientific .### rounding-mode-half-up" - if (skeleton.indexOf("scientific") >= 0) { + if (skeleton.indexOf(icu::UnicodeString("scientific")) >= 0) { return Notation::SCIENTIFIC; } // Ex: skeleton as // "engineering .### rounding-mode-half-up" - if (skeleton.indexOf("engineering") >= 0) { + if (skeleton.indexOf(icu::UnicodeString("engineering")) >= 0) { return Notation::ENGINEERING; } // Ex: skeleton as // "compact-short .### rounding-mode-half-up" or // "compact-long .### rounding-mode-half-up - if (skeleton.indexOf("compact-") >= 0) { + if (skeleton.indexOf(icu::UnicodeString("compact-")) >= 0) { return Notation::COMPACT; } // Ex: skeleton as @@ -445,12 +445,12 @@ Handle CompactDisplayString(Isolate* isolate, const icu::UnicodeString& skeleton) { // Ex: skeleton as // "compact-long .### rounding-mode-half-up" - if (skeleton.indexOf("compact-long") >= 0) { + if (skeleton.indexOf(icu::UnicodeString("compact-long")) >= 0) { return ReadOnlyRoots(isolate).long_string_handle(); } // Ex: skeleton as // "compact-short .### rounding-mode-half-up" - DCHECK_GE(skeleton.indexOf("compact-short"), 0); + DCHECK_GE(skeleton.indexOf(icu::UnicodeString("compact-short")), 0); return ReadOnlyRoots(isolate).short_string_handle(); } @@ -459,21 +459,21 @@ Handle SignDisplayString(Isolate* isolate, const icu::UnicodeString& skeleton) { // Ex: skeleton as // "currency/TWD .00 rounding-mode-half-up sign-never" - if (skeleton.indexOf("sign-never") >= 0) { + if (skeleton.indexOf(icu::UnicodeString("sign-never")) >= 0) { return ReadOnlyRoots(isolate).never_string_handle(); } // Ex: skeleton as // ".### rounding-mode-half-up sign-always" or // "currency/TWD .00 rounding-mode-half-up sign-accounting-always" - if (skeleton.indexOf("sign-always") >= 0 || - skeleton.indexOf("sign-accounting-always") >= 0) { + if (skeleton.indexOf(icu::UnicodeString("sign-always")) >= 0 || + skeleton.indexOf(icu::UnicodeString("sign-accounting-always")) >= 0) { return ReadOnlyRoots(isolate).always_string_handle(); } // Ex: skeleton as // "currency/TWD .00 rounding-mode-half-up sign-accounting-except-zero" or // "currency/TWD .00 rounding-mode-half-up sign-except-zero" - if (skeleton.indexOf("sign-accounting-except-zero") >= 0 || - skeleton.indexOf("sign-except-zero") >= 0) { + if (skeleton.indexOf(icu::UnicodeString("sign-accounting-except-zero")) >= 0 || + skeleton.indexOf(icu::UnicodeString("sign-except-zero")) >= 0) { return ReadOnlyRoots(isolate).exceptZero_string_handle(); } return ReadOnlyRoots(isolate).auto_string_handle(); @@ -603,19 +603,19 @@ std::string UnitFromSkeleton(const icu::UnicodeString& skeleton) { } Style StyleFromSkeleton(const icu::UnicodeString& skeleton) { - if (skeleton.indexOf("currency/") >= 0) { + if (skeleton.indexOf(icu::UnicodeString("currency/")) >= 0) { return Style::CURRENCY; } - if (skeleton.indexOf("percent") >= 0) { + if (skeleton.indexOf(icu::UnicodeString("percent")) >= 0) { // percent precision-integer rounding-mode-half-up scale/100 - if (skeleton.indexOf("scale/100") >= 0) { + if (skeleton.indexOf(icu::UnicodeString("scale/100")) >= 0) { return Style::PERCENT; } else { return Style::UNIT; } } // Before ICU68: "measure-unit/", since ICU68 "unit/" - if (skeleton.indexOf("unit/") >= 0) { + if (skeleton.indexOf(icu::UnicodeString("unit/")) >= 0) { return Style::UNIT; } return Style::DECIMAL; @@ -1043,7 +1043,7 @@ MaybeHandle JSNumberFormat::New(Isolate* isolate, // 14.a. Let currency be the result of converting currency to upper case as // specified in 6.1 std::transform(currency.begin(), currency.end(), currency.begin(), toupper); - currency_ustr = currency.c_str(); + currency_ustr = icu::UnicodeString(currency.c_str()); // 14.b. Set numberFormat.[[Currency]] to currency. if (!currency_ustr.isEmpty()) { diff --git a/src/regexp/gen-regexp-special-case.cc b/src/regexp/gen-regexp-special-case.cc index 9ed338fc1d..61378a33bb 100644 --- a/src/regexp/gen-regexp-special-case.cc +++ b/src/regexp/gen-regexp-special-case.cc @@ -51,7 +51,7 @@ void PrintSpecial(std::ofstream& out) { icu::UnicodeSet special_add; icu::UnicodeSet ignore; UErrorCode status = U_ZERO_ERROR; - icu::UnicodeSet upper("[\\p{Lu}]", status); + icu::UnicodeSet upper(icu::UnicodeString("[\\p{Lu}]"), status); CHECK(U_SUCCESS(status)); // Iterate through all chars in BMP except surrogates. diff --git a/src/regexp/regexp-compiler-tonode.cc b/src/regexp/regexp-compiler-tonode.cc index 90e3ecffab..09c7563554 100644 --- a/src/regexp/regexp-compiler-tonode.cc +++ b/src/regexp/regexp-compiler-tonode.cc @@ -461,7 +461,8 @@ int CompareFirstCharCaseInsensitve(RegExpTree* const* a, RegExpTree* const* b) { RegExpAtom* atom1 = (*a)->AsAtom(); RegExpAtom* atom2 = (*b)->AsAtom(); icu::UnicodeString character1(atom1->data().at(0)); - return character1.caseCompare(atom2->data().at(0), U_FOLD_CASE_DEFAULT); + icu::UnicodeString character2(atom2->data().at(0)); + return character1.caseCompare(character2, U_FOLD_CASE_DEFAULT); } #else diff --git a/src/snapshot/snapshot-compression.cc b/src/snapshot/snapshot-compression.cc index 09ac2eecda..5242886ab3 100644 --- a/src/snapshot/snapshot-compression.cc +++ b/src/snapshot/snapshot-compression.cc @@ -7,7 +7,7 @@ #include "src/base/platform/elapsed-timer.h" #include "src/utils/memcopy.h" #include "src/utils/utils.h" -#include "third_party/zlib/google/compression_utils_portable.h" +#include "src/common/compression_utils_portable.h" namespace v8 { namespace internal { diff --git a/src/snapshot/snapshot-utils.cc b/src/snapshot/snapshot-utils.cc index eb2372372c..7defadb4b1 100644 --- a/src/snapshot/snapshot-utils.cc +++ b/src/snapshot/snapshot-utils.cc @@ -5,7 +5,7 @@ #include "src/snapshot/snapshot-utils.h" #include "src/sanitizer/msan.h" -#include "third_party/zlib/zlib.h" +#include "zlib.h" namespace v8 { namespace internal { diff --git a/src/trap-handler/handler-inside-win.cc b/src/trap-handler/handler-inside-win.cc index e5ce133a6b..aa8af5affc 100644 --- a/src/trap-handler/handler-inside-win.cc +++ b/src/trap-handler/handler-inside-win.cc @@ -22,11 +22,8 @@ // This file contains most of the code that actually runs in an exception // handler context. Some additional code is used both inside and outside the // trap handler. This code can be found in handler-shared.cc. - +#include "src/base/win32-headers.h" #include "src/trap-handler/handler-inside-win.h" - -#include - #include "src/trap-handler/trap-handler-internal.h" #include "src/trap-handler/trap-handler.h" diff --git a/src/trap-handler/handler-outside-win.cc b/src/trap-handler/handler-outside-win.cc index 09673c8ccc..b6553bf2d1 100644 --- a/src/trap-handler/handler-outside-win.cc +++ b/src/trap-handler/handler-outside-win.cc @@ -18,9 +18,7 @@ // For more information, see https://goo.gl/yMeyUY. // // For the code that runs in the trap handler itself, see handler-inside.cc. - -#include - +#include "src/base/win32-headers.h" #include "src/trap-handler/handler-inside-win.h" #include "src/trap-handler/trap-handler.h"