Skip to content

Commit 5034729

Browse files
Vasili Skurydzinrvagg
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: #23958 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Beth Griggs <[email protected]> Reviewed-By: George Adams <[email protected]>
1 parent 9bedae5 commit 5034729

7 files changed

+15
-11
lines changed

deps/v8/include/v8-version.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define V8_MAJOR_VERSION 6
1212
#define V8_MINOR_VERSION 2
1313
#define V8_BUILD_NUMBER 414
14-
#define V8_PATCH_LEVEL 73
14+
#define V8_PATCH_LEVEL 74
1515

1616
// Use 1 for candidates and 0 otherwise.
1717
// (Boolean macro values are not supported by all preprocessors.)

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ Node* BytecodeGraphBuilder::Environment::Checkpoint(
475475
BytecodeGraphBuilder::BytecodeGraphBuilder(
476476
Zone* local_zone, Handle<SharedFunctionInfo> shared_info,
477477
Handle<FeedbackVector> feedback_vector, BailoutId osr_offset,
478-
JSGraph* jsgraph, CallFrequency invocation_frequency,
478+
JSGraph* jsgraph, CallFrequency& invocation_frequency,
479479
SourcePositionTable* source_positions, int inlining_id,
480480
JSTypeHintLowering::Flags flags, bool stack_check)
481481
: local_zone_(local_zone),

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class BytecodeGraphBuilder {
2828
BytecodeGraphBuilder(
2929
Zone* local_zone, Handle<SharedFunctionInfo> shared,
3030
Handle<FeedbackVector> feedback_vector, BailoutId osr_offset,
31-
JSGraph* jsgraph, CallFrequency invocation_frequency,
31+
JSGraph* jsgraph, CallFrequency& invocation_frequency,
3232
SourcePositionTable* source_positions,
3333
int inlining_id = SourcePosition::kNotInlined,
3434
JSTypeHintLowering::Flags flags = JSTypeHintLowering::kNoFlags,

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -539,9 +539,10 @@ Reduction JSInliner::ReduceJSCall(Node* node) {
539539
if (info_->is_bailout_on_uninitialized()) {
540540
flags |= JSTypeHintLowering::kBailoutOnUninitialized;
541541
}
542+
CallFrequency frequency = call.frequency();
542543
BytecodeGraphBuilder graph_builder(
543544
zone(), shared_info, feedback_vector, BailoutId::None(), jsgraph(),
544-
call.frequency(), source_positions_, inlining_id, flags, false);
545+
frequency, source_positions_, inlining_id, flags, false);
545546
graph_builder.CreateGraph();
546547

547548
// Extract the inlinee start/end nodes.

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

+4-2
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,8 @@ const Operator* JSOperatorBuilder::CallForwardVarargs(size_t arity,
731731
parameters); // parameter
732732
}
733733

734-
const Operator* JSOperatorBuilder::Call(size_t arity, CallFrequency frequency,
734+
const Operator* JSOperatorBuilder::Call(size_t arity,
735+
CallFrequency const& frequency,
735736
VectorSlotPair const& feedback,
736737
ConvertReceiverMode convert_mode) {
737738
CallParameters parameters(arity, frequency, feedback, convert_mode);
@@ -751,7 +752,8 @@ const Operator* JSOperatorBuilder::CallWithArrayLike(CallFrequency frequency) {
751752
}
752753

753754
const Operator* JSOperatorBuilder::CallWithSpread(
754-
uint32_t arity, CallFrequency frequency, VectorSlotPair const& feedback) {
755+
uint32_t arity, CallFrequency const& frequency,
756+
VectorSlotPair const& feedback) {
755757
CallParameters parameters(arity, frequency, feedback,
756758
ConvertReceiverMode::kAny);
757759
return new (zone()) Operator1<CallParameters>( // --

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ CallForwardVarargsParameters const& CallForwardVarargsParametersOf(
192192
// used as a parameter by JSCall and JSCallWithSpread operators.
193193
class CallParameters final {
194194
public:
195-
CallParameters(size_t arity, CallFrequency frequency,
195+
CallParameters(size_t arity, CallFrequency const& frequency,
196196
VectorSlotPair const& feedback,
197197
ConvertReceiverMode convert_mode)
198198
: bit_field_(ArityField::encode(arity) |
@@ -201,7 +201,7 @@ class CallParameters final {
201201
feedback_(feedback) {}
202202

203203
size_t arity() const { return ArityField::decode(bit_field_); }
204-
CallFrequency frequency() const { return frequency_; }
204+
CallFrequency const& frequency() const { return frequency_; }
205205
ConvertReceiverMode convert_mode() const {
206206
return ConvertReceiverModeField::decode(bit_field_);
207207
}
@@ -647,12 +647,12 @@ class V8_EXPORT_PRIVATE JSOperatorBuilder final
647647

648648
const Operator* CallForwardVarargs(size_t arity, uint32_t start_index);
649649
const Operator* Call(
650-
size_t arity, CallFrequency frequency = CallFrequency(),
650+
size_t arity, CallFrequency const& frequency = CallFrequency(),
651651
VectorSlotPair const& feedback = VectorSlotPair(),
652652
ConvertReceiverMode convert_mode = ConvertReceiverMode::kAny);
653653
const Operator* CallWithArrayLike(CallFrequency frequency);
654654
const Operator* CallWithSpread(
655-
uint32_t arity, CallFrequency frequency = CallFrequency(),
655+
uint32_t arity, CallFrequency const& frequency = CallFrequency(),
656656
VectorSlotPair const& feedback = VectorSlotPair());
657657
const Operator* CallRuntime(Runtime::FunctionId id);
658658
const Operator* CallRuntime(Runtime::FunctionId id, size_t arity);

deps/v8/src/compiler/pipeline.cc

+2-1
Original file line numberDiff line numberDiff line change
@@ -890,10 +890,11 @@ struct GraphBuilderPhase {
890890
if (data->info()->is_bailout_on_uninitialized()) {
891891
flags |= JSTypeHintLowering::kBailoutOnUninitialized;
892892
}
893+
CallFrequency frequency = CallFrequency(1.0f);
893894
BytecodeGraphBuilder graph_builder(
894895
temp_zone, data->info()->shared_info(),
895896
handle(data->info()->closure()->feedback_vector()),
896-
data->info()->osr_offset(), data->jsgraph(), CallFrequency(1.0f),
897+
data->info()->osr_offset(), data->jsgraph(), frequency,
897898
data->source_positions(), SourcePosition::kNotInlined, flags);
898899
graph_builder.CreateGraph();
899900
}

0 commit comments

Comments
 (0)