Skip to content
This repository was archived by the owner on Dec 4, 2023. It is now read-only.

Commit 1164b68

Browse files
committed
Backport 'avoid constructor inheritance due to compilation issues'
This fixes #249
1 parent 16e2929 commit 1164b68

5 files changed

Lines changed: 93 additions & 12 deletions

patches/0001-Build-a-standalone-static-library.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From ab2830d1cb3ba231c3ed3de4ed59e19c65e6e1d4 Mon Sep 17 00:00:00 2001
1+
From cbe264bb5c231d06f64b48413f3f268ca490e00a Mon Sep 17 00:00:00 2001
22
From: Petko Bordjukov <bordjukov@gmail.com>
33
Date: Mon, 25 Jul 2016 00:00:19 +0300
4-
Subject: [PATCH 1/4] Build a standalone static library
4+
Subject: [PATCH 1/5] Build a standalone static library
55

66
---
77
gypfiles/standalone.gypi | 3 +++
@@ -22,5 +22,5 @@ index 63930d8aef..d0d00d3f67 100644
2222
'defines!': [
2323
'DEBUG',
2424
--
25-
2.14.2
25+
2.14.3
2626

patches/0002-Don-t-compile-unnecessary-stuff.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 8b85dc00cfffe510e51677641586732396fe4cf0 Mon Sep 17 00:00:00 2001
1+
From 96075b7eeeef64063186d743d1fa36e6de494a6e Mon Sep 17 00:00:00 2001
22
From: Petko Bordjukov <bordjukov@gmail.com>
33
Date: Fri, 28 Jul 2017 11:11:08 +0300
4-
Subject: [PATCH 2/4] Don't compile unnecessary stuff
4+
Subject: [PATCH 2/5] Don't compile unnecessary stuff
55

66
---
77
Makefile | 9 ++-------
@@ -81,5 +81,5 @@ index bc9d9650eb..96820a0ecc 100644
8181
}
8282
]
8383
--
84-
2.14.2
84+
2.14.3
8585

patches/0003-Use-the-fPIC-flag-for-the-static-library.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 6d8fb9964719799a423db755f84dfe582dd0040e Mon Sep 17 00:00:00 2001
1+
From 97bb118756e30cea60216d3e74ba352d76001637 Mon Sep 17 00:00:00 2001
22
From: Petko Bordjukov <bordjukov@gmail.com>
33
Date: Mon, 25 Jul 2016 00:05:47 +0300
4-
Subject: [PATCH 3/4] Use the -fPIC flag for the static library
4+
Subject: [PATCH 3/5] Use the -fPIC flag for the static library
55

66
---
77
gypfiles/standalone.gypi | 2 +-
@@ -21,5 +21,5 @@ index d0d00d3f67..f01bd48596 100644
2121
}],
2222
[ 'clang==0 and coverage==1', {
2323
--
24-
2.14.2
24+
2.14.3
2525

patches/0004-Do-not-embed-debug-symbols-in-macOS-libraries.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From 875cb8e75c8ef5cd471a98b1349f98cb78708217 Mon Sep 17 00:00:00 2001
1+
From b06fb098489c375a4499fb6a62c92a32a0b282d8 Mon Sep 17 00:00:00 2001
22
From: Jb Aviat <jb@sqreen.io>
33
Date: Mon, 27 Feb 2017 11:14:42 +0200
4-
Subject: [PATCH 4/4] Do not embed debug symbols in macOS libraries
4+
Subject: [PATCH 4/5] Do not embed debug symbols in macOS libraries
55

66
This lowers dramatically the produced binary size
77
---
@@ -21,5 +21,5 @@ index f01bd48596..25ca6b8606 100644
2121
'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES',
2222
'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden
2323
--
24-
2.14.2
24+
2.14.3
2525

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
From dae2970a6e2f4ac30a1deee21562ac00cce3794a Mon Sep 17 00:00:00 2001
2+
From: Tobias Tebbi <tebbi@chromium.org>
3+
Date: Tue, 10 Oct 2017 22:39:41 +0200
4+
Subject: [PATCH 5/5] avoid constructor inheritance due to compilation issues
5+
6+
Constructor inheritance of a templated constructor is causing compilation issues for node.js:
7+
8+
https: //github.com/nodejs/node/pull/15362#issue-257007421
9+
Change-Id: I7d099ff5a1a2fd5b19c11112ddef8fe824e509f7
10+
Reviewed-on: https://chromium-review.googlesource.com/707008
11+
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
12+
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
13+
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
14+
Cr-Commit-Position: refs/heads/master@{#48445}
15+
---
16+
src/compiler/common-operator.cc | 4 ++--
17+
src/compiler/common-operator.h | 12 ++++++++----
18+
2 files changed, 10 insertions(+), 6 deletions(-)
19+
20+
diff --git a/src/compiler/common-operator.cc b/src/compiler/common-operator.cc
21+
index c48773920d..d92722f701 100644
22+
--- a/src/compiler/common-operator.cc
23+
+++ b/src/compiler/common-operator.cc
24+
@@ -1255,7 +1255,7 @@ bool IsRestOf(Operator const* op) {
25+
return OpParameter<bool>(op);
26+
}
27+
28+
-const Operator* CommonOperatorBuilder::ObjectState(int object_id,
29+
+const Operator* CommonOperatorBuilder::ObjectState(uint32_t object_id,
30+
int pointer_slots) {
31+
return new (zone()) Operator1<ObjectStateInfo>( // --
32+
IrOpcode::kObjectState, Operator::kPure, // opcode
33+
@@ -1265,7 +1265,7 @@ const Operator* CommonOperatorBuilder::ObjectState(int object_id,
34+
}
35+
36+
const Operator* CommonOperatorBuilder::TypedObjectState(
37+
- int object_id, const ZoneVector<MachineType>* types) {
38+
+ uint32_t object_id, const ZoneVector<MachineType>* types) {
39+
return new (zone()) Operator1<TypedObjectStateInfo>( // --
40+
IrOpcode::kTypedObjectState, Operator::kPure, // opcode
41+
"TypedObjectState", // name
42+
diff --git a/src/compiler/common-operator.h b/src/compiler/common-operator.h
43+
index f7638a3cca..9dfb059518 100644
44+
--- a/src/compiler/common-operator.h
45+
+++ b/src/compiler/common-operator.h
46+
@@ -125,7 +125,8 @@ V8_EXPORT_PRIVATE int ParameterIndexOf(const Operator* const);
47+
const ParameterInfo& ParameterInfoOf(const Operator* const);
48+
49+
struct ObjectStateInfo final : std::pair<uint32_t, int> {
50+
- using std::pair<uint32_t, int>::pair;
51+
+ ObjectStateInfo(uint32_t object_id, int size)
52+
+ : std::pair<uint32_t, int>(object_id, size) {}
53+
uint32_t object_id() const { return first; }
54+
int size() const { return second; }
55+
};
56+
@@ -134,7 +135,10 @@ size_t hash_value(ObjectStateInfo const& p);
57+
58+
struct TypedObjectStateInfo final
59+
: std::pair<uint32_t, const ZoneVector<MachineType>*> {
60+
- using std::pair<uint32_t, const ZoneVector<MachineType>*>::pair;
61+
+ TypedObjectStateInfo(uint32_t object_id,
62+
+ const ZoneVector<MachineType>* machine_types)
63+
+ : std::pair<uint32_t, const ZoneVector<MachineType>*>(object_id,
64+
+ machine_types) {}
65+
uint32_t object_id() const { return first; }
66+
const ZoneVector<MachineType>* machine_types() const { return second; }
67+
};
68+
@@ -385,8 +389,8 @@ class V8_EXPORT_PRIVATE CommonOperatorBuilder final
69+
SparseInputMask bitmask);
70+
const Operator* ArgumentsElementsState(bool is_rest);
71+
const Operator* ArgumentsLengthState(bool is_rest);
72+
- const Operator* ObjectState(int object_id, int pointer_slots);
73+
- const Operator* TypedObjectState(int object_id,
74+
+ const Operator* ObjectState(uint32_t object_id, int pointer_slots);
75+
+ const Operator* TypedObjectState(uint32_t object_id,
76+
const ZoneVector<MachineType>* types);
77+
const Operator* FrameState(BailoutId bailout_id,
78+
OutputFrameStateCombine state_combine,
79+
--
80+
2.14.3
81+

0 commit comments

Comments
 (0)