Commit 2af5cfa8 authored by Peter Kasting's avatar Peter Kasting Committed by V8 LUCI CQ

Fix -Wdeprecated-copy in V8.

TNode has a templated constructor from TNode<U>, but this doesn't take
precedence over the auto-generated copy constructor, which results in a
warning being fired.  Fix by adding an explicit copy constructor that
does what the templated constructor does, which in turn requires fixing
some missing #includes that slipped by due to the lack of
LazyTemplateChecks() in the autogenerated copy constructor.

Bug: chromium:1213098
Change-Id: Iad40950261af8f88396be9227355e4e013837341
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2953503Reviewed-by: 's avatarNico Hartmann <nicohartmann@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75133}
parent dd4d29a2
......@@ -15,8 +15,11 @@
#include "src/compiler/code-assembler.h"
#include "src/objects/arguments.h"
#include "src/objects/bigint.h"
#include "src/objects/cell.h"
#include "src/objects/feedback-vector.h"
#include "src/objects/js-function.h"
#include "src/objects/js-generator.h"
#include "src/objects/js-promise.h"
#include "src/objects/objects.h"
#include "src/objects/promise.h"
#include "src/objects/shared-function-info.h"
......
......@@ -349,6 +349,7 @@ class TNode {
TNode(const TNode<U>& other) : node_(other) {
LazyTemplateChecks();
}
TNode(const TNode& other) : node_(other) { LazyTemplateChecks(); }
TNode() : TNode(nullptr) {}
TNode operator=(TNode other) {
......
......@@ -5198,11 +5198,14 @@ void ImplementationVisitor::GenerateExportedMacrosAssembler(
cc_contents << "#include \"src/objects/fixed-array-inl.h\"\n";
cc_contents << "#include \"src/objects/free-space.h\"\n";
cc_contents << "#include \"src/objects/js-regexp-string-iterator.h\"\n";
cc_contents << "#include \"src/objects/js-weak-refs.h\"\n";
cc_contents << "#include \"src/objects/ordered-hash-table.h\"\n";
cc_contents << "#include \"src/objects/property-descriptor-object.h\"\n";
cc_contents << "#include \"src/objects/stack-frame-info.h\"\n";
cc_contents << "#include \"src/objects/swiss-name-dictionary.h\"\n";
cc_contents << "#include \"src/objects/synthetic-module.h\"\n";
cc_contents << "#include \"src/objects/template-objects.h\"\n";
cc_contents << "#include \"src/objects/torque-defined-classes.h\"\n";
{
IfDefScope intl_scope(cc_contents, "V8_INTL_SUPPORT");
cc_contents << "#include \"src/objects/js-break-iterator.h\"\n";
......
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