From 0d84b4019b084f4907296ba76080b88e69806127 Mon Sep 17 00:00:00 2001 From: Jiawen Geng Date: Mon, 6 Sep 2021 02:34:08 +0000 Subject: [PATCH] deps: patch for v8 on windows --- .github/workflows/build-windows.yml | 6 +++++- deps/v8/src/objects/fixed-array-inl.h | 3 ++- deps/v8/src/objects/fixed-array.h | 6 +++--- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 1b0b336f4b8273..d489de708d130b 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -18,7 +18,11 @@ env: jobs: build-windows: if: github.event.pull_request.draft == false - runs-on: windows-latest + strategy: + matrix: + windows: [windows-2019, windows-2022] + fail-fast: false + runs-on: ${{ matrix.windows }} steps: - uses: actions/checkout@v2 - name: Set up Python ${{ env.PYTHON_VERSION }} diff --git a/deps/v8/src/objects/fixed-array-inl.h b/deps/v8/src/objects/fixed-array-inl.h index 3b450634a59ee6..944976748ebebf 100644 --- a/deps/v8/src/objects/fixed-array-inl.h +++ b/deps/v8/src/objects/fixed-array-inl.h @@ -84,7 +84,8 @@ bool FixedArray::is_the_hole(Isolate* isolate, int index) { return get(isolate, index).IsTheHole(isolate); } -#if !defined(_WIN32) || defined(_WIN64) +// dirty hack for vs on windows +#if !defined(_WIN32) || (defined(_WIN64) && _MSC_VER < 1930) void FixedArray::set(int index, Smi value) { DCHECK_NE(map(), GetReadOnlyRoots().fixed_cow_array_map()); DCHECK_LT(static_cast(index), static_cast(length())); diff --git a/deps/v8/src/objects/fixed-array.h b/deps/v8/src/objects/fixed-array.h index 23904b81968509..8d6e4b1dfb7949 100644 --- a/deps/v8/src/objects/fixed-array.h +++ b/deps/v8/src/objects/fixed-array.h @@ -134,7 +134,9 @@ class FixedArray inline bool is_the_hole(Isolate* isolate, int index); // Setter that doesn't need write barrier. -#if defined(_WIN32) && !defined(_WIN64) +#if !defined(_WIN32) || (defined(_WIN64) && _MSC_VER < 1930) + inline void set(int index, Smi value); +#else inline void set(int index, Smi value) { DCHECK_NE(map(), GetReadOnlyRoots().fixed_cow_array_map()); DCHECK_LT(static_cast(index), static_cast(length())); @@ -142,8 +144,6 @@ class FixedArray int offset = OffsetOfElementAt(index); RELAXED_WRITE_FIELD(*this, offset, value); } -#else - inline void set(int index, Smi value); #endif // Setter with explicit barrier mode.