mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 06:21:04 +01:00
Reconcile function default values between decl and def (#7665)
Updates the pattern matching code to support unspecified default values. Adds logic to decl and def merge code to diagnose mismatches in defaults if specified in both places, or if let entirely unspecified. Per https://github.com/carbon-language/carbon-lang/pull/7521.
This commit is contained in:
@@ -141,8 +141,7 @@ class FullPatternStack {
|
||||
// Marks the end of checking and pattern matching for the current
|
||||
// full-pattern.
|
||||
auto PopFullPattern() -> void {
|
||||
auto kind = kind_stack_.back();
|
||||
kind_stack_.pop_back();
|
||||
auto kind = kind_stack_.pop_back_val();
|
||||
bind_name_stack_.PopArray();
|
||||
int index = next_var_index_stack_.pop_back_val();
|
||||
CARBON_CHECK(index < 0 || static_cast<size_t>(index) ==
|
||||
@@ -222,7 +221,6 @@ class FullPatternStack {
|
||||
// the stack. Note default values are only supported for explicit parameter
|
||||
// lists.
|
||||
auto GetDefaultValues() -> llvm::ArrayRef<SemIR::InstId> {
|
||||
CARBON_CHECK(!default_values_stack_.empty());
|
||||
return default_values_stack_.PeekArray();
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "toolchain/base/kind_switch.h"
|
||||
#include "toolchain/check/action.h"
|
||||
#include "toolchain/check/convert.h"
|
||||
#include "toolchain/check/eval.h"
|
||||
#include "toolchain/check/generic.h"
|
||||
#include "toolchain/check/inst.h"
|
||||
#include "toolchain/check/merge.h"
|
||||
@@ -304,6 +305,102 @@ static auto CheckFunctionEvaluationModeMatches(
|
||||
return false;
|
||||
}
|
||||
|
||||
// Given a parameter patterns block, extracts the locations of all
|
||||
// `SemIR::DefaultValuePattern` instructions and returns them in an array.
|
||||
static auto ExtractDefaultValueLocations(Context& context,
|
||||
SemIR::InstBlockId param_patterns_id)
|
||||
-> llvm::SmallVector<SemIR::LocId> {
|
||||
llvm::SmallVector<SemIR::LocId> locations;
|
||||
for (auto inst_id : context.inst_blocks().GetOrEmpty(param_patterns_id)) {
|
||||
if (context.insts().Is<SemIR::DefaultValuePattern>(inst_id)) {
|
||||
locations.push_back(SemIR::LocId(inst_id));
|
||||
}
|
||||
}
|
||||
return locations;
|
||||
}
|
||||
|
||||
// Checks every parameter in `prev_function` and `new_function`, that if they
|
||||
// both specify a default value those values are identical, or that at most
|
||||
// one has an unspecified default value. If `diagnose` is true, issues
|
||||
// diagnostics where either condition is violated. Returns true if every
|
||||
// parameter met both criteria.
|
||||
static auto CheckDefaultValueConsistency(Context& context,
|
||||
const SemIR::Function& new_function,
|
||||
const SemIR::Function& prev_function,
|
||||
bool diagnose) -> bool {
|
||||
// Both functions must either have defaults or not.
|
||||
CARBON_CHECK(prev_function.call_param_default_values_id.has_value() ==
|
||||
new_function.call_param_default_values_id.has_value());
|
||||
|
||||
if (!prev_function.call_param_default_values_id.has_value()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
auto prev_value_inst_ids =
|
||||
context.inst_blocks().Get(prev_function.call_param_default_values_id);
|
||||
auto new_value_inst_ids =
|
||||
context.inst_blocks().Get(new_function.call_param_default_values_id);
|
||||
CARBON_CHECK(prev_value_inst_ids.size() == new_value_inst_ids.size());
|
||||
|
||||
llvm::SmallVector<size_t> indices_without_values;
|
||||
llvm::SmallVector<size_t> indices_with_different_values;
|
||||
for (size_t i = 0; i < prev_value_inst_ids.size(); ++i) {
|
||||
bool prev_value_specified =
|
||||
!context.insts().Is<SemIR::UnspecifiedValue>(prev_value_inst_ids[i]);
|
||||
bool new_value_specified =
|
||||
!context.insts().Is<SemIR::UnspecifiedValue>(new_value_inst_ids[i]);
|
||||
if (!prev_value_specified && !new_value_specified) {
|
||||
indices_without_values.push_back(i);
|
||||
} else if (prev_value_specified && new_value_specified) {
|
||||
auto prev_constant_id = TryEvalInst(context, prev_value_inst_ids[i]);
|
||||
CARBON_CHECK(prev_constant_id != SemIR::ConstantId::NotConstant);
|
||||
auto new_constant_id = TryEvalInst(context, new_value_inst_ids[i]);
|
||||
CARBON_CHECK(new_constant_id != SemIR::ConstantId::NotConstant);
|
||||
if (prev_constant_id != new_constant_id) {
|
||||
indices_with_different_values.push_back(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool check_ok =
|
||||
indices_without_values.empty() && indices_with_different_values.empty();
|
||||
|
||||
if (check_ok || !diagnose) {
|
||||
return check_ok;
|
||||
}
|
||||
|
||||
// TODO: for imported functions we don't seem to have the previous parameter
|
||||
// pattern block, so we can't add their locations to the diagnostic.
|
||||
auto prev_param_locations =
|
||||
ExtractDefaultValueLocations(context, prev_function.param_patterns_id);
|
||||
auto new_param_locations =
|
||||
ExtractDefaultValueLocations(context, new_function.param_patterns_id);
|
||||
|
||||
for (auto index : indices_without_values) {
|
||||
CARBON_DIAGNOSTIC(PatternDefaultValueNeverSpecified, Error,
|
||||
"no value for default number {0} is ever specified.",
|
||||
size_t);
|
||||
CARBON_DIAGNOSTIC(PatternDefaultValueNeverSpecifiedNote, Note,
|
||||
"previous declaration here.");
|
||||
auto builder = context.emitter().Build(
|
||||
new_param_locations[index], PatternDefaultValueNeverSpecified, index);
|
||||
if (index < prev_param_locations.size()) {
|
||||
builder.Note(prev_param_locations[index],
|
||||
PatternDefaultValueNeverSpecifiedNote);
|
||||
}
|
||||
builder.Emit();
|
||||
}
|
||||
|
||||
for (auto index : indices_with_different_values) {
|
||||
CARBON_DIAGNOSTIC(PatternDefaultValueDiffers, Error,
|
||||
"default value differs from the previous declaration.");
|
||||
context.emitter().Emit(new_param_locations[index],
|
||||
PatternDefaultValueDiffers);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
auto CheckFunctionTypeMatches(Context& context,
|
||||
const SemIR::Function& new_function,
|
||||
const SemIR::Function& prev_function,
|
||||
@@ -322,6 +419,10 @@ auto CheckFunctionTypeMatches(Context& context,
|
||||
diagnose)) {
|
||||
return false;
|
||||
}
|
||||
if (!CheckDefaultValueConsistency(context, new_function, prev_function,
|
||||
diagnose)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -518,6 +518,7 @@ static auto CheckUnusedBindingsInPattern(Context& context,
|
||||
SemIR::InstId pattern_id) -> void {
|
||||
llvm::SmallVector<SemIR::InstId> work_list;
|
||||
work_list.push_back(pattern_id);
|
||||
|
||||
while (!work_list.empty()) {
|
||||
auto current_id = work_list.pop_back_val();
|
||||
auto inst = context.insts().Get(current_id);
|
||||
@@ -611,7 +612,7 @@ static auto DiagnoseOutOfOrderDefaults(Context& context,
|
||||
|
||||
// True if the current pattern being processed has a default value
|
||||
// specified.
|
||||
bool pattern_has_default = false;
|
||||
bool current_pattern_has_default = false;
|
||||
|
||||
// The current pattern we are processing, stored separately since it's been
|
||||
// popped from the `pattern_work_list` and already processed, just may need
|
||||
@@ -622,38 +623,40 @@ static auto DiagnoseOutOfOrderDefaults(Context& context,
|
||||
llvm::SmallVector<SemIR::InstId> pattern_work_list;
|
||||
|
||||
// A list of subpatterns missing required defaults, to coalesce error
|
||||
// reporting into a single diagnostic and limit diagnostic spam.
|
||||
// reporting into a single diagnostic.
|
||||
llvm::SmallVector<SemIR::InstId> patterns_missing_defaults;
|
||||
};
|
||||
|
||||
llvm::SmallVector<PatternLevelState> level_state_stack;
|
||||
level_state_stack.push_back({});
|
||||
for (auto subpattern_id :
|
||||
llvm::reverse(context.inst_blocks().Get(function.param_patterns_id))) {
|
||||
level_state_stack.back().subpattern_ids.push_back(subpattern_id);
|
||||
}
|
||||
llvm::append_range(
|
||||
level_state_stack.back().subpattern_ids,
|
||||
llvm::reverse(context.inst_blocks().Get(function.param_patterns_id)));
|
||||
|
||||
while (!level_state_stack.empty()) {
|
||||
auto& state = level_state_stack.back();
|
||||
while (!state.subpattern_ids.empty() || !state.pattern_work_list.empty() ||
|
||||
state.current_id.has_value()) {
|
||||
if (!state.current_id.has_value()) {
|
||||
state.pattern_work_list.push_back(state.subpattern_ids.pop_back_val());
|
||||
state.pattern_has_default = false;
|
||||
PatternLevelState* state = &level_state_stack.back();
|
||||
while (!state->subpattern_ids.empty() ||
|
||||
!state->pattern_work_list.empty() || state->current_id.has_value()) {
|
||||
// If we're not resuming processing a pattern from a nested state, start
|
||||
// processing the next subpattern.
|
||||
if (!state->current_id.has_value()) {
|
||||
state->pattern_work_list.push_back(
|
||||
state->subpattern_ids.pop_back_val());
|
||||
state->current_pattern_has_default = false;
|
||||
}
|
||||
while (!state.pattern_work_list.empty()) {
|
||||
state.current_id = state.pattern_work_list.pop_back_val();
|
||||
auto inst = context.insts().Get(state.current_id);
|
||||
while (!state->pattern_work_list.empty()) {
|
||||
state->current_id = state->pattern_work_list.pop_back_val();
|
||||
auto inst = context.insts().Get(state->current_id);
|
||||
CARBON_KIND_SWITCH(inst) {
|
||||
case CARBON_KIND(SemIR::DefaultValuePattern default_value_pattern): {
|
||||
state.pattern_has_default = true;
|
||||
state.pattern_work_list.push_back(
|
||||
state->current_pattern_has_default = true;
|
||||
state->pattern_work_list.push_back(
|
||||
default_value_pattern.subpattern_id);
|
||||
break;
|
||||
}
|
||||
case CARBON_KIND(
|
||||
SemIR::WrapperBindingPattern wrapper_binding_pattern): {
|
||||
state.pattern_work_list.push_back(
|
||||
state->pattern_work_list.push_back(
|
||||
wrapper_binding_pattern.subpattern_id);
|
||||
break;
|
||||
}
|
||||
@@ -663,30 +666,31 @@ static auto DiagnoseOutOfOrderDefaults(Context& context,
|
||||
if (!elements.empty()) {
|
||||
// Start a new state for the nested tuple pattern elements.
|
||||
level_state_stack.push_back({});
|
||||
state = level_state_stack.back();
|
||||
for (auto element_id : llvm::reverse(elements)) {
|
||||
state.subpattern_ids.push_back(element_id);
|
||||
}
|
||||
state = &level_state_stack.back();
|
||||
llvm::append_range(state->subpattern_ids,
|
||||
llvm::reverse(elements));
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
// We only process patterns containing subpatterns, so this is an
|
||||
// intentional no-op.
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Finished processing this subpattern, detect a missing default if
|
||||
// required.
|
||||
if (state.pattern_has_default &&
|
||||
!state.first_pattern_with_default.has_value()) {
|
||||
state.first_pattern_with_default = state.current_id;
|
||||
} else if (!state.pattern_has_default &&
|
||||
state.first_pattern_with_default.has_value()) {
|
||||
state.patterns_missing_defaults.push_back(state.current_id);
|
||||
if (state->current_pattern_has_default &&
|
||||
!state->first_pattern_with_default.has_value()) {
|
||||
state->first_pattern_with_default = state->current_id;
|
||||
} else if (!state->current_pattern_has_default &&
|
||||
state->first_pattern_with_default.has_value()) {
|
||||
state->patterns_missing_defaults.push_back(state->current_id);
|
||||
}
|
||||
state.current_id = SemIR::InstId::None;
|
||||
state->current_id = SemIR::InstId::None;
|
||||
}
|
||||
// Finished processing this tuple-pattern, emit diagnostics if any.
|
||||
if (!state.patterns_missing_defaults.empty()) {
|
||||
if (!state->patterns_missing_defaults.empty()) {
|
||||
CARBON_DIAGNOSTIC(RequiredPatternDefaultValueMissing, Error,
|
||||
"this pattern is missing a required default value.");
|
||||
CARBON_DIAGNOSTIC(RequiredPatternDefaultValueFirstDefault, Note,
|
||||
@@ -695,16 +699,15 @@ static auto DiagnoseOutOfOrderDefaults(Context& context,
|
||||
CARBON_DIAGNOSTIC(
|
||||
RequiredPatternDefaultValueMissingAdditional, Note,
|
||||
"this pattern is also missing a required default value.");
|
||||
auto inst_ref =
|
||||
llvm::ArrayRef<SemIR::InstId>(state.patterns_missing_defaults);
|
||||
auto diag = context.emitter().Build(inst_ref.consume_front(),
|
||||
RequiredPatternDefaultValueMissing);
|
||||
diag.Note(state.first_pattern_with_default,
|
||||
RequiredPatternDefaultValueFirstDefault);
|
||||
auto inst_ref = llvm::ArrayRef(state->patterns_missing_defaults);
|
||||
auto builder = context.emitter().Build(
|
||||
inst_ref.consume_front(), RequiredPatternDefaultValueMissing);
|
||||
for (auto inst_id : inst_ref) {
|
||||
diag.Note(inst_id, RequiredPatternDefaultValueMissingAdditional);
|
||||
builder.Note(inst_id, RequiredPatternDefaultValueMissingAdditional);
|
||||
}
|
||||
diag.Emit();
|
||||
builder.Note(state->first_pattern_with_default,
|
||||
RequiredPatternDefaultValueFirstDefault);
|
||||
builder.Emit();
|
||||
}
|
||||
level_state_stack.pop_back();
|
||||
}
|
||||
|
||||
@@ -154,7 +154,12 @@ auto HandleParseNode(Context& context, Parse::PatternListCommaId /*node_id*/)
|
||||
|
||||
auto HandleParseNode(Context& context, Parse::DefaultValueUnspecifiedId node_id)
|
||||
-> bool {
|
||||
return context.TODO(node_id, "pattern default values");
|
||||
context.node_stack().Push(
|
||||
node_id, AddInst<SemIR::UnspecifiedValue>(
|
||||
context, node_id,
|
||||
{.type_id = GetSingletonType(
|
||||
context, SemIR::UnspecifiedValueType::TypeInstId)}));
|
||||
return true;
|
||||
}
|
||||
|
||||
auto HandleParseNode(Context& context,
|
||||
@@ -181,23 +186,24 @@ auto HandleParseNode(Context& context, Parse::DefaultValuePatternId node_id)
|
||||
return false;
|
||||
}
|
||||
|
||||
// Evaluate the default value constant.
|
||||
auto expr_const_id = TryEvalInst(context, expr_inst_id);
|
||||
if (expr_const_id == SemIR::ConstantId::NotConstant) {
|
||||
CARBON_DIAGNOSTIC(PatternDefaultValueNotConstant, Error,
|
||||
"default value for pattern must be constant");
|
||||
context.emitter().Emit(LocIdForDiagnostics(expr_node_id),
|
||||
PatternDefaultValueNotConstant);
|
||||
context.emitter().Emit(
|
||||
LocIdForDiagnostics(context.insts().GetCanonicalLocId(expr_inst_id)),
|
||||
PatternDefaultValueNotConstant);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Look up the instruction associated with the evaluated constant.
|
||||
auto constant_inst_id = context.constant_values().GetInstId(expr_const_id);
|
||||
CARBON_CHECK(constant_inst_id != SemIR::InstId::None);
|
||||
auto value_inst_id = context.constant_values().GetInstId(expr_const_id);
|
||||
CARBON_CHECK(value_inst_id.has_value());
|
||||
|
||||
// Add the value to the default values array in the full pattern stack, for
|
||||
// recovery later in the NameComponent.
|
||||
auto default_value_id =
|
||||
context.full_pattern_stack().AddDefaultValue(constant_inst_id);
|
||||
context.full_pattern_stack().AddDefaultValue(value_inst_id);
|
||||
|
||||
// Next on the node stack should be the pattern for which this default was
|
||||
// specified. We pop that so we can issue the DefaultValuePattern in its
|
||||
|
||||
@@ -2300,6 +2300,24 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver,
|
||||
.query_specific_interface_id = query_specific_interface_id});
|
||||
}
|
||||
|
||||
static auto TryResolveTypedInst(ImportRefResolver& resolver,
|
||||
SemIR::DefaultValuePattern inst)
|
||||
-> ResolveResult {
|
||||
auto subpattern = GetLocalImportRefInfo(resolver, inst.subpattern_id);
|
||||
if (resolver.HasNewWork()) {
|
||||
return ResolveResult::Retry();
|
||||
}
|
||||
|
||||
return ResolveResult::Deduplicated<SemIR::DefaultValuePattern>(
|
||||
resolver,
|
||||
{
|
||||
.type_id = resolver.local_types().GetTypeIdForTypeConstantId(
|
||||
subpattern.local_type_const_id),
|
||||
.subpattern_id = AddLoadedImportRef(resolver, subpattern),
|
||||
.default_value_id = inst.default_value_id,
|
||||
});
|
||||
}
|
||||
|
||||
static auto TryResolveTypedInst(ImportRefResolver& resolver,
|
||||
SemIR::ExportDecl inst) -> ResolveResult {
|
||||
auto value_id = GetLocalConstantId(resolver, inst.value_id);
|
||||
@@ -2467,6 +2485,17 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver,
|
||||
|
||||
auto call_param_patterns = GetLocalBlockImportRefInfo(
|
||||
resolver, import_function.call_param_patterns_id);
|
||||
auto call_param_default_values = GetLocalBlockImportRefInfo(
|
||||
resolver, import_function.call_param_default_values_id);
|
||||
llvm::SmallVector<SemIR::InstId> imported_default_values;
|
||||
if (call_param_default_values.has_value()) {
|
||||
auto import_fn = [&resolver](const auto& import_info) {
|
||||
return GetLocalConstantInstId(resolver, import_info.import_inst_id);
|
||||
};
|
||||
llvm::append_range(imported_default_values,
|
||||
llvm::map_range(*call_param_default_values, import_fn));
|
||||
}
|
||||
|
||||
auto return_type_const_id = SemIR::ConstantId::None;
|
||||
if (import_function.return_type_inst_id.has_value()) {
|
||||
return_type_const_id =
|
||||
@@ -2516,6 +2545,10 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver,
|
||||
// Add the function declaration.
|
||||
new_function.call_param_patterns_id =
|
||||
AddLoadedImportRefBlock(resolver, call_param_patterns);
|
||||
if (call_param_default_values.has_value()) {
|
||||
new_function.call_param_default_values_id =
|
||||
resolver.local_inst_blocks().Add(imported_default_values);
|
||||
}
|
||||
new_function.parent_scope_id = parent_scope_id;
|
||||
new_function.implicit_param_patterns_id =
|
||||
AddLoadedImportRefBlock(resolver, implicit_param_patterns);
|
||||
@@ -4340,6 +4373,16 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver,
|
||||
.element_type_inst_id = elem_const_inst_id});
|
||||
}
|
||||
|
||||
static auto TryResolveTypedInst(ImportRefResolver& resolver,
|
||||
SemIR::UnspecifiedValue inst) -> ResolveResult {
|
||||
CARBON_CHECK(resolver.import_ir().types().Is<SemIR::UnspecifiedValueType>(
|
||||
inst.type_id));
|
||||
auto type_id = GetSingletonType(resolver.local_context(),
|
||||
SemIR::UnspecifiedValueType::TypeInstId);
|
||||
return ResolveResult::Deduplicated<SemIR::UnspecifiedValue>(
|
||||
resolver, {.type_id = type_id});
|
||||
}
|
||||
|
||||
template <typename VarPatternT>
|
||||
requires SemIR::Internal::HasInstCategory<SemIR::AnyVarPattern, VarPatternT>
|
||||
static auto TryResolveTypedInst(ImportRefResolver& resolver, VarPatternT inst)
|
||||
@@ -4498,6 +4541,9 @@ static auto TryResolveInstCanonical(ImportRefResolver& resolver,
|
||||
case CARBON_KIND(SemIR::CustomWitness inst): {
|
||||
return TryResolveTypedInst(resolver, inst);
|
||||
}
|
||||
case CARBON_KIND(SemIR::DefaultValuePattern inst): {
|
||||
return TryResolveTypedInst(resolver, inst);
|
||||
}
|
||||
case CARBON_KIND(SemIR::ExportDecl inst): {
|
||||
return TryResolveTypedInst(resolver, inst);
|
||||
}
|
||||
@@ -4651,6 +4697,9 @@ static auto TryResolveInstCanonical(ImportRefResolver& resolver,
|
||||
case CARBON_KIND(SemIR::UnboundElementType inst): {
|
||||
return TryResolveTypedInst(resolver, inst);
|
||||
}
|
||||
case CARBON_KIND(SemIR::UnspecifiedValue inst): {
|
||||
return TryResolveTypedInst(resolver, inst);
|
||||
}
|
||||
case CARBON_KIND(SemIR::ValueBindingPattern inst): {
|
||||
return TryResolveTypedInst(resolver, inst);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
#include "toolchain/check/merge.h"
|
||||
|
||||
#include "toolchain/base/kind_switch.h"
|
||||
#include "toolchain/check/eval.h"
|
||||
#include "toolchain/check/import.h"
|
||||
#include "toolchain/check/import_ref.h"
|
||||
#include "toolchain/diagnostics/format_providers.h"
|
||||
@@ -323,6 +324,20 @@ static auto CheckRedeclParam(Context& context, bool is_implicit_param,
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CARBON_KIND(SemIR::DefaultValuePattern new_default_value_pattern): {
|
||||
auto prev_default_value_pattern =
|
||||
prev_param_pattern.As<SemIR::DefaultValuePattern>();
|
||||
|
||||
pattern_stack.push_back(
|
||||
{.prev_id = prev_default_value_pattern.subpattern_id,
|
||||
.new_id = new_default_value_pattern.subpattern_id});
|
||||
|
||||
// The node kind comparison should catch this on the mismatched patterns
|
||||
// prior to this, so the indices should never mismatch.
|
||||
CARBON_CHECK(prev_default_value_pattern.default_value_id.index ==
|
||||
new_default_value_pattern.default_value_id.index);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
CARBON_FATAL("Unexpected inst kind in parameter pattern: {0}",
|
||||
new_param_pattern.kind());
|
||||
@@ -499,6 +514,14 @@ static auto CheckRedeclParamSyntax(Context& context,
|
||||
++new_iter;
|
||||
continue;
|
||||
}
|
||||
// We don't require default values to be repeated on re-declaration,
|
||||
// so skip over any comparisons to unspecified default values.
|
||||
if (prev_node_kind == Parse::NodeKind::DefaultValueUnspecified ||
|
||||
new_node_kind == Parse::NodeKind::DefaultValueUnspecified) {
|
||||
++prev_iter;
|
||||
++new_iter;
|
||||
continue;
|
||||
}
|
||||
if (!diagnose) {
|
||||
return false;
|
||||
}
|
||||
@@ -659,6 +682,43 @@ static auto FillPrevEntityInfo(Context& context,
|
||||
}
|
||||
}
|
||||
|
||||
// Updates the default values in `prev_function` to include any of those not
|
||||
// previously specified and that are now specified in `new_function`.
|
||||
static auto MergeFunctionParamDefaultValues(Context& context,
|
||||
SemIR::Function& prev_function,
|
||||
const SemIR::Function& new_function)
|
||||
-> void {
|
||||
CARBON_CHECK(prev_function.call_param_default_values_id.has_value() ==
|
||||
new_function.call_param_default_values_id.has_value());
|
||||
if (!prev_function.call_param_default_values_id.has_value()) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto prev_value_inst_ids =
|
||||
context.inst_blocks().Get(prev_function.call_param_default_values_id);
|
||||
auto new_value_inst_ids =
|
||||
context.inst_blocks().Get(new_function.call_param_default_values_id);
|
||||
CARBON_CHECK(prev_value_inst_ids.size() == new_value_inst_ids.size());
|
||||
|
||||
llvm::SmallVector<SemIR::InstId> merged_value_inst_ids;
|
||||
bool merge_has_new_info = false;
|
||||
merged_value_inst_ids.reserve(prev_value_inst_ids.size());
|
||||
|
||||
for (size_t i = 0; i < prev_value_inst_ids.size(); ++i) {
|
||||
bool had_value =
|
||||
!context.insts().Is<SemIR::UnspecifiedValue>(prev_value_inst_ids[i]);
|
||||
auto merged_id = had_value ? prev_value_inst_ids[i] : new_value_inst_ids[i];
|
||||
merge_has_new_info |=
|
||||
!had_value && !context.insts().Is<SemIR::UnspecifiedValue>(merged_id);
|
||||
merged_value_inst_ids.push_back(merged_id);
|
||||
}
|
||||
|
||||
if (merge_has_new_info) {
|
||||
auto merged_block_id = context.inst_blocks().Add(merged_value_inst_ids);
|
||||
prev_function.call_param_default_values_id = merged_block_id;
|
||||
}
|
||||
}
|
||||
|
||||
template <typename EntityT>
|
||||
auto TryMergeRedecl(Context& context,
|
||||
const DeclNameStack::NameContext& name_context,
|
||||
@@ -833,6 +893,10 @@ auto TryMergeRedecl(Context& context,
|
||||
|
||||
if (is_definition) {
|
||||
prev_entity.MergeDefinition(entity_info.new_entity);
|
||||
if constexpr (IsFunction) {
|
||||
MergeFunctionParamDefaultValues(context, prev_entity,
|
||||
entity_info.new_entity);
|
||||
}
|
||||
}
|
||||
|
||||
auto replace_prev_inst = prev_import_ir_id.has_value();
|
||||
|
||||
@@ -959,12 +959,12 @@ auto MatchContext::DoPostWork(State state,
|
||||
.GetDefaultValues()[default_value_pattern.default_value_id.index];
|
||||
// If a constant was specified, we should be able to convert it into the
|
||||
// type of the parameter.
|
||||
if (default_value_inst_id != SemIR::InstId::None) {
|
||||
if (!context_.insts().Is<SemIR::UnspecifiedValue>(default_value_inst_id)) {
|
||||
// We should be able to convert the supplied constant into the type of
|
||||
// the parameter.
|
||||
auto converted_id = TryConvertToValueOfType(
|
||||
context_, context_.insts().GetCanonicalLocId(default_value_inst_id),
|
||||
default_value_inst_id, param_type_id);
|
||||
auto converted_id =
|
||||
TryConvertToValueOfType(context_, SemIR::LocId(default_value_inst_id),
|
||||
default_value_inst_id, param_type_id);
|
||||
if (converted_id == SemIR::ErrorInst::InstId) {
|
||||
CARBON_DIAGNOSTIC(
|
||||
PatternDefaultValueTypeMismatch, Error,
|
||||
@@ -974,11 +974,8 @@ auto MatchContext::DoPostWork(State state,
|
||||
// TODO: should be able to provide precise locations for both default
|
||||
// value expression and the type of the pattern, but we can't because
|
||||
// they are both constants.
|
||||
context_.emitter().Emit(
|
||||
LocIdForDiagnostics(
|
||||
context_.insts().GetCanonicalLocId(entry.pattern_id)),
|
||||
PatternDefaultValueTypeMismatch, default_value_inst_id,
|
||||
param_inst_id);
|
||||
context_.emitter().Emit(entry.pattern_id, PatternDefaultValueTypeMismatch,
|
||||
default_value_inst_id, param_inst_id);
|
||||
}
|
||||
}
|
||||
results_stack_.PopArray();
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
// CHECK:STDOUT: clang_decls: {}
|
||||
// CHECK:STDOUT: clang_decl_signatures: {}
|
||||
// CHECK:STDOUT: name_scopes:
|
||||
// CHECK:STDOUT: name_scope0: {inst: instF, parent_scope: name_scope<none>, has_error: false, extended_scopes: [], names: {}}
|
||||
// CHECK:STDOUT: name_scope0: {inst: inst10, parent_scope: name_scope<none>, has_error: false, extended_scopes: [], names: {}}
|
||||
// CHECK:STDOUT: entity_names: {}
|
||||
// CHECK:STDOUT: functions: {}
|
||||
// CHECK:STDOUT: classes: {}
|
||||
@@ -75,9 +75,10 @@
|
||||
// CHECK:STDOUT: 'inst(NamespaceType)': {kind: NamespaceType, type: type(TypeType)}
|
||||
// CHECK:STDOUT: 'inst(RequireSpecificDefinitionType)': {kind: RequireSpecificDefinitionType, type: type(TypeType)}
|
||||
// CHECK:STDOUT: 'inst(SpecificFunctionType)': {kind: SpecificFunctionType, type: type(TypeType)}
|
||||
// CHECK:STDOUT: 'inst(UnspecifiedValueType)': {kind: UnspecifiedValueType, type: type(TypeType)}
|
||||
// CHECK:STDOUT: 'inst(VtableType)': {kind: VtableType, type: type(TypeType)}
|
||||
// CHECK:STDOUT: 'inst(WitnessType)': {kind: WitnessType, type: type(TypeType)}
|
||||
// CHECK:STDOUT: instF: {kind: Namespace, arg0: name_scope0, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst10: {kind: Namespace, arg0: name_scope0, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: bundles: {}
|
||||
// CHECK:STDOUT: constant_values:
|
||||
// CHECK:STDOUT: values:
|
||||
@@ -94,9 +95,10 @@
|
||||
// CHECK:STDOUT: 'inst(NamespaceType)': concrete_constant(inst(NamespaceType))
|
||||
// CHECK:STDOUT: 'inst(RequireSpecificDefinitionType)': concrete_constant(inst(RequireSpecificDefinitionType))
|
||||
// CHECK:STDOUT: 'inst(SpecificFunctionType)': concrete_constant(inst(SpecificFunctionType))
|
||||
// CHECK:STDOUT: 'inst(UnspecifiedValueType)': concrete_constant(inst(UnspecifiedValueType))
|
||||
// CHECK:STDOUT: 'inst(VtableType)': concrete_constant(inst(VtableType))
|
||||
// CHECK:STDOUT: 'inst(WitnessType)': concrete_constant(inst(WitnessType))
|
||||
// CHECK:STDOUT: instF: concrete_constant(instF)
|
||||
// CHECK:STDOUT: inst10: concrete_constant(inst10)
|
||||
// CHECK:STDOUT: symbolic_constants: {}
|
||||
// CHECK:STDOUT: inst_blocks:
|
||||
// CHECK:STDOUT: inst_block_empty: {}
|
||||
@@ -105,7 +107,7 @@
|
||||
// CHECK:STDOUT: imports: {}
|
||||
// CHECK:STDOUT: global_init: {}
|
||||
// CHECK:STDOUT: inst_block50000005:
|
||||
// CHECK:STDOUT: 0: instF
|
||||
// CHECK:STDOUT: 0: inst10
|
||||
// CHECK:STDOUT: value_stores:
|
||||
// CHECK:STDOUT: shared_values:
|
||||
// CHECK:STDOUT: ints: {}
|
||||
|
||||
+150
-150
@@ -24,27 +24,27 @@ fn F(generic Form: Core.Form) ->? Form;
|
||||
// CHECK:STDOUT: import_irs:
|
||||
// CHECK:STDOUT: 'import_ir(ApiForImpl)': {decl_id: inst<none>, is_export: false}
|
||||
// CHECK:STDOUT: 'import_ir(Cpp)': {decl_id: inst<none>, is_export: false}
|
||||
// CHECK:STDOUT: import_ir70000002: {decl_id: inst70000010, is_export: false}
|
||||
// CHECK:STDOUT: import_ir70000003: {decl_id: inst70000010, is_export: false}
|
||||
// CHECK:STDOUT: import_ir70000002: {decl_id: inst70000011, is_export: false}
|
||||
// CHECK:STDOUT: import_ir70000003: {decl_id: inst70000011, is_export: false}
|
||||
// CHECK:STDOUT: import_ir_insts:
|
||||
// CHECK:STDOUT: import_ir_inst0: {ir_id: import_ir70000003, inst_id: inst50000022}
|
||||
// CHECK:STDOUT: import_ir_inst0: {ir_id: import_ir70000003, inst_id: inst50000023}
|
||||
// CHECK:STDOUT: clang_decls: {}
|
||||
// CHECK:STDOUT: clang_decl_signatures: {}
|
||||
// CHECK:STDOUT: name_scopes:
|
||||
// CHECK:STDOUT: name_scope0: {inst: instF, parent_scope: name_scope<none>, has_error: false, extended_scopes: [], names: {name(Core): inst70000011, name0: inst70000032}}
|
||||
// CHECK:STDOUT: name_scope70000001: {inst: inst70000011, parent_scope: name_scope0, has_error: false, extended_scopes: [], names: {name1: inst70000016}}
|
||||
// CHECK:STDOUT: name_scope0: {inst: inst10, parent_scope: name_scope<none>, has_error: false, extended_scopes: [], names: {name(Core): inst70000012, name0: inst70000033}}
|
||||
// CHECK:STDOUT: name_scope70000001: {inst: inst70000012, parent_scope: name_scope0, has_error: false, extended_scopes: [], names: {name1: inst70000017}}
|
||||
// CHECK:STDOUT: entity_names:
|
||||
// CHECK:STDOUT: entity_name70000000: {name: name(PeriodSelf), parent_scope: name_scope<none>, index: -1, is_template: 0, is_unused: 0, is_frozen_period_self: 1}, form: inst<none>}
|
||||
// CHECK:STDOUT: entity_name70000001: {name: name1, parent_scope: name_scope70000001, index: -1, is_template: 0, is_unused: 0, form: inst<none>}
|
||||
// CHECK:STDOUT: entity_name70000002: {name: name1, parent_scope: name_scope<none>, index: 0, is_template: 0, is_unused: 0, form: inst<none>}
|
||||
// CHECK:STDOUT: functions:
|
||||
// CHECK:STDOUT: function70000000: {name: name0, parent_scope: name_scope0, call_param_patterns_id: inst_block70000007, call_params_id: inst_block70000008, return_type_inst_id: inst70000020, return_form_inst_id: inst7000001F, return_pattern_id: inst70000029}
|
||||
// CHECK:STDOUT: function70000000: {name: name0, parent_scope: name_scope0, call_param_patterns_id: inst_block70000007, call_params_id: inst_block70000008, return_type_inst_id: inst70000021, return_form_inst_id: inst70000020, return_pattern_id: inst7000002A}
|
||||
// CHECK:STDOUT: classes: {}
|
||||
// CHECK:STDOUT: interfaces: {}
|
||||
// CHECK:STDOUT: associated_constants: {}
|
||||
// CHECK:STDOUT: impls: {}
|
||||
// CHECK:STDOUT: generics:
|
||||
// CHECK:STDOUT: generic70000000: {decl: inst70000032, bindings: inst_block7000000B, self_specific_id: specific70000000, decl_block_id: inst_block7000000D, definition_block_id: inst_block<none>}
|
||||
// CHECK:STDOUT: generic70000000: {decl: inst70000033, bindings: inst_block7000000B, self_specific_id: specific70000000, decl_block_id: inst_block7000000D, definition_block_id: inst_block<none>}
|
||||
// CHECK:STDOUT: specifics:
|
||||
// CHECK:STDOUT: specific70000000: {generic: generic70000000, args: inst_block7000000C, decl_block_id: inst_block7000000E, decl_has_error: 0, definition_block_id: inst_block<none>, definition_has_error: 0}
|
||||
// CHECK:STDOUT: specific_interfaces: {}
|
||||
@@ -76,190 +76,190 @@ fn F(generic Form: Core.Form) ->? Form;
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 0
|
||||
// CHECK:STDOUT: alignment: 1
|
||||
// CHECK:STDOUT: 'type(inst70000038)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst70000039)}
|
||||
// CHECK:STDOUT: 'type(inst70000039)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst7000003A)}
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 0
|
||||
// CHECK:STDOUT: alignment: 1
|
||||
// CHECK:STDOUT: 'type(inst70000039)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst70000039)}
|
||||
// CHECK:STDOUT: 'type(inst7000003A)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst7000003A)}
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 0
|
||||
// CHECK:STDOUT: alignment: 1
|
||||
// CHECK:STDOUT: declared_facet_types:
|
||||
// CHECK:STDOUT: declared_facet_type70000000: {}
|
||||
// CHECK:STDOUT: insts:
|
||||
// CHECK:STDOUT: instF: {kind: Namespace, arg0: name_scope0, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst70000010: {kind: ImportDecl, arg0: name(Core)}
|
||||
// CHECK:STDOUT: inst70000011: {kind: Namespace, arg0: name_scope70000001, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst70000012: {kind: FacetType, arg0: declared_facet_type70000000, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst70000013: {kind: SymbolicBinding, arg0: entity_name70000000, arg1: inst<none>, type: type(inst70000012)}
|
||||
// CHECK:STDOUT: inst70000014: {kind: SymbolicBinding, arg0: entity_name70000000, arg1: inst<none>, type: type(inst70000012)}
|
||||
// CHECK:STDOUT: inst70000015: {kind: NameRef, arg0: name(Core), arg1: inst70000011, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst70000016: {kind: ImportRefLoaded, arg0: import_ir_inst0, arg1: entity_name70000001, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst70000017: {kind: NameRef, arg0: name1, arg1: inst70000016, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst70000018: {kind: PatternType, arg0: inst(FormType), type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst70000019: {kind: SymbolicBindingPattern, arg0: entity_name70000002, type: type(inst70000018)}
|
||||
// CHECK:STDOUT: inst7000001A: {kind: SymbolicBindingPattern, arg0: entity_name70000002, type: type(inst70000018)}
|
||||
// CHECK:STDOUT: inst7000001B: {kind: SymbolicBindingPattern, arg0: entity_name70000002, type: type(inst70000018)}
|
||||
// CHECK:STDOUT: inst7000001C: {kind: SymbolicBinding, arg0: entity_name70000002, arg1: inst<none>, type: type(inst(FormType))}
|
||||
// CHECK:STDOUT: inst10: {kind: Namespace, arg0: name_scope0, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst70000011: {kind: ImportDecl, arg0: name(Core)}
|
||||
// CHECK:STDOUT: inst70000012: {kind: Namespace, arg0: name_scope70000001, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst70000013: {kind: FacetType, arg0: declared_facet_type70000000, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst70000014: {kind: SymbolicBinding, arg0: entity_name70000000, arg1: inst<none>, type: type(inst70000013)}
|
||||
// CHECK:STDOUT: inst70000015: {kind: SymbolicBinding, arg0: entity_name70000000, arg1: inst<none>, type: type(inst70000013)}
|
||||
// CHECK:STDOUT: inst70000016: {kind: NameRef, arg0: name(Core), arg1: inst70000012, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst70000017: {kind: ImportRefLoaded, arg0: import_ir_inst0, arg1: entity_name70000001, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst70000018: {kind: NameRef, arg0: name1, arg1: inst70000017, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst70000019: {kind: PatternType, arg0: inst(FormType), type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst7000001A: {kind: SymbolicBindingPattern, arg0: entity_name70000002, type: type(inst70000019)}
|
||||
// CHECK:STDOUT: inst7000001B: {kind: SymbolicBindingPattern, arg0: entity_name70000002, type: type(inst70000019)}
|
||||
// CHECK:STDOUT: inst7000001C: {kind: SymbolicBindingPattern, arg0: entity_name70000002, type: type(inst70000019)}
|
||||
// CHECK:STDOUT: inst7000001D: {kind: SymbolicBinding, arg0: entity_name70000002, arg1: inst<none>, type: type(inst(FormType))}
|
||||
// CHECK:STDOUT: inst7000001E: {kind: SymbolicBinding, arg0: entity_name70000002, arg1: inst<none>, type: type(inst(FormType))}
|
||||
// CHECK:STDOUT: inst7000001F: {kind: NameRef, arg0: name1, arg1: inst7000001C, type: type(inst(FormType))}
|
||||
// CHECK:STDOUT: inst70000020: {kind: TypeComponentOf, arg0: inst7000001F, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst70000021: {kind: TypeComponentOf, arg0: inst7000001D, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst7000001F: {kind: SymbolicBinding, arg0: entity_name70000002, arg1: inst<none>, type: type(inst(FormType))}
|
||||
// CHECK:STDOUT: inst70000020: {kind: NameRef, arg0: name1, arg1: inst7000001D, type: type(inst(FormType))}
|
||||
// CHECK:STDOUT: inst70000021: {kind: TypeComponentOf, arg0: inst70000020, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst70000022: {kind: TypeComponentOf, arg0: inst7000001E, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst70000023: {kind: PatternType, arg0: inst70000021, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst70000024: {kind: OutFormParamPatternAction, arg0: inst7000001F, type: type(inst(InstType))}
|
||||
// CHECK:STDOUT: inst70000025: {kind: SpliceInst, arg0: inst70000024, type: type(symbolic_constant7000000A)}
|
||||
// CHECK:STDOUT: inst70000026: {kind: SpliceInst, arg0: inst70000024, type: type(symbolic_constant70000007)}
|
||||
// CHECK:STDOUT: inst70000027: {kind: PatternType, arg0: inst70000022, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst70000028: {kind: SpliceInst, arg0: inst70000024, type: type(symbolic_constant7000000A)}
|
||||
// CHECK:STDOUT: inst70000029: {kind: ReturnSlotPattern, arg0: inst70000025, arg1: inst70000020, type: type(symbolic_constant7000000A)}
|
||||
// CHECK:STDOUT: inst7000002A: {kind: ReturnSlotPattern, arg0: inst70000026, arg1: inst70000021, type: type(symbolic_constant70000007)}
|
||||
// CHECK:STDOUT: inst7000002B: {kind: ReturnSlotPattern, arg0: inst70000028, arg1: inst70000022, type: type(symbolic_constant7000000A)}
|
||||
// CHECK:STDOUT: inst7000002C: {kind: SpliceBlock, arg0: inst_block70000005, arg1: inst70000017, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst7000002D: {kind: CalleePatternMatchAction, arg0: bundle70000000, type: type(inst(InstType))}
|
||||
// CHECK:STDOUT: inst7000002E: {kind: SpliceInst, arg0: inst7000002D, type: type(symbolic_constant70000006)}
|
||||
// CHECK:STDOUT: inst7000002F: {kind: SpliceInst, arg0: inst7000002D, type: type(symbolic_constant70000005)}
|
||||
// CHECK:STDOUT: inst70000030: {kind: SpliceInst, arg0: inst7000002D, type: type(symbolic_constant70000006)}
|
||||
// CHECK:STDOUT: inst70000031: {kind: ReturnSlot, arg0: inst70000021, arg1: inst7000002E, type: type(symbolic_constant70000006)}
|
||||
// CHECK:STDOUT: inst70000032: {kind: FunctionDecl, arg0: function70000000, arg1: inst_block7000000A, type: type(inst70000038)}
|
||||
// CHECK:STDOUT: inst70000033: {kind: OutFormParamPatternAction, arg0: inst7000001D, type: type(inst(InstType))}
|
||||
// CHECK:STDOUT: inst70000034: {kind: SpliceInst, arg0: inst70000033, type: type(symbolic_constant70000007)}
|
||||
// CHECK:STDOUT: inst70000035: {kind: ReturnSlotPattern, arg0: inst70000034, arg1: inst70000021, type: type(symbolic_constant70000007)}
|
||||
// CHECK:STDOUT: inst70000036: {kind: CalleePatternMatchAction, arg0: bundle70000000, type: type(inst(InstType))}
|
||||
// CHECK:STDOUT: inst70000037: {kind: SpliceInst, arg0: inst70000036, type: type(symbolic_constant70000005)}
|
||||
// CHECK:STDOUT: inst70000038: {kind: FunctionType, arg0: function70000000, arg1: specific<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst70000039: {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst7000003A: {kind: StructValue, arg0: inst_block_empty, type: type(inst70000038)}
|
||||
// CHECK:STDOUT: inst70000023: {kind: TypeComponentOf, arg0: inst7000001F, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst70000024: {kind: PatternType, arg0: inst70000022, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst70000025: {kind: OutFormParamPatternAction, arg0: inst70000020, type: type(inst(InstType))}
|
||||
// CHECK:STDOUT: inst70000026: {kind: SpliceInst, arg0: inst70000025, type: type(symbolic_constant7000000A)}
|
||||
// CHECK:STDOUT: inst70000027: {kind: SpliceInst, arg0: inst70000025, type: type(symbolic_constant70000007)}
|
||||
// CHECK:STDOUT: inst70000028: {kind: PatternType, arg0: inst70000023, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst70000029: {kind: SpliceInst, arg0: inst70000025, type: type(symbolic_constant7000000A)}
|
||||
// CHECK:STDOUT: inst7000002A: {kind: ReturnSlotPattern, arg0: inst70000026, arg1: inst70000021, type: type(symbolic_constant7000000A)}
|
||||
// CHECK:STDOUT: inst7000002B: {kind: ReturnSlotPattern, arg0: inst70000027, arg1: inst70000022, type: type(symbolic_constant70000007)}
|
||||
// CHECK:STDOUT: inst7000002C: {kind: ReturnSlotPattern, arg0: inst70000029, arg1: inst70000023, type: type(symbolic_constant7000000A)}
|
||||
// CHECK:STDOUT: inst7000002D: {kind: SpliceBlock, arg0: inst_block70000005, arg1: inst70000018, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst7000002E: {kind: CalleePatternMatchAction, arg0: bundle70000000, type: type(inst(InstType))}
|
||||
// CHECK:STDOUT: inst7000002F: {kind: SpliceInst, arg0: inst7000002E, type: type(symbolic_constant70000006)}
|
||||
// CHECK:STDOUT: inst70000030: {kind: SpliceInst, arg0: inst7000002E, type: type(symbolic_constant70000005)}
|
||||
// CHECK:STDOUT: inst70000031: {kind: SpliceInst, arg0: inst7000002E, type: type(symbolic_constant70000006)}
|
||||
// CHECK:STDOUT: inst70000032: {kind: ReturnSlot, arg0: inst70000022, arg1: inst7000002F, type: type(symbolic_constant70000006)}
|
||||
// CHECK:STDOUT: inst70000033: {kind: FunctionDecl, arg0: function70000000, arg1: inst_block7000000A, type: type(inst70000039)}
|
||||
// CHECK:STDOUT: inst70000034: {kind: OutFormParamPatternAction, arg0: inst7000001E, type: type(inst(InstType))}
|
||||
// CHECK:STDOUT: inst70000035: {kind: SpliceInst, arg0: inst70000034, type: type(symbolic_constant70000007)}
|
||||
// CHECK:STDOUT: inst70000036: {kind: ReturnSlotPattern, arg0: inst70000035, arg1: inst70000022, type: type(symbolic_constant70000007)}
|
||||
// CHECK:STDOUT: inst70000037: {kind: CalleePatternMatchAction, arg0: bundle70000000, type: type(inst(InstType))}
|
||||
// CHECK:STDOUT: inst70000038: {kind: SpliceInst, arg0: inst70000037, type: type(symbolic_constant70000005)}
|
||||
// CHECK:STDOUT: inst70000039: {kind: FunctionType, arg0: function70000000, arg1: specific<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst7000003A: {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst7000003B: {kind: StructValue, arg0: inst_block_empty, type: type(inst70000039)}
|
||||
// CHECK:STDOUT: bundles:
|
||||
// CHECK:STDOUT: bundle70000000: {arg0: inst70000026, arg1: call_param0}
|
||||
// CHECK:STDOUT: bundle70000000: {arg0: inst70000027, arg1: call_param0}
|
||||
// CHECK:STDOUT: constant_values:
|
||||
// CHECK:STDOUT: values:
|
||||
// CHECK:STDOUT: instF: concrete_constant(instF)
|
||||
// CHECK:STDOUT: inst70000011: concrete_constant(inst70000011)
|
||||
// CHECK:STDOUT: inst10: concrete_constant(inst10)
|
||||
// CHECK:STDOUT: inst70000012: concrete_constant(inst70000012)
|
||||
// CHECK:STDOUT: inst70000013: symbolic_constant70000000
|
||||
// CHECK:STDOUT: inst70000013: concrete_constant(inst70000013)
|
||||
// CHECK:STDOUT: inst70000014: symbolic_constant70000000
|
||||
// CHECK:STDOUT: inst70000015: concrete_constant(inst70000011)
|
||||
// CHECK:STDOUT: inst70000016: concrete_constant(inst(FormType))
|
||||
// CHECK:STDOUT: inst70000015: symbolic_constant70000000
|
||||
// CHECK:STDOUT: inst70000016: concrete_constant(inst70000012)
|
||||
// CHECK:STDOUT: inst70000017: concrete_constant(inst(FormType))
|
||||
// CHECK:STDOUT: inst70000018: concrete_constant(inst70000018)
|
||||
// CHECK:STDOUT: inst70000019: symbolic_constant70000002
|
||||
// CHECK:STDOUT: inst7000001A: symbolic_constant70000001
|
||||
// CHECK:STDOUT: inst7000001B: symbolic_constant70000002
|
||||
// CHECK:STDOUT: inst7000001C: symbolic_constant70000004
|
||||
// CHECK:STDOUT: inst7000001D: symbolic_constant70000003
|
||||
// CHECK:STDOUT: inst7000001E: symbolic_constant70000004
|
||||
// CHECK:STDOUT: inst70000018: concrete_constant(inst(FormType))
|
||||
// CHECK:STDOUT: inst70000019: concrete_constant(inst70000019)
|
||||
// CHECK:STDOUT: inst7000001A: symbolic_constant70000002
|
||||
// CHECK:STDOUT: inst7000001B: symbolic_constant70000001
|
||||
// CHECK:STDOUT: inst7000001C: symbolic_constant70000002
|
||||
// CHECK:STDOUT: inst7000001D: symbolic_constant70000004
|
||||
// CHECK:STDOUT: inst7000001E: symbolic_constant70000003
|
||||
// CHECK:STDOUT: inst7000001F: symbolic_constant70000004
|
||||
// CHECK:STDOUT: inst70000020: symbolic_constant70000006
|
||||
// CHECK:STDOUT: inst70000021: symbolic_constant70000005
|
||||
// CHECK:STDOUT: inst70000022: symbolic_constant70000006
|
||||
// CHECK:STDOUT: inst70000023: symbolic_constant70000007
|
||||
// CHECK:STDOUT: inst70000024: symbolic_constant70000008
|
||||
// CHECK:STDOUT: inst70000025: symbolic_constant7000000B
|
||||
// CHECK:STDOUT: inst70000026: symbolic_constant70000009
|
||||
// CHECK:STDOUT: inst70000027: symbolic_constant7000000A
|
||||
// CHECK:STDOUT: inst70000028: symbolic_constant7000000B
|
||||
// CHECK:STDOUT: inst70000029: symbolic_constant7000000D
|
||||
// CHECK:STDOUT: inst7000002A: symbolic_constant7000000C
|
||||
// CHECK:STDOUT: inst7000002B: symbolic_constant7000000D
|
||||
// CHECK:STDOUT: inst7000002C: concrete_constant(inst(FormType))
|
||||
// CHECK:STDOUT: inst7000002D: symbolic_constant7000000E
|
||||
// CHECK:STDOUT: inst7000002E: symbolic_constant70000010
|
||||
// CHECK:STDOUT: inst7000002F: symbolic_constant7000000F
|
||||
// CHECK:STDOUT: inst70000030: symbolic_constant70000010
|
||||
// CHECK:STDOUT: inst70000032: concrete_constant(inst7000003A)
|
||||
// CHECK:STDOUT: inst70000033: symbolic_constant70000011
|
||||
// CHECK:STDOUT: inst70000034: symbolic_constant70000012
|
||||
// CHECK:STDOUT: inst70000035: symbolic_constant70000013
|
||||
// CHECK:STDOUT: inst70000036: symbolic_constant70000014
|
||||
// CHECK:STDOUT: inst70000037: symbolic_constant70000015
|
||||
// CHECK:STDOUT: inst70000038: concrete_constant(inst70000038)
|
||||
// CHECK:STDOUT: inst70000020: symbolic_constant70000004
|
||||
// CHECK:STDOUT: inst70000021: symbolic_constant70000006
|
||||
// CHECK:STDOUT: inst70000022: symbolic_constant70000005
|
||||
// CHECK:STDOUT: inst70000023: symbolic_constant70000006
|
||||
// CHECK:STDOUT: inst70000024: symbolic_constant70000007
|
||||
// CHECK:STDOUT: inst70000025: symbolic_constant70000008
|
||||
// CHECK:STDOUT: inst70000026: symbolic_constant7000000B
|
||||
// CHECK:STDOUT: inst70000027: symbolic_constant70000009
|
||||
// CHECK:STDOUT: inst70000028: symbolic_constant7000000A
|
||||
// CHECK:STDOUT: inst70000029: symbolic_constant7000000B
|
||||
// CHECK:STDOUT: inst7000002A: symbolic_constant7000000D
|
||||
// CHECK:STDOUT: inst7000002B: symbolic_constant7000000C
|
||||
// CHECK:STDOUT: inst7000002C: symbolic_constant7000000D
|
||||
// CHECK:STDOUT: inst7000002D: concrete_constant(inst(FormType))
|
||||
// CHECK:STDOUT: inst7000002E: symbolic_constant7000000E
|
||||
// CHECK:STDOUT: inst7000002F: symbolic_constant70000010
|
||||
// CHECK:STDOUT: inst70000030: symbolic_constant7000000F
|
||||
// CHECK:STDOUT: inst70000031: symbolic_constant70000010
|
||||
// CHECK:STDOUT: inst70000033: concrete_constant(inst7000003B)
|
||||
// CHECK:STDOUT: inst70000034: symbolic_constant70000011
|
||||
// CHECK:STDOUT: inst70000035: symbolic_constant70000012
|
||||
// CHECK:STDOUT: inst70000036: symbolic_constant70000013
|
||||
// CHECK:STDOUT: inst70000037: symbolic_constant70000014
|
||||
// CHECK:STDOUT: inst70000038: symbolic_constant70000015
|
||||
// CHECK:STDOUT: inst70000039: concrete_constant(inst70000039)
|
||||
// CHECK:STDOUT: inst7000003A: concrete_constant(inst7000003A)
|
||||
// CHECK:STDOUT: inst7000003B: concrete_constant(inst7000003B)
|
||||
// CHECK:STDOUT: symbolic_constants:
|
||||
// CHECK:STDOUT: symbolic_constant70000000: {inst: inst70000014, kind: self, attached: null}
|
||||
// CHECK:STDOUT: symbolic_constant70000001: {inst: inst7000001A, kind: checked, attached: null}
|
||||
// CHECK:STDOUT: symbolic_constant70000002: {inst: inst7000001A, kind: checked, attached: {generic: generic70000000, index: generic_inst_in_decl0}}
|
||||
// CHECK:STDOUT: symbolic_constant70000003: {inst: inst7000001D, kind: checked, attached: null}
|
||||
// CHECK:STDOUT: symbolic_constant70000004: {inst: inst7000001D, kind: checked, attached: {generic: generic70000000, index: generic_inst_in_decl1}}
|
||||
// CHECK:STDOUT: symbolic_constant70000005: {inst: inst70000021, kind: checked, attached: null}
|
||||
// CHECK:STDOUT: symbolic_constant70000006: {inst: inst70000021, kind: checked, attached: {generic: generic70000000, index: generic_inst_in_decl2}}
|
||||
// CHECK:STDOUT: symbolic_constant70000007: {inst: inst70000023, kind: checked, attached: null}
|
||||
// CHECK:STDOUT: symbolic_constant70000008: {inst: inst70000024, kind: template, attached: {generic: generic70000000, index: generic_inst_in_decl3}}
|
||||
// CHECK:STDOUT: symbolic_constant70000009: {inst: inst70000026, kind: template, attached: null}
|
||||
// CHECK:STDOUT: symbolic_constant7000000A: {inst: inst70000023, kind: checked, attached: {generic: generic70000000, index: generic_inst_in_decl4}}
|
||||
// CHECK:STDOUT: symbolic_constant7000000B: {inst: inst70000026, kind: template, attached: {generic: generic70000000, index: generic_inst_in_decl5}}
|
||||
// CHECK:STDOUT: symbolic_constant7000000C: {inst: inst7000002A, kind: template, attached: null}
|
||||
// CHECK:STDOUT: symbolic_constant7000000D: {inst: inst7000002A, kind: template, attached: {generic: generic70000000, index: generic_inst_in_decl6}}
|
||||
// CHECK:STDOUT: symbolic_constant7000000E: {inst: inst7000002D, kind: template, attached: {generic: generic70000000, index: generic_inst_in_decl7}}
|
||||
// CHECK:STDOUT: symbolic_constant7000000F: {inst: inst7000002F, kind: template, attached: null}
|
||||
// CHECK:STDOUT: symbolic_constant70000010: {inst: inst7000002F, kind: template, attached: {generic: generic70000000, index: generic_inst_in_decl8}}
|
||||
// CHECK:STDOUT: symbolic_constant70000011: {inst: inst70000033, kind: template, attached: null}
|
||||
// CHECK:STDOUT: symbolic_constant70000012: {inst: inst70000034, kind: template, attached: null}
|
||||
// CHECK:STDOUT: symbolic_constant70000013: {inst: inst70000035, kind: template, attached: null}
|
||||
// CHECK:STDOUT: symbolic_constant70000014: {inst: inst70000036, kind: template, attached: null}
|
||||
// CHECK:STDOUT: symbolic_constant70000015: {inst: inst70000037, kind: template, attached: null}
|
||||
// CHECK:STDOUT: symbolic_constant70000000: {inst: inst70000015, kind: self, attached: null}
|
||||
// CHECK:STDOUT: symbolic_constant70000001: {inst: inst7000001B, kind: checked, attached: null}
|
||||
// CHECK:STDOUT: symbolic_constant70000002: {inst: inst7000001B, kind: checked, attached: {generic: generic70000000, index: generic_inst_in_decl0}}
|
||||
// CHECK:STDOUT: symbolic_constant70000003: {inst: inst7000001E, kind: checked, attached: null}
|
||||
// CHECK:STDOUT: symbolic_constant70000004: {inst: inst7000001E, kind: checked, attached: {generic: generic70000000, index: generic_inst_in_decl1}}
|
||||
// CHECK:STDOUT: symbolic_constant70000005: {inst: inst70000022, kind: checked, attached: null}
|
||||
// CHECK:STDOUT: symbolic_constant70000006: {inst: inst70000022, kind: checked, attached: {generic: generic70000000, index: generic_inst_in_decl2}}
|
||||
// CHECK:STDOUT: symbolic_constant70000007: {inst: inst70000024, kind: checked, attached: null}
|
||||
// CHECK:STDOUT: symbolic_constant70000008: {inst: inst70000025, kind: template, attached: {generic: generic70000000, index: generic_inst_in_decl3}}
|
||||
// CHECK:STDOUT: symbolic_constant70000009: {inst: inst70000027, kind: template, attached: null}
|
||||
// CHECK:STDOUT: symbolic_constant7000000A: {inst: inst70000024, kind: checked, attached: {generic: generic70000000, index: generic_inst_in_decl4}}
|
||||
// CHECK:STDOUT: symbolic_constant7000000B: {inst: inst70000027, kind: template, attached: {generic: generic70000000, index: generic_inst_in_decl5}}
|
||||
// CHECK:STDOUT: symbolic_constant7000000C: {inst: inst7000002B, kind: template, attached: null}
|
||||
// CHECK:STDOUT: symbolic_constant7000000D: {inst: inst7000002B, kind: template, attached: {generic: generic70000000, index: generic_inst_in_decl6}}
|
||||
// CHECK:STDOUT: symbolic_constant7000000E: {inst: inst7000002E, kind: template, attached: {generic: generic70000000, index: generic_inst_in_decl7}}
|
||||
// CHECK:STDOUT: symbolic_constant7000000F: {inst: inst70000030, kind: template, attached: null}
|
||||
// CHECK:STDOUT: symbolic_constant70000010: {inst: inst70000030, kind: template, attached: {generic: generic70000000, index: generic_inst_in_decl8}}
|
||||
// CHECK:STDOUT: symbolic_constant70000011: {inst: inst70000034, kind: template, attached: null}
|
||||
// CHECK:STDOUT: symbolic_constant70000012: {inst: inst70000035, kind: template, attached: null}
|
||||
// CHECK:STDOUT: symbolic_constant70000013: {inst: inst70000036, kind: template, attached: null}
|
||||
// CHECK:STDOUT: symbolic_constant70000014: {inst: inst70000037, kind: template, attached: null}
|
||||
// CHECK:STDOUT: symbolic_constant70000015: {inst: inst70000038, kind: template, attached: null}
|
||||
// CHECK:STDOUT: inst_blocks:
|
||||
// CHECK:STDOUT: inst_block_empty: {}
|
||||
// CHECK:STDOUT: exports:
|
||||
// CHECK:STDOUT: 0: inst70000032
|
||||
// CHECK:STDOUT: 0: inst70000033
|
||||
// CHECK:STDOUT: generated: {}
|
||||
// CHECK:STDOUT: imports:
|
||||
// CHECK:STDOUT: 0: inst70000011
|
||||
// CHECK:STDOUT: 1: inst70000016
|
||||
// CHECK:STDOUT: 0: inst70000012
|
||||
// CHECK:STDOUT: 1: inst70000017
|
||||
// CHECK:STDOUT: global_init: {}
|
||||
// CHECK:STDOUT: inst_block70000005:
|
||||
// CHECK:STDOUT: 0: inst70000013
|
||||
// CHECK:STDOUT: 1: inst70000015
|
||||
// CHECK:STDOUT: 2: inst70000017
|
||||
// CHECK:STDOUT: 0: inst70000014
|
||||
// CHECK:STDOUT: 1: inst70000016
|
||||
// CHECK:STDOUT: 2: inst70000018
|
||||
// CHECK:STDOUT: inst_block70000006:
|
||||
// CHECK:STDOUT: 0: inst70000019
|
||||
// CHECK:STDOUT: 0: inst7000001A
|
||||
// CHECK:STDOUT: inst_block70000007:
|
||||
// CHECK:STDOUT: 0: inst70000025
|
||||
// CHECK:STDOUT: 0: inst70000026
|
||||
// CHECK:STDOUT: inst_block70000008:
|
||||
// CHECK:STDOUT: 0: inst7000002E
|
||||
// CHECK:STDOUT: 0: inst7000002F
|
||||
// CHECK:STDOUT: inst_block70000009:
|
||||
// CHECK:STDOUT: 0: inst70000019
|
||||
// CHECK:STDOUT: 1: inst70000025
|
||||
// CHECK:STDOUT: 2: inst70000029
|
||||
// CHECK:STDOUT: 0: inst7000001A
|
||||
// CHECK:STDOUT: 1: inst70000026
|
||||
// CHECK:STDOUT: 2: inst7000002A
|
||||
// CHECK:STDOUT: inst_block7000000A:
|
||||
// CHECK:STDOUT: 0: inst7000001F
|
||||
// CHECK:STDOUT: 1: inst70000020
|
||||
// CHECK:STDOUT: 2: inst7000002C
|
||||
// CHECK:STDOUT: 3: inst7000001C
|
||||
// CHECK:STDOUT: 4: inst7000002E
|
||||
// CHECK:STDOUT: 5: inst70000031
|
||||
// CHECK:STDOUT: 0: inst70000020
|
||||
// CHECK:STDOUT: 1: inst70000021
|
||||
// CHECK:STDOUT: 2: inst7000002D
|
||||
// CHECK:STDOUT: 3: inst7000001D
|
||||
// CHECK:STDOUT: 4: inst7000002F
|
||||
// CHECK:STDOUT: 5: inst70000032
|
||||
// CHECK:STDOUT: inst_block7000000B:
|
||||
// CHECK:STDOUT: 0: inst7000001C
|
||||
// CHECK:STDOUT: inst_block7000000C:
|
||||
// CHECK:STDOUT: 0: inst7000001D
|
||||
// CHECK:STDOUT: inst_block7000000C:
|
||||
// CHECK:STDOUT: 0: inst7000001E
|
||||
// CHECK:STDOUT: inst_block7000000D:
|
||||
// CHECK:STDOUT: 0: inst7000001C
|
||||
// CHECK:STDOUT: 1: inst7000001F
|
||||
// CHECK:STDOUT: 2: inst70000023
|
||||
// CHECK:STDOUT: 3: inst70000025
|
||||
// CHECK:STDOUT: 4: inst70000028
|
||||
// CHECK:STDOUT: 5: inst70000029
|
||||
// CHECK:STDOUT: 6: inst7000002C
|
||||
// CHECK:STDOUT: 7: inst7000002E
|
||||
// CHECK:STDOUT: 8: inst70000031
|
||||
// CHECK:STDOUT: inst_block7000000E:
|
||||
// CHECK:STDOUT: 0: inst7000001B
|
||||
// CHECK:STDOUT: 1: inst7000001E
|
||||
// CHECK:STDOUT: 2: inst70000022
|
||||
// CHECK:STDOUT: 3: inst70000024
|
||||
// CHECK:STDOUT: 4: inst70000027
|
||||
// CHECK:STDOUT: 5: inst70000028
|
||||
// CHECK:STDOUT: 6: inst7000002B
|
||||
// CHECK:STDOUT: 7: inst7000002D
|
||||
// CHECK:STDOUT: 8: inst70000030
|
||||
// CHECK:STDOUT: inst_block7000000E:
|
||||
// CHECK:STDOUT: 0: inst7000001A
|
||||
// CHECK:STDOUT: 1: inst7000001D
|
||||
// CHECK:STDOUT: 2: inst70000021
|
||||
// CHECK:STDOUT: 3: inst70000033
|
||||
// CHECK:STDOUT: 4: inst70000023
|
||||
// CHECK:STDOUT: 5: inst70000034
|
||||
// CHECK:STDOUT: 6: inst70000035
|
||||
// CHECK:STDOUT: 7: inst70000036
|
||||
// CHECK:STDOUT: 8: inst70000037
|
||||
// CHECK:STDOUT: 3: inst70000034
|
||||
// CHECK:STDOUT: 4: inst70000024
|
||||
// CHECK:STDOUT: 5: inst70000035
|
||||
// CHECK:STDOUT: 6: inst70000036
|
||||
// CHECK:STDOUT: 7: inst70000037
|
||||
// CHECK:STDOUT: 8: inst70000038
|
||||
// CHECK:STDOUT: inst_block7000000F:
|
||||
// CHECK:STDOUT: 0: instF
|
||||
// CHECK:STDOUT: 1: inst70000010
|
||||
// CHECK:STDOUT: 2: inst70000032
|
||||
// CHECK:STDOUT: 0: inst10
|
||||
// CHECK:STDOUT: 1: inst70000011
|
||||
// CHECK:STDOUT: 2: inst70000033
|
||||
// CHECK:STDOUT: value_stores:
|
||||
// CHECK:STDOUT: shared_values:
|
||||
// CHECK:STDOUT: ints: {}
|
||||
|
||||
+234
-232
@@ -53,22 +53,22 @@ fn G(x: Cpp.X) {
|
||||
// CHECK:STDOUT: import_ir_inst3: {ir_id: import_ir(Cpp), clang_source_loc_id: clang_source_loc50000003}
|
||||
// CHECK:STDOUT: import_ir_inst4: {ir_id: import_ir(Cpp), clang_source_loc_id: clang_source_loc50000004}
|
||||
// CHECK:STDOUT: clang_decls:
|
||||
// CHECK:STDOUT: clang_decl_id50000000: {key: {decl: "namespace Carbon {\n}"}, inst_id: instF}
|
||||
// CHECK:STDOUT: clang_decl_id50000001: {key: {decl: "<translation unit>"}, inst_id: inst50000011}
|
||||
// CHECK:STDOUT: clang_decl_id50000002: {key: {decl: "struct X {}"}, inst_id: inst50000013}
|
||||
// CHECK:STDOUT: clang_decl_id50000003: {key: {decl: "X * _Nonnull p"}, inst_id: inst50000024}
|
||||
// CHECK:STDOUT: clang_decl_id50000004: {key: {decl: "void f(X x = {})", clang_decl_signature_id: clang_decl_signature_id50000000}, inst_id: inst5000002F}
|
||||
// CHECK:STDOUT: clang_decl_id50000005: {key: {decl: "inline void f__carbon_thunk()", clang_decl_signature_id: clang_decl_signature_id50000000}, inst_id: inst50000032}
|
||||
// CHECK:STDOUT: clang_decl_id50000006: {key: {decl: "void f(X x = {})", clang_decl_signature_id: clang_decl_signature_id50000001}, inst_id: inst5000003D}
|
||||
// CHECK:STDOUT: clang_decl_id50000007: {key: {decl: "inline void f__carbon_thunk(X * _Nonnull x)", clang_decl_signature_id: clang_decl_signature_id50000001}, inst_id: inst50000047}
|
||||
// CHECK:STDOUT: clang_decl_id50000008: {key: {decl: "X * _Nonnull global"}, inst_id: inst50000052}
|
||||
// CHECK:STDOUT: clang_decl_id50000000: {key: {decl: "namespace Carbon {\n}"}, inst_id: inst10}
|
||||
// CHECK:STDOUT: clang_decl_id50000001: {key: {decl: "<translation unit>"}, inst_id: inst50000012}
|
||||
// CHECK:STDOUT: clang_decl_id50000002: {key: {decl: "struct X {}"}, inst_id: inst50000014}
|
||||
// CHECK:STDOUT: clang_decl_id50000003: {key: {decl: "X * _Nonnull p"}, inst_id: inst50000025}
|
||||
// CHECK:STDOUT: clang_decl_id50000004: {key: {decl: "void f(X x = {})", clang_decl_signature_id: clang_decl_signature_id50000000}, inst_id: inst50000030}
|
||||
// CHECK:STDOUT: clang_decl_id50000005: {key: {decl: "inline void f__carbon_thunk()", clang_decl_signature_id: clang_decl_signature_id50000000}, inst_id: inst50000033}
|
||||
// CHECK:STDOUT: clang_decl_id50000006: {key: {decl: "void f(X x = {})", clang_decl_signature_id: clang_decl_signature_id50000001}, inst_id: inst5000003E}
|
||||
// CHECK:STDOUT: clang_decl_id50000007: {key: {decl: "inline void f__carbon_thunk(X * _Nonnull x)", clang_decl_signature_id: clang_decl_signature_id50000001}, inst_id: inst50000048}
|
||||
// CHECK:STDOUT: clang_decl_id50000008: {key: {decl: "X * _Nonnull global"}, inst_id: inst50000053}
|
||||
// CHECK:STDOUT: clang_decl_signatures:
|
||||
// CHECK:STDOUT: clang_decl_signature_id50000000: {kind: normal, num_params: 0}
|
||||
// CHECK:STDOUT: clang_decl_signature_id50000001: {kind: normal, num_params: 1, modes: [value]}
|
||||
// CHECK:STDOUT: name_scopes:
|
||||
// CHECK:STDOUT: name_scope0: {inst: instF, parent_scope: name_scope<none>, has_error: false, extended_scopes: [], names: {name(Cpp): inst50000011, name0: inst5000001E}}
|
||||
// CHECK:STDOUT: name_scope50000001: {inst: inst50000011, parent_scope: name_scope0, has_error: false, extended_scopes: [], names: {name2: inst50000013, name3: inst5000002C, name4: inst50000054}}
|
||||
// CHECK:STDOUT: name_scope50000002: {inst: inst50000013, parent_scope: name_scope50000001, has_error: false, extended_scopes: [], names: {}}
|
||||
// CHECK:STDOUT: name_scope0: {inst: inst10, parent_scope: name_scope<none>, has_error: false, extended_scopes: [], names: {name(Cpp): inst50000012, name0: inst5000001F}}
|
||||
// CHECK:STDOUT: name_scope50000001: {inst: inst50000012, parent_scope: name_scope0, has_error: false, extended_scopes: [], names: {name2: inst50000014, name3: inst5000002D, name4: inst50000055}}
|
||||
// CHECK:STDOUT: name_scope50000002: {inst: inst50000014, parent_scope: name_scope50000001, has_error: false, extended_scopes: [], names: {}}
|
||||
// CHECK:STDOUT: entity_names:
|
||||
// CHECK:STDOUT: entity_name50000000: {name: name1, parent_scope: name_scope<none>, index: -1, is_template: 0, is_unused: 0, form: inst<none>}
|
||||
// CHECK:STDOUT: entity_name50000001: {name: name1, parent_scope: name_scope<none>, index: -1, is_template: 0, is_unused: 0, form: inst<none>}
|
||||
@@ -76,12 +76,12 @@ fn G(x: Cpp.X) {
|
||||
// CHECK:STDOUT: entity_name50000003: {name: name4, parent_scope: name_scope50000001, index: -1, is_template: 0, is_unused: 0, form: inst<none>}
|
||||
// CHECK:STDOUT: functions:
|
||||
// CHECK:STDOUT: function50000000: {name: name0, parent_scope: name_scope0, call_param_patterns_id: inst_block50000007, call_params_id: inst_block50000008, body: [inst_block5000000B]}
|
||||
// CHECK:STDOUT: function50000001: {name: name3, parent_scope: name_scope50000001, call_param_patterns_id: inst_block_empty, call_params_id: inst_block_empty, cpp_thunk_decl: inst50000032}
|
||||
// CHECK:STDOUT: function50000002: {name: name6, parent_scope: name_scope50000001, call_param_patterns_id: inst_block_empty, call_params_id: inst_block_empty, cpp_thunk_callee: inst5000002F}
|
||||
// CHECK:STDOUT: function50000003: {name: name3, parent_scope: name_scope50000001, call_param_patterns_id: inst_block50000010, call_params_id: inst_block50000011, cpp_thunk_decl: inst50000047}
|
||||
// CHECK:STDOUT: function50000004: {name: name6, parent_scope: name_scope50000001, call_param_patterns_id: inst_block50000016, call_params_id: inst_block50000017, cpp_thunk_callee: inst5000003D}
|
||||
// CHECK:STDOUT: function50000001: {name: name3, parent_scope: name_scope50000001, call_param_patterns_id: inst_block_empty, call_params_id: inst_block_empty, cpp_thunk_decl: inst50000033}
|
||||
// CHECK:STDOUT: function50000002: {name: name6, parent_scope: name_scope50000001, call_param_patterns_id: inst_block_empty, call_params_id: inst_block_empty, cpp_thunk_callee: inst50000030}
|
||||
// CHECK:STDOUT: function50000003: {name: name3, parent_scope: name_scope50000001, call_param_patterns_id: inst_block50000010, call_params_id: inst_block50000011, cpp_thunk_decl: inst50000048}
|
||||
// CHECK:STDOUT: function50000004: {name: name6, parent_scope: name_scope50000001, call_param_patterns_id: inst_block50000016, call_params_id: inst_block50000017, cpp_thunk_callee: inst5000003E}
|
||||
// CHECK:STDOUT: classes:
|
||||
// CHECK:STDOUT: class50000000: {name: name2, parent_scope: name_scope50000001, self_type_id: type(inst50000014), inheritance_kind: Base, is_dynamic: 0, scope_id: name_scope50000002, body_block_id: inst_block5000000D, adapt_id: inst<none>, base_id: inst<none>, complete_type_witness_id: inst50000027, vtable_decl_id: inst<none>}}
|
||||
// CHECK:STDOUT: class50000000: {name: name2, parent_scope: name_scope50000001, self_type_id: type(inst50000015), inheritance_kind: Base, is_dynamic: 0, scope_id: name_scope50000002, body_block_id: inst_block5000000D, adapt_id: inst<none>, base_id: inst<none>, complete_type_witness_id: inst50000028, vtable_decl_id: inst<none>}}
|
||||
// CHECK:STDOUT: interfaces: {}
|
||||
// CHECK:STDOUT: associated_constants: {}
|
||||
// CHECK:STDOUT: impls: {}
|
||||
@@ -91,9 +91,9 @@ fn G(x: Cpp.X) {
|
||||
// CHECK:STDOUT: struct_type_fields:
|
||||
// CHECK:STDOUT: struct_type_fields_empty: {}
|
||||
// CHECK:STDOUT: struct_type_fields50000001:
|
||||
// CHECK:STDOUT: 0: {name_id: name5, type_inst_id: inst50000022}
|
||||
// CHECK:STDOUT: 0: {name_id: name5, type_inst_id: inst50000023}
|
||||
// CHECK:STDOUT: struct_type_fields50000002:
|
||||
// CHECK:STDOUT: 0: {name_id: name5, type_inst_id: inst50000022}
|
||||
// CHECK:STDOUT: 0: {name_id: name5, type_inst_id: inst50000023}
|
||||
// CHECK:STDOUT: types:
|
||||
// CHECK:STDOUT: 'type(TypeType)':
|
||||
// CHECK:STDOUT: value_repr: {kind: copy, type: type(TypeType)}
|
||||
@@ -120,18 +120,18 @@ fn G(x: Cpp.X) {
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 0
|
||||
// CHECK:STDOUT: alignment: 1
|
||||
// CHECK:STDOUT: 'type(inst5000001F)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst50000020)}
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 0
|
||||
// CHECK:STDOUT: alignment: 1
|
||||
// CHECK:STDOUT: 'type(inst50000020)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst50000020)}
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst50000021)}
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 0
|
||||
// CHECK:STDOUT: alignment: 1
|
||||
// CHECK:STDOUT: 'type(inst50000022)':
|
||||
// CHECK:STDOUT: value_repr: {kind: copy, type: type(inst50000022)}
|
||||
// CHECK:STDOUT: 'type(inst50000021)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst50000021)}
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 0
|
||||
// CHECK:STDOUT: alignment: 1
|
||||
// CHECK:STDOUT: 'type(inst50000023)':
|
||||
// CHECK:STDOUT: value_repr: {kind: copy, type: type(inst50000023)}
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 8
|
||||
// CHECK:STDOUT: alignment: 8
|
||||
@@ -140,43 +140,43 @@ fn G(x: Cpp.X) {
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 0
|
||||
// CHECK:STDOUT: alignment: 1
|
||||
// CHECK:STDOUT: 'type(inst50000029)':
|
||||
// CHECK:STDOUT: value_repr: {kind: copy, type: type(inst50000029)}
|
||||
// CHECK:STDOUT: 'type(inst5000002A)':
|
||||
// CHECK:STDOUT: value_repr: {kind: copy, type: type(inst5000002A)}
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 8
|
||||
// CHECK:STDOUT: alignment: 8
|
||||
// CHECK:STDOUT: 'type(inst50000026)':
|
||||
// CHECK:STDOUT: value_repr: {kind: pointer, type: type(inst50000029)}
|
||||
// CHECK:STDOUT: 'type(inst50000027)':
|
||||
// CHECK:STDOUT: value_repr: {kind: pointer, type: type(inst5000002A)}
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 8
|
||||
// CHECK:STDOUT: alignment: 8
|
||||
// CHECK:STDOUT: 'type(inst50000014)':
|
||||
// CHECK:STDOUT: value_repr: {kind: pointer, type: type(inst50000029)}
|
||||
// CHECK:STDOUT: 'type(inst50000015)':
|
||||
// CHECK:STDOUT: value_repr: {kind: pointer, type: type(inst5000002A)}
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 8
|
||||
// CHECK:STDOUT: alignment: 8
|
||||
// CHECK:STDOUT: 'type(inst5000002B)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst50000020)}
|
||||
// CHECK:STDOUT: 'type(inst5000002C)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst50000021)}
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 0
|
||||
// CHECK:STDOUT: alignment: 1
|
||||
// CHECK:STDOUT: 'type(inst50000030)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst50000020)}
|
||||
// CHECK:STDOUT: 'type(inst50000031)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst50000021)}
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 0
|
||||
// CHECK:STDOUT: alignment: 1
|
||||
// CHECK:STDOUT: 'type(inst50000033)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst50000020)}
|
||||
// CHECK:STDOUT: 'type(inst50000034)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst50000021)}
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 0
|
||||
// CHECK:STDOUT: alignment: 1
|
||||
// CHECK:STDOUT: 'type(inst5000003E)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst50000020)}
|
||||
// CHECK:STDOUT: 'type(inst5000003F)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst50000021)}
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 0
|
||||
// CHECK:STDOUT: alignment: 1
|
||||
// CHECK:STDOUT: 'type(inst50000048)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst50000020)}
|
||||
// CHECK:STDOUT: 'type(inst50000049)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst50000021)}
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 0
|
||||
// CHECK:STDOUT: alignment: 1
|
||||
@@ -195,86 +195,87 @@ fn G(x: Cpp.X) {
|
||||
// CHECK:STDOUT: 'inst(NamespaceType)': {kind: NamespaceType, type: type(TypeType)}
|
||||
// CHECK:STDOUT: 'inst(RequireSpecificDefinitionType)': {kind: RequireSpecificDefinitionType, type: type(TypeType)}
|
||||
// CHECK:STDOUT: 'inst(SpecificFunctionType)': {kind: SpecificFunctionType, type: type(TypeType)}
|
||||
// CHECK:STDOUT: 'inst(UnspecifiedValueType)': {kind: UnspecifiedValueType, type: type(TypeType)}
|
||||
// CHECK:STDOUT: 'inst(VtableType)': {kind: VtableType, type: type(TypeType)}
|
||||
// CHECK:STDOUT: 'inst(WitnessType)': {kind: WitnessType, type: type(TypeType)}
|
||||
// CHECK:STDOUT: instF: {kind: Namespace, arg0: name_scope0, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst50000010: {kind: ImportCppDecl}
|
||||
// CHECK:STDOUT: inst50000011: {kind: Namespace, arg0: name_scope50000001, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst50000012: {kind: NameRef, arg0: name(Cpp), arg1: inst50000011, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst50000013: {kind: ClassDecl, arg0: class50000000, arg1: inst_block<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000014: {kind: ClassType, arg0: class50000000, arg1: specific<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000015: {kind: NameRef, arg0: name2, arg1: inst50000013, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000016: {kind: PatternType, arg0: inst50000014, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000017: {kind: ValueParamPattern, arg0: name1, type: type(inst50000016)}
|
||||
// CHECK:STDOUT: inst50000018: {kind: ValueParamPattern, arg0: name1, type: type(inst50000016)}
|
||||
// CHECK:STDOUT: inst50000019: {kind: WrapperBindingPattern, arg0: entity_name50000000, arg1: inst50000017, type: type(inst50000016)}
|
||||
// CHECK:STDOUT: inst5000001A: {kind: WrapperBindingPattern, arg0: entity_name50000000, arg1: inst50000018, type: type(inst50000016)}
|
||||
// CHECK:STDOUT: inst5000001B: {kind: WrapperBinding, arg0: entity_name50000000, arg1: inst5000001C, type: type(inst50000014)}
|
||||
// CHECK:STDOUT: inst5000001C: {kind: ValueParam, arg0: call_param0, arg1: name1, type: type(inst50000014)}
|
||||
// CHECK:STDOUT: inst5000001D: {kind: SpliceBlock, arg0: inst_block50000005, arg1: inst50000015, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst5000001E: {kind: FunctionDecl, arg0: function50000000, arg1: inst_block5000000A, type: type(inst5000001F)}
|
||||
// CHECK:STDOUT: inst5000001F: {kind: FunctionType, arg0: function50000000, arg1: specific<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000020: {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000021: {kind: StructValue, arg0: inst_block_empty, type: type(inst5000001F)}
|
||||
// CHECK:STDOUT: inst50000022: {kind: PointerType, arg0: inst50000014, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000023: {kind: UnboundElementType, arg0: inst50000014, arg1: inst50000022, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000024: {kind: FieldDecl, arg0: field50000000, arg1: region50000001, type: type(inst50000023)}
|
||||
// CHECK:STDOUT: inst50000025: {kind: CustomLayoutType, arg0: struct_type_fields50000001, arg1: custom_layout50000001, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000026: {kind: CustomLayoutType, arg0: struct_type_fields50000002, arg1: custom_layout50000001, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000027: {kind: CompleteTypeWitness, arg0: inst50000025, type: type(inst(WitnessType))}
|
||||
// CHECK:STDOUT: inst10: {kind: Namespace, arg0: name_scope0, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst50000011: {kind: ImportCppDecl}
|
||||
// CHECK:STDOUT: inst50000012: {kind: Namespace, arg0: name_scope50000001, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst50000013: {kind: NameRef, arg0: name(Cpp), arg1: inst50000012, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst50000014: {kind: ClassDecl, arg0: class50000000, arg1: inst_block<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000015: {kind: ClassType, arg0: class50000000, arg1: specific<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000016: {kind: NameRef, arg0: name2, arg1: inst50000014, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000017: {kind: PatternType, arg0: inst50000015, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000018: {kind: ValueParamPattern, arg0: name1, type: type(inst50000017)}
|
||||
// CHECK:STDOUT: inst50000019: {kind: ValueParamPattern, arg0: name1, type: type(inst50000017)}
|
||||
// CHECK:STDOUT: inst5000001A: {kind: WrapperBindingPattern, arg0: entity_name50000000, arg1: inst50000018, type: type(inst50000017)}
|
||||
// CHECK:STDOUT: inst5000001B: {kind: WrapperBindingPattern, arg0: entity_name50000000, arg1: inst50000019, type: type(inst50000017)}
|
||||
// CHECK:STDOUT: inst5000001C: {kind: WrapperBinding, arg0: entity_name50000000, arg1: inst5000001D, type: type(inst50000015)}
|
||||
// CHECK:STDOUT: inst5000001D: {kind: ValueParam, arg0: call_param0, arg1: name1, type: type(inst50000015)}
|
||||
// CHECK:STDOUT: inst5000001E: {kind: SpliceBlock, arg0: inst_block50000005, arg1: inst50000016, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst5000001F: {kind: FunctionDecl, arg0: function50000000, arg1: inst_block5000000A, type: type(inst50000020)}
|
||||
// CHECK:STDOUT: inst50000020: {kind: FunctionType, arg0: function50000000, arg1: specific<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000021: {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000022: {kind: StructValue, arg0: inst_block_empty, type: type(inst50000020)}
|
||||
// CHECK:STDOUT: inst50000023: {kind: PointerType, arg0: inst50000015, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000024: {kind: UnboundElementType, arg0: inst50000015, arg1: inst50000023, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000025: {kind: FieldDecl, arg0: field50000000, arg1: region50000001, type: type(inst50000024)}
|
||||
// CHECK:STDOUT: inst50000026: {kind: CustomLayoutType, arg0: struct_type_fields50000001, arg1: custom_layout50000001, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000027: {kind: CustomLayoutType, arg0: struct_type_fields50000002, arg1: custom_layout50000001, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000028: {kind: CompleteTypeWitness, arg0: inst50000026, type: type(inst(WitnessType))}
|
||||
// CHECK:STDOUT: inst50000029: {kind: PointerType, arg0: inst50000026, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst5000002A: {kind: NameRef, arg0: name(Cpp), arg1: inst50000011, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst5000002B: {kind: CppOverloadSetType, arg0: cpp_overload_set50000000, arg1: specific<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst5000002C: {kind: CppOverloadSetValue, arg0: cpp_overload_set50000000, type: type(inst5000002B)}
|
||||
// CHECK:STDOUT: inst5000002D: {kind: CppOverloadSetValue, arg0: cpp_overload_set50000000, type: type(inst5000002B)}
|
||||
// CHECK:STDOUT: inst5000002E: {kind: NameRef, arg0: name3, arg1: inst5000002C, type: type(inst5000002B)}
|
||||
// CHECK:STDOUT: inst5000002F: {kind: FunctionDecl, arg0: function50000001, arg1: inst_block_empty, type: type(inst50000030)}
|
||||
// CHECK:STDOUT: inst50000030: {kind: FunctionType, arg0: function50000001, arg1: specific<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000031: {kind: StructValue, arg0: inst_block_empty, type: type(inst50000030)}
|
||||
// CHECK:STDOUT: inst50000032: {kind: FunctionDecl, arg0: function50000002, arg1: inst_block_empty, type: type(inst50000033)}
|
||||
// CHECK:STDOUT: inst50000033: {kind: FunctionType, arg0: function50000002, arg1: specific<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000034: {kind: StructValue, arg0: inst_block_empty, type: type(inst50000033)}
|
||||
// CHECK:STDOUT: inst50000035: {kind: Call, arg0: inst50000032, arg1: inst_block_empty, type: type(inst50000020)}
|
||||
// CHECK:STDOUT: inst50000036: {kind: NameRef, arg0: name(Cpp), arg1: inst50000011, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst50000037: {kind: NameRef, arg0: name3, arg1: inst5000002C, type: type(inst5000002B)}
|
||||
// CHECK:STDOUT: inst50000038: {kind: NameRef, arg0: name1, arg1: inst5000001B, type: type(inst50000014)}
|
||||
// CHECK:STDOUT: inst50000039: {kind: ValueParamPattern, arg0: name1, type: type(inst50000016)}
|
||||
// CHECK:STDOUT: inst5000003A: {kind: WrapperBindingPattern, arg0: entity_name50000001, arg1: inst50000039, type: type(inst50000016)}
|
||||
// CHECK:STDOUT: inst5000003B: {kind: WrapperBinding, arg0: entity_name50000001, arg1: inst5000003C, type: type(inst50000014)}
|
||||
// CHECK:STDOUT: inst5000003C: {kind: ValueParam, arg0: call_param0, arg1: name1, type: type(inst50000014)}
|
||||
// CHECK:STDOUT: inst5000003D: {kind: FunctionDecl, arg0: function50000003, arg1: inst_block50000013, type: type(inst5000003E)}
|
||||
// CHECK:STDOUT: inst5000003E: {kind: FunctionType, arg0: function50000003, arg1: specific<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst5000003F: {kind: StructValue, arg0: inst_block_empty, type: type(inst5000003E)}
|
||||
// CHECK:STDOUT: inst50000040: {kind: PatternType, arg0: inst50000022, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000041: {kind: ValueParamPattern, arg0: name1, type: type(inst50000040)}
|
||||
// CHECK:STDOUT: inst50000042: {kind: ValueParamPattern, arg0: name1, type: type(inst50000040)}
|
||||
// CHECK:STDOUT: inst50000043: {kind: WrapperBindingPattern, arg0: entity_name50000002, arg1: inst50000041, type: type(inst50000040)}
|
||||
// CHECK:STDOUT: inst50000044: {kind: WrapperBindingPattern, arg0: entity_name50000000, arg1: inst50000042, type: type(inst50000040)}
|
||||
// CHECK:STDOUT: inst50000045: {kind: WrapperBinding, arg0: entity_name50000002, arg1: inst50000046, type: type(inst50000022)}
|
||||
// CHECK:STDOUT: inst50000046: {kind: ValueParam, arg0: call_param0, arg1: name1, type: type(inst50000022)}
|
||||
// CHECK:STDOUT: inst50000047: {kind: FunctionDecl, arg0: function50000004, arg1: inst_block50000019, type: type(inst50000048)}
|
||||
// CHECK:STDOUT: inst50000048: {kind: FunctionType, arg0: function50000004, arg1: specific<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000049: {kind: StructValue, arg0: inst_block_empty, type: type(inst50000048)}
|
||||
// CHECK:STDOUT: inst5000004A: {kind: ValueAsRef, arg0: inst50000038, type: type(inst50000014)}
|
||||
// CHECK:STDOUT: inst5000004B: {kind: AddrOf, arg0: inst5000004A, type: type(inst50000022)}
|
||||
// CHECK:STDOUT: inst5000004C: {kind: Call, arg0: inst50000047, arg1: inst_block5000001B, type: type(inst50000020)}
|
||||
// CHECK:STDOUT: inst5000004D: {kind: NameRef, arg0: name(Cpp), arg1: inst50000011, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst5000004E: {kind: NameRef, arg0: name3, arg1: inst5000002C, type: type(inst5000002B)}
|
||||
// CHECK:STDOUT: inst5000004F: {kind: NameRef, arg0: name(Cpp), arg1: inst50000011, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst50000050: {kind: RefBindingPattern, arg0: entity_name50000003, type: type(inst50000040)}
|
||||
// CHECK:STDOUT: inst50000051: {kind: RefBindingPattern, arg0: entity_name50000003, type: type(inst50000040)}
|
||||
// CHECK:STDOUT: inst50000052: {kind: VarPattern, arg0: inst50000050, type: type(inst50000040)}
|
||||
// CHECK:STDOUT: inst50000053: {kind: VarPattern, arg0: inst50000051, type: type(inst50000040)}
|
||||
// CHECK:STDOUT: inst50000054: {kind: VarStorage, arg0: inst50000052, type: type(inst50000022)}
|
||||
// CHECK:STDOUT: inst50000055: {kind: NameRef, arg0: name4, arg1: inst50000054, type: type(inst50000022)}
|
||||
// CHECK:STDOUT: inst50000056: {kind: AcquireValue, arg0: inst50000055, type: type(inst50000022)}
|
||||
// CHECK:STDOUT: inst50000057: {kind: Deref, arg0: inst50000056, type: type(inst50000014)}
|
||||
// CHECK:STDOUT: inst50000058: {kind: AcquireValue, arg0: inst50000057, type: type(inst50000014)}
|
||||
// CHECK:STDOUT: inst50000059: {kind: ValueAsRef, arg0: inst50000058, type: type(inst50000014)}
|
||||
// CHECK:STDOUT: inst5000005A: {kind: AddrOf, arg0: inst50000059, type: type(inst50000022)}
|
||||
// CHECK:STDOUT: inst5000005B: {kind: Call, arg0: inst50000047, arg1: inst_block5000001D, type: type(inst50000020)}
|
||||
// CHECK:STDOUT: inst5000005C: {kind: Return}
|
||||
// CHECK:STDOUT: inst50000029: {kind: CompleteTypeWitness, arg0: inst50000027, type: type(inst(WitnessType))}
|
||||
// CHECK:STDOUT: inst5000002A: {kind: PointerType, arg0: inst50000027, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst5000002B: {kind: NameRef, arg0: name(Cpp), arg1: inst50000012, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst5000002C: {kind: CppOverloadSetType, arg0: cpp_overload_set50000000, arg1: specific<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst5000002D: {kind: CppOverloadSetValue, arg0: cpp_overload_set50000000, type: type(inst5000002C)}
|
||||
// CHECK:STDOUT: inst5000002E: {kind: CppOverloadSetValue, arg0: cpp_overload_set50000000, type: type(inst5000002C)}
|
||||
// CHECK:STDOUT: inst5000002F: {kind: NameRef, arg0: name3, arg1: inst5000002D, type: type(inst5000002C)}
|
||||
// CHECK:STDOUT: inst50000030: {kind: FunctionDecl, arg0: function50000001, arg1: inst_block_empty, type: type(inst50000031)}
|
||||
// CHECK:STDOUT: inst50000031: {kind: FunctionType, arg0: function50000001, arg1: specific<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000032: {kind: StructValue, arg0: inst_block_empty, type: type(inst50000031)}
|
||||
// CHECK:STDOUT: inst50000033: {kind: FunctionDecl, arg0: function50000002, arg1: inst_block_empty, type: type(inst50000034)}
|
||||
// CHECK:STDOUT: inst50000034: {kind: FunctionType, arg0: function50000002, arg1: specific<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000035: {kind: StructValue, arg0: inst_block_empty, type: type(inst50000034)}
|
||||
// CHECK:STDOUT: inst50000036: {kind: Call, arg0: inst50000033, arg1: inst_block_empty, type: type(inst50000021)}
|
||||
// CHECK:STDOUT: inst50000037: {kind: NameRef, arg0: name(Cpp), arg1: inst50000012, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst50000038: {kind: NameRef, arg0: name3, arg1: inst5000002D, type: type(inst5000002C)}
|
||||
// CHECK:STDOUT: inst50000039: {kind: NameRef, arg0: name1, arg1: inst5000001C, type: type(inst50000015)}
|
||||
// CHECK:STDOUT: inst5000003A: {kind: ValueParamPattern, arg0: name1, type: type(inst50000017)}
|
||||
// CHECK:STDOUT: inst5000003B: {kind: WrapperBindingPattern, arg0: entity_name50000001, arg1: inst5000003A, type: type(inst50000017)}
|
||||
// CHECK:STDOUT: inst5000003C: {kind: WrapperBinding, arg0: entity_name50000001, arg1: inst5000003D, type: type(inst50000015)}
|
||||
// CHECK:STDOUT: inst5000003D: {kind: ValueParam, arg0: call_param0, arg1: name1, type: type(inst50000015)}
|
||||
// CHECK:STDOUT: inst5000003E: {kind: FunctionDecl, arg0: function50000003, arg1: inst_block50000013, type: type(inst5000003F)}
|
||||
// CHECK:STDOUT: inst5000003F: {kind: FunctionType, arg0: function50000003, arg1: specific<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000040: {kind: StructValue, arg0: inst_block_empty, type: type(inst5000003F)}
|
||||
// CHECK:STDOUT: inst50000041: {kind: PatternType, arg0: inst50000023, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000042: {kind: ValueParamPattern, arg0: name1, type: type(inst50000041)}
|
||||
// CHECK:STDOUT: inst50000043: {kind: ValueParamPattern, arg0: name1, type: type(inst50000041)}
|
||||
// CHECK:STDOUT: inst50000044: {kind: WrapperBindingPattern, arg0: entity_name50000002, arg1: inst50000042, type: type(inst50000041)}
|
||||
// CHECK:STDOUT: inst50000045: {kind: WrapperBindingPattern, arg0: entity_name50000000, arg1: inst50000043, type: type(inst50000041)}
|
||||
// CHECK:STDOUT: inst50000046: {kind: WrapperBinding, arg0: entity_name50000002, arg1: inst50000047, type: type(inst50000023)}
|
||||
// CHECK:STDOUT: inst50000047: {kind: ValueParam, arg0: call_param0, arg1: name1, type: type(inst50000023)}
|
||||
// CHECK:STDOUT: inst50000048: {kind: FunctionDecl, arg0: function50000004, arg1: inst_block50000019, type: type(inst50000049)}
|
||||
// CHECK:STDOUT: inst50000049: {kind: FunctionType, arg0: function50000004, arg1: specific<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst5000004A: {kind: StructValue, arg0: inst_block_empty, type: type(inst50000049)}
|
||||
// CHECK:STDOUT: inst5000004B: {kind: ValueAsRef, arg0: inst50000039, type: type(inst50000015)}
|
||||
// CHECK:STDOUT: inst5000004C: {kind: AddrOf, arg0: inst5000004B, type: type(inst50000023)}
|
||||
// CHECK:STDOUT: inst5000004D: {kind: Call, arg0: inst50000048, arg1: inst_block5000001B, type: type(inst50000021)}
|
||||
// CHECK:STDOUT: inst5000004E: {kind: NameRef, arg0: name(Cpp), arg1: inst50000012, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst5000004F: {kind: NameRef, arg0: name3, arg1: inst5000002D, type: type(inst5000002C)}
|
||||
// CHECK:STDOUT: inst50000050: {kind: NameRef, arg0: name(Cpp), arg1: inst50000012, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst50000051: {kind: RefBindingPattern, arg0: entity_name50000003, type: type(inst50000041)}
|
||||
// CHECK:STDOUT: inst50000052: {kind: RefBindingPattern, arg0: entity_name50000003, type: type(inst50000041)}
|
||||
// CHECK:STDOUT: inst50000053: {kind: VarPattern, arg0: inst50000051, type: type(inst50000041)}
|
||||
// CHECK:STDOUT: inst50000054: {kind: VarPattern, arg0: inst50000052, type: type(inst50000041)}
|
||||
// CHECK:STDOUT: inst50000055: {kind: VarStorage, arg0: inst50000053, type: type(inst50000023)}
|
||||
// CHECK:STDOUT: inst50000056: {kind: NameRef, arg0: name4, arg1: inst50000055, type: type(inst50000023)}
|
||||
// CHECK:STDOUT: inst50000057: {kind: AcquireValue, arg0: inst50000056, type: type(inst50000023)}
|
||||
// CHECK:STDOUT: inst50000058: {kind: Deref, arg0: inst50000057, type: type(inst50000015)}
|
||||
// CHECK:STDOUT: inst50000059: {kind: AcquireValue, arg0: inst50000058, type: type(inst50000015)}
|
||||
// CHECK:STDOUT: inst5000005A: {kind: ValueAsRef, arg0: inst50000059, type: type(inst50000015)}
|
||||
// CHECK:STDOUT: inst5000005B: {kind: AddrOf, arg0: inst5000005A, type: type(inst50000023)}
|
||||
// CHECK:STDOUT: inst5000005C: {kind: Call, arg0: inst50000048, arg1: inst_block5000001D, type: type(inst50000021)}
|
||||
// CHECK:STDOUT: inst5000005D: {kind: Return}
|
||||
// CHECK:STDOUT: bundles: {}
|
||||
// CHECK:STDOUT: constant_values:
|
||||
// CHECK:STDOUT: values:
|
||||
@@ -291,165 +292,166 @@ fn G(x: Cpp.X) {
|
||||
// CHECK:STDOUT: 'inst(NamespaceType)': concrete_constant(inst(NamespaceType))
|
||||
// CHECK:STDOUT: 'inst(RequireSpecificDefinitionType)': concrete_constant(inst(RequireSpecificDefinitionType))
|
||||
// CHECK:STDOUT: 'inst(SpecificFunctionType)': concrete_constant(inst(SpecificFunctionType))
|
||||
// CHECK:STDOUT: 'inst(UnspecifiedValueType)': concrete_constant(inst(UnspecifiedValueType))
|
||||
// CHECK:STDOUT: 'inst(VtableType)': concrete_constant(inst(VtableType))
|
||||
// CHECK:STDOUT: 'inst(WitnessType)': concrete_constant(inst(WitnessType))
|
||||
// CHECK:STDOUT: instF: concrete_constant(instF)
|
||||
// CHECK:STDOUT: inst50000011: concrete_constant(inst50000011)
|
||||
// CHECK:STDOUT: inst50000012: concrete_constant(inst50000011)
|
||||
// CHECK:STDOUT: inst50000013: concrete_constant(inst50000014)
|
||||
// CHECK:STDOUT: inst50000014: concrete_constant(inst50000014)
|
||||
// CHECK:STDOUT: inst50000015: concrete_constant(inst50000014)
|
||||
// CHECK:STDOUT: inst50000016: concrete_constant(inst50000016)
|
||||
// CHECK:STDOUT: inst50000017: concrete_constant(inst50000018)
|
||||
// CHECK:STDOUT: inst50000018: concrete_constant(inst50000018)
|
||||
// CHECK:STDOUT: inst50000019: concrete_constant(inst5000001A)
|
||||
// CHECK:STDOUT: inst5000001A: concrete_constant(inst5000001A)
|
||||
// CHECK:STDOUT: inst5000001D: concrete_constant(inst50000014)
|
||||
// CHECK:STDOUT: inst5000001E: concrete_constant(inst50000021)
|
||||
// CHECK:STDOUT: inst5000001F: concrete_constant(inst5000001F)
|
||||
// CHECK:STDOUT: inst10: concrete_constant(inst10)
|
||||
// CHECK:STDOUT: inst50000012: concrete_constant(inst50000012)
|
||||
// CHECK:STDOUT: inst50000013: concrete_constant(inst50000012)
|
||||
// CHECK:STDOUT: inst50000014: concrete_constant(inst50000015)
|
||||
// CHECK:STDOUT: inst50000015: concrete_constant(inst50000015)
|
||||
// CHECK:STDOUT: inst50000016: concrete_constant(inst50000015)
|
||||
// CHECK:STDOUT: inst50000017: concrete_constant(inst50000017)
|
||||
// CHECK:STDOUT: inst50000018: concrete_constant(inst50000019)
|
||||
// CHECK:STDOUT: inst50000019: concrete_constant(inst50000019)
|
||||
// CHECK:STDOUT: inst5000001A: concrete_constant(inst5000001B)
|
||||
// CHECK:STDOUT: inst5000001B: concrete_constant(inst5000001B)
|
||||
// CHECK:STDOUT: inst5000001E: concrete_constant(inst50000015)
|
||||
// CHECK:STDOUT: inst5000001F: concrete_constant(inst50000022)
|
||||
// CHECK:STDOUT: inst50000020: concrete_constant(inst50000020)
|
||||
// CHECK:STDOUT: inst50000021: concrete_constant(inst50000021)
|
||||
// CHECK:STDOUT: inst50000022: concrete_constant(inst50000022)
|
||||
// CHECK:STDOUT: inst50000023: concrete_constant(inst50000023)
|
||||
// CHECK:STDOUT: inst50000024: concrete_constant(inst50000024)
|
||||
// CHECK:STDOUT: inst50000025: concrete_constant(inst50000026)
|
||||
// CHECK:STDOUT: inst50000026: concrete_constant(inst50000026)
|
||||
// CHECK:STDOUT: inst50000027: concrete_constant(inst50000028)
|
||||
// CHECK:STDOUT: inst50000028: concrete_constant(inst50000028)
|
||||
// CHECK:STDOUT: inst50000025: concrete_constant(inst50000025)
|
||||
// CHECK:STDOUT: inst50000026: concrete_constant(inst50000027)
|
||||
// CHECK:STDOUT: inst50000027: concrete_constant(inst50000027)
|
||||
// CHECK:STDOUT: inst50000028: concrete_constant(inst50000029)
|
||||
// CHECK:STDOUT: inst50000029: concrete_constant(inst50000029)
|
||||
// CHECK:STDOUT: inst5000002A: concrete_constant(inst50000011)
|
||||
// CHECK:STDOUT: inst5000002B: concrete_constant(inst5000002B)
|
||||
// CHECK:STDOUT: inst5000002C: concrete_constant(inst5000002D)
|
||||
// CHECK:STDOUT: inst5000002D: concrete_constant(inst5000002D)
|
||||
// CHECK:STDOUT: inst5000002E: concrete_constant(inst5000002D)
|
||||
// CHECK:STDOUT: inst5000002F: concrete_constant(inst50000031)
|
||||
// CHECK:STDOUT: inst50000030: concrete_constant(inst50000030)
|
||||
// CHECK:STDOUT: inst5000002A: concrete_constant(inst5000002A)
|
||||
// CHECK:STDOUT: inst5000002B: concrete_constant(inst50000012)
|
||||
// CHECK:STDOUT: inst5000002C: concrete_constant(inst5000002C)
|
||||
// CHECK:STDOUT: inst5000002D: concrete_constant(inst5000002E)
|
||||
// CHECK:STDOUT: inst5000002E: concrete_constant(inst5000002E)
|
||||
// CHECK:STDOUT: inst5000002F: concrete_constant(inst5000002E)
|
||||
// CHECK:STDOUT: inst50000030: concrete_constant(inst50000032)
|
||||
// CHECK:STDOUT: inst50000031: concrete_constant(inst50000031)
|
||||
// CHECK:STDOUT: inst50000032: concrete_constant(inst50000034)
|
||||
// CHECK:STDOUT: inst50000033: concrete_constant(inst50000033)
|
||||
// CHECK:STDOUT: inst50000032: concrete_constant(inst50000032)
|
||||
// CHECK:STDOUT: inst50000033: concrete_constant(inst50000035)
|
||||
// CHECK:STDOUT: inst50000034: concrete_constant(inst50000034)
|
||||
// CHECK:STDOUT: inst50000036: concrete_constant(inst50000011)
|
||||
// CHECK:STDOUT: inst50000037: concrete_constant(inst5000002D)
|
||||
// CHECK:STDOUT: inst50000039: concrete_constant(inst50000018)
|
||||
// CHECK:STDOUT: inst5000003A: concrete_constant(inst5000001A)
|
||||
// CHECK:STDOUT: inst5000003D: concrete_constant(inst5000003F)
|
||||
// CHECK:STDOUT: inst5000003E: concrete_constant(inst5000003E)
|
||||
// CHECK:STDOUT: inst50000035: concrete_constant(inst50000035)
|
||||
// CHECK:STDOUT: inst50000037: concrete_constant(inst50000012)
|
||||
// CHECK:STDOUT: inst50000038: concrete_constant(inst5000002E)
|
||||
// CHECK:STDOUT: inst5000003A: concrete_constant(inst50000019)
|
||||
// CHECK:STDOUT: inst5000003B: concrete_constant(inst5000001B)
|
||||
// CHECK:STDOUT: inst5000003E: concrete_constant(inst50000040)
|
||||
// CHECK:STDOUT: inst5000003F: concrete_constant(inst5000003F)
|
||||
// CHECK:STDOUT: inst50000040: concrete_constant(inst50000040)
|
||||
// CHECK:STDOUT: inst50000041: concrete_constant(inst50000042)
|
||||
// CHECK:STDOUT: inst50000042: concrete_constant(inst50000042)
|
||||
// CHECK:STDOUT: inst50000043: concrete_constant(inst50000044)
|
||||
// CHECK:STDOUT: inst50000044: concrete_constant(inst50000044)
|
||||
// CHECK:STDOUT: inst50000047: concrete_constant(inst50000049)
|
||||
// CHECK:STDOUT: inst50000048: concrete_constant(inst50000048)
|
||||
// CHECK:STDOUT: inst50000041: concrete_constant(inst50000041)
|
||||
// CHECK:STDOUT: inst50000042: concrete_constant(inst50000043)
|
||||
// CHECK:STDOUT: inst50000043: concrete_constant(inst50000043)
|
||||
// CHECK:STDOUT: inst50000044: concrete_constant(inst50000045)
|
||||
// CHECK:STDOUT: inst50000045: concrete_constant(inst50000045)
|
||||
// CHECK:STDOUT: inst50000048: concrete_constant(inst5000004A)
|
||||
// CHECK:STDOUT: inst50000049: concrete_constant(inst50000049)
|
||||
// CHECK:STDOUT: inst5000004D: concrete_constant(inst50000011)
|
||||
// CHECK:STDOUT: inst5000004E: concrete_constant(inst5000002D)
|
||||
// CHECK:STDOUT: inst5000004F: concrete_constant(inst50000011)
|
||||
// CHECK:STDOUT: inst50000050: concrete_constant(inst50000051)
|
||||
// CHECK:STDOUT: inst50000051: concrete_constant(inst50000051)
|
||||
// CHECK:STDOUT: inst50000052: concrete_constant(inst50000053)
|
||||
// CHECK:STDOUT: inst50000053: concrete_constant(inst50000053)
|
||||
// CHECK:STDOUT: inst5000004A: concrete_constant(inst5000004A)
|
||||
// CHECK:STDOUT: inst5000004E: concrete_constant(inst50000012)
|
||||
// CHECK:STDOUT: inst5000004F: concrete_constant(inst5000002E)
|
||||
// CHECK:STDOUT: inst50000050: concrete_constant(inst50000012)
|
||||
// CHECK:STDOUT: inst50000051: concrete_constant(inst50000052)
|
||||
// CHECK:STDOUT: inst50000052: concrete_constant(inst50000052)
|
||||
// CHECK:STDOUT: inst50000053: concrete_constant(inst50000054)
|
||||
// CHECK:STDOUT: inst50000054: concrete_constant(inst50000054)
|
||||
// CHECK:STDOUT: inst50000055: concrete_constant(inst50000054)
|
||||
// CHECK:STDOUT: inst50000055: concrete_constant(inst50000055)
|
||||
// CHECK:STDOUT: inst50000056: concrete_constant(inst50000055)
|
||||
// CHECK:STDOUT: symbolic_constants: {}
|
||||
// CHECK:STDOUT: inst_blocks:
|
||||
// CHECK:STDOUT: inst_block_empty: {}
|
||||
// CHECK:STDOUT: exports:
|
||||
// CHECK:STDOUT: 0: inst5000001E
|
||||
// CHECK:STDOUT: 0: inst5000001F
|
||||
// CHECK:STDOUT: generated: {}
|
||||
// CHECK:STDOUT: imports:
|
||||
// CHECK:STDOUT: 0: inst50000011
|
||||
// CHECK:STDOUT: 1: inst50000013
|
||||
// CHECK:STDOUT: 2: inst5000002C
|
||||
// CHECK:STDOUT: 3: inst5000002F
|
||||
// CHECK:STDOUT: 4: inst50000032
|
||||
// CHECK:STDOUT: 5: inst5000003D
|
||||
// CHECK:STDOUT: 6: inst50000047
|
||||
// CHECK:STDOUT: 7: inst50000050
|
||||
// CHECK:STDOUT: 8: inst50000052
|
||||
// CHECK:STDOUT: 9: inst50000054
|
||||
// CHECK:STDOUT: 0: inst50000012
|
||||
// CHECK:STDOUT: 1: inst50000014
|
||||
// CHECK:STDOUT: 2: inst5000002D
|
||||
// CHECK:STDOUT: 3: inst50000030
|
||||
// CHECK:STDOUT: 4: inst50000033
|
||||
// CHECK:STDOUT: 5: inst5000003E
|
||||
// CHECK:STDOUT: 6: inst50000048
|
||||
// CHECK:STDOUT: 7: inst50000051
|
||||
// CHECK:STDOUT: 8: inst50000053
|
||||
// CHECK:STDOUT: 9: inst50000055
|
||||
// CHECK:STDOUT: global_init: {}
|
||||
// CHECK:STDOUT: inst_block50000005:
|
||||
// CHECK:STDOUT: 0: inst50000012
|
||||
// CHECK:STDOUT: 1: inst50000015
|
||||
// CHECK:STDOUT: 0: inst50000013
|
||||
// CHECK:STDOUT: 1: inst50000016
|
||||
// CHECK:STDOUT: inst_block50000006:
|
||||
// CHECK:STDOUT: 0: inst50000019
|
||||
// CHECK:STDOUT: 0: inst5000001A
|
||||
// CHECK:STDOUT: inst_block50000007:
|
||||
// CHECK:STDOUT: 0: inst50000017
|
||||
// CHECK:STDOUT: 0: inst50000018
|
||||
// CHECK:STDOUT: inst_block50000008:
|
||||
// CHECK:STDOUT: 0: inst5000001C
|
||||
// CHECK:STDOUT: 0: inst5000001D
|
||||
// CHECK:STDOUT: inst_block50000009:
|
||||
// CHECK:STDOUT: 0: inst50000017
|
||||
// CHECK:STDOUT: 1: inst50000019
|
||||
// CHECK:STDOUT: 0: inst50000018
|
||||
// CHECK:STDOUT: 1: inst5000001A
|
||||
// CHECK:STDOUT: inst_block5000000A:
|
||||
// CHECK:STDOUT: 0: inst5000001C
|
||||
// CHECK:STDOUT: 1: inst5000001D
|
||||
// CHECK:STDOUT: 2: inst5000001B
|
||||
// CHECK:STDOUT: 0: inst5000001D
|
||||
// CHECK:STDOUT: 1: inst5000001E
|
||||
// CHECK:STDOUT: 2: inst5000001C
|
||||
// CHECK:STDOUT: inst_block5000000B:
|
||||
// CHECK:STDOUT: 0: inst5000002A
|
||||
// CHECK:STDOUT: 1: inst5000002E
|
||||
// CHECK:STDOUT: 2: inst50000035
|
||||
// CHECK:STDOUT: 3: inst50000036
|
||||
// CHECK:STDOUT: 4: inst50000037
|
||||
// CHECK:STDOUT: 5: inst50000038
|
||||
// CHECK:STDOUT: 6: inst5000004A
|
||||
// CHECK:STDOUT: 7: inst5000004B
|
||||
// CHECK:STDOUT: 8: inst5000004C
|
||||
// CHECK:STDOUT: 9: inst5000004D
|
||||
// CHECK:STDOUT: 10: inst5000004E
|
||||
// CHECK:STDOUT: 11: inst5000004F
|
||||
// CHECK:STDOUT: 12: inst50000055
|
||||
// CHECK:STDOUT: 13: inst50000056
|
||||
// CHECK:STDOUT: 14: inst50000057
|
||||
// CHECK:STDOUT: 15: inst50000058
|
||||
// CHECK:STDOUT: 16: inst50000059
|
||||
// CHECK:STDOUT: 17: inst5000005A
|
||||
// CHECK:STDOUT: 18: inst5000005B
|
||||
// CHECK:STDOUT: 19: inst5000005C
|
||||
// CHECK:STDOUT: 0: inst5000002B
|
||||
// CHECK:STDOUT: 1: inst5000002F
|
||||
// CHECK:STDOUT: 2: inst50000036
|
||||
// CHECK:STDOUT: 3: inst50000037
|
||||
// CHECK:STDOUT: 4: inst50000038
|
||||
// CHECK:STDOUT: 5: inst50000039
|
||||
// CHECK:STDOUT: 6: inst5000004B
|
||||
// CHECK:STDOUT: 7: inst5000004C
|
||||
// CHECK:STDOUT: 8: inst5000004D
|
||||
// CHECK:STDOUT: 9: inst5000004E
|
||||
// CHECK:STDOUT: 10: inst5000004F
|
||||
// CHECK:STDOUT: 11: inst50000050
|
||||
// CHECK:STDOUT: 12: inst50000056
|
||||
// CHECK:STDOUT: 13: inst50000057
|
||||
// CHECK:STDOUT: 14: inst50000058
|
||||
// CHECK:STDOUT: 15: inst50000059
|
||||
// CHECK:STDOUT: 16: inst5000005A
|
||||
// CHECK:STDOUT: 17: inst5000005B
|
||||
// CHECK:STDOUT: 18: inst5000005C
|
||||
// CHECK:STDOUT: 19: inst5000005D
|
||||
// CHECK:STDOUT: inst_block5000000C: {}
|
||||
// CHECK:STDOUT: inst_block5000000D:
|
||||
// CHECK:STDOUT: 0: inst50000024
|
||||
// CHECK:STDOUT: 1: inst50000025
|
||||
// CHECK:STDOUT: 2: inst50000027
|
||||
// CHECK:STDOUT: 0: inst50000025
|
||||
// CHECK:STDOUT: 1: inst50000026
|
||||
// CHECK:STDOUT: 2: inst50000028
|
||||
// CHECK:STDOUT: inst_block5000000E: {}
|
||||
// CHECK:STDOUT: inst_block5000000F:
|
||||
// CHECK:STDOUT: 0: inst5000003A
|
||||
// CHECK:STDOUT: 0: inst5000003B
|
||||
// CHECK:STDOUT: inst_block50000010:
|
||||
// CHECK:STDOUT: 0: inst50000039
|
||||
// CHECK:STDOUT: 0: inst5000003A
|
||||
// CHECK:STDOUT: inst_block50000011:
|
||||
// CHECK:STDOUT: 0: inst5000003C
|
||||
// CHECK:STDOUT: 0: inst5000003D
|
||||
// CHECK:STDOUT: inst_block50000012:
|
||||
// CHECK:STDOUT: 0: inst50000039
|
||||
// CHECK:STDOUT: 1: inst5000003A
|
||||
// CHECK:STDOUT: inst_block50000013:
|
||||
// CHECK:STDOUT: 0: inst5000003C
|
||||
// CHECK:STDOUT: 0: inst5000003A
|
||||
// CHECK:STDOUT: 1: inst5000003B
|
||||
// CHECK:STDOUT: inst_block50000013:
|
||||
// CHECK:STDOUT: 0: inst5000003D
|
||||
// CHECK:STDOUT: 1: inst5000003C
|
||||
// CHECK:STDOUT: inst_block50000014: {}
|
||||
// CHECK:STDOUT: inst_block50000015:
|
||||
// CHECK:STDOUT: 0: inst50000043
|
||||
// CHECK:STDOUT: 0: inst50000044
|
||||
// CHECK:STDOUT: inst_block50000016:
|
||||
// CHECK:STDOUT: 0: inst50000041
|
||||
// CHECK:STDOUT: 0: inst50000042
|
||||
// CHECK:STDOUT: inst_block50000017:
|
||||
// CHECK:STDOUT: 0: inst50000046
|
||||
// CHECK:STDOUT: 0: inst50000047
|
||||
// CHECK:STDOUT: inst_block50000018:
|
||||
// CHECK:STDOUT: 0: inst50000041
|
||||
// CHECK:STDOUT: 1: inst50000043
|
||||
// CHECK:STDOUT: 0: inst50000042
|
||||
// CHECK:STDOUT: 1: inst50000044
|
||||
// CHECK:STDOUT: inst_block50000019:
|
||||
// CHECK:STDOUT: 0: inst50000046
|
||||
// CHECK:STDOUT: 1: inst50000045
|
||||
// CHECK:STDOUT: 0: inst50000047
|
||||
// CHECK:STDOUT: 1: inst50000046
|
||||
// CHECK:STDOUT: inst_block5000001A:
|
||||
// CHECK:STDOUT: 0: inst50000038
|
||||
// CHECK:STDOUT: 0: inst50000039
|
||||
// CHECK:STDOUT: inst_block5000001B:
|
||||
// CHECK:STDOUT: 0: inst5000004B
|
||||
// CHECK:STDOUT: 0: inst5000004C
|
||||
// CHECK:STDOUT: inst_block5000001C:
|
||||
// CHECK:STDOUT: 0: inst50000058
|
||||
// CHECK:STDOUT: 0: inst50000059
|
||||
// CHECK:STDOUT: inst_block5000001D:
|
||||
// CHECK:STDOUT: 0: inst5000005A
|
||||
// CHECK:STDOUT: 0: inst5000005B
|
||||
// CHECK:STDOUT: inst_block5000001E:
|
||||
// CHECK:STDOUT: 0: instF
|
||||
// CHECK:STDOUT: 1: inst50000010
|
||||
// CHECK:STDOUT: 2: inst5000001E
|
||||
// CHECK:STDOUT: 0: inst10
|
||||
// CHECK:STDOUT: 1: inst50000011
|
||||
// CHECK:STDOUT: 2: inst5000001F
|
||||
// CHECK:STDOUT: value_stores:
|
||||
// CHECK:STDOUT: shared_values:
|
||||
// CHECK:STDOUT: ints: {}
|
||||
|
||||
+62
-62
@@ -39,7 +39,7 @@ fn B() {
|
||||
// CHECK:STDOUT: clang_decls: {}
|
||||
// CHECK:STDOUT: clang_decl_signatures: {}
|
||||
// CHECK:STDOUT: name_scopes:
|
||||
// CHECK:STDOUT: name_scope0: {inst: instF, parent_scope: name_scope<none>, has_error: false, extended_scopes: [], names: {name0: inst50000010}}
|
||||
// CHECK:STDOUT: name_scope0: {inst: inst10, parent_scope: name_scope<none>, has_error: false, extended_scopes: [], names: {name0: inst50000011}}
|
||||
// CHECK:STDOUT: entity_names: {}
|
||||
// CHECK:STDOUT: functions:
|
||||
// CHECK:STDOUT: function50000000: {name: name0, parent_scope: name_scope0, call_param_patterns_id: inst_block_empty, call_params_id: inst_block_empty, body: [inst_block50000006]}
|
||||
@@ -78,46 +78,46 @@ fn B() {
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 0
|
||||
// CHECK:STDOUT: alignment: 1
|
||||
// CHECK:STDOUT: 'type(inst50000011)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst50000012)}
|
||||
// CHECK:STDOUT: 'type(inst50000012)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst50000013)}
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 0
|
||||
// CHECK:STDOUT: alignment: 1
|
||||
// CHECK:STDOUT: 'type(inst50000012)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst50000012)}
|
||||
// CHECK:STDOUT: 'type(inst50000013)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst50000013)}
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 0
|
||||
// CHECK:STDOUT: alignment: 1
|
||||
// CHECK:STDOUT: declared_facet_types: {}
|
||||
// CHECK:STDOUT: insts:
|
||||
// CHECK:STDOUT: instF: {kind: Namespace, arg0: name_scope0, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst50000010: {kind: FunctionDecl, arg0: function50000000, arg1: inst_block_empty, type: type(inst50000011)}
|
||||
// CHECK:STDOUT: inst50000011: {kind: FunctionType, arg0: function50000000, arg1: specific<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000012: {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000013: {kind: StructValue, arg0: inst_block_empty, type: type(inst50000011)}
|
||||
// CHECK:STDOUT: inst50000014: {kind: Return}
|
||||
// CHECK:STDOUT: inst10: {kind: Namespace, arg0: name_scope0, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst50000011: {kind: FunctionDecl, arg0: function50000000, arg1: inst_block_empty, type: type(inst50000012)}
|
||||
// CHECK:STDOUT: inst50000012: {kind: FunctionType, arg0: function50000000, arg1: specific<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000013: {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000014: {kind: StructValue, arg0: inst_block_empty, type: type(inst50000012)}
|
||||
// CHECK:STDOUT: inst50000015: {kind: Return}
|
||||
// CHECK:STDOUT: bundles: {}
|
||||
// CHECK:STDOUT: constant_values:
|
||||
// CHECK:STDOUT: values:
|
||||
// CHECK:STDOUT: instF: concrete_constant(instF)
|
||||
// CHECK:STDOUT: inst50000010: concrete_constant(inst50000013)
|
||||
// CHECK:STDOUT: inst50000011: concrete_constant(inst50000011)
|
||||
// CHECK:STDOUT: inst10: concrete_constant(inst10)
|
||||
// CHECK:STDOUT: inst50000011: concrete_constant(inst50000014)
|
||||
// CHECK:STDOUT: inst50000012: concrete_constant(inst50000012)
|
||||
// CHECK:STDOUT: inst50000013: concrete_constant(inst50000013)
|
||||
// CHECK:STDOUT: inst50000014: concrete_constant(inst50000014)
|
||||
// CHECK:STDOUT: symbolic_constants: {}
|
||||
// CHECK:STDOUT: inst_blocks:
|
||||
// CHECK:STDOUT: inst_block_empty: {}
|
||||
// CHECK:STDOUT: exports:
|
||||
// CHECK:STDOUT: 0: inst50000010
|
||||
// CHECK:STDOUT: 0: inst50000011
|
||||
// CHECK:STDOUT: generated: {}
|
||||
// CHECK:STDOUT: imports: {}
|
||||
// CHECK:STDOUT: global_init: {}
|
||||
// CHECK:STDOUT: inst_block50000005: {}
|
||||
// CHECK:STDOUT: inst_block50000006:
|
||||
// CHECK:STDOUT: 0: inst50000014
|
||||
// CHECK:STDOUT: 0: inst50000015
|
||||
// CHECK:STDOUT: inst_block50000007:
|
||||
// CHECK:STDOUT: 0: instF
|
||||
// CHECK:STDOUT: 1: inst50000010
|
||||
// CHECK:STDOUT: 0: inst10
|
||||
// CHECK:STDOUT: 1: inst50000011
|
||||
// CHECK:STDOUT: value_stores:
|
||||
// CHECK:STDOUT: shared_values:
|
||||
// CHECK:STDOUT: ints: {}
|
||||
@@ -136,15 +136,15 @@ fn B() {
|
||||
// CHECK:STDOUT: import_irs:
|
||||
// CHECK:STDOUT: 'import_ir(ApiForImpl)': {decl_id: inst<none>, is_export: false}
|
||||
// CHECK:STDOUT: 'import_ir(Cpp)': {decl_id: inst<none>, is_export: false}
|
||||
// CHECK:STDOUT: import_ir70000002: {decl_id: inst70000010, is_export: false}
|
||||
// CHECK:STDOUT: import_ir70000002: {decl_id: inst70000011, is_export: false}
|
||||
// CHECK:STDOUT: import_ir_insts:
|
||||
// CHECK:STDOUT: import_ir_inst0: {ir_id: import_ir70000002, inst_id: inst50000010}
|
||||
// CHECK:STDOUT: import_ir_inst1: {ir_id: import_ir70000002, inst_id: inst50000010}
|
||||
// CHECK:STDOUT: import_ir_inst0: {ir_id: import_ir70000002, inst_id: inst50000011}
|
||||
// CHECK:STDOUT: import_ir_inst1: {ir_id: import_ir70000002, inst_id: inst50000011}
|
||||
// CHECK:STDOUT: clang_decls: {}
|
||||
// CHECK:STDOUT: clang_decl_signatures: {}
|
||||
// CHECK:STDOUT: name_scopes:
|
||||
// CHECK:STDOUT: name_scope0: {inst: instF, parent_scope: name_scope<none>, has_error: false, extended_scopes: [], names: {name1: inst70000011, name0: inst70000012}}
|
||||
// CHECK:STDOUT: name_scope70000001: {inst: inst70000011, parent_scope: name_scope0, has_error: false, extended_scopes: [], names: {name1: inst70000017}}
|
||||
// CHECK:STDOUT: name_scope0: {inst: inst10, parent_scope: name_scope<none>, has_error: false, extended_scopes: [], names: {name1: inst70000012, name0: inst70000013}}
|
||||
// CHECK:STDOUT: name_scope70000001: {inst: inst70000012, parent_scope: name_scope0, has_error: false, extended_scopes: [], names: {name1: inst70000018}}
|
||||
// CHECK:STDOUT: entity_names:
|
||||
// CHECK:STDOUT: entity_name70000000: {name: name1, parent_scope: name_scope70000001, index: -1, is_template: 0, is_unused: 0, form: inst<none>}
|
||||
// CHECK:STDOUT: functions:
|
||||
@@ -185,69 +185,69 @@ fn B() {
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 0
|
||||
// CHECK:STDOUT: alignment: 1
|
||||
// CHECK:STDOUT: 'type(inst70000013)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst70000014)}
|
||||
// CHECK:STDOUT: 'type(inst70000014)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst70000015)}
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 0
|
||||
// CHECK:STDOUT: alignment: 1
|
||||
// CHECK:STDOUT: 'type(inst70000014)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst70000014)}
|
||||
// CHECK:STDOUT: 'type(inst70000015)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst70000015)}
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 0
|
||||
// CHECK:STDOUT: alignment: 1
|
||||
// CHECK:STDOUT: declared_facet_types: {}
|
||||
// CHECK:STDOUT: insts:
|
||||
// CHECK:STDOUT: instF: {kind: Namespace, arg0: name_scope0, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst70000010: {kind: ImportDecl, arg0: name1}
|
||||
// CHECK:STDOUT: inst70000011: {kind: Namespace, arg0: name_scope70000001, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst70000012: {kind: FunctionDecl, arg0: function70000000, arg1: inst_block_empty, type: type(inst70000013)}
|
||||
// CHECK:STDOUT: inst70000013: {kind: FunctionType, arg0: function70000000, arg1: specific<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst70000014: {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst70000015: {kind: StructValue, arg0: inst_block_empty, type: type(inst70000013)}
|
||||
// CHECK:STDOUT: inst70000016: {kind: NameRef, arg0: name1, arg1: inst70000011, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst70000017: {kind: ImportRefLoaded, arg0: import_ir_inst0, arg1: entity_name70000000, type: type(inst70000019)}
|
||||
// CHECK:STDOUT: inst70000018: {kind: FunctionDecl, arg0: function70000001, arg1: inst_block_empty, type: type(inst70000019)}
|
||||
// CHECK:STDOUT: inst70000019: {kind: FunctionType, arg0: function70000001, arg1: specific<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst7000001A: {kind: StructValue, arg0: inst_block_empty, type: type(inst70000019)}
|
||||
// CHECK:STDOUT: inst7000001B: {kind: NameRef, arg0: name1, arg1: inst70000017, type: type(inst70000019)}
|
||||
// CHECK:STDOUT: inst7000001C: {kind: Call, arg0: inst7000001B, arg1: inst_block_empty, type: type(inst70000014)}
|
||||
// CHECK:STDOUT: inst7000001D: {kind: Return}
|
||||
// CHECK:STDOUT: inst10: {kind: Namespace, arg0: name_scope0, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst70000011: {kind: ImportDecl, arg0: name1}
|
||||
// CHECK:STDOUT: inst70000012: {kind: Namespace, arg0: name_scope70000001, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst70000013: {kind: FunctionDecl, arg0: function70000000, arg1: inst_block_empty, type: type(inst70000014)}
|
||||
// CHECK:STDOUT: inst70000014: {kind: FunctionType, arg0: function70000000, arg1: specific<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst70000015: {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst70000016: {kind: StructValue, arg0: inst_block_empty, type: type(inst70000014)}
|
||||
// CHECK:STDOUT: inst70000017: {kind: NameRef, arg0: name1, arg1: inst70000012, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst70000018: {kind: ImportRefLoaded, arg0: import_ir_inst0, arg1: entity_name70000000, type: type(inst7000001A)}
|
||||
// CHECK:STDOUT: inst70000019: {kind: FunctionDecl, arg0: function70000001, arg1: inst_block_empty, type: type(inst7000001A)}
|
||||
// CHECK:STDOUT: inst7000001A: {kind: FunctionType, arg0: function70000001, arg1: specific<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst7000001B: {kind: StructValue, arg0: inst_block_empty, type: type(inst7000001A)}
|
||||
// CHECK:STDOUT: inst7000001C: {kind: NameRef, arg0: name1, arg1: inst70000018, type: type(inst7000001A)}
|
||||
// CHECK:STDOUT: inst7000001D: {kind: Call, arg0: inst7000001C, arg1: inst_block_empty, type: type(inst70000015)}
|
||||
// CHECK:STDOUT: inst7000001E: {kind: Return}
|
||||
// CHECK:STDOUT: bundles: {}
|
||||
// CHECK:STDOUT: constant_values:
|
||||
// CHECK:STDOUT: values:
|
||||
// CHECK:STDOUT: instF: concrete_constant(instF)
|
||||
// CHECK:STDOUT: inst70000011: concrete_constant(inst70000011)
|
||||
// CHECK:STDOUT: inst70000012: concrete_constant(inst70000015)
|
||||
// CHECK:STDOUT: inst70000013: concrete_constant(inst70000013)
|
||||
// CHECK:STDOUT: inst10: concrete_constant(inst10)
|
||||
// CHECK:STDOUT: inst70000012: concrete_constant(inst70000012)
|
||||
// CHECK:STDOUT: inst70000013: concrete_constant(inst70000016)
|
||||
// CHECK:STDOUT: inst70000014: concrete_constant(inst70000014)
|
||||
// CHECK:STDOUT: inst70000015: concrete_constant(inst70000015)
|
||||
// CHECK:STDOUT: inst70000016: concrete_constant(inst70000011)
|
||||
// CHECK:STDOUT: inst70000017: concrete_constant(inst7000001A)
|
||||
// CHECK:STDOUT: inst70000018: concrete_constant(inst7000001A)
|
||||
// CHECK:STDOUT: inst70000019: concrete_constant(inst70000019)
|
||||
// CHECK:STDOUT: inst70000016: concrete_constant(inst70000016)
|
||||
// CHECK:STDOUT: inst70000017: concrete_constant(inst70000012)
|
||||
// CHECK:STDOUT: inst70000018: concrete_constant(inst7000001B)
|
||||
// CHECK:STDOUT: inst70000019: concrete_constant(inst7000001B)
|
||||
// CHECK:STDOUT: inst7000001A: concrete_constant(inst7000001A)
|
||||
// CHECK:STDOUT: inst7000001B: concrete_constant(inst7000001A)
|
||||
// CHECK:STDOUT: inst7000001B: concrete_constant(inst7000001B)
|
||||
// CHECK:STDOUT: inst7000001C: concrete_constant(inst7000001B)
|
||||
// CHECK:STDOUT: symbolic_constants: {}
|
||||
// CHECK:STDOUT: inst_blocks:
|
||||
// CHECK:STDOUT: inst_block_empty: {}
|
||||
// CHECK:STDOUT: exports:
|
||||
// CHECK:STDOUT: 0: inst70000012
|
||||
// CHECK:STDOUT: 0: inst70000013
|
||||
// CHECK:STDOUT: generated: {}
|
||||
// CHECK:STDOUT: imports:
|
||||
// CHECK:STDOUT: 0: inst70000011
|
||||
// CHECK:STDOUT: 1: inst70000017
|
||||
// CHECK:STDOUT: 2: inst70000018
|
||||
// CHECK:STDOUT: 0: inst70000012
|
||||
// CHECK:STDOUT: 1: inst70000018
|
||||
// CHECK:STDOUT: 2: inst70000019
|
||||
// CHECK:STDOUT: global_init: {}
|
||||
// CHECK:STDOUT: inst_block70000005: {}
|
||||
// CHECK:STDOUT: inst_block70000006:
|
||||
// CHECK:STDOUT: 0: inst70000016
|
||||
// CHECK:STDOUT: 1: inst7000001B
|
||||
// CHECK:STDOUT: 2: inst7000001C
|
||||
// CHECK:STDOUT: 3: inst7000001D
|
||||
// CHECK:STDOUT: 0: inst70000017
|
||||
// CHECK:STDOUT: 1: inst7000001C
|
||||
// CHECK:STDOUT: 2: inst7000001D
|
||||
// CHECK:STDOUT: 3: inst7000001E
|
||||
// CHECK:STDOUT: inst_block70000007:
|
||||
// CHECK:STDOUT: 0: instF
|
||||
// CHECK:STDOUT: 1: inst70000010
|
||||
// CHECK:STDOUT: 2: inst70000012
|
||||
// CHECK:STDOUT: 0: inst10
|
||||
// CHECK:STDOUT: 1: inst70000011
|
||||
// CHECK:STDOUT: 2: inst70000013
|
||||
// CHECK:STDOUT: value_stores:
|
||||
// CHECK:STDOUT: shared_values:
|
||||
// CHECK:STDOUT: ints: {}
|
||||
|
||||
+62
-62
@@ -39,7 +39,7 @@ fn B() {
|
||||
// CHECK:STDOUT: clang_decls: {}
|
||||
// CHECK:STDOUT: clang_decl_signatures: {}
|
||||
// CHECK:STDOUT: name_scopes:
|
||||
// CHECK:STDOUT: name_scope0: {inst: instF, parent_scope: name_scope<none>, has_error: false, extended_scopes: [], names: {name0: inst50000010}}
|
||||
// CHECK:STDOUT: name_scope0: {inst: inst10, parent_scope: name_scope<none>, has_error: false, extended_scopes: [], names: {name0: inst50000011}}
|
||||
// CHECK:STDOUT: entity_names: {}
|
||||
// CHECK:STDOUT: functions:
|
||||
// CHECK:STDOUT: function50000000: {name: name0, parent_scope: name_scope0, call_param_patterns_id: inst_block_empty, call_params_id: inst_block_empty, body: [inst_block50000006]}
|
||||
@@ -78,46 +78,46 @@ fn B() {
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 0
|
||||
// CHECK:STDOUT: alignment: 1
|
||||
// CHECK:STDOUT: 'type(inst50000011)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst50000012)}
|
||||
// CHECK:STDOUT: 'type(inst50000012)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst50000013)}
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 0
|
||||
// CHECK:STDOUT: alignment: 1
|
||||
// CHECK:STDOUT: 'type(inst50000012)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst50000012)}
|
||||
// CHECK:STDOUT: 'type(inst50000013)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst50000013)}
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 0
|
||||
// CHECK:STDOUT: alignment: 1
|
||||
// CHECK:STDOUT: declared_facet_types: {}
|
||||
// CHECK:STDOUT: insts:
|
||||
// CHECK:STDOUT: instF: {kind: Namespace, arg0: name_scope0, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst50000010: {kind: FunctionDecl, arg0: function50000000, arg1: inst_block_empty, type: type(inst50000011)}
|
||||
// CHECK:STDOUT: inst50000011: {kind: FunctionType, arg0: function50000000, arg1: specific<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000012: {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000013: {kind: StructValue, arg0: inst_block_empty, type: type(inst50000011)}
|
||||
// CHECK:STDOUT: inst50000014: {kind: Return}
|
||||
// CHECK:STDOUT: inst10: {kind: Namespace, arg0: name_scope0, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst50000011: {kind: FunctionDecl, arg0: function50000000, arg1: inst_block_empty, type: type(inst50000012)}
|
||||
// CHECK:STDOUT: inst50000012: {kind: FunctionType, arg0: function50000000, arg1: specific<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000013: {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000014: {kind: StructValue, arg0: inst_block_empty, type: type(inst50000012)}
|
||||
// CHECK:STDOUT: inst50000015: {kind: Return}
|
||||
// CHECK:STDOUT: bundles: {}
|
||||
// CHECK:STDOUT: constant_values:
|
||||
// CHECK:STDOUT: values:
|
||||
// CHECK:STDOUT: instF: concrete_constant(instF)
|
||||
// CHECK:STDOUT: inst50000010: concrete_constant(inst50000013)
|
||||
// CHECK:STDOUT: inst50000011: concrete_constant(inst50000011)
|
||||
// CHECK:STDOUT: inst10: concrete_constant(inst10)
|
||||
// CHECK:STDOUT: inst50000011: concrete_constant(inst50000014)
|
||||
// CHECK:STDOUT: inst50000012: concrete_constant(inst50000012)
|
||||
// CHECK:STDOUT: inst50000013: concrete_constant(inst50000013)
|
||||
// CHECK:STDOUT: inst50000014: concrete_constant(inst50000014)
|
||||
// CHECK:STDOUT: symbolic_constants: {}
|
||||
// CHECK:STDOUT: inst_blocks:
|
||||
// CHECK:STDOUT: inst_block_empty: {}
|
||||
// CHECK:STDOUT: exports:
|
||||
// CHECK:STDOUT: 0: inst50000010
|
||||
// CHECK:STDOUT: 0: inst50000011
|
||||
// CHECK:STDOUT: generated: {}
|
||||
// CHECK:STDOUT: imports: {}
|
||||
// CHECK:STDOUT: global_init: {}
|
||||
// CHECK:STDOUT: inst_block50000005: {}
|
||||
// CHECK:STDOUT: inst_block50000006:
|
||||
// CHECK:STDOUT: 0: inst50000014
|
||||
// CHECK:STDOUT: 0: inst50000015
|
||||
// CHECK:STDOUT: inst_block50000007:
|
||||
// CHECK:STDOUT: 0: instF
|
||||
// CHECK:STDOUT: 1: inst50000010
|
||||
// CHECK:STDOUT: 0: inst10
|
||||
// CHECK:STDOUT: 1: inst50000011
|
||||
// CHECK:STDOUT: value_stores:
|
||||
// CHECK:STDOUT: shared_values:
|
||||
// CHECK:STDOUT: ints: {}
|
||||
@@ -155,15 +155,15 @@ fn B() {
|
||||
// CHECK:STDOUT: import_irs:
|
||||
// CHECK:STDOUT: 'import_ir(ApiForImpl)': {decl_id: inst<none>, is_export: false}
|
||||
// CHECK:STDOUT: 'import_ir(Cpp)': {decl_id: inst<none>, is_export: false}
|
||||
// CHECK:STDOUT: import_ir70000002: {decl_id: inst70000010, is_export: false}
|
||||
// CHECK:STDOUT: import_ir70000002: {decl_id: inst70000011, is_export: false}
|
||||
// CHECK:STDOUT: import_ir_insts:
|
||||
// CHECK:STDOUT: import_ir_inst0: {ir_id: import_ir70000002, inst_id: inst50000010}
|
||||
// CHECK:STDOUT: import_ir_inst1: {ir_id: import_ir70000002, inst_id: inst50000010}
|
||||
// CHECK:STDOUT: import_ir_inst0: {ir_id: import_ir70000002, inst_id: inst50000011}
|
||||
// CHECK:STDOUT: import_ir_inst1: {ir_id: import_ir70000002, inst_id: inst50000011}
|
||||
// CHECK:STDOUT: clang_decls: {}
|
||||
// CHECK:STDOUT: clang_decl_signatures: {}
|
||||
// CHECK:STDOUT: name_scopes:
|
||||
// CHECK:STDOUT: name_scope0: {inst: instF, parent_scope: name_scope<none>, has_error: false, extended_scopes: [], names: {name1: inst70000011, name0: inst70000012}}
|
||||
// CHECK:STDOUT: name_scope70000001: {inst: inst70000011, parent_scope: name_scope0, has_error: false, extended_scopes: [], names: {name1: inst70000017}}
|
||||
// CHECK:STDOUT: name_scope0: {inst: inst10, parent_scope: name_scope<none>, has_error: false, extended_scopes: [], names: {name1: inst70000012, name0: inst70000013}}
|
||||
// CHECK:STDOUT: name_scope70000001: {inst: inst70000012, parent_scope: name_scope0, has_error: false, extended_scopes: [], names: {name1: inst70000018}}
|
||||
// CHECK:STDOUT: entity_names:
|
||||
// CHECK:STDOUT: entity_name70000000: {name: name1, parent_scope: name_scope70000001, index: -1, is_template: 0, is_unused: 0, form: inst<none>}
|
||||
// CHECK:STDOUT: functions:
|
||||
@@ -204,69 +204,69 @@ fn B() {
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 0
|
||||
// CHECK:STDOUT: alignment: 1
|
||||
// CHECK:STDOUT: 'type(inst70000013)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst70000014)}
|
||||
// CHECK:STDOUT: 'type(inst70000014)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst70000015)}
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 0
|
||||
// CHECK:STDOUT: alignment: 1
|
||||
// CHECK:STDOUT: 'type(inst70000014)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst70000014)}
|
||||
// CHECK:STDOUT: 'type(inst70000015)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst70000015)}
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 0
|
||||
// CHECK:STDOUT: alignment: 1
|
||||
// CHECK:STDOUT: declared_facet_types: {}
|
||||
// CHECK:STDOUT: insts:
|
||||
// CHECK:STDOUT: instF: {kind: Namespace, arg0: name_scope0, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst70000010: {kind: ImportDecl, arg0: name1}
|
||||
// CHECK:STDOUT: inst70000011: {kind: Namespace, arg0: name_scope70000001, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst70000012: {kind: FunctionDecl, arg0: function70000000, arg1: inst_block_empty, type: type(inst70000013)}
|
||||
// CHECK:STDOUT: inst70000013: {kind: FunctionType, arg0: function70000000, arg1: specific<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst70000014: {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst70000015: {kind: StructValue, arg0: inst_block_empty, type: type(inst70000013)}
|
||||
// CHECK:STDOUT: inst70000016: {kind: NameRef, arg0: name1, arg1: inst70000011, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst70000017: {kind: ImportRefLoaded, arg0: import_ir_inst0, arg1: entity_name70000000, type: type(inst70000019)}
|
||||
// CHECK:STDOUT: inst70000018: {kind: FunctionDecl, arg0: function70000001, arg1: inst_block_empty, type: type(inst70000019)}
|
||||
// CHECK:STDOUT: inst70000019: {kind: FunctionType, arg0: function70000001, arg1: specific<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst7000001A: {kind: StructValue, arg0: inst_block_empty, type: type(inst70000019)}
|
||||
// CHECK:STDOUT: inst7000001B: {kind: NameRef, arg0: name1, arg1: inst70000017, type: type(inst70000019)}
|
||||
// CHECK:STDOUT: inst7000001C: {kind: Call, arg0: inst7000001B, arg1: inst_block_empty, type: type(inst70000014)}
|
||||
// CHECK:STDOUT: inst7000001D: {kind: Return}
|
||||
// CHECK:STDOUT: inst10: {kind: Namespace, arg0: name_scope0, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst70000011: {kind: ImportDecl, arg0: name1}
|
||||
// CHECK:STDOUT: inst70000012: {kind: Namespace, arg0: name_scope70000001, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst70000013: {kind: FunctionDecl, arg0: function70000000, arg1: inst_block_empty, type: type(inst70000014)}
|
||||
// CHECK:STDOUT: inst70000014: {kind: FunctionType, arg0: function70000000, arg1: specific<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst70000015: {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst70000016: {kind: StructValue, arg0: inst_block_empty, type: type(inst70000014)}
|
||||
// CHECK:STDOUT: inst70000017: {kind: NameRef, arg0: name1, arg1: inst70000012, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst70000018: {kind: ImportRefLoaded, arg0: import_ir_inst0, arg1: entity_name70000000, type: type(inst7000001A)}
|
||||
// CHECK:STDOUT: inst70000019: {kind: FunctionDecl, arg0: function70000001, arg1: inst_block_empty, type: type(inst7000001A)}
|
||||
// CHECK:STDOUT: inst7000001A: {kind: FunctionType, arg0: function70000001, arg1: specific<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst7000001B: {kind: StructValue, arg0: inst_block_empty, type: type(inst7000001A)}
|
||||
// CHECK:STDOUT: inst7000001C: {kind: NameRef, arg0: name1, arg1: inst70000018, type: type(inst7000001A)}
|
||||
// CHECK:STDOUT: inst7000001D: {kind: Call, arg0: inst7000001C, arg1: inst_block_empty, type: type(inst70000015)}
|
||||
// CHECK:STDOUT: inst7000001E: {kind: Return}
|
||||
// CHECK:STDOUT: bundles: {}
|
||||
// CHECK:STDOUT: constant_values:
|
||||
// CHECK:STDOUT: values:
|
||||
// CHECK:STDOUT: instF: concrete_constant(instF)
|
||||
// CHECK:STDOUT: inst70000011: concrete_constant(inst70000011)
|
||||
// CHECK:STDOUT: inst70000012: concrete_constant(inst70000015)
|
||||
// CHECK:STDOUT: inst70000013: concrete_constant(inst70000013)
|
||||
// CHECK:STDOUT: inst10: concrete_constant(inst10)
|
||||
// CHECK:STDOUT: inst70000012: concrete_constant(inst70000012)
|
||||
// CHECK:STDOUT: inst70000013: concrete_constant(inst70000016)
|
||||
// CHECK:STDOUT: inst70000014: concrete_constant(inst70000014)
|
||||
// CHECK:STDOUT: inst70000015: concrete_constant(inst70000015)
|
||||
// CHECK:STDOUT: inst70000016: concrete_constant(inst70000011)
|
||||
// CHECK:STDOUT: inst70000017: concrete_constant(inst7000001A)
|
||||
// CHECK:STDOUT: inst70000018: concrete_constant(inst7000001A)
|
||||
// CHECK:STDOUT: inst70000019: concrete_constant(inst70000019)
|
||||
// CHECK:STDOUT: inst70000016: concrete_constant(inst70000016)
|
||||
// CHECK:STDOUT: inst70000017: concrete_constant(inst70000012)
|
||||
// CHECK:STDOUT: inst70000018: concrete_constant(inst7000001B)
|
||||
// CHECK:STDOUT: inst70000019: concrete_constant(inst7000001B)
|
||||
// CHECK:STDOUT: inst7000001A: concrete_constant(inst7000001A)
|
||||
// CHECK:STDOUT: inst7000001B: concrete_constant(inst7000001A)
|
||||
// CHECK:STDOUT: inst7000001B: concrete_constant(inst7000001B)
|
||||
// CHECK:STDOUT: inst7000001C: concrete_constant(inst7000001B)
|
||||
// CHECK:STDOUT: symbolic_constants: {}
|
||||
// CHECK:STDOUT: inst_blocks:
|
||||
// CHECK:STDOUT: inst_block_empty: {}
|
||||
// CHECK:STDOUT: exports:
|
||||
// CHECK:STDOUT: 0: inst70000012
|
||||
// CHECK:STDOUT: 0: inst70000013
|
||||
// CHECK:STDOUT: generated: {}
|
||||
// CHECK:STDOUT: imports:
|
||||
// CHECK:STDOUT: 0: inst70000011
|
||||
// CHECK:STDOUT: 1: inst70000017
|
||||
// CHECK:STDOUT: 2: inst70000018
|
||||
// CHECK:STDOUT: 0: inst70000012
|
||||
// CHECK:STDOUT: 1: inst70000018
|
||||
// CHECK:STDOUT: 2: inst70000019
|
||||
// CHECK:STDOUT: global_init: {}
|
||||
// CHECK:STDOUT: inst_block70000005: {}
|
||||
// CHECK:STDOUT: inst_block70000006:
|
||||
// CHECK:STDOUT: 0: inst70000016
|
||||
// CHECK:STDOUT: 1: inst7000001B
|
||||
// CHECK:STDOUT: 2: inst7000001C
|
||||
// CHECK:STDOUT: 3: inst7000001D
|
||||
// CHECK:STDOUT: 0: inst70000017
|
||||
// CHECK:STDOUT: 1: inst7000001C
|
||||
// CHECK:STDOUT: 2: inst7000001D
|
||||
// CHECK:STDOUT: 3: inst7000001E
|
||||
// CHECK:STDOUT: inst_block70000007:
|
||||
// CHECK:STDOUT: 0: instF
|
||||
// CHECK:STDOUT: 1: inst70000010
|
||||
// CHECK:STDOUT: 2: inst70000012
|
||||
// CHECK:STDOUT: 0: inst10
|
||||
// CHECK:STDOUT: 1: inst70000011
|
||||
// CHECK:STDOUT: 2: inst70000013
|
||||
// CHECK:STDOUT: value_stores:
|
||||
// CHECK:STDOUT: shared_values:
|
||||
// CHECK:STDOUT: ints: {}
|
||||
|
||||
+605
-605
File diff suppressed because it is too large
Load Diff
+2516
-2516
File diff suppressed because it is too large
Load Diff
+149
-149
@@ -30,11 +30,11 @@ fn Foo(n: ()) -> ((), ()) {
|
||||
// CHECK:STDOUT: clang_decls: {}
|
||||
// CHECK:STDOUT: clang_decl_signatures: {}
|
||||
// CHECK:STDOUT: name_scopes:
|
||||
// CHECK:STDOUT: name_scope0: {inst: instF, parent_scope: name_scope<none>, has_error: false, extended_scopes: [], names: {name0: inst5000002E}}
|
||||
// CHECK:STDOUT: name_scope0: {inst: inst10, parent_scope: name_scope<none>, has_error: false, extended_scopes: [], names: {name0: inst5000002F}}
|
||||
// CHECK:STDOUT: entity_names:
|
||||
// CHECK:STDOUT: entity_name50000000: {name: name1, parent_scope: name_scope<none>, index: -1, is_template: 0, is_unused: 0, form: inst<none>}
|
||||
// CHECK:STDOUT: functions:
|
||||
// CHECK:STDOUT: function50000000: {name: name0, parent_scope: name_scope0, call_param_patterns_id: inst_block5000000B, call_params_id: inst_block5000000C, return_type_inst_id: inst50000022, return_form_inst_id: inst50000023, return_pattern_id: inst50000028, body: [inst_block5000000F]}
|
||||
// CHECK:STDOUT: function50000000: {name: name0, parent_scope: name_scope0, call_param_patterns_id: inst_block5000000B, call_params_id: inst_block5000000C, return_type_inst_id: inst50000023, return_form_inst_id: inst50000024, return_pattern_id: inst50000029, body: [inst_block5000000F]}
|
||||
// CHECK:STDOUT: classes: {}
|
||||
// CHECK:STDOUT: interfaces: {}
|
||||
// CHECK:STDOUT: associated_constants: {}
|
||||
@@ -70,191 +70,191 @@ fn Foo(n: ()) -> ((), ()) {
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 0
|
||||
// CHECK:STDOUT: alignment: 1
|
||||
// CHECK:STDOUT: 'type(inst50000010)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst50000010)}
|
||||
// CHECK:STDOUT: 'type(inst50000011)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst50000011)}
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 0
|
||||
// CHECK:STDOUT: alignment: 1
|
||||
// CHECK:STDOUT: 'type(inst5000001F)':
|
||||
// CHECK:STDOUT: value_repr: {kind: copy, type: type(inst5000001F)}
|
||||
// CHECK:STDOUT: 'type(inst50000020)':
|
||||
// CHECK:STDOUT: value_repr: {kind: copy, type: type(inst50000020)}
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 8
|
||||
// CHECK:STDOUT: alignment: 8
|
||||
// CHECK:STDOUT: 'type(inst5000001C)':
|
||||
// CHECK:STDOUT: value_repr: {kind: pointer, type: type(inst5000001F)}
|
||||
// CHECK:STDOUT: 'type(inst5000001D)':
|
||||
// CHECK:STDOUT: value_repr: {kind: pointer, type: type(inst50000020)}
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 0
|
||||
// CHECK:STDOUT: alignment: 1
|
||||
// CHECK:STDOUT: 'type(inst5000002F)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst50000010)}
|
||||
// CHECK:STDOUT: 'type(inst50000030)':
|
||||
// CHECK:STDOUT: value_repr: {kind: none, type: type(inst50000011)}
|
||||
// CHECK:STDOUT: object_layout:
|
||||
// CHECK:STDOUT: size: 0
|
||||
// CHECK:STDOUT: alignment: 1
|
||||
// CHECK:STDOUT: declared_facet_types: {}
|
||||
// CHECK:STDOUT: insts:
|
||||
// CHECK:STDOUT: instF: {kind: Namespace, arg0: name_scope0, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst50000010: {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000011: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst50000010)}
|
||||
// CHECK:STDOUT: inst50000012: {kind: TupleValue, arg0: inst_block_empty, type: type(inst50000010)}
|
||||
// CHECK:STDOUT: inst50000013: {kind: Converted, arg0: inst50000011, arg1: inst50000010, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000014: {kind: PatternType, arg0: inst50000010, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000015: {kind: ValueParamPattern, arg0: name1, type: type(inst50000014)}
|
||||
// CHECK:STDOUT: inst50000016: {kind: ValueParamPattern, arg0: name1, type: type(inst50000014)}
|
||||
// CHECK:STDOUT: inst50000017: {kind: WrapperBindingPattern, arg0: entity_name50000000, arg1: inst50000015, type: type(inst50000014)}
|
||||
// CHECK:STDOUT: inst50000018: {kind: WrapperBindingPattern, arg0: entity_name50000000, arg1: inst50000016, type: type(inst50000014)}
|
||||
// CHECK:STDOUT: inst50000019: {kind: WrapperBinding, arg0: entity_name50000000, arg1: inst5000002A, type: type(inst50000010)}
|
||||
// CHECK:STDOUT: inst5000001A: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst50000010)}
|
||||
// CHECK:STDOUT: inst5000001B: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst50000010)}
|
||||
// CHECK:STDOUT: inst5000001C: {kind: TupleType, arg0: inst_block50000008, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst5000001D: {kind: TupleLiteral, arg0: inst_block50000007, type: type(inst5000001C)}
|
||||
// CHECK:STDOUT: inst5000001E: {kind: TupleValue, arg0: inst_block50000009, type: type(inst5000001C)}
|
||||
// CHECK:STDOUT: inst5000001F: {kind: PointerType, arg0: inst5000001C, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000020: {kind: Converted, arg0: inst50000012, arg1: inst50000010, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000021: {kind: Converted, arg0: inst50000012, arg1: inst50000010, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000022: {kind: Converted, arg0: inst5000001D, arg1: inst5000001C, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000023: {kind: InitForm, arg0: inst50000022, type: type(inst(FormType))}
|
||||
// CHECK:STDOUT: inst50000024: {kind: InitForm, arg0: inst5000001C, type: type(inst(FormType))}
|
||||
// CHECK:STDOUT: inst50000025: {kind: PatternType, arg0: inst5000001C, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000026: {kind: OutParamPattern, arg0: name(ReturnSlot), type: type(inst50000025)}
|
||||
// CHECK:STDOUT: inst50000027: {kind: OutParamPattern, arg0: name(ReturnSlot), type: type(inst50000025)}
|
||||
// CHECK:STDOUT: inst50000028: {kind: ReturnSlotPattern, arg0: inst50000026, arg1: inst50000022, type: type(inst50000025)}
|
||||
// CHECK:STDOUT: inst50000029: {kind: ReturnSlotPattern, arg0: inst50000027, arg1: inst5000001C, type: type(inst50000025)}
|
||||
// CHECK:STDOUT: inst5000002A: {kind: ValueParam, arg0: call_param0, arg1: name1, type: type(inst50000010)}
|
||||
// CHECK:STDOUT: inst5000002B: {kind: SpliceBlock, arg0: inst_block50000005, arg1: inst50000013, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst5000002C: {kind: OutParam, arg0: call_param1, arg1: name(ReturnSlot), type: type(inst5000001C)}
|
||||
// CHECK:STDOUT: inst5000002D: {kind: ReturnSlot, arg0: inst5000001C, arg1: inst5000002C, type: type(inst5000001C)}
|
||||
// CHECK:STDOUT: inst5000002E: {kind: FunctionDecl, arg0: function50000000, arg1: inst_block5000000E, type: type(inst5000002F)}
|
||||
// CHECK:STDOUT: inst5000002F: {kind: FunctionType, arg0: function50000000, arg1: specific<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000030: {kind: StructValue, arg0: inst_block_empty, type: type(inst5000002F)}
|
||||
// CHECK:STDOUT: inst50000031: {kind: NameRef, arg0: name1, arg1: inst50000019, type: type(inst50000010)}
|
||||
// CHECK:STDOUT: inst50000032: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst50000010)}
|
||||
// CHECK:STDOUT: inst50000033: {kind: TupleLiteral, arg0: inst_block50000010, type: type(inst5000001C)}
|
||||
// CHECK:STDOUT: inst50000034: {kind: TupleAccess, arg0: inst5000002C, arg1: element0, type: type(inst50000010)}
|
||||
// CHECK:STDOUT: inst50000035: {kind: TupleInit, arg0: inst_block_empty, arg1: inst50000034, type: type(inst50000010)}
|
||||
// CHECK:STDOUT: inst50000036: {kind: Converted, arg0: inst50000031, arg1: inst50000035, type: type(inst50000010)}
|
||||
// CHECK:STDOUT: inst50000037: {kind: InPlaceInit, arg0: inst50000036, arg1: inst50000034, type: type(inst50000010)}
|
||||
// CHECK:STDOUT: inst50000038: {kind: TupleAccess, arg0: inst5000002C, arg1: element1, type: type(inst50000010)}
|
||||
// CHECK:STDOUT: inst50000039: {kind: TupleInit, arg0: inst_block_empty, arg1: inst50000038, type: type(inst50000010)}
|
||||
// CHECK:STDOUT: inst5000003A: {kind: Converted, arg0: inst50000032, arg1: inst50000039, type: type(inst50000010)}
|
||||
// CHECK:STDOUT: inst5000003B: {kind: InPlaceInit, arg0: inst5000003A, arg1: inst50000038, type: type(inst50000010)}
|
||||
// CHECK:STDOUT: inst5000003C: {kind: TupleInit, arg0: inst_block50000011, arg1: inst5000002C, type: type(inst5000001C)}
|
||||
// CHECK:STDOUT: inst5000003D: {kind: Converted, arg0: inst50000033, arg1: inst5000003C, type: type(inst5000001C)}
|
||||
// CHECK:STDOUT: inst5000003E: {kind: ReturnExpr, arg0: inst5000003D, arg1: inst5000002C}
|
||||
// CHECK:STDOUT: inst10: {kind: Namespace, arg0: name_scope0, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst50000011: {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000012: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst50000011)}
|
||||
// CHECK:STDOUT: inst50000013: {kind: TupleValue, arg0: inst_block_empty, type: type(inst50000011)}
|
||||
// CHECK:STDOUT: inst50000014: {kind: Converted, arg0: inst50000012, arg1: inst50000011, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000015: {kind: PatternType, arg0: inst50000011, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000016: {kind: ValueParamPattern, arg0: name1, type: type(inst50000015)}
|
||||
// CHECK:STDOUT: inst50000017: {kind: ValueParamPattern, arg0: name1, type: type(inst50000015)}
|
||||
// CHECK:STDOUT: inst50000018: {kind: WrapperBindingPattern, arg0: entity_name50000000, arg1: inst50000016, type: type(inst50000015)}
|
||||
// CHECK:STDOUT: inst50000019: {kind: WrapperBindingPattern, arg0: entity_name50000000, arg1: inst50000017, type: type(inst50000015)}
|
||||
// CHECK:STDOUT: inst5000001A: {kind: WrapperBinding, arg0: entity_name50000000, arg1: inst5000002B, type: type(inst50000011)}
|
||||
// CHECK:STDOUT: inst5000001B: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst50000011)}
|
||||
// CHECK:STDOUT: inst5000001C: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst50000011)}
|
||||
// CHECK:STDOUT: inst5000001D: {kind: TupleType, arg0: inst_block50000008, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst5000001E: {kind: TupleLiteral, arg0: inst_block50000007, type: type(inst5000001D)}
|
||||
// CHECK:STDOUT: inst5000001F: {kind: TupleValue, arg0: inst_block50000009, type: type(inst5000001D)}
|
||||
// CHECK:STDOUT: inst50000020: {kind: PointerType, arg0: inst5000001D, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000021: {kind: Converted, arg0: inst50000013, arg1: inst50000011, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000022: {kind: Converted, arg0: inst50000013, arg1: inst50000011, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000023: {kind: Converted, arg0: inst5000001E, arg1: inst5000001D, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000024: {kind: InitForm, arg0: inst50000023, type: type(inst(FormType))}
|
||||
// CHECK:STDOUT: inst50000025: {kind: InitForm, arg0: inst5000001D, type: type(inst(FormType))}
|
||||
// CHECK:STDOUT: inst50000026: {kind: PatternType, arg0: inst5000001D, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000027: {kind: OutParamPattern, arg0: name(ReturnSlot), type: type(inst50000026)}
|
||||
// CHECK:STDOUT: inst50000028: {kind: OutParamPattern, arg0: name(ReturnSlot), type: type(inst50000026)}
|
||||
// CHECK:STDOUT: inst50000029: {kind: ReturnSlotPattern, arg0: inst50000027, arg1: inst50000023, type: type(inst50000026)}
|
||||
// CHECK:STDOUT: inst5000002A: {kind: ReturnSlotPattern, arg0: inst50000028, arg1: inst5000001D, type: type(inst50000026)}
|
||||
// CHECK:STDOUT: inst5000002B: {kind: ValueParam, arg0: call_param0, arg1: name1, type: type(inst50000011)}
|
||||
// CHECK:STDOUT: inst5000002C: {kind: SpliceBlock, arg0: inst_block50000005, arg1: inst50000014, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst5000002D: {kind: OutParam, arg0: call_param1, arg1: name(ReturnSlot), type: type(inst5000001D)}
|
||||
// CHECK:STDOUT: inst5000002E: {kind: ReturnSlot, arg0: inst5000001D, arg1: inst5000002D, type: type(inst5000001D)}
|
||||
// CHECK:STDOUT: inst5000002F: {kind: FunctionDecl, arg0: function50000000, arg1: inst_block5000000E, type: type(inst50000030)}
|
||||
// CHECK:STDOUT: inst50000030: {kind: FunctionType, arg0: function50000000, arg1: specific<none>, type: type(TypeType)}
|
||||
// CHECK:STDOUT: inst50000031: {kind: StructValue, arg0: inst_block_empty, type: type(inst50000030)}
|
||||
// CHECK:STDOUT: inst50000032: {kind: NameRef, arg0: name1, arg1: inst5000001A, type: type(inst50000011)}
|
||||
// CHECK:STDOUT: inst50000033: {kind: TupleLiteral, arg0: inst_block_empty, type: type(inst50000011)}
|
||||
// CHECK:STDOUT: inst50000034: {kind: TupleLiteral, arg0: inst_block50000010, type: type(inst5000001D)}
|
||||
// CHECK:STDOUT: inst50000035: {kind: TupleAccess, arg0: inst5000002D, arg1: element0, type: type(inst50000011)}
|
||||
// CHECK:STDOUT: inst50000036: {kind: TupleInit, arg0: inst_block_empty, arg1: inst50000035, type: type(inst50000011)}
|
||||
// CHECK:STDOUT: inst50000037: {kind: Converted, arg0: inst50000032, arg1: inst50000036, type: type(inst50000011)}
|
||||
// CHECK:STDOUT: inst50000038: {kind: InPlaceInit, arg0: inst50000037, arg1: inst50000035, type: type(inst50000011)}
|
||||
// CHECK:STDOUT: inst50000039: {kind: TupleAccess, arg0: inst5000002D, arg1: element1, type: type(inst50000011)}
|
||||
// CHECK:STDOUT: inst5000003A: {kind: TupleInit, arg0: inst_block_empty, arg1: inst50000039, type: type(inst50000011)}
|
||||
// CHECK:STDOUT: inst5000003B: {kind: Converted, arg0: inst50000033, arg1: inst5000003A, type: type(inst50000011)}
|
||||
// CHECK:STDOUT: inst5000003C: {kind: InPlaceInit, arg0: inst5000003B, arg1: inst50000039, type: type(inst50000011)}
|
||||
// CHECK:STDOUT: inst5000003D: {kind: TupleInit, arg0: inst_block50000011, arg1: inst5000002D, type: type(inst5000001D)}
|
||||
// CHECK:STDOUT: inst5000003E: {kind: Converted, arg0: inst50000034, arg1: inst5000003D, type: type(inst5000001D)}
|
||||
// CHECK:STDOUT: inst5000003F: {kind: ReturnExpr, arg0: inst5000003E, arg1: inst5000002D}
|
||||
// CHECK:STDOUT: bundles: {}
|
||||
// CHECK:STDOUT: constant_values:
|
||||
// CHECK:STDOUT: values:
|
||||
// CHECK:STDOUT: instF: concrete_constant(instF)
|
||||
// CHECK:STDOUT: inst50000010: concrete_constant(inst50000010)
|
||||
// CHECK:STDOUT: inst50000011: concrete_constant(inst50000012)
|
||||
// CHECK:STDOUT: inst50000012: concrete_constant(inst50000012)
|
||||
// CHECK:STDOUT: inst50000013: concrete_constant(inst50000010)
|
||||
// CHECK:STDOUT: inst50000014: concrete_constant(inst50000014)
|
||||
// CHECK:STDOUT: inst50000015: concrete_constant(inst50000016)
|
||||
// CHECK:STDOUT: inst50000016: concrete_constant(inst50000016)
|
||||
// CHECK:STDOUT: inst50000017: concrete_constant(inst50000018)
|
||||
// CHECK:STDOUT: inst50000018: concrete_constant(inst50000018)
|
||||
// CHECK:STDOUT: inst5000001A: concrete_constant(inst50000012)
|
||||
// CHECK:STDOUT: inst5000001B: concrete_constant(inst50000012)
|
||||
// CHECK:STDOUT: inst5000001C: concrete_constant(inst5000001C)
|
||||
// CHECK:STDOUT: inst5000001D: concrete_constant(inst5000001E)
|
||||
// CHECK:STDOUT: inst5000001E: concrete_constant(inst5000001E)
|
||||
// CHECK:STDOUT: inst10: concrete_constant(inst10)
|
||||
// CHECK:STDOUT: inst50000011: concrete_constant(inst50000011)
|
||||
// CHECK:STDOUT: inst50000012: concrete_constant(inst50000013)
|
||||
// CHECK:STDOUT: inst50000013: concrete_constant(inst50000013)
|
||||
// CHECK:STDOUT: inst50000014: concrete_constant(inst50000011)
|
||||
// CHECK:STDOUT: inst50000015: concrete_constant(inst50000015)
|
||||
// CHECK:STDOUT: inst50000016: concrete_constant(inst50000017)
|
||||
// CHECK:STDOUT: inst50000017: concrete_constant(inst50000017)
|
||||
// CHECK:STDOUT: inst50000018: concrete_constant(inst50000019)
|
||||
// CHECK:STDOUT: inst50000019: concrete_constant(inst50000019)
|
||||
// CHECK:STDOUT: inst5000001B: concrete_constant(inst50000013)
|
||||
// CHECK:STDOUT: inst5000001C: concrete_constant(inst50000013)
|
||||
// CHECK:STDOUT: inst5000001D: concrete_constant(inst5000001D)
|
||||
// CHECK:STDOUT: inst5000001E: concrete_constant(inst5000001F)
|
||||
// CHECK:STDOUT: inst5000001F: concrete_constant(inst5000001F)
|
||||
// CHECK:STDOUT: inst50000020: concrete_constant(inst50000010)
|
||||
// CHECK:STDOUT: inst50000021: concrete_constant(inst50000010)
|
||||
// CHECK:STDOUT: inst50000022: concrete_constant(inst5000001C)
|
||||
// CHECK:STDOUT: inst50000023: concrete_constant(inst50000024)
|
||||
// CHECK:STDOUT: inst50000024: concrete_constant(inst50000024)
|
||||
// CHECK:STDOUT: inst50000020: concrete_constant(inst50000020)
|
||||
// CHECK:STDOUT: inst50000021: concrete_constant(inst50000011)
|
||||
// CHECK:STDOUT: inst50000022: concrete_constant(inst50000011)
|
||||
// CHECK:STDOUT: inst50000023: concrete_constant(inst5000001D)
|
||||
// CHECK:STDOUT: inst50000024: concrete_constant(inst50000025)
|
||||
// CHECK:STDOUT: inst50000025: concrete_constant(inst50000025)
|
||||
// CHECK:STDOUT: inst50000026: concrete_constant(inst50000027)
|
||||
// CHECK:STDOUT: inst50000027: concrete_constant(inst50000027)
|
||||
// CHECK:STDOUT: inst50000028: concrete_constant(inst50000029)
|
||||
// CHECK:STDOUT: inst50000029: concrete_constant(inst50000029)
|
||||
// CHECK:STDOUT: inst5000002B: concrete_constant(inst50000010)
|
||||
// CHECK:STDOUT: inst5000002E: concrete_constant(inst50000030)
|
||||
// CHECK:STDOUT: inst5000002F: concrete_constant(inst5000002F)
|
||||
// CHECK:STDOUT: inst50000026: concrete_constant(inst50000026)
|
||||
// CHECK:STDOUT: inst50000027: concrete_constant(inst50000028)
|
||||
// CHECK:STDOUT: inst50000028: concrete_constant(inst50000028)
|
||||
// CHECK:STDOUT: inst50000029: concrete_constant(inst5000002A)
|
||||
// CHECK:STDOUT: inst5000002A: concrete_constant(inst5000002A)
|
||||
// CHECK:STDOUT: inst5000002C: concrete_constant(inst50000011)
|
||||
// CHECK:STDOUT: inst5000002F: concrete_constant(inst50000031)
|
||||
// CHECK:STDOUT: inst50000030: concrete_constant(inst50000030)
|
||||
// CHECK:STDOUT: inst50000032: concrete_constant(inst50000012)
|
||||
// CHECK:STDOUT: inst50000035: concrete_constant(inst50000012)
|
||||
// CHECK:STDOUT: inst50000036: concrete_constant(inst50000012)
|
||||
// CHECK:STDOUT: inst50000037: concrete_constant(inst50000012)
|
||||
// CHECK:STDOUT: inst50000039: concrete_constant(inst50000012)
|
||||
// CHECK:STDOUT: inst5000003A: concrete_constant(inst50000012)
|
||||
// CHECK:STDOUT: inst5000003B: concrete_constant(inst50000012)
|
||||
// CHECK:STDOUT: inst5000003C: concrete_constant(inst5000001E)
|
||||
// CHECK:STDOUT: inst5000003D: concrete_constant(inst5000001E)
|
||||
// CHECK:STDOUT: inst50000031: concrete_constant(inst50000031)
|
||||
// CHECK:STDOUT: inst50000033: concrete_constant(inst50000013)
|
||||
// CHECK:STDOUT: inst50000036: concrete_constant(inst50000013)
|
||||
// CHECK:STDOUT: inst50000037: concrete_constant(inst50000013)
|
||||
// CHECK:STDOUT: inst50000038: concrete_constant(inst50000013)
|
||||
// CHECK:STDOUT: inst5000003A: concrete_constant(inst50000013)
|
||||
// CHECK:STDOUT: inst5000003B: concrete_constant(inst50000013)
|
||||
// CHECK:STDOUT: inst5000003C: concrete_constant(inst50000013)
|
||||
// CHECK:STDOUT: inst5000003D: concrete_constant(inst5000001F)
|
||||
// CHECK:STDOUT: inst5000003E: concrete_constant(inst5000001F)
|
||||
// CHECK:STDOUT: symbolic_constants: {}
|
||||
// CHECK:STDOUT: inst_blocks:
|
||||
// CHECK:STDOUT: inst_block_empty: {}
|
||||
// CHECK:STDOUT: exports:
|
||||
// CHECK:STDOUT: 0: inst5000002E
|
||||
// CHECK:STDOUT: 0: inst5000002F
|
||||
// CHECK:STDOUT: generated: {}
|
||||
// CHECK:STDOUT: imports: {}
|
||||
// CHECK:STDOUT: global_init: {}
|
||||
// CHECK:STDOUT: inst_block50000005:
|
||||
// CHECK:STDOUT: 0: inst50000011
|
||||
// CHECK:STDOUT: 1: inst50000013
|
||||
// CHECK:STDOUT: inst_block50000006:
|
||||
// CHECK:STDOUT: 0: inst50000017
|
||||
// CHECK:STDOUT: inst_block50000007:
|
||||
// CHECK:STDOUT: 0: inst5000001A
|
||||
// CHECK:STDOUT: 1: inst5000001B
|
||||
// CHECK:STDOUT: inst_block50000008:
|
||||
// CHECK:STDOUT: 0: inst50000010
|
||||
// CHECK:STDOUT: 1: inst50000010
|
||||
// CHECK:STDOUT: inst_block50000009:
|
||||
// CHECK:STDOUT: 0: inst50000012
|
||||
// CHECK:STDOUT: 1: inst50000012
|
||||
// CHECK:STDOUT: 1: inst50000014
|
||||
// CHECK:STDOUT: inst_block50000006:
|
||||
// CHECK:STDOUT: 0: inst50000018
|
||||
// CHECK:STDOUT: inst_block50000007:
|
||||
// CHECK:STDOUT: 0: inst5000001B
|
||||
// CHECK:STDOUT: 1: inst5000001C
|
||||
// CHECK:STDOUT: inst_block50000008:
|
||||
// CHECK:STDOUT: 0: inst50000011
|
||||
// CHECK:STDOUT: 1: inst50000011
|
||||
// CHECK:STDOUT: inst_block50000009:
|
||||
// CHECK:STDOUT: 0: inst50000013
|
||||
// CHECK:STDOUT: 1: inst50000013
|
||||
// CHECK:STDOUT: inst_block5000000A:
|
||||
// CHECK:STDOUT: 0: inst50000020
|
||||
// CHECK:STDOUT: 1: inst50000021
|
||||
// CHECK:STDOUT: 0: inst50000021
|
||||
// CHECK:STDOUT: 1: inst50000022
|
||||
// CHECK:STDOUT: inst_block5000000B:
|
||||
// CHECK:STDOUT: 0: inst50000015
|
||||
// CHECK:STDOUT: 1: inst50000026
|
||||
// CHECK:STDOUT: 0: inst50000016
|
||||
// CHECK:STDOUT: 1: inst50000027
|
||||
// CHECK:STDOUT: inst_block5000000C:
|
||||
// CHECK:STDOUT: 0: inst5000002A
|
||||
// CHECK:STDOUT: 1: inst5000002C
|
||||
// CHECK:STDOUT: 0: inst5000002B
|
||||
// CHECK:STDOUT: 1: inst5000002D
|
||||
// CHECK:STDOUT: inst_block5000000D:
|
||||
// CHECK:STDOUT: 0: inst50000015
|
||||
// CHECK:STDOUT: 1: inst50000017
|
||||
// CHECK:STDOUT: 2: inst50000026
|
||||
// CHECK:STDOUT: 3: inst50000028
|
||||
// CHECK:STDOUT: 0: inst50000016
|
||||
// CHECK:STDOUT: 1: inst50000018
|
||||
// CHECK:STDOUT: 2: inst50000027
|
||||
// CHECK:STDOUT: 3: inst50000029
|
||||
// CHECK:STDOUT: inst_block5000000E:
|
||||
// CHECK:STDOUT: 0: inst5000001A
|
||||
// CHECK:STDOUT: 1: inst5000001B
|
||||
// CHECK:STDOUT: 2: inst5000001D
|
||||
// CHECK:STDOUT: 3: inst50000020
|
||||
// CHECK:STDOUT: 4: inst50000021
|
||||
// CHECK:STDOUT: 5: inst50000022
|
||||
// CHECK:STDOUT: 6: inst50000023
|
||||
// CHECK:STDOUT: 7: inst5000002A
|
||||
// CHECK:STDOUT: 8: inst5000002B
|
||||
// CHECK:STDOUT: 9: inst50000019
|
||||
// CHECK:STDOUT: 10: inst5000002C
|
||||
// CHECK:STDOUT: 11: inst5000002D
|
||||
// CHECK:STDOUT: 0: inst5000001B
|
||||
// CHECK:STDOUT: 1: inst5000001C
|
||||
// CHECK:STDOUT: 2: inst5000001E
|
||||
// CHECK:STDOUT: 3: inst50000021
|
||||
// CHECK:STDOUT: 4: inst50000022
|
||||
// CHECK:STDOUT: 5: inst50000023
|
||||
// CHECK:STDOUT: 6: inst50000024
|
||||
// CHECK:STDOUT: 7: inst5000002B
|
||||
// CHECK:STDOUT: 8: inst5000002C
|
||||
// CHECK:STDOUT: 9: inst5000001A
|
||||
// CHECK:STDOUT: 10: inst5000002D
|
||||
// CHECK:STDOUT: 11: inst5000002E
|
||||
// CHECK:STDOUT: inst_block5000000F:
|
||||
// CHECK:STDOUT: 0: inst50000031
|
||||
// CHECK:STDOUT: 1: inst50000032
|
||||
// CHECK:STDOUT: 2: inst50000033
|
||||
// CHECK:STDOUT: 3: inst50000034
|
||||
// CHECK:STDOUT: 4: inst50000035
|
||||
// CHECK:STDOUT: 5: inst50000036
|
||||
// CHECK:STDOUT: 6: inst50000037
|
||||
// CHECK:STDOUT: 7: inst50000038
|
||||
// CHECK:STDOUT: 8: inst50000039
|
||||
// CHECK:STDOUT: 9: inst5000003A
|
||||
// CHECK:STDOUT: 10: inst5000003B
|
||||
// CHECK:STDOUT: 11: inst5000003C
|
||||
// CHECK:STDOUT: 12: inst5000003D
|
||||
// CHECK:STDOUT: 13: inst5000003E
|
||||
// CHECK:STDOUT: 0: inst50000032
|
||||
// CHECK:STDOUT: 1: inst50000033
|
||||
// CHECK:STDOUT: 2: inst50000034
|
||||
// CHECK:STDOUT: 3: inst50000035
|
||||
// CHECK:STDOUT: 4: inst50000036
|
||||
// CHECK:STDOUT: 5: inst50000037
|
||||
// CHECK:STDOUT: 6: inst50000038
|
||||
// CHECK:STDOUT: 7: inst50000039
|
||||
// CHECK:STDOUT: 8: inst5000003A
|
||||
// CHECK:STDOUT: 9: inst5000003B
|
||||
// CHECK:STDOUT: 10: inst5000003C
|
||||
// CHECK:STDOUT: 11: inst5000003D
|
||||
// CHECK:STDOUT: 12: inst5000003E
|
||||
// CHECK:STDOUT: 13: inst5000003F
|
||||
// CHECK:STDOUT: inst_block50000010:
|
||||
// CHECK:STDOUT: 0: inst50000031
|
||||
// CHECK:STDOUT: 1: inst50000032
|
||||
// CHECK:STDOUT: 0: inst50000032
|
||||
// CHECK:STDOUT: 1: inst50000033
|
||||
// CHECK:STDOUT: inst_block50000011:
|
||||
// CHECK:STDOUT: 0: inst50000037
|
||||
// CHECK:STDOUT: 1: inst5000003B
|
||||
// CHECK:STDOUT: 0: inst50000038
|
||||
// CHECK:STDOUT: 1: inst5000003C
|
||||
// CHECK:STDOUT: inst_block50000012:
|
||||
// CHECK:STDOUT: 0: instF
|
||||
// CHECK:STDOUT: 1: inst5000002E
|
||||
// CHECK:STDOUT: 0: inst10
|
||||
// CHECK:STDOUT: 1: inst5000002F
|
||||
// CHECK:STDOUT: value_stores:
|
||||
// CHECK:STDOUT: shared_values:
|
||||
// CHECK:STDOUT: ints: {}
|
||||
|
||||
@@ -133,7 +133,7 @@ var C: Class = {};
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @Class {
|
||||
// CHECK:STDOUT: %field_decl: %Class.elem = field_decl field, element0, initializer = inst6400010B, %i32 in [concrete] {
|
||||
// CHECK:STDOUT: %field_decl: %Class.elem = field_decl field, element0, initializer = inst6400010C, %i32 in [concrete] {
|
||||
// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %int_123: Core.IntLiteral = int_value 123 [concrete = constants.%int_123.fff]
|
||||
|
||||
+1
-1
@@ -816,7 +816,7 @@ interface Y(T: type) {
|
||||
|
||||
// TODO: We crash if this impl is not generic, as the call to `.YF()` produces a
|
||||
// symbolic-dependent instruction, but there's no generic eval block for it.
|
||||
// CHECK:STDERR: fail_todo_period_self_in_generic_argument.carbon:[[@LINE+4]]:60: error: cannot convert type `<cannot stringify inst5D0000AF: {kind: Call, arg0: inst5D0000AD, arg1: inst_block_empty, type: type(inst5D000088)}>` that implements `Z where .(Z.Z1) = ()` into type implementing `Z where .(Z.Z1) = ()` [ConversionFailureFacetToFacet]
|
||||
// CHECK:STDERR: fail_todo_period_self_in_generic_argument.carbon:[[@LINE+4]]:60: error: cannot convert type `<cannot stringify inst5D0000B0: {kind: Call, arg0: inst5D0000AE, arg1: inst_block_empty, type: type(inst5D000089)}>` that implements `Z where .(Z.Z1) = ()` into type implementing `Z where .(Z.Z1) = ()` [ConversionFailureFacetToFacet]
|
||||
// CHECK:STDERR: impl forall [T: type] T as Y(Z where .Z1 = ()) where .Y1 = .YF() {}
|
||||
// CHECK:STDERR: ^~~~~
|
||||
// CHECK:STDERR:
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/declaration/default_values.carbon
|
||||
|
||||
// --- fail_value_not_constant.carbon
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
// CHECK:STDERR: fail_value_not_constant.carbon:[[@LINE+4]]:23: error: default value for pattern must be constant [PatternDefaultValueNotConstant]
|
||||
@@ -22,7 +21,6 @@ library "[[@TEST_NAME]]";
|
||||
fn H(x: i32, y: i32 = x);
|
||||
|
||||
// --- fail_type_mismatch.carbon
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+4]]:6: error: default value expression type `str` doesn't match pattern type `i32` [PatternDefaultValueTypeMismatch]
|
||||
@@ -32,7 +30,6 @@ library "[[@TEST_NAME]]";
|
||||
fn K(x: i32 = "bazz");
|
||||
|
||||
// --- fail_pattern_defaults_not_in_parameter_list.carbon
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
// CHECK:STDERR: fail_pattern_defaults_not_in_parameter_list.carbon:[[@LINE+4]]:23: error: default values are only supported in parameter lists [PatternDefaultValueNotInParameterList]
|
||||
@@ -42,7 +39,6 @@ library "[[@TEST_NAME]]";
|
||||
let (y: i32, x: i32 = 0) = (1, 2);
|
||||
|
||||
// --- fail_required_default_values_missing.carbon
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
// CHECK:STDERR: fail_required_default_values_missing.carbon:[[@LINE+17]]:39: error: this pattern is missing a required default value. [RequiredPatternDefaultValueMissing]
|
||||
@@ -55,15 +51,34 @@ library "[[@TEST_NAME]]";
|
||||
// CHECK:STDERR: fail_required_default_values_missing.carbon:[[@LINE+10]]:26: error: this pattern is missing a required default value. [RequiredPatternDefaultValueMissing]
|
||||
// CHECK:STDERR: fn Z(v: i32, x: i32 = 3, (y: i32 = 2, z: i32), w: i32 = 4, k: i32);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_required_default_values_missing.carbon:[[@LINE+7]]:14: note: all patterns to the right of this first pattern with a default value must also specify a default value. [RequiredPatternDefaultValueFirstDefault]
|
||||
// CHECK:STDERR: fn Z(v: i32, x: i32 = 3, (y: i32 = 2, z: i32), w: i32 = 4, k: i32);
|
||||
// CHECK:STDERR: ^~~~~~
|
||||
// CHECK:STDERR: fail_required_default_values_missing.carbon:[[@LINE+4]]:60: note: this pattern is also missing a required default value. [RequiredPatternDefaultValueMissingAdditional]
|
||||
// CHECK:STDERR: fail_required_default_values_missing.carbon:[[@LINE+7]]:60: note: this pattern is also missing a required default value. [RequiredPatternDefaultValueMissingAdditional]
|
||||
// CHECK:STDERR: fn Z(v: i32, x: i32 = 3, (y: i32 = 2, z: i32), w: i32 = 4, k: i32);
|
||||
// CHECK:STDERR: ^~~~~~
|
||||
// CHECK:STDERR: fail_required_default_values_missing.carbon:[[@LINE+4]]:14: note: all patterns to the right of this first pattern with a default value must also specify a default value. [RequiredPatternDefaultValueFirstDefault]
|
||||
// CHECK:STDERR: fn Z(v: i32, x: i32 = 3, (y: i32 = 2, z: i32), w: i32 = 4, k: i32);
|
||||
// CHECK:STDERR: ^~~~~~
|
||||
// CHECK:STDERR:
|
||||
fn Z(v: i32, x: i32 = 3, (y: i32 = 2, z: i32), w: i32 = 4, k: i32);
|
||||
|
||||
// --- fail_nesting_required_default_values_missing.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
// CHECK:STDERR: fail_nesting_required_default_values_missing.carbon:[[@LINE+14]]:40: error: this pattern is missing a required default value. [RequiredPatternDefaultValueMissing]
|
||||
// CHECK:STDERR: fn F(a: i32, (b: i32 = 0, (c: i32 = 0, (d: i32, e: i32))));
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_nesting_required_default_values_missing.carbon:[[@LINE+11]]:28: note: all patterns to the right of this first pattern with a default value must also specify a default value. [RequiredPatternDefaultValueFirstDefault]
|
||||
// CHECK:STDERR: fn F(a: i32, (b: i32 = 0, (c: i32 = 0, (d: i32, e: i32))));
|
||||
// CHECK:STDERR: ^~~~~~
|
||||
// CHECK:STDERR:
|
||||
// CHECK:STDERR: fail_nesting_required_default_values_missing.carbon:[[@LINE+7]]:27: error: this pattern is missing a required default value. [RequiredPatternDefaultValueMissing]
|
||||
// CHECK:STDERR: fn F(a: i32, (b: i32 = 0, (c: i32 = 0, (d: i32, e: i32))));
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_nesting_required_default_values_missing.carbon:[[@LINE+4]]:15: note: all patterns to the right of this first pattern with a default value must also specify a default value. [RequiredPatternDefaultValueFirstDefault]
|
||||
// CHECK:STDERR: fn F(a: i32, (b: i32 = 0, (c: i32 = 0, (d: i32, e: i32))));
|
||||
// CHECK:STDERR: ^~~~~~
|
||||
// CHECK:STDERR:
|
||||
fn F(a: i32, (b: i32 = 0, (c: i32 = 0, (d: i32, e: i32))));
|
||||
|
||||
// --- nested.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
@@ -72,7 +87,6 @@ fn F(a: i32, (b: i32, (c: i32, (d: i32, e: i32))) = (1, (2, (3, 4))));
|
||||
//@dump-sem-ir-end
|
||||
|
||||
// --- basic.carbon
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
//@dump-sem-ir-begin
|
||||
@@ -165,9 +179,10 @@ fn F(x: i32 = 0);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F(%a.param: %i32, %b.param: %i32, %c.param: %i32, %d.param: %i32, %e.param: %i32) default_values: {
|
||||
// CHECK:STDOUT: fn @F(%a.param: %i32, %b.param: %i32, %c.param: %i32, %d.param: %i32, %e.param: %i32) {
|
||||
// CHECK:STDOUT: !default_values:
|
||||
// CHECK:STDOUT: constants.%tuple.326: %tuple.type.c4f = tuple_value (constants.%int_1.5b8, constants.%tuple.b26) [concrete]
|
||||
// CHECK:STDOUT: };
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- basic.carbon
|
||||
// CHECK:STDOUT:
|
||||
@@ -187,7 +202,7 @@ fn F(x: i32 = 0);
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
|
||||
// CHECK:STDOUT: %x.param_patt: %pattern_type.6b6 = value_param_pattern [concrete = constants.%x.param_patt]
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type.6b6 = wrapper_binding_pattern x, %x.param_patt [concrete = constants.%x.patt]
|
||||
// CHECK:STDOUT: %.loc5: %pattern_type.6b6 = default_value_pattern %x.patt, index: 0 [concrete = constants.%.e53]
|
||||
// CHECK:STDOUT: %.loc4: %pattern_type.6b6 = default_value_pattern %x.patt, index: 0 [concrete = constants.%.e53]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6]
|
||||
// CHECK:STDOUT: %x.param: %i32 = value_param call_param0
|
||||
@@ -197,7 +212,8 @@ fn F(x: i32 = 0);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F(%x.param: %i32) default_values: {
|
||||
// CHECK:STDOUT: fn @F(%x.param: %i32) {
|
||||
// CHECK:STDOUT: !default_values:
|
||||
// CHECK:STDOUT: constants.%int_0.5c6: Core.IntLiteral = int_value 0 [concrete]
|
||||
// CHECK:STDOUT: };
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -0,0 +1,481 @@
|
||||
// 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
|
||||
//
|
||||
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon
|
||||
// EXTRA-ARGS: --dump-sem-ir-ranges=only
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// TIP: To test this file alone, run:
|
||||
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/function/definition/default_values.carbon
|
||||
// TIP: To dump output, run:
|
||||
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/definition/default_values.carbon
|
||||
//
|
||||
// --- fail_default_presence_mismatch_redecl.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
fn F(x: i32 = 0, y: i32 = _, z: i32 = _);
|
||||
// CHECK:STDERR: fail_default_presence_mismatch_redecl.carbon:[[@LINE+7]]:13: error: redeclaration differs at parameter 1 [RedeclParamDiffers]
|
||||
// CHECK:STDERR: fn F(unused x: i32, unused y: i32 = 1, unused z: i32 = 2) { }
|
||||
// CHECK:STDERR: ^~~~~~
|
||||
// CHECK:STDERR: fail_default_presence_mismatch_redecl.carbon:[[@LINE-4]]:6: note: previous declaration's corresponding parameter here [RedeclParamPrevious]
|
||||
// CHECK:STDERR: fn F(x: i32 = 0, y: i32 = _, z: i32 = _);
|
||||
// CHECK:STDERR: ^~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
fn F(unused x: i32, unused y: i32 = 1, unused z: i32 = 2) { }
|
||||
|
||||
// --- fail_defaults_different_values_redecl.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
fn F(x: i32 = 0, y: i32 = 10);
|
||||
// CHECK:STDERR: fail_defaults_different_values_redecl.carbon:[[@LINE+7]]:41: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers]
|
||||
// CHECK:STDERR: fn F(unused x: i32 = 0, unused y: i32 = 22) { }
|
||||
// CHECK:STDERR: ^~
|
||||
// CHECK:STDERR: fail_defaults_different_values_redecl.carbon:[[@LINE-4]]:27: note: comparing with previous declaration here [RedeclParamSyntaxPrevious]
|
||||
// CHECK:STDERR: fn F(x: i32 = 0, y: i32 = 10);
|
||||
// CHECK:STDERR: ^~
|
||||
// CHECK:STDERR:
|
||||
fn F(unused x: i32 = 0, unused y: i32 = 22) { }
|
||||
|
||||
// --- fail_defaults_never_specified_redecl.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
fn F(x: i32 = _);
|
||||
// CHECK:STDERR: fail_defaults_never_specified_redecl.carbon:[[@LINE+7]]:6: error: no value for default number 0 is ever specified. [PatternDefaultValueNeverSpecified]
|
||||
// CHECK:STDERR: fn F(unused x: i32 = _) { }
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_defaults_never_specified_redecl.carbon:[[@LINE-4]]:6: note: previous declaration here. [PatternDefaultValueNeverSpecifiedNote]
|
||||
// CHECK:STDERR: fn F(x: i32 = _);
|
||||
// CHECK:STDERR: ^~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
fn F(unused x: i32 = _) { }
|
||||
|
||||
// --- default_presence_mismatch.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
fn F(x: i32 = 0, y: i32 = _, z: i32 = _);
|
||||
|
||||
// --- fail_default_presence_mismatch.impl.carbon
|
||||
impl library "[[@TEST_NAME]]";
|
||||
|
||||
// CHECK:STDERR: fail_default_presence_mismatch.impl.carbon:[[@LINE+8]]:13: error: redeclaration differs at parameter 1 [RedeclParamDiffers]
|
||||
// CHECK:STDERR: fn F(unused x: i32, unused y: i32 = 1, unused z: i32 = 2) { }
|
||||
// CHECK:STDERR: ^~~~~~
|
||||
// CHECK:STDERR: fail_default_presence_mismatch.impl.carbon:[[@LINE-5]]:1: in import [InImport]
|
||||
// CHECK:STDERR: default_presence_mismatch.carbon:3:6: note: previous declaration's corresponding parameter here [RedeclParamPrevious]
|
||||
// CHECK:STDERR: fn F(x: i32 = 0, y: i32 = _, z: i32 = _);
|
||||
// CHECK:STDERR: ^~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
fn F(unused x: i32, unused y: i32 = 1, unused z: i32 = 2) { }
|
||||
|
||||
// --- defaults_different_values.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
fn F(x: i32 = 0, y: i32 = 10);
|
||||
|
||||
// --- fail_defaults_different_values.impl.carbon
|
||||
impl library "[[@TEST_NAME]]";
|
||||
|
||||
// CHECK:STDERR: fail_defaults_different_values.impl.carbon:[[@LINE+4]]:25: error: default value differs from the previous declaration. [PatternDefaultValueDiffers]
|
||||
// CHECK:STDERR: fn F(unused x: i32 = 0, unused y: i32 = 22) { }
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
fn F(unused x: i32 = 0, unused y: i32 = 22) { }
|
||||
|
||||
// --- defaults_never_specified.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
fn F(x: i32 = _);
|
||||
|
||||
// --- fail_defaults_never_specified.impl.carbon
|
||||
impl library "[[@TEST_NAME]]";
|
||||
|
||||
// CHECK:STDERR: fail_defaults_never_specified.impl.carbon:[[@LINE+4]]:6: error: no value for default number 0 is ever specified. [PatternDefaultValueNeverSpecified]
|
||||
// CHECK:STDERR: fn F(unused x: i32 = _) { }
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
fn F(unused x: i32 = _) { }
|
||||
|
||||
// --- redecl.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
fn F(x: i32 = 0) -> i32;
|
||||
fn G(x: i32 = _) -> i32;
|
||||
fn H(x: i32 = 0) -> i32;
|
||||
|
||||
//@dump-sem-ir-begin
|
||||
fn F(x: i32 = 0) -> i32 { return x; }
|
||||
fn G(x: i32 = 0) -> i32 { return x; }
|
||||
fn H(x: i32 = _) -> i32 { return x; }
|
||||
//@dump-sem-ir-end
|
||||
|
||||
// --- repeated_defaults.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
fn F(x: i32 = 0) -> i32;
|
||||
|
||||
// --- repeated_defaults.impl.carbon
|
||||
impl library "[[@TEST_NAME]]";
|
||||
|
||||
//@dump-sem-ir-begin
|
||||
fn F(x: i32 = 0) -> i32 { return x; }
|
||||
//@dump-sem-ir-end
|
||||
|
||||
// --- elided_defaults_in_def.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
fn F(x: i32 = 0) -> i32;
|
||||
|
||||
// --- elided_defaults_in_def.impl.carbon
|
||||
impl library "[[@TEST_NAME]]";
|
||||
|
||||
//@dump-sem-ir-begin
|
||||
fn F(x: i32 = _) -> i32 { return x; }
|
||||
//@dump-sem-ir-end
|
||||
|
||||
// --- elided_defaults_in_decl.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
fn F(x: i32 = _) -> i32;
|
||||
|
||||
// --- elided_defaults_in_decl.impl.carbon
|
||||
impl library "[[@TEST_NAME]]";
|
||||
|
||||
//@dump-sem-ir-begin
|
||||
fn F(x: i32 = 0) -> i32 { return x; }
|
||||
//@dump-sem-ir-end
|
||||
|
||||
// CHECK:STDOUT: --- redecl.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
|
||||
// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.6b6: type = pattern_type %i32 [concrete]
|
||||
// CHECK:STDOUT: %x.param_patt: %pattern_type.6b6 = value_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type.6b6 = wrapper_binding_pattern x, %x.param_patt [concrete]
|
||||
// CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete]
|
||||
// CHECK:STDOUT: %.e53: %pattern_type.6b6 = default_value_pattern %x.patt, index: 0 [concrete]
|
||||
// CHECK:STDOUT: %.795f: Core.Form = init_form %i32 [concrete]
|
||||
// CHECK:STDOUT: %return.param_patt.a9a: %pattern_type.6b6 = out_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %return.patt.e1b: %pattern_type.6b6 = return_slot_pattern %return.param_patt.a9a, %i32 [concrete]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %.d49: <unspecified_value> = unspecified_value [concrete]
|
||||
// CHECK:STDOUT: %G.type: type = fn_type @G [concrete]
|
||||
// CHECK:STDOUT: %G: %G.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %H.type: type = fn_type @H [concrete]
|
||||
// CHECK:STDOUT: %H: %H.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.ac8: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic]
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.5e0: %Int.as.Copy.impl.Op.type.ac8 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %Copy.impl_witness.b51: <witness> = impl_witness imports.%Copy.impl_witness_table.8d2, @Int.as.Copy.impl(%int_32) [concrete]
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.3f6: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete]
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.4f6: %Int.as.Copy.impl.Op.type.3f6 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.b51) [concrete]
|
||||
// CHECK:STDOUT: %Copy.WithSelf.Op.type.381: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [concrete]
|
||||
// CHECK:STDOUT: %.737: type = fn_type_with_self_type %Copy.WithSelf.Op.type.381, %Copy.facet [concrete]
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: <specific function> = specific_function %Int.as.Copy.impl.Op.4f6, @Int.as.Copy.impl.Op(%int_32) [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core.import_ref.cd6: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.ac8) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.5e0)]
|
||||
// CHECK:STDOUT: %Copy.impl_witness_table.8d2 = impl_witness_table (%Core.import_ref.cd6), @Int.as.Copy.impl [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %F.decl.loc8: %F.type = fn_decl @F [concrete = constants.%F] {
|
||||
// CHECK:STDOUT: %x.param_patt: %pattern_type.6b6 = value_param_pattern [concrete = constants.%x.param_patt]
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type.6b6 = wrapper_binding_pattern x, %x.param_patt [concrete = constants.%x.patt]
|
||||
// CHECK:STDOUT: %.loc8_13: %pattern_type.6b6 = default_value_pattern %x.patt, index: 0 [concrete = constants.%.e53]
|
||||
// CHECK:STDOUT: %return.param_patt: %pattern_type.6b6 = out_param_pattern [concrete = constants.%return.param_patt.a9a]
|
||||
// CHECK:STDOUT: %return.patt: %pattern_type.6b6 = return_slot_pattern %return.param_patt, %i32.loc8_21 [concrete = constants.%return.patt.e1b]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %int_0.loc8: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6]
|
||||
// CHECK:STDOUT: %i32.loc8_21: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc8_21: Core.Form = init_form %i32.loc8_21 [concrete = constants.%.795f]
|
||||
// CHECK:STDOUT: %x.param.loc8: %i32 = value_param call_param0
|
||||
// CHECK:STDOUT: %i32.loc8_9: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %x.loc8: %i32 = wrapper_binding x, %x.param.loc8
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %return.param.loc8: ref %i32 = out_param call_param1
|
||||
// CHECK:STDOUT: %return.loc8: ref %i32 = return_slot %return.param.loc8
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %G.decl.loc9: %G.type = fn_decl @G [concrete = constants.%G] {
|
||||
// CHECK:STDOUT: %x.param_patt: %pattern_type.6b6 = value_param_pattern [concrete = constants.%x.param_patt]
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type.6b6 = wrapper_binding_pattern x, %x.param_patt [concrete = constants.%x.patt]
|
||||
// CHECK:STDOUT: %.loc9_13: %pattern_type.6b6 = default_value_pattern %x.patt, index: 0 [concrete = constants.%.e53]
|
||||
// CHECK:STDOUT: %return.param_patt: %pattern_type.6b6 = out_param_pattern [concrete = constants.%return.param_patt.a9a]
|
||||
// CHECK:STDOUT: %return.patt: %pattern_type.6b6 = return_slot_pattern %return.param_patt, %i32.loc9_21 [concrete = constants.%return.patt.e1b]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6]
|
||||
// CHECK:STDOUT: %i32.loc9_21: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc9_21: Core.Form = init_form %i32.loc9_21 [concrete = constants.%.795f]
|
||||
// CHECK:STDOUT: %x.param.loc9: %i32 = value_param call_param0
|
||||
// CHECK:STDOUT: %i32.loc9_9: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %x.loc9: %i32 = wrapper_binding x, %x.param.loc9
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %return.param.loc9: ref %i32 = out_param call_param1
|
||||
// CHECK:STDOUT: %return.loc9: ref %i32 = return_slot %return.param.loc9
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %H.decl.loc10: %H.type = fn_decl @H [concrete = constants.%H] {
|
||||
// CHECK:STDOUT: %x.param_patt: %pattern_type.6b6 = value_param_pattern [concrete = constants.%x.param_patt]
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type.6b6 = wrapper_binding_pattern x, %x.param_patt [concrete = constants.%x.patt]
|
||||
// CHECK:STDOUT: %.loc10_13: %pattern_type.6b6 = default_value_pattern %x.patt, index: 0 [concrete = constants.%.e53]
|
||||
// CHECK:STDOUT: %return.param_patt: %pattern_type.6b6 = out_param_pattern [concrete = constants.%return.param_patt.a9a]
|
||||
// CHECK:STDOUT: %return.patt: %pattern_type.6b6 = return_slot_pattern %return.param_patt, %i32.loc10_21 [concrete = constants.%return.patt.e1b]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc10_15: <unspecified_value> = unspecified_value [concrete = constants.%.d49]
|
||||
// CHECK:STDOUT: %i32.loc10_21: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc10_21: Core.Form = init_form %i32.loc10_21 [concrete = constants.%.795f]
|
||||
// CHECK:STDOUT: %x.param.loc10: %i32 = value_param call_param0
|
||||
// CHECK:STDOUT: %i32.loc10_9: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %x.loc10: %i32 = wrapper_binding x, %x.param.loc10
|
||||
// CHECK:STDOUT: %return.param.loc10: ref %i32 = out_param call_param1
|
||||
// CHECK:STDOUT: %return.loc10: ref %i32 = return_slot %return.param.loc10
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F(%x.param.loc8: %i32) -> out %return.param.loc8: %i32 {
|
||||
// CHECK:STDOUT: !default_values:
|
||||
// CHECK:STDOUT: constants.%int_0.5c6: Core.IntLiteral = int_value 0 [concrete]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %x.ref: %i32 = name_ref x, %x.loc8
|
||||
// CHECK:STDOUT: %impl.elem0.loc8: %.737 = impl_witness_access constants.%Copy.impl_witness.b51, element0 [concrete = constants.%Int.as.Copy.impl.Op.4f6]
|
||||
// CHECK:STDOUT: %bound_method.loc8_34.1: <bound method> = bound_method %x.ref, %impl.elem0.loc8
|
||||
// CHECK:STDOUT: %specific_fn.loc8: <specific function> = specific_function %impl.elem0.loc8, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc8_34.2: <bound method> = bound_method %x.ref, %specific_fn.loc8
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc8_34.2(%x.ref)
|
||||
// CHECK:STDOUT: return %Int.as.Copy.impl.Op.call
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @G(%x.param.loc9: %i32) -> out %return.param.loc9: %i32 {
|
||||
// CHECK:STDOUT: !default_values:
|
||||
// CHECK:STDOUT: constants.%int_0.5c6: Core.IntLiteral = int_value 0 [concrete]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %x.ref: %i32 = name_ref x, %x.loc9
|
||||
// CHECK:STDOUT: %impl.elem0.loc9: %.737 = impl_witness_access constants.%Copy.impl_witness.b51, element0 [concrete = constants.%Int.as.Copy.impl.Op.4f6]
|
||||
// CHECK:STDOUT: %bound_method.loc9_34.1: <bound method> = bound_method %x.ref, %impl.elem0.loc9
|
||||
// CHECK:STDOUT: %specific_fn.loc9: <specific function> = specific_function %impl.elem0.loc9, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc9_34.2: <bound method> = bound_method %x.ref, %specific_fn.loc9
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc9_34.2(%x.ref)
|
||||
// CHECK:STDOUT: return %Int.as.Copy.impl.Op.call
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @H(%x.param.loc10: %i32) -> out %return.param.loc10: %i32 {
|
||||
// CHECK:STDOUT: !default_values:
|
||||
// CHECK:STDOUT: constants.%int_0.5c6: Core.IntLiteral = int_value 0 [concrete]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %x.ref: %i32 = name_ref x, %x.loc10
|
||||
// CHECK:STDOUT: %impl.elem0.loc10: %.737 = impl_witness_access constants.%Copy.impl_witness.b51, element0 [concrete = constants.%Int.as.Copy.impl.Op.4f6]
|
||||
// CHECK:STDOUT: %bound_method.loc10_34.1: <bound method> = bound_method %x.ref, %impl.elem0.loc10
|
||||
// CHECK:STDOUT: %specific_fn.loc10: <specific function> = specific_function %impl.elem0.loc10, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc10_34.2: <bound method> = bound_method %x.ref, %specific_fn.loc10
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc10_34.2(%x.ref)
|
||||
// CHECK:STDOUT: return %Int.as.Copy.impl.Op.call
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- repeated_defaults.impl.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.6b6: type = pattern_type %i32 [concrete]
|
||||
// CHECK:STDOUT: %x.param_patt: %pattern_type.6b6 = value_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type.6b6 = wrapper_binding_pattern x, %x.param_patt [concrete]
|
||||
// CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete]
|
||||
// CHECK:STDOUT: %.e53: %pattern_type.6b6 = default_value_pattern %x.patt, index: 0 [concrete]
|
||||
// CHECK:STDOUT: %.795f: Core.Form = init_form %i32 [concrete]
|
||||
// CHECK:STDOUT: %return.param_patt.a9a: %pattern_type.6b6 = out_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %return.patt.e1b: %pattern_type.6b6 = return_slot_pattern %return.param_patt.a9a, %i32 [concrete]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.ac8: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic]
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.5e0: %Int.as.Copy.impl.Op.type.ac8 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %Copy.impl_witness.b51: <witness> = impl_witness imports.%Copy.impl_witness_table.8d2, @Int.as.Copy.impl(%int_32) [concrete]
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.3f6: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete]
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.4f6: %Int.as.Copy.impl.Op.type.3f6 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.b51) [concrete]
|
||||
// CHECK:STDOUT: %Copy.WithSelf.Op.type.381: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [concrete]
|
||||
// CHECK:STDOUT: %.737: type = fn_type_with_self_type %Copy.WithSelf.Op.type.381, %Copy.facet [concrete]
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: <specific function> = specific_function %Int.as.Copy.impl.Op.4f6, @Int.as.Copy.impl.Op(%int_32) [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core.import_ref.cd6: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.ac8) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.5e0)]
|
||||
// CHECK:STDOUT: %Copy.impl_witness_table.8d2 = impl_witness_table (%Core.import_ref.cd6), @Int.as.Copy.impl [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
|
||||
// CHECK:STDOUT: %x.param_patt: %pattern_type.6b6 = value_param_pattern [concrete = constants.%x.param_patt]
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type.6b6 = wrapper_binding_pattern x, %x.param_patt [concrete = constants.%x.patt]
|
||||
// CHECK:STDOUT: %.loc4_13: %pattern_type.6b6 = default_value_pattern %x.patt, index: 0 [concrete = constants.%.e53]
|
||||
// CHECK:STDOUT: %return.param_patt: %pattern_type.6b6 = out_param_pattern [concrete = constants.%return.param_patt.a9a]
|
||||
// CHECK:STDOUT: %return.patt: %pattern_type.6b6 = return_slot_pattern %return.param_patt, %i32.loc4_21 [concrete = constants.%return.patt.e1b]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6]
|
||||
// CHECK:STDOUT: %i32.loc4_21: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc4_21: Core.Form = init_form %i32.loc4_21 [concrete = constants.%.795f]
|
||||
// CHECK:STDOUT: %x.param: %i32 = value_param call_param0
|
||||
// CHECK:STDOUT: %i32.loc4_9: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %x: %i32 = wrapper_binding x, %x.param
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1
|
||||
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F(%x.param: %i32) -> out %return.param: %i32 [from "repeated_defaults.carbon"] {
|
||||
// CHECK:STDOUT: !default_values:
|
||||
// CHECK:STDOUT: constants.%int_0.5c6: Core.IntLiteral = int_value 0 [concrete]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %x.ref: %i32 = name_ref x, %x
|
||||
// CHECK:STDOUT: %impl.elem0.loc4: %.737 = impl_witness_access constants.%Copy.impl_witness.b51, element0 [concrete = constants.%Int.as.Copy.impl.Op.4f6]
|
||||
// CHECK:STDOUT: %bound_method.loc4_34.1: <bound method> = bound_method %x.ref, %impl.elem0.loc4
|
||||
// CHECK:STDOUT: %specific_fn.loc4: <specific function> = specific_function %impl.elem0.loc4, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc4_34.2: <bound method> = bound_method %x.ref, %specific_fn.loc4
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc4_34.2(%x.ref)
|
||||
// CHECK:STDOUT: return %Int.as.Copy.impl.Op.call
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- elided_defaults_in_def.impl.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.6b6: type = pattern_type %i32 [concrete]
|
||||
// CHECK:STDOUT: %x.param_patt: %pattern_type.6b6 = value_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type.6b6 = wrapper_binding_pattern x, %x.param_patt [concrete]
|
||||
// CHECK:STDOUT: %.d49: <unspecified_value> = unspecified_value [concrete]
|
||||
// CHECK:STDOUT: %.e53: %pattern_type.6b6 = default_value_pattern %x.patt, index: 0 [concrete]
|
||||
// CHECK:STDOUT: %.795f: Core.Form = init_form %i32 [concrete]
|
||||
// CHECK:STDOUT: %return.param_patt.a9a: %pattern_type.6b6 = out_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %return.patt.e1b: %pattern_type.6b6 = return_slot_pattern %return.param_patt.a9a, %i32 [concrete]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
|
||||
// CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.ac8: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic]
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.5e0: %Int.as.Copy.impl.Op.type.ac8 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %Copy.impl_witness.b51: <witness> = impl_witness imports.%Copy.impl_witness_table.8d2, @Int.as.Copy.impl(%int_32) [concrete]
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.3f6: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete]
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.4f6: %Int.as.Copy.impl.Op.type.3f6 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.b51) [concrete]
|
||||
// CHECK:STDOUT: %Copy.WithSelf.Op.type.381: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [concrete]
|
||||
// CHECK:STDOUT: %.737: type = fn_type_with_self_type %Copy.WithSelf.Op.type.381, %Copy.facet [concrete]
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: <specific function> = specific_function %Int.as.Copy.impl.Op.4f6, @Int.as.Copy.impl.Op(%int_32) [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core.import_ref.cd6: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.ac8) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.5e0)]
|
||||
// CHECK:STDOUT: %Copy.impl_witness_table.8d2 = impl_witness_table (%Core.import_ref.cd6), @Int.as.Copy.impl [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
|
||||
// CHECK:STDOUT: %x.param_patt: %pattern_type.6b6 = value_param_pattern [concrete = constants.%x.param_patt]
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type.6b6 = wrapper_binding_pattern x, %x.param_patt [concrete = constants.%x.patt]
|
||||
// CHECK:STDOUT: %.loc4_13: %pattern_type.6b6 = default_value_pattern %x.patt, index: 0 [concrete = constants.%.e53]
|
||||
// CHECK:STDOUT: %return.param_patt: %pattern_type.6b6 = out_param_pattern [concrete = constants.%return.param_patt.a9a]
|
||||
// CHECK:STDOUT: %return.patt: %pattern_type.6b6 = return_slot_pattern %return.param_patt, %i32.loc4_21 [concrete = constants.%return.patt.e1b]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc4_15: <unspecified_value> = unspecified_value [concrete = constants.%.d49]
|
||||
// CHECK:STDOUT: %i32.loc4_21: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc4_21: Core.Form = init_form %i32.loc4_21 [concrete = constants.%.795f]
|
||||
// CHECK:STDOUT: %x.param: %i32 = value_param call_param0
|
||||
// CHECK:STDOUT: %i32.loc4_9: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %x: %i32 = wrapper_binding x, %x.param
|
||||
// CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1
|
||||
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F(%x.param: %i32) -> out %return.param: %i32 [from "elided_defaults_in_def.carbon"] {
|
||||
// CHECK:STDOUT: !default_values:
|
||||
// CHECK:STDOUT: constants.%int_0: Core.IntLiteral = int_value 0 [concrete]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %x.ref: %i32 = name_ref x, %x
|
||||
// CHECK:STDOUT: %impl.elem0: %.737 = impl_witness_access constants.%Copy.impl_witness.b51, element0 [concrete = constants.%Int.as.Copy.impl.Op.4f6]
|
||||
// CHECK:STDOUT: %bound_method.loc4_34.1: <bound method> = bound_method %x.ref, %impl.elem0
|
||||
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc4_34.2: <bound method> = bound_method %x.ref, %specific_fn
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc4_34.2(%x.ref)
|
||||
// CHECK:STDOUT: return %Int.as.Copy.impl.Op.call
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- elided_defaults_in_decl.impl.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
|
||||
// CHECK:STDOUT: %N: Core.IntLiteral = symbolic_binding N, 0 [symbolic]
|
||||
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.6b6: type = pattern_type %i32 [concrete]
|
||||
// CHECK:STDOUT: %x.param_patt: %pattern_type.6b6 = value_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type.6b6 = wrapper_binding_pattern x, %x.param_patt [concrete]
|
||||
// CHECK:STDOUT: %int_0.5c6: Core.IntLiteral = int_value 0 [concrete]
|
||||
// CHECK:STDOUT: %.e53: %pattern_type.6b6 = default_value_pattern %x.patt, index: 0 [concrete]
|
||||
// CHECK:STDOUT: %.795f: Core.Form = init_form %i32 [concrete]
|
||||
// CHECK:STDOUT: %return.param_patt.a9a: %pattern_type.6b6 = out_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %return.patt.e1b: %pattern_type.6b6 = return_slot_pattern %return.param_patt.a9a, %i32 [concrete]
|
||||
// CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
|
||||
// CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.ac8: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic]
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.5e0: %Int.as.Copy.impl.Op.type.ac8 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %Copy.impl_witness.b51: <witness> = impl_witness imports.%Copy.impl_witness_table.8d2, @Int.as.Copy.impl(%int_32) [concrete]
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.3f6: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete]
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.4f6: %Int.as.Copy.impl.Op.type.3f6 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.b51) [concrete]
|
||||
// CHECK:STDOUT: %Copy.WithSelf.Op.type.381: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [concrete]
|
||||
// CHECK:STDOUT: %.737: type = fn_type_with_self_type %Copy.WithSelf.Op.type.381, %Copy.facet [concrete]
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: <specific function> = specific_function %Int.as.Copy.impl.Op.4f6, @Int.as.Copy.impl.Op(%int_32) [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core.import_ref.cd6: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.ac8) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Int.as.Copy.impl.%Int.as.Copy.impl.Op (constants.%Int.as.Copy.impl.Op.5e0)]
|
||||
// CHECK:STDOUT: %Copy.impl_witness_table.8d2 = impl_witness_table (%Core.import_ref.cd6), @Int.as.Copy.impl [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
|
||||
// CHECK:STDOUT: %x.param_patt: %pattern_type.6b6 = value_param_pattern [concrete = constants.%x.param_patt]
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type.6b6 = wrapper_binding_pattern x, %x.param_patt [concrete = constants.%x.patt]
|
||||
// CHECK:STDOUT: %.loc4_13: %pattern_type.6b6 = default_value_pattern %x.patt, index: 0 [concrete = constants.%.e53]
|
||||
// CHECK:STDOUT: %return.param_patt: %pattern_type.6b6 = out_param_pattern [concrete = constants.%return.param_patt.a9a]
|
||||
// CHECK:STDOUT: %return.patt: %pattern_type.6b6 = return_slot_pattern %return.param_patt, %i32.loc4_21 [concrete = constants.%return.patt.e1b]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0.5c6]
|
||||
// CHECK:STDOUT: %i32.loc4_21: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc4_21: Core.Form = init_form %i32.loc4_21 [concrete = constants.%.795f]
|
||||
// CHECK:STDOUT: %x.param: %i32 = value_param call_param0
|
||||
// CHECK:STDOUT: %i32.loc4_9: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %x: %i32 = wrapper_binding x, %x.param
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %return.param: ref %i32 = out_param call_param1
|
||||
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F(%x.param: %i32) -> out %return.param: %i32 [from "elided_defaults_in_decl.carbon"] {
|
||||
// CHECK:STDOUT: !default_values:
|
||||
// CHECK:STDOUT: constants.%int_0.5c6: Core.IntLiteral = int_value 0 [concrete]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %x.ref: %i32 = name_ref x, %x
|
||||
// CHECK:STDOUT: %impl.elem0.loc4: %.737 = impl_witness_access constants.%Copy.impl_witness.b51, element0 [concrete = constants.%Int.as.Copy.impl.Op.4f6]
|
||||
// CHECK:STDOUT: %bound_method.loc4_34.1: <bound method> = bound_method %x.ref, %impl.elem0.loc4
|
||||
// CHECK:STDOUT: %specific_fn.loc4: <specific function> = specific_function %impl.elem0.loc4, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc4_34.2: <bound method> = bound_method %x.ref, %specific_fn.loc4
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc4_34.2(%x.ref)
|
||||
// CHECK:STDOUT: return %Int.as.Copy.impl.Op.call
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -258,7 +258,8 @@ class TypeCompleter {
|
||||
SemIR::ErrorInst, SemIR::FacetType, SemIR::FloatLiteralType,
|
||||
SemIR::FormType, SemIR::IntLiteralType, SemIR::NamespaceType,
|
||||
SemIR::PatternType, SemIR::RequireSpecificDefinitionType,
|
||||
SemIR::SpecificFunctionType, SemIR::TypeType, SemIR::VtableType,
|
||||
SemIR::SpecificFunctionType, SemIR::TypeType,
|
||||
SemIR::UnspecifiedValueType, SemIR::VtableType,
|
||||
SemIR::WitnessType>())
|
||||
auto BuildInfoForInst(SemIR::TypeId type_id, InstT /*inst*/) const
|
||||
-> SemIR::CompleteTypeInfo {
|
||||
|
||||
@@ -620,9 +620,12 @@ CARBON_DIAGNOSTIC_KIND(GenericMissingExplicitParameters)
|
||||
CARBON_DIAGNOSTIC_KIND(RequiredPatternDefaultValueMissing)
|
||||
CARBON_DIAGNOSTIC_KIND(RequiredPatternDefaultValueFirstDefault)
|
||||
CARBON_DIAGNOSTIC_KIND(RequiredPatternDefaultValueMissingAdditional)
|
||||
CARBON_DIAGNOSTIC_KIND(PatternDefaultValueDiffers)
|
||||
CARBON_DIAGNOSTIC_KIND(PatternDefaultValueNotConstant)
|
||||
CARBON_DIAGNOSTIC_KIND(PatternDefaultValueNotInParameterList)
|
||||
CARBON_DIAGNOSTIC_KIND(PatternDefaultValueTypeMismatch)
|
||||
CARBON_DIAGNOSTIC_KIND(PatternDefaultValueNeverSpecified)
|
||||
CARBON_DIAGNOSTIC_KIND(PatternDefaultValueNeverSpecifiedNote)
|
||||
CARBON_DIAGNOSTIC_KIND(TuplePatternSizeDoesntMatchLiteral)
|
||||
|
||||
// Unused diagnostics.
|
||||
|
||||
+4
-4
@@ -34,7 +34,7 @@
|
||||
// CHECK:STDOUT: clang_decls: {}
|
||||
// CHECK:STDOUT: clang_decl_signatures: {}
|
||||
// CHECK:STDOUT: name_scopes:
|
||||
// CHECK:STDOUT: name_scope0: {inst: instF, parent_scope: name_scope<none>, has_error: false, extended_scopes: [], names: {}}
|
||||
// CHECK:STDOUT: name_scope0: {inst: inst10, parent_scope: name_scope<none>, has_error: false, extended_scopes: [], names: {}}
|
||||
// CHECK:STDOUT: entity_names: {}
|
||||
// CHECK:STDOUT: functions: {}
|
||||
// CHECK:STDOUT: classes: {}
|
||||
@@ -74,11 +74,11 @@
|
||||
// CHECK:STDOUT: alignment: 1
|
||||
// CHECK:STDOUT: declared_facet_types: {}
|
||||
// CHECK:STDOUT: insts:
|
||||
// CHECK:STDOUT: instF: {kind: Namespace, arg0: name_scope0, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: inst10: {kind: Namespace, arg0: name_scope0, type: type(inst(NamespaceType))}
|
||||
// CHECK:STDOUT: bundles: {}
|
||||
// CHECK:STDOUT: constant_values:
|
||||
// CHECK:STDOUT: values:
|
||||
// CHECK:STDOUT: instF: concrete_constant(instF)
|
||||
// CHECK:STDOUT: inst10: concrete_constant(inst10)
|
||||
// CHECK:STDOUT: symbolic_constants: {}
|
||||
// CHECK:STDOUT: inst_blocks:
|
||||
// CHECK:STDOUT: inst_block_empty: {}
|
||||
@@ -87,7 +87,7 @@
|
||||
// CHECK:STDOUT: imports: {}
|
||||
// CHECK:STDOUT: global_init: {}
|
||||
// CHECK:STDOUT: inst_block60000005:
|
||||
// CHECK:STDOUT: 0: instF
|
||||
// CHECK:STDOUT: 0: inst10
|
||||
// CHECK:STDOUT: value_stores:
|
||||
// CHECK:STDOUT: shared_values:
|
||||
// CHECK:STDOUT: ints: {}
|
||||
|
||||
@@ -829,7 +829,8 @@ template <typename InstT>
|
||||
SemIR::GenericNamedConstraintType, SemIR::InstType,
|
||||
SemIR::IntLiteralType, SemIR::NamespaceType,
|
||||
SemIR::RequireSpecificDefinitionType, SemIR::SpecificFunctionType,
|
||||
SemIR::UnboundElementType, SemIR::WhereExpr, SemIR::WitnessType>())
|
||||
SemIR::UnboundElementType, SemIR::UnspecifiedValueType,
|
||||
SemIR::WhereExpr, SemIR::WitnessType>())
|
||||
static auto BuildTypeForInst(FileContext& context, InstT /*inst*/)
|
||||
-> LoweredTypes {
|
||||
// Return an empty struct as a placeholder.
|
||||
|
||||
@@ -597,24 +597,28 @@ auto Formatter::FormatFunction(FunctionId id, const Function& fn) -> void {
|
||||
out() << "]";
|
||||
}
|
||||
|
||||
if (fn.call_param_default_values_id.has_value()) {
|
||||
out() << " default_values:";
|
||||
// The default values are encoded as instructions referring to constants,
|
||||
// and as such have no location, and so are normally elided when
|
||||
// use_dump_sem_ir_ranges_ is true. However, if the function containing
|
||||
// these default values is to be printed, it should also include these
|
||||
// defaults, so we temporarily disable this flag to force the printing of
|
||||
// the contents of this block.
|
||||
auto format_mask = use_dump_sem_ir_ranges_;
|
||||
use_dump_sem_ir_ranges_ = false;
|
||||
FormatTrailingBlock(fn.call_param_default_values_id);
|
||||
use_dump_sem_ir_ranges_ = format_mask;
|
||||
}
|
||||
|
||||
if (!fn.body_block_ids.empty()) {
|
||||
if (!fn.body_block_ids.empty() ||
|
||||
fn.call_param_default_values_id.has_value()) {
|
||||
out() << ' ';
|
||||
OpenBrace();
|
||||
|
||||
if (fn.call_param_default_values_id.has_value()) {
|
||||
IndentLabel();
|
||||
out() << "!default_values:\n";
|
||||
// The default values are encoded as canonical instructions,
|
||||
// and as such have no location, and so are normally elided when
|
||||
// use_dump_sem_ir_ranges_ is true. However, if the function containing
|
||||
// these default values is to be printed, it should also include these
|
||||
// defaults, so we temporarily disable this flag to force the printing of
|
||||
// the contents of this block.
|
||||
// TODO: drop this code once default values are stored as non-canonical
|
||||
// instructions.
|
||||
auto format_mask = use_dump_sem_ir_ranges_;
|
||||
use_dump_sem_ir_ranges_ = false;
|
||||
FormatCodeBlock(fn.call_param_default_values_id);
|
||||
use_dump_sem_ir_ranges_ = format_mask;
|
||||
}
|
||||
|
||||
for (auto block_id : fn.body_block_ids) {
|
||||
IndentLabel();
|
||||
FormatLabel(block_id);
|
||||
|
||||
@@ -82,7 +82,8 @@ struct FunctionFields {
|
||||
// because it is relevant only for a function definition.
|
||||
InstBlockId call_params_id;
|
||||
|
||||
// Instructions representing the constant default values for parameters.
|
||||
// Instructions representing the canonical default values for parameters.
|
||||
// TODO: Change this to non-canonical values.
|
||||
InstBlockId call_param_default_values_id;
|
||||
|
||||
// The index ranges within the `Call` parameters that correspond to the
|
||||
|
||||
@@ -177,6 +177,8 @@ CARBON_SEM_IR_INST_KIND(TypeType)
|
||||
CARBON_SEM_IR_INST_KIND(UnaryOperatorNot)
|
||||
CARBON_SEM_IR_INST_KIND(UnboundElementType)
|
||||
CARBON_SEM_IR_INST_KIND(UninitializedValue)
|
||||
CARBON_SEM_IR_INST_KIND(UnspecifiedValue)
|
||||
CARBON_SEM_IR_INST_KIND(UnspecifiedValueType)
|
||||
CARBON_SEM_IR_INST_KIND(UpdateInit)
|
||||
CARBON_SEM_IR_INST_KIND(ValueAsRef)
|
||||
CARBON_SEM_IR_INST_KIND(ValueBindingPattern)
|
||||
|
||||
@@ -124,6 +124,7 @@ auto Mangler::MangleInverseQualifiedNameScope(llvm::raw_ostream& os,
|
||||
case SemIR::RequireSpecificDefinitionType::Kind:
|
||||
case SemIR::SpecificFunctionType::Kind:
|
||||
case SemIR::TypeType::Kind:
|
||||
case SemIR::UnspecifiedValueType::Kind:
|
||||
case SemIR::VtableType::Kind:
|
||||
case SemIR::WitnessType::Kind: {
|
||||
os << self_inst.kind().ir_name();
|
||||
|
||||
@@ -26,6 +26,7 @@ static constexpr std::array SingletonInstKinds = {
|
||||
InstKind::NamespaceType,
|
||||
InstKind::RequireSpecificDefinitionType,
|
||||
InstKind::SpecificFunctionType,
|
||||
InstKind::UnspecifiedValueType,
|
||||
InstKind::VtableType,
|
||||
InstKind::WitnessType,
|
||||
};
|
||||
|
||||
@@ -148,6 +148,7 @@ auto TypeIterator::ProcessType(InstId inst_id) -> std::optional<Step> {
|
||||
case RequireSpecificDefinitionType::Kind:
|
||||
case TypeType::Kind:
|
||||
case UnboundElementType::Kind:
|
||||
case UnspecifiedValueType::Kind:
|
||||
case VtableType::Kind:
|
||||
case WitnessType::Kind: {
|
||||
return Step::ConcreteType{
|
||||
|
||||
@@ -2354,6 +2354,21 @@ struct UninitializedValue {
|
||||
TypeId type_id;
|
||||
};
|
||||
|
||||
using UnspecifiedValueType =
|
||||
SingletonTypeInst<InstKind::UnspecifiedValueType, "<unspecified_value>">;
|
||||
|
||||
// A placeholder value for default values in function definitions.
|
||||
struct UnspecifiedValue {
|
||||
static constexpr auto Kind =
|
||||
InstKind::UnspecifiedValue.Define<Parse::DefaultValueUnspecifiedId>(
|
||||
{.ir_name = "unspecified_value",
|
||||
.constant_kind = InstConstantKind::Always,
|
||||
.is_lowered = false});
|
||||
// Always the type of the builtin `UnspecifiedValueType` singleton
|
||||
// instruction.
|
||||
TypeId type_id;
|
||||
};
|
||||
|
||||
// Initializes an object by performing a base initialization followed by an
|
||||
// update step.
|
||||
struct UpdateInit {
|
||||
|
||||
Reference in New Issue
Block a user