Skip to content

Commit 28bf2ca

Browse files
committed
Revert "V8 v12.2 Windows patch (#13)"
This reverts commit 1b8b110.
1 parent 59e2848 commit 28bf2ca

30 files changed

+129
-121
lines changed

deps/v8/src/builtins/builtins-collections-gen.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2782,9 +2782,10 @@ TNode<Word32T> WeakCollectionsBuiltinsAssembler::ShouldShrink(
27822782

27832783
TNode<IntPtrT> WeakCollectionsBuiltinsAssembler::ValueIndexFromKeyIndex(
27842784
TNode<IntPtrT> key_index) {
2785-
return IntPtrAdd(key_index,
2786-
IntPtrConstant(EphemeronHashTable::ShapeT::kEntryValueIndex -
2787-
EphemeronHashTable::kEntryKeyIndex));
2785+
return IntPtrAdd(
2786+
key_index,
2787+
IntPtrConstant(EphemeronHashTable::TodoShape::kEntryValueIndex -
2788+
EphemeronHashTable::kEntryKeyIndex));
27882789
}
27892790

27902791
TF_BUILTIN(WeakMapConstructor, WeakCollectionsBuiltinsAssembler) {

deps/v8/src/codegen/code-stub-assembler.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9455,7 +9455,7 @@ void CodeStubAssembler::NameDictionaryLookup(
94559455
CAST(UnsafeLoadFixedArrayElement(dictionary, index));
94569456
GotoIf(TaggedEqual(current, undefined), if_not_found);
94579457
if (mode == kFindExisting) {
9458-
if (Dictionary::ShapeT::kMatchNeedsHoleCheck) {
9458+
if (Dictionary::TodoShape::kMatchNeedsHoleCheck) {
94599459
GotoIf(TaggedEqual(current, TheHoleConstant()), &next_probe);
94609460
}
94619461
current = LoadName<Dictionary>(current);

deps/v8/src/compiler/turboshaft/assembler.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3934,9 +3934,8 @@ class TSAssembler
39343934
: public Assembler<reducer_list<TurboshaftAssemblerOpInterface, Reducers...,
39353935
TSReducerBase>> {
39363936
public:
3937-
explicit TSAssembler(Graph& input_graph, Graph& output_graph,
3938-
Zone* phase_zone)
3939-
: Assembler(input_graph, output_graph, phase_zone) {}
3937+
using Assembler<reducer_list<TurboshaftAssemblerOpInterface, Reducers...,
3938+
TSReducerBase>>::Assembler;
39403939
};
39413940

39423941
#include "src/compiler/turboshaft/undef-assembler-macros.inc"

deps/v8/src/compiler/turboshaft/code-elimination-and-simplification-phase.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ void CodeEliminationAndSimplificationPhase::Run(Zone* temp_zone) {
3232
// (which, for simplificy, doesn't use the Assembler helper
3333
// methods, but only calls Next::ReduceLoad/Store).
3434
DuplicationOptimizationReducer,
35-
ValueNumberingReducer,
36-
VariableReducerHotfix>::Run<false>(temp_zone);
35+
ValueNumberingReducer>::Run(temp_zone);
3736
}
3837

3938
} // namespace v8::internal::compiler::turboshaft

deps/v8/src/compiler/turboshaft/copying-phase.h

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,6 @@ struct PaddingSpace {
3636
V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os,
3737
PaddingSpace padding);
3838

39-
template <class Next>
40-
class VariableReducerHotfix : public Next {
41-
public:
42-
void SetVariable(Variable var, OpIndex new_index) {}
43-
Variable NewLoopInvariantVariable(MaybeRegisterRepresentation rep) { return Variable(); }
44-
45-
OpIndex GetVariable(Variable var) { return OpIndex(); }
46-
OpIndex GetPredecessorValue(Variable var, int predecessor_index) { return OpIndex(); }
47-
};
48-
4939
template <typename Next>
5040
class ReducerBaseForwarder;
5141
template <typename Next>
@@ -56,9 +46,6 @@ class GraphVisitor : public Next {
5646
template <typename N>
5747
friend class ReducerBaseForwarder;
5848

59-
private:
60-
bool contains_variable_reducer_;
61-
6249
public:
6350
TURBOSHAFT_REDUCER_BOILERPLATE()
6451

@@ -79,8 +66,7 @@ class GraphVisitor : public Next {
7966
// `trace_reduction` is a template parameter to avoid paying for tracing at
8067
// runtime.
8168
template <bool trace_reduction>
82-
void VisitGraph(bool contains_variable_reducer) {
83-
contains_variable_reducer_ = contains_variable_reducer;
69+
void VisitGraph() {
8470
Asm().Analyze();
8571

8672
// Creating initial old-to-new Block mapping.
@@ -191,7 +177,8 @@ class GraphVisitor : public Next {
191177
DCHECK(old_index.valid());
192178
OpIndex result = op_mapping_[old_index];
193179

194-
if (contains_variable_reducer_) {
180+
if constexpr (reducer_list_contains<typename Next::ReducerList,
181+
VariableReducer>::value) {
195182
if (!result.valid()) {
196183
// {op_mapping} doesn't have a mapping for {old_index}. The assembler
197184
// should provide the mapping.
@@ -1307,7 +1294,8 @@ class GraphVisitor : public Next {
13071294
DCHECK(Asm().input_graph().BelongsToThisGraph(old_index));
13081295
DCHECK_IMPLIES(new_index.valid(),
13091296
Asm().output_graph().BelongsToThisGraph(new_index));
1310-
if (contains_variable_reducer_) {
1297+
if constexpr (reducer_list_contains<typename Next::ReducerList,
1298+
VariableReducer>::value) {
13111299
if (current_block_needs_variables_) {
13121300
MaybeVariable var = GetVariableFor(old_index);
13131301
if (!var.has_value()) {
@@ -1404,31 +1392,29 @@ class TSAssembler;
14041392
template <template <class> class... Reducers>
14051393
class CopyingPhaseImpl {
14061394
public:
1407-
template <bool contains_variable_reducer>
14081395
static void Run(Graph& input_graph, Zone* phase_zone,
14091396
bool trace_reductions = false) {
14101397
TSAssembler<GraphVisitor, Reducers...> phase(
14111398
input_graph, input_graph.GetOrCreateCompanion(), phase_zone);
14121399
#ifdef DEBUG
14131400
if (trace_reductions) {
1414-
phase.template VisitGraph<true>(contains_variable_reducer);
1401+
phase.template VisitGraph<true>();
14151402
} else {
1416-
phase.template VisitGraph<false>(contains_variable_reducer);
1403+
phase.template VisitGraph<false>();
14171404
}
14181405
#else
1419-
phase.template VisitGraph<false>(contains_variable_reducer);
1406+
phase.template VisitGraph<false>();
14201407
#endif // DEBUG
14211408
}
14221409
};
14231410

14241411
template <template <typename> typename... Reducers>
14251412
class CopyingPhase {
14261413
public:
1427-
template <bool contains_variable_reducer>
14281414
static void Run(Zone* phase_zone) {
14291415
PipelineData& data = PipelineData::Get();
14301416
Graph& input_graph = data.graph();
1431-
CopyingPhaseImpl<Reducers...>::Run<contains_variable_reducer>(
1417+
CopyingPhaseImpl<Reducers...>::Run(
14321418
input_graph, phase_zone, data.info()->turboshaft_trace_reduction());
14331419
}
14341420
};

deps/v8/src/compiler/turboshaft/csa-optimize-phase.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,23 @@ namespace v8::internal::compiler::turboshaft {
2525
void CsaLoadEliminationPhase::Run(Zone* temp_zone) {
2626
CopyingPhase<VariableReducer, MachineOptimizationReducer,
2727
RequiredOptimizationReducer,
28-
ValueNumberingReducer>::Run<true>(temp_zone);
28+
ValueNumberingReducer>::Run(temp_zone);
2929

3030
CopyingPhase<VariableReducer, LateLoadEliminationReducer,
3131
MachineOptimizationReducer, RequiredOptimizationReducer,
32-
ValueNumberingReducer>::Run<true>(temp_zone);
32+
ValueNumberingReducer>::Run(temp_zone);
3333
}
3434

3535
void CsaLateEscapeAnalysisPhase::Run(Zone* temp_zone) {
3636
CopyingPhase<VariableReducer, LateEscapeAnalysisReducer,
3737
MachineOptimizationReducer, RequiredOptimizationReducer,
38-
ValueNumberingReducer>::Run<true>(temp_zone);
38+
ValueNumberingReducer>::Run(temp_zone);
3939
}
4040

4141
void CsaBranchEliminationPhase::Run(Zone* temp_zone) {
4242
CopyingPhase<VariableReducer, MachineOptimizationReducer,
4343
BranchEliminationReducer, RequiredOptimizationReducer,
44-
ValueNumberingReducer>::Run<true>(temp_zone);
44+
ValueNumberingReducer>::Run(temp_zone);
4545
}
4646

4747
void CsaOptimizePhase::Run(Zone* temp_zone) {
@@ -51,7 +51,7 @@ void CsaOptimizePhase::Run(Zone* temp_zone) {
5151
CopyingPhase<VariableReducer, PretenuringPropagationReducer,
5252
MachineOptimizationReducer, MemoryOptimizationReducer,
5353
RequiredOptimizationReducer,
54-
ValueNumberingReducer>::Run<true>(temp_zone);
54+
ValueNumberingReducer>::Run(temp_zone);
5555
}
5656

5757
} // namespace v8::internal::compiler::turboshaft

deps/v8/src/compiler/turboshaft/debug-feature-lowering-phase.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace v8::internal::compiler::turboshaft {
1111

1212
void DebugFeatureLoweringPhase::Run(Zone* temp_zone) {
1313
#ifdef V8_ENABLE_DEBUG_CODE
14-
turboshaft::CopyingPhase<turboshaft::DebugFeatureLoweringReducer>::Run<false>(
14+
turboshaft::CopyingPhase<turboshaft::DebugFeatureLoweringReducer>::Run(
1515
temp_zone);
1616
#endif
1717
}

deps/v8/src/compiler/turboshaft/int64-lowering-phase.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ void Int64LoweringPhase::Run(Zone* temp_zone) {
1616
#if V8_TARGET_ARCH_32_BIT
1717
turboshaft::CopyingPhase<
1818
turboshaft::Int64LoweringReducer, turboshaft::VariableReducer,
19-
turboshaft::RequiredOptimizationReducer>::Run<true>(temp_zone);
19+
turboshaft::RequiredOptimizationReducer>::Run(temp_zone);
2020
#else
2121
UNREACHABLE();
2222
#endif

deps/v8/src/compiler/turboshaft/loop-peeling-phase.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void LoopPeelingPhase::Run(Zone* temp_zone) {
2323
turboshaft::VariableReducer,
2424
turboshaft::MachineOptimizationReducer,
2525
turboshaft::RequiredOptimizationReducer,
26-
turboshaft::ValueNumberingReducer>::Run<true>(temp_zone);
26+
turboshaft::ValueNumberingReducer>::Run(temp_zone);
2727
}
2828

2929
} // namespace v8::internal::compiler::turboshaft

deps/v8/src/compiler/turboshaft/loop-unrolling-phase.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ void LoopUnrollingPhase::Run(Zone* temp_zone) {
2222
turboshaft::VariableReducer,
2323
turboshaft::MachineOptimizationReducer,
2424
turboshaft::RequiredOptimizationReducer,
25-
turboshaft::ValueNumberingReducer>::Run<true>(temp_zone);
25+
turboshaft::ValueNumberingReducer>::Run(temp_zone);
2626
PipelineData::Get().clear_loop_unrolling_analyzer();
2727
}
2828
}

0 commit comments

Comments
 (0)