Skip to content

Commit f2d3bad

Browse files
Vasili SkurydzinMylesBorins
Vasili Skurydzin
authored andcommitted
deps: cherry-pick d2e0166 from V8 upstream
Original commit message: ppc64, aix: Pass CallFrequency object by const reference to avoid value copy error. Bug: v8:8193 GCC bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61976 Change-Id: I0d4efca4da03ef82651325e15ddf2160022bc8de Reviewed-on: https://chromium-review.googlesource.com/1228633 Reviewed-by: Michael Starzinger <[email protected]> Reviewed-by: Daniel Clifford <[email protected]> Reviewed-by: Junliang Yan <[email protected]> Commit-Queue: Junliang Yan <[email protected]> Cr-Commit-Position: refs/heads/master@{#56275} PR-URL: #23695 Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Yang Guo <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]>
1 parent a4d67c9 commit f2d3bad

File tree

7 files changed

+15
-12
lines changed

7 files changed

+15
-12
lines changed

common.gypi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
# Reset this number to 0 on major V8 upgrades.
3535
# Increment by one for each non-official patch applied to deps/v8.
36-
'v8_embedder_string': '-node.41',
36+
'v8_embedder_string': '-node.42',
3737

3838
# Enable disassembler for `--print-code` v8 options
3939
'v8_enable_disassembler': 1,

deps/v8/src/compiler/bytecode-graph-builder.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ Node* BytecodeGraphBuilder::Environment::Checkpoint(
514514
BytecodeGraphBuilder::BytecodeGraphBuilder(
515515
Zone* local_zone, Handle<SharedFunctionInfo> shared_info,
516516
Handle<FeedbackVector> feedback_vector, BailoutId osr_offset,
517-
JSGraph* jsgraph, CallFrequency invocation_frequency,
517+
JSGraph* jsgraph, CallFrequency& invocation_frequency,
518518
SourcePositionTable* source_positions, Handle<Context> native_context,
519519
int inlining_id, JSTypeHintLowering::Flags flags, bool stack_check,
520520
bool analyze_environment_liveness)

deps/v8/src/compiler/bytecode-graph-builder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class BytecodeGraphBuilder {
3131
BytecodeGraphBuilder(
3232
Zone* local_zone, Handle<SharedFunctionInfo> shared,
3333
Handle<FeedbackVector> feedback_vector, BailoutId osr_offset,
34-
JSGraph* jsgraph, CallFrequency invocation_frequency,
34+
JSGraph* jsgraph, CallFrequency& invocation_frequency,
3535
SourcePositionTable* source_positions, Handle<Context> native_context,
3636
int inlining_id = SourcePosition::kNotInlined,
3737
JSTypeHintLowering::Flags flags = JSTypeHintLowering::kNoFlags,

deps/v8/src/compiler/js-inlining.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,9 +484,10 @@ Reduction JSInliner::ReduceJSCall(Node* node) {
484484
if (info_->is_bailout_on_uninitialized()) {
485485
flags |= JSTypeHintLowering::kBailoutOnUninitialized;
486486
}
487+
CallFrequency frequency = call.frequency();
487488
BytecodeGraphBuilder graph_builder(
488489
zone(), shared_info, feedback_vector, BailoutId::None(), jsgraph(),
489-
call.frequency(), source_positions_, native_context(), inlining_id,
490+
frequency, source_positions_, native_context(), inlining_id,
490491
flags, false, info_->is_analyze_environment_liveness());
491492
graph_builder.CreateGraph();
492493

deps/v8/src/compiler/js-operator.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,8 @@ const Operator* JSOperatorBuilder::CallForwardVarargs(size_t arity,
794794
parameters); // parameter
795795
}
796796

797-
const Operator* JSOperatorBuilder::Call(size_t arity, CallFrequency frequency,
797+
const Operator* JSOperatorBuilder::Call(size_t arity,
798+
CallFrequency const& frequency,
798799
VectorSlotPair const& feedback,
799800
ConvertReceiverMode convert_mode,
800801
SpeculationMode speculation_mode) {
@@ -818,8 +819,8 @@ const Operator* JSOperatorBuilder::CallWithArrayLike(CallFrequency frequency) {
818819
}
819820

820821
const Operator* JSOperatorBuilder::CallWithSpread(
821-
uint32_t arity, CallFrequency frequency, VectorSlotPair const& feedback,
822-
SpeculationMode speculation_mode) {
822+
uint32_t arity, CallFrequency const& frequency,
823+
VectorSlotPair const& feedback, SpeculationMode speculation_mode) {
823824
DCHECK_IMPLIES(speculation_mode == SpeculationMode::kAllowSpeculation,
824825
feedback.IsValid());
825826
CallParameters parameters(arity, frequency, feedback,

deps/v8/src/compiler/js-operator.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ CallForwardVarargsParameters const& CallForwardVarargsParametersOf(
160160
// used as a parameter by JSCall and JSCallWithSpread operators.
161161
class CallParameters final {
162162
public:
163-
CallParameters(size_t arity, CallFrequency frequency,
163+
CallParameters(size_t arity, CallFrequency const& frequency,
164164
VectorSlotPair const& feedback,
165165
ConvertReceiverMode convert_mode,
166166
SpeculationMode speculation_mode)
@@ -171,7 +171,7 @@ class CallParameters final {
171171
feedback_(feedback) {}
172172

173173
size_t arity() const { return ArityField::decode(bit_field_); }
174-
CallFrequency frequency() const { return frequency_; }
174+
CallFrequency const& frequency() const { return frequency_; }
175175
ConvertReceiverMode convert_mode() const {
176176
return ConvertReceiverModeField::decode(bit_field_);
177177
}
@@ -721,13 +721,13 @@ class V8_EXPORT_PRIVATE JSOperatorBuilder final
721721

722722
const Operator* CallForwardVarargs(size_t arity, uint32_t start_index);
723723
const Operator* Call(
724-
size_t arity, CallFrequency frequency = CallFrequency(),
724+
size_t arity, CallFrequency const& frequency = CallFrequency(),
725725
VectorSlotPair const& feedback = VectorSlotPair(),
726726
ConvertReceiverMode convert_mode = ConvertReceiverMode::kAny,
727727
SpeculationMode speculation_mode = SpeculationMode::kDisallowSpeculation);
728728
const Operator* CallWithArrayLike(CallFrequency frequency);
729729
const Operator* CallWithSpread(
730-
uint32_t arity, CallFrequency frequency = CallFrequency(),
730+
uint32_t arity, CallFrequency const& frequency = CallFrequency(),
731731
VectorSlotPair const& feedback = VectorSlotPair(),
732732
SpeculationMode speculation_mode = SpeculationMode::kDisallowSpeculation);
733733
const Operator* CallRuntime(Runtime::FunctionId id);

deps/v8/src/compiler/pipeline.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1059,10 +1059,11 @@ struct GraphBuilderPhase {
10591059
if (data->info()->is_bailout_on_uninitialized()) {
10601060
flags |= JSTypeHintLowering::kBailoutOnUninitialized;
10611061
}
1062+
CallFrequency frequency = CallFrequency(1.0f);
10621063
BytecodeGraphBuilder graph_builder(
10631064
temp_zone, data->info()->shared_info(),
10641065
handle(data->info()->closure()->feedback_vector()),
1065-
data->info()->osr_offset(), data->jsgraph(), CallFrequency(1.0f),
1066+
data->info()->osr_offset(), data->jsgraph(), frequency,
10661067
data->source_positions(), data->native_context(),
10671068
SourcePosition::kNotInlined, flags, true,
10681069
data->info()->is_analyze_environment_liveness());

0 commit comments

Comments
 (0)