Commit cd574c15 authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[torque] Remove objects.h include from class-verifiers

and replace it with forward declarations of all occuring classes.

R=tebbi@chromium.org

Bug: v8:7793
Change-Id: I337b069ef10d52e7e42332c977284b4d2ae8fafb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1609836Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61479}
parent 758a668b
......@@ -3050,7 +3050,7 @@ void ImplementationVisitor::GenerateClassVerifiers(
h_contents << enabled_check;
cc_contents << enabled_check;
h_contents << "\n#include \"src/objects.h\"\n";
cc_contents << "\n#include \"src/objects.h\"\n";
for (const std::string& include_path : GlobalContext::CppIncludes()) {
cc_contents << "#include " << StringLiteralQuote(include_path) << "\n";
......@@ -3067,9 +3067,17 @@ void ImplementationVisitor::GenerateClassVerifiers(
h_contents << namespaces;
cc_contents << namespaces;
// Generate forward declarations to avoid including any headers.
h_contents << "class Isolate;\n";
for (auto i : GlobalContext::GetClasses()) {
ClassType* type = i.second;
if (!type->IsExtern() || !type->ShouldGenerateVerify()) continue;
h_contents << "class " << type->name() << ";\n";
}
const char* verifier_class = "ClassVerifiersFromDSL";
h_contents << "class " << verifier_class << "{\n";
h_contents << "class " << verifier_class << " {\n";
h_contents << " public:\n";
for (auto i : GlobalContext::GetClasses()) {
......
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