mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 20:40:11 +01:00
Some specific features: * Use `SpecificFunction` for vtable entries for generic classes. * Create specific constants for vtable entries in classes derived from generic classes to reference the appropriate specific of the function in the context of such a derived class. * Create specific constants for vtable_ptrs for uses of specific generic classes. --------- Co-authored-by: Richard Smith <richard@metafoo.co.uk>
29 lines
1.1 KiB
C++
29 lines
1.1 KiB
C++
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
// Exceptions. See /LICENSE for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
#ifndef CARBON_TOOLCHAIN_CHECK_CLASS_H_
|
|
#define CARBON_TOOLCHAIN_CHECK_CLASS_H_
|
|
|
|
#include "toolchain/check/context.h"
|
|
|
|
namespace Carbon::Check {
|
|
|
|
// Sets the `Self` type for the class.
|
|
auto SetClassSelfType(Context& context, SemIR::ClassId class_id) -> void;
|
|
|
|
// Starts the class definition, adding `Self` to name lookup.
|
|
auto StartClassDefinition(Context& context, SemIR::Class& class_info,
|
|
SemIR::InstId definition_id) -> void;
|
|
|
|
// Computes the object representation for a fully defined class.
|
|
auto ComputeClassObjectRepr(Context& context, Parse::ClassDefinitionId node_id,
|
|
SemIR::ClassId class_id,
|
|
llvm::ArrayRef<SemIR::InstId> field_decls,
|
|
llvm::ArrayRef<SemIR::InstId> vtable_contents,
|
|
llvm::ArrayRef<SemIR::InstId> body) -> void;
|
|
|
|
} // namespace Carbon::Check
|
|
|
|
#endif // CARBON_TOOLCHAIN_CHECK_CLASS_H_
|