Skip to content

Commit

Permalink
fix: patch for v8 on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
gengjiawen committed Sep 6, 2021
1 parent 80785f6 commit 5e84e8d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion deps/v8/src/objects/fixed-array-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ bool FixedArray::is_the_hole(Isolate* isolate, int index) {
return get(isolate, index).IsTheHole(isolate);
}

#if !defined(_WIN32) || defined(_WIN64)
#if !defined(_WIN32) || (defined(_WIN64) && __cplusplus < 201703L)
void FixedArray::set(int index, Smi value) {
DCHECK_NE(map(), GetReadOnlyRoots().fixed_cow_array_map());
DCHECK_LT(static_cast<unsigned>(index), static_cast<unsigned>(length()));
Expand Down
6 changes: 3 additions & 3 deletions deps/v8/src/objects/fixed-array.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,16 +134,16 @@ 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) && __cplusplus < 201703L)
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<unsigned>(index), static_cast<unsigned>(length()));
DCHECK(Object(value).IsSmi());
int offset = OffsetOfElementAt(index);
RELAXED_WRITE_FIELD(*this, offset, value);
}
#else
inline void set(int index, Smi value);
#endif

// Setter with explicit barrier mode.
Expand Down

0 comments on commit 5e84e8d

Please sign in to comment.