Commit 13a04aba authored by Jon Kunkee's avatar Jon Kunkee Committed by Commit Bot

fix: move V8_EXPORT_PRIVATE marks to prevent unresolvable references

This change fixes missing symbol errors in the Windows 10 on ARM build
of Node.js.

When a whole class is marked for export, all of its members are marked
as well. This can be a problem when inline members call undefined yet
inline members of other classes: the exported function will contain a
reference to the undefined inline function that should be satisfied at
link time, but because the other function is inline no symbol will be
produced that will satisfy that reference.

Clang gets around this by masking inlined class members from export
using /Fc:dllexportInlines-. This is why b0a2a567 worked.

Node.js' Windows builds use MSVC and so do not have access to this
flag. This results in unresolved symbols at link time.

Bug: v8:9465
Change-Id: Ief9c7ab6ba35d22f995939eb62a64d6f1992ed85
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1696771Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62660}
parent 92e75df1
...@@ -95,7 +95,7 @@ class V8_EXPORT_PRIVATE DecoderVisitor { ...@@ -95,7 +95,7 @@ class V8_EXPORT_PRIVATE DecoderVisitor {
}; };
// A visitor that dispatches to a list of visitors. // A visitor that dispatches to a list of visitors.
class V8_EXPORT_PRIVATE DispatchingDecoderVisitor : public DecoderVisitor { class DispatchingDecoderVisitor : public DecoderVisitor {
public: public:
DispatchingDecoderVisitor() {} DispatchingDecoderVisitor() {}
virtual ~DispatchingDecoderVisitor() {} virtual ~DispatchingDecoderVisitor() {}
...@@ -119,7 +119,7 @@ class V8_EXPORT_PRIVATE DispatchingDecoderVisitor : public DecoderVisitor { ...@@ -119,7 +119,7 @@ class V8_EXPORT_PRIVATE DispatchingDecoderVisitor : public DecoderVisitor {
// //
// will call in order visitor methods in V3, V2, V1, V4. // will call in order visitor methods in V3, V2, V1, V4.
void AppendVisitor(DecoderVisitor* visitor); void AppendVisitor(DecoderVisitor* visitor);
void PrependVisitor(DecoderVisitor* visitor); void V8_EXPORT_PRIVATE PrependVisitor(DecoderVisitor* visitor);
void InsertVisitorBefore(DecoderVisitor* new_visitor, void InsertVisitorBefore(DecoderVisitor* new_visitor,
DecoderVisitor* registered_visitor); DecoderVisitor* registered_visitor);
void InsertVisitorAfter(DecoderVisitor* new_visitor, void InsertVisitorAfter(DecoderVisitor* new_visitor,
......
...@@ -1970,7 +1970,7 @@ class InstructionAccurateScope { ...@@ -1970,7 +1970,7 @@ class InstructionAccurateScope {
// original state, even if the lists were modified by some other means. Note // original state, even if the lists were modified by some other means. Note
// that this scope can be nested but the destructors need to run in the opposite // that this scope can be nested but the destructors need to run in the opposite
// order as the constructors. We do not have assertions for this. // order as the constructors. We do not have assertions for this.
class V8_EXPORT_PRIVATE UseScratchRegisterScope { class UseScratchRegisterScope {
public: public:
explicit UseScratchRegisterScope(TurboAssembler* tasm) explicit UseScratchRegisterScope(TurboAssembler* tasm)
: available_(tasm->TmpList()), : available_(tasm->TmpList()),
...@@ -1981,7 +1981,7 @@ class V8_EXPORT_PRIVATE UseScratchRegisterScope { ...@@ -1981,7 +1981,7 @@ class V8_EXPORT_PRIVATE UseScratchRegisterScope {
DCHECK_EQ(availablefp_->type(), CPURegister::kVRegister); DCHECK_EQ(availablefp_->type(), CPURegister::kVRegister);
} }
~UseScratchRegisterScope(); V8_EXPORT_PRIVATE ~UseScratchRegisterScope();
// Take a register from the appropriate temps list. It will be returned // Take a register from the appropriate temps list. It will be returned
// automatically when the scope ends. // automatically when the scope ends.
...@@ -1998,7 +1998,8 @@ class V8_EXPORT_PRIVATE UseScratchRegisterScope { ...@@ -1998,7 +1998,8 @@ class V8_EXPORT_PRIVATE UseScratchRegisterScope {
VRegister AcquireSameSizeAs(const VRegister& reg); VRegister AcquireSameSizeAs(const VRegister& reg);
private: private:
static CPURegister AcquireNextAvailable(CPURegList* available); V8_EXPORT_PRIVATE static CPURegister AcquireNextAvailable(
CPURegList* available);
// Available scratch registers. // Available scratch registers.
CPURegList* available_; // kRegister CPURegList* available_; // kRegister
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment