Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: cherry-pick 5e227bebf193 from v8 (#34931)
* chore: cherry-pick 5e227bebf193 from v8 * chore: update patches Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
- Loading branch information
1 parent
2afb284
commit 574da5a
Showing
2 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Ben Noordhuis <info@bnoordhuis.nl> | ||
Date: Sat, 9 Jul 2022 14:05:56 +0200 | ||
Subject: Fix undefined symbol linker error | ||
|
||
Assembler::CheckBuffer() was defined inline in a header file but without | ||
inline linkage, causing an undefined symbol link error on arm64 macOS. | ||
|
||
Fixes: https://github.com/nodejs/node-v8/issues/233 | ||
Bug: v8:13055 | ||
Change-Id: Ifb638705e95de72b2e8d472e7092e88d77cf8ba8 | ||
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3749583 | ||
Auto-Submit: Ben Noordhuis <info@bnoordhuis.nl> | ||
Reviewed-by: Leszek Swirski <leszeks@chromium.org> | ||
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> | ||
Commit-Queue: Leszek Swirski <leszeks@chromium.org> | ||
Cr-Commit-Position: refs/heads/main@{#81749} | ||
|
||
diff --git a/src/codegen/arm64/assembler-arm64-inl.h b/src/codegen/arm64/assembler-arm64-inl.h | ||
index da4201b28307a71e988b50e26fc8854fdcc510d4..60deb07b65b5acaaa1e8762cc57730f366f483d2 100644 | ||
--- a/src/codegen/arm64/assembler-arm64-inl.h | ||
+++ b/src/codegen/arm64/assembler-arm64-inl.h | ||
@@ -1066,21 +1066,6 @@ const Register& Assembler::AppropriateZeroRegFor(const CPURegister& reg) const { | ||
return reg.Is64Bits() ? xzr : wzr; | ||
} | ||
|
||
-inline void Assembler::CheckBufferSpace() { | ||
- DCHECK_LT(pc_, buffer_start_ + buffer_->size()); | ||
- if (V8_UNLIKELY(buffer_space() < kGap)) { | ||
- GrowBuffer(); | ||
- } | ||
-} | ||
- | ||
-V8_INLINE void Assembler::CheckBuffer() { | ||
- CheckBufferSpace(); | ||
- if (pc_offset() >= next_veneer_pool_check_) { | ||
- CheckVeneerPool(false, true); | ||
- } | ||
- constpool_.MaybeCheck(); | ||
-} | ||
- | ||
EnsureSpace::EnsureSpace(Assembler* assembler) : block_pools_scope_(assembler) { | ||
assembler->CheckBufferSpace(); | ||
} | ||
diff --git a/src/codegen/arm64/assembler-arm64.h b/src/codegen/arm64/assembler-arm64.h | ||
index 703e4bba9381c57849882e7cb2cdeb751064dd2a..dceda86275d3ef0bfc2b5bea9d8f04957b2e721c 100644 | ||
--- a/src/codegen/arm64/assembler-arm64.h | ||
+++ b/src/codegen/arm64/assembler-arm64.h | ||
@@ -2625,8 +2625,21 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { | ||
} | ||
|
||
void GrowBuffer(); | ||
- V8_INLINE void CheckBufferSpace(); | ||
- void CheckBuffer(); | ||
+ | ||
+ void CheckBufferSpace() { | ||
+ DCHECK_LT(pc_, buffer_start_ + buffer_->size()); | ||
+ if (V8_UNLIKELY(buffer_space() < kGap)) { | ||
+ GrowBuffer(); | ||
+ } | ||
+ } | ||
+ | ||
+ void CheckBuffer() { | ||
+ CheckBufferSpace(); | ||
+ if (pc_offset() >= next_veneer_pool_check_) { | ||
+ CheckVeneerPool(false, true); | ||
+ } | ||
+ constpool_.MaybeCheck(); | ||
+ } | ||
|
||
// Emission of the veneer pools may be blocked in some code sequences. | ||
int veneer_pool_blocked_nesting_; // Block emission if this is not zero. |