Skip to content

Commit

Permalink
deps: 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 0d84b40
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build-windows.yml
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
3 changes: 2 additions & 1 deletion deps/v8/src/objects/fixed-array-inl.h
Expand Up @@ -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<unsigned>(index), static_cast<unsigned>(length()));
Expand Down
6 changes: 3 additions & 3 deletions deps/v8/src/objects/fixed-array.h
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) && _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<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 0d84b40

Please sign in to comment.