mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-10 12:28:25 +00:00
Handle references to global lets and enclosing locals. (#8061)
When building an expression referencing the result of name lookup, if the lookup result is non-constant then check we can access it from the current scope. * If it is a global, then use a new `GlobalRef` instruction to get the value of that global. In lowering, create global variables to hold the values of global `let` bindings so that `GlobalRef` can access those values. * If it is a local, walk the lexical scopes between it and the point of use and ensure it is usable through from all of them. Error if there's an intervening declarative scope such as a class, add a TODO to handle captures for intervening functions, and allow `typeof(...)` to name things it can't read the value of since it's unevaluated. Global `let`s (which includes `let`s at class scope) now also have their initializers collected into the global inits block. If the initializer is non-constant, the wrapper binding also lives in the global inits block; otherwise it continues to live in the file block and the variable emitted for it is a global constant. Assisted-by: Gemini and Claude via Antigravity
This commit is contained in:
1 parent
bb6486b553
commit
d50576ca16
94 files changed
+3394
-1293
No files matched your search
@@ -8,6 +8,7 @@
|
||||
#include "toolchain/check/convert.h"
|
||||
#include "toolchain/check/cpp/export.h"
|
||||
#include "toolchain/check/eval.h"
|
||||
#include "toolchain/check/full_pattern_stack.h"
|
||||
#include "toolchain/check/function.h"
|
||||
#include "toolchain/check/generic.h"
|
||||
#include "toolchain/check/impl.h"
|
||||
@@ -457,19 +458,26 @@ auto ComputeClassObjectRepr(Context& context, Parse::ClassDefinitionId node_id,
|
||||
}
|
||||
|
||||
auto InNonStaticFieldDecl(Context& context) -> bool {
|
||||
return context.full_pattern_stack().IsCurrentKindClassScopeVarDecl() &&
|
||||
return context.full_pattern_stack().CurrentKindIs(
|
||||
FullPatternStack::Kind::ClassScopeVarDecl) &&
|
||||
!context.decl_introducer_state_stack()
|
||||
.innermost()
|
||||
.modifier_set.HasAnyOf(KeywordModifierSet::Static);
|
||||
}
|
||||
|
||||
auto InStaticClassScopeVar(Context& context) -> bool {
|
||||
return context.full_pattern_stack().IsCurrentKindClassScopeVarDecl() &&
|
||||
return context.full_pattern_stack().CurrentKindIs(
|
||||
FullPatternStack::Kind::ClassScopeVarDecl) &&
|
||||
context.decl_introducer_state_stack()
|
||||
.innermost()
|
||||
.modifier_set.HasAnyOf(KeywordModifierSet::Static);
|
||||
}
|
||||
|
||||
auto InClassScopeLet(Context& context) -> bool {
|
||||
return context.full_pattern_stack().CurrentKindIs(
|
||||
FullPatternStack::Kind::ClassScopeLetDecl);
|
||||
}
|
||||
|
||||
auto LookupClassFieldByStructField(Context& context,
|
||||
const SemIR::NameScope& class_scope,
|
||||
const SemIR::StructTypeField& struct_field)
|
||||
|
||||
@@ -34,6 +34,9 @@ auto InNonStaticFieldDecl(Context& context) -> bool;
|
||||
// Whether a static class var decl is currently being checked.
|
||||
auto InStaticClassScopeVar(Context& context) -> bool;
|
||||
|
||||
// Whether a class scope `let` is currently being checked.
|
||||
auto InClassScopeLet(Context& context) -> bool;
|
||||
|
||||
// Returns the `FieldDecl` in the class scope corresponding to the given field
|
||||
// of the class's object representation, or `nullopt` if there is none, such as
|
||||
// for a base class. If the class was imported, this loads the field. See
|
||||
|
||||
@@ -70,6 +70,11 @@ class DeclIntroducerStateStack {
|
||||
// declaration currently being processed.
|
||||
auto innermost() -> DeclIntroducerState& { return stack_.back(); }
|
||||
|
||||
// Returns whether the innermost declaration is of kind `kind`.
|
||||
auto InnermostKindIs(Lex::TokenKind kind) const -> bool {
|
||||
return !stack_.empty() && stack_.back().kind == kind;
|
||||
}
|
||||
|
||||
// Finishes a declaration introducer `Kind` and returns the produced state.
|
||||
template <Lex::TokenKind::RawEnumType Kind>
|
||||
requires(IsDeclIntroducer<Kind>())
|
||||
|
||||
@@ -61,11 +61,12 @@ auto DeclNameStack::MakeUnqualifiedName(SemIR::LocId loc_id,
|
||||
return context;
|
||||
}
|
||||
|
||||
auto DeclNameStack::PushScopeAndStartName() -> void {
|
||||
auto DeclNameStack::PushScopeAndStartName(
|
||||
ScopeStack::NonConstantAccess non_constant_access) -> void {
|
||||
decl_name_stack_.push_back(MakeEmptyNameContext());
|
||||
|
||||
// Create a scope for any parameters introduced in this name.
|
||||
context_->scope_stack().PushForDeclName();
|
||||
context_->scope_stack().PushForDeclName(non_constant_access);
|
||||
|
||||
UpdateAccessContext();
|
||||
}
|
||||
|
||||
@@ -184,7 +184,9 @@ class DeclNameStack {
|
||||
// Pushes processing of a new declaration name, which will be used
|
||||
// contextually, and prepares to enter scopes for that name. To pop this
|
||||
// state, `FinishName` and `PopScope` must be called, in that order.
|
||||
auto PushScopeAndStartName() -> void;
|
||||
auto PushScopeAndStartName(ScopeStack::NonConstantAccess non_constant_access =
|
||||
ScopeStack::NonConstantAccess::Disallowed)
|
||||
-> void;
|
||||
|
||||
// Creates and returns a name context corresponding to declaring an
|
||||
// unqualified name in the current context. This is suitable for adding to
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
namespace Carbon::Check {
|
||||
|
||||
auto FullPatternStack::StartPatternInitializer() -> void {
|
||||
CARBON_CHECK(kind_stack_.back() == Kind::ClassScopeVarDecl ||
|
||||
kind_stack_.back() == Kind::NameBindingDecl);
|
||||
CARBON_CHECK(IsAnyNameBindingDeclKind(kind_stack_.back()));
|
||||
for (auto& [name_id, inst_id] : bind_name_stack_.PeekArray()) {
|
||||
CARBON_CHECK(
|
||||
inst_id == SemIR::InstId::InitTombstone,
|
||||
|
||||
@@ -43,9 +43,12 @@ class FullPatternStack {
|
||||
// A name-binding declaration, such as a `let` or `var` statement.
|
||||
NameBindingDecl,
|
||||
|
||||
// A `var` field declaration inside a class.
|
||||
// A `var` declaration of a field or static var inside a class.
|
||||
ClassScopeVarDecl,
|
||||
|
||||
// A `let` declaration inside a class.
|
||||
ClassScopeLetDecl,
|
||||
|
||||
// The implicit parameter list of a function or impl declaration.
|
||||
ImplicitParamList,
|
||||
|
||||
@@ -63,14 +66,20 @@ class FullPatternStack {
|
||||
NotInEitherParamList
|
||||
};
|
||||
|
||||
// Returns whether `kind` is the kind of a name binding declaration.
|
||||
static auto IsAnyNameBindingDeclKind(Kind kind) -> bool {
|
||||
return kind == Kind::NameBindingDecl || kind == Kind::ClassScopeVarDecl ||
|
||||
kind == Kind::ClassScopeLetDecl;
|
||||
}
|
||||
|
||||
auto empty() const -> bool { return kind_stack_.empty(); }
|
||||
|
||||
// The kind of the current full-pattern.
|
||||
auto CurrentKind() const -> Kind { return kind_stack_.back(); }
|
||||
|
||||
// Whether the kind of the current full-pattern is a class `var` decl.
|
||||
auto IsCurrentKindClassScopeVarDecl() -> bool {
|
||||
return !empty() && CurrentKind() == Kind::ClassScopeVarDecl;
|
||||
// Returns whether the kind of the current full-pattern is `kind`.
|
||||
auto CurrentKindIs(Kind kind) -> bool {
|
||||
return !empty() && CurrentKind() == kind;
|
||||
}
|
||||
|
||||
// Marks the start of a new full-pattern for a parameterized entity
|
||||
@@ -84,8 +93,8 @@ class FullPatternStack {
|
||||
}
|
||||
|
||||
// Marks the start of a new full-pattern for a name binding declaration.
|
||||
auto PushNameBindingDecl() -> void {
|
||||
kind_stack_.push_back(Kind::NameBindingDecl);
|
||||
auto PushNameBindingDecl(Kind kind = Kind::NameBindingDecl) -> void {
|
||||
kind_stack_.push_back(kind);
|
||||
bind_name_stack_.PushArray();
|
||||
var_pattern_stack_.PushArray();
|
||||
next_var_index_stack_.push_back(-1);
|
||||
@@ -93,10 +102,12 @@ class FullPatternStack {
|
||||
|
||||
// Marks the start of a new full-pattern for a class `var` declaration.
|
||||
auto PushClassScopeVarDecl() -> void {
|
||||
kind_stack_.push_back(Kind::ClassScopeVarDecl);
|
||||
bind_name_stack_.PushArray();
|
||||
var_pattern_stack_.PushArray();
|
||||
next_var_index_stack_.push_back(-1);
|
||||
PushNameBindingDecl(Kind::ClassScopeVarDecl);
|
||||
}
|
||||
|
||||
// Marks the start of a new full-pattern for a class `let` declaration.
|
||||
auto PushClassScopeLetDecl() -> void {
|
||||
PushNameBindingDecl(Kind::ClassScopeLetDecl);
|
||||
}
|
||||
|
||||
// Marks the start of the current parameterized entity's implicit parameter
|
||||
@@ -170,8 +181,7 @@ class FullPatternStack {
|
||||
// needs to be emitted early; otherwise the `VarStorage` should be emitted on
|
||||
// demand during pattern matching.
|
||||
auto AddLocalVarPattern(VarInfo var_info) -> void {
|
||||
CARBON_CHECK(kind_stack_.back() == Kind::ClassScopeVarDecl ||
|
||||
kind_stack_.back() == Kind::NameBindingDecl);
|
||||
CARBON_CHECK(IsAnyNameBindingDeclKind(kind_stack_.back()));
|
||||
CARBON_CHECK(next_var_index_stack_.back() < 0);
|
||||
var_pattern_stack_.AppendToTop(var_info);
|
||||
}
|
||||
@@ -183,8 +193,7 @@ class FullPatternStack {
|
||||
// exactly once for each inst pair passed to `AddLocalVarPattern`, and in the
|
||||
// same order.
|
||||
auto GetLocalVarStorage(SemIR::InstId var_pattern_id) -> SemIR::InstId {
|
||||
CARBON_CHECK(kind_stack_.back() == Kind::ClassScopeVarDecl ||
|
||||
kind_stack_.back() == Kind::NameBindingDecl);
|
||||
CARBON_CHECK(IsAnyNameBindingDeclKind(kind_stack_.back()));
|
||||
auto& index = next_var_index_stack_.back();
|
||||
CARBON_CHECK(index >= 0);
|
||||
auto var_info = var_pattern_stack_.PeekArray()[index];
|
||||
|
||||
@@ -60,7 +60,7 @@ auto GlobalInit::Finalize() -> void {
|
||||
|
||||
auto UseGlobalInit(Context& context) -> bool {
|
||||
return context.scope_stack().PeekIndex() == ScopeIndex::Package ||
|
||||
InStaticClassScopeVar(context);
|
||||
InStaticClassScopeVar(context) || InClassScopeLet(context);
|
||||
}
|
||||
|
||||
} // namespace Carbon::Check
|
||||
@@ -23,7 +23,11 @@ auto HandleParseNode(Context& context, Parse::AliasIntroducerId /*node_id*/)
|
||||
StartGenericDecl(context);
|
||||
// Optional modifiers and the name follow.
|
||||
context.decl_introducer_state_stack().Push<Lex::TokenKind::Alias>();
|
||||
context.decl_name_stack().PushScopeAndStartName();
|
||||
// Aliases can't have non-constant targets, but we diagnose that later. Don't
|
||||
// diagnose references to enclosing non-constant state in name lookup since
|
||||
// that would produce a less useful error message.
|
||||
context.decl_name_stack().PushScopeAndStartName(
|
||||
ScopeStack::NonConstantAccess::Permitted);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -530,8 +530,9 @@ static auto HandleAnyBindingPattern(Context& context, Parse::NodeId node_id,
|
||||
break;
|
||||
}
|
||||
|
||||
case FullPatternStack::Kind::NameBindingDecl:
|
||||
case FullPatternStack::Kind::ClassScopeVarDecl: {
|
||||
case FullPatternStack::Kind::ClassScopeLetDecl:
|
||||
case FullPatternStack::Kind::ClassScopeVarDecl:
|
||||
case FullPatternStack::Kind::NameBindingDecl: {
|
||||
if (node_kind == Parse::NodeKind::FormBindingPattern) {
|
||||
return context.TODO(node_id, "support local form bindings");
|
||||
}
|
||||
|
||||
@@ -177,23 +177,23 @@ struct ChoiceInfo {
|
||||
int num_alternative_bits;
|
||||
};
|
||||
|
||||
// Builds a `let` binding for an alternative without parameters as a member of
|
||||
// the resulting class for the Choice definition. If the alternative was `Alt`
|
||||
// then the binding will be like:
|
||||
// Builds a binding for an alternative without parameters as a member of the
|
||||
// resulting class for the Choice definition. If the alternative was `Alt` then
|
||||
// the binding will be like:
|
||||
// ```
|
||||
// let Alt: ChoiceType = <ChoiceType with Alt selected>;
|
||||
// alias Alt = <ChoiceType with Alt selected>;
|
||||
// ```
|
||||
static auto MakeLetBinding(Context& context, const ChoiceInfo& choice_info,
|
||||
int alternative_index,
|
||||
const Context::ChoiceDeferredBinding& binding)
|
||||
-> void {
|
||||
static auto MakeBinding(Context& context, const ChoiceInfo& choice_info,
|
||||
int alternative_index,
|
||||
const Context::ChoiceDeferredBinding& binding) -> void {
|
||||
SemIR::InstId discriminant_value_id = [&] {
|
||||
if (choice_info.num_alternative_bits == 0) {
|
||||
return AddInst(context, binding.node_id,
|
||||
SemIR::TupleLiteral{
|
||||
.type_id = GetTupleType(context, {}),
|
||||
.elements_id = SemIR::InstBlockId::Empty,
|
||||
});
|
||||
return AddInst<SemIR::TupleLiteral>(
|
||||
context, binding.node_id,
|
||||
{
|
||||
.type_id = GetTupleType(context, {}),
|
||||
.elements_id = SemIR::InstBlockId::Empty,
|
||||
});
|
||||
} else {
|
||||
return MakeIntLiteral(context, binding.node_id,
|
||||
context.ints().Add(alternative_index));
|
||||
@@ -205,28 +205,29 @@ static auto MakeLetBinding(Context& context, const ChoiceInfo& choice_info,
|
||||
|
||||
auto self_value_id = ConvertToValueOfType(
|
||||
context, binding.node_id,
|
||||
AddInst(context, binding.node_id,
|
||||
SemIR::StructLiteral{
|
||||
.type_id = choice_info.self_struct_type_id,
|
||||
.elements_id =
|
||||
[&] {
|
||||
context.inst_block_stack().Push();
|
||||
context.inst_block_stack().AddInstId(
|
||||
discriminant_value_id);
|
||||
return context.inst_block_stack().Pop();
|
||||
}(),
|
||||
}),
|
||||
AddInst<SemIR::StructLiteral>(
|
||||
context, binding.node_id,
|
||||
{
|
||||
.type_id = choice_info.self_struct_type_id,
|
||||
.elements_id =
|
||||
[&] {
|
||||
context.inst_block_stack().Push();
|
||||
context.inst_block_stack().AddInstId(discriminant_value_id);
|
||||
return context.inst_block_stack().Pop();
|
||||
}(),
|
||||
}),
|
||||
choice_info.self_type_id);
|
||||
|
||||
auto entity_name_id = context.entity_names().Add(
|
||||
{.name_id = binding.name_component.name_id,
|
||||
.parent_scope_id = choice_info.name_scope_id});
|
||||
auto bind_name_id = AddInst(context, binding.node_id,
|
||||
SemIR::WrapperBinding{
|
||||
.type_id = choice_info.self_type_id,
|
||||
.entity_name_id = entity_name_id,
|
||||
.value_id = self_value_id,
|
||||
});
|
||||
auto bind_name_id =
|
||||
AddInst<SemIR::AliasBinding>(context, binding.node_id,
|
||||
{
|
||||
.type_id = choice_info.self_type_id,
|
||||
.entity_name_id = entity_name_id,
|
||||
.value_id = self_value_id,
|
||||
});
|
||||
context.name_scopes()
|
||||
.Get(choice_info.name_scope_id)
|
||||
.AddRequired({.name_id = binding.name_component.name_id,
|
||||
@@ -278,12 +279,11 @@ auto HandleParseNode(Context& context, Parse::ChoiceDefinitionId node_id)
|
||||
});
|
||||
auto fields_id =
|
||||
context.struct_type_fields().AddCanonical(struct_type_fields);
|
||||
auto choice_witness_id = AddInst(
|
||||
auto choice_witness_id = AddInst<SemIR::CompleteTypeWitness>(
|
||||
context, node_id,
|
||||
SemIR::CompleteTypeWitness{
|
||||
.type_id = GetSingletonType(context, SemIR::WitnessType::TypeInstId),
|
||||
.object_repr_type_inst_id = context.types().GetTypeInstId(
|
||||
GetStructType(context, fields_id))});
|
||||
{.type_id = GetSingletonType(context, SemIR::WitnessType::TypeInstId),
|
||||
.object_repr_type_inst_id =
|
||||
context.types().GetTypeInstId(GetStructType(context, fields_id))});
|
||||
auto& class_info = context.classes().Get(class_id);
|
||||
class_info.complete_type_witness_id = choice_witness_id;
|
||||
|
||||
@@ -296,13 +296,13 @@ auto HandleParseNode(Context& context, Parse::ChoiceDefinitionId node_id)
|
||||
// `FinishGenericDefinition`, so we can't use it as a complete type yet. But
|
||||
// this also potentially adds things to the generic definition, so we can't
|
||||
// call `FinsihGenericDefinition` before this call, either.
|
||||
MakeLetBinding(context,
|
||||
ChoiceInfo{.self_type_id = class_info.self_type_id,
|
||||
.name_scope_id = class_info.scope_id,
|
||||
.self_struct_type_id = self_struct_type_id,
|
||||
.discriminant_type_id = discriminant_type_id,
|
||||
.num_alternative_bits = num_alternative_bits},
|
||||
i, deferred_binding);
|
||||
MakeBinding(context,
|
||||
ChoiceInfo{.self_type_id = class_info.self_type_id,
|
||||
.name_scope_id = class_info.scope_id,
|
||||
.self_struct_type_id = self_struct_type_id,
|
||||
.discriminant_type_id = discriminant_type_id,
|
||||
.num_alternative_bits = num_alternative_bits},
|
||||
i, deferred_binding);
|
||||
}
|
||||
|
||||
// The scopes and blocks for the choice itself.
|
||||
|
||||
@@ -68,9 +68,13 @@ static auto HandleIntroducer(Context& context, Parse::NodeId node_id) -> bool {
|
||||
// Push a bracketing node and pattern block to establish the pattern context.
|
||||
context.node_stack().Push(node_id);
|
||||
context.pattern_block_stack().Push();
|
||||
if (context.scope_stack().TryGetCurrentScopeAs<SemIR::ClassDecl>() &&
|
||||
Kind == Lex::TokenKind::Var) {
|
||||
context.full_pattern_stack().PushClassScopeVarDecl();
|
||||
if (context.scope_stack().TryGetCurrentScopeAs<SemIR::ClassDecl>()) {
|
||||
if constexpr (Kind == Lex::TokenKind::Var) {
|
||||
context.full_pattern_stack().PushClassScopeVarDecl();
|
||||
} else {
|
||||
static_assert(Kind == Lex::TokenKind::Let);
|
||||
context.full_pattern_stack().PushClassScopeLetDecl();
|
||||
}
|
||||
} else {
|
||||
context.full_pattern_stack().PushNameBindingDecl();
|
||||
}
|
||||
@@ -129,6 +133,7 @@ auto HandleParseNode(Context& context, Parse::VariablePatternId node_id)
|
||||
context, node_id,
|
||||
{.type_id = type_id, .subpattern_id = subpattern_id});
|
||||
break;
|
||||
case FullPatternStack::Kind::ClassScopeLetDecl:
|
||||
case FullPatternStack::Kind::NameBindingDecl:
|
||||
pattern_id = add_local_var();
|
||||
break;
|
||||
@@ -316,7 +321,6 @@ auto HandleParseNode(Context& context, Parse::LetDeclId node_id) -> bool {
|
||||
auto decl_info =
|
||||
HandleDecl<Lex::TokenKind::Let, Parse::NodeKind::LetIntroducer,
|
||||
Parse::NodeKind::LetInitializer>(context, node_id);
|
||||
context.decl_introducer_state_stack().Pop<Lex::TokenKind::Let>();
|
||||
|
||||
LimitModifiersOnDecl(
|
||||
context, decl_info.introducer,
|
||||
@@ -351,6 +355,11 @@ auto HandleParseNode(Context& context, Parse::LetDeclId node_id) -> bool {
|
||||
}
|
||||
|
||||
context.full_pattern_stack().PopFullPattern();
|
||||
|
||||
// Keep the introducer on the stack until we've finished processing the
|
||||
// declaration so we can detect when we're processing an initializer for a
|
||||
// global let or var.
|
||||
context.decl_introducer_state_stack().Pop<Lex::TokenKind::Let>();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -110,6 +110,9 @@ static auto GetIdentifierAsNameId(
|
||||
static auto HandleNameAsExpr(Context& context, Parse::NodeId node_id,
|
||||
SemIR::NameId name_id) -> SemIR::InstId {
|
||||
auto result = LookupUnqualifiedName(context, node_id, name_id);
|
||||
if (!TryGetLookupResultInCurrentScope(context, node_id, name_id, result)) {
|
||||
return SemIR::ErrorInst::InstId;
|
||||
}
|
||||
return BuildNameRef(context, node_id, name_id,
|
||||
result.scope_result.target_inst_id(), result.specific_id);
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "toolchain/check/context.h"
|
||||
#include "toolchain/check/convert.h"
|
||||
#include "toolchain/check/eval.h"
|
||||
#include "toolchain/check/full_pattern_stack.h"
|
||||
#include "toolchain/check/handle.h"
|
||||
#include "toolchain/check/inst.h"
|
||||
#include "toolchain/check/pattern.h"
|
||||
@@ -115,19 +116,19 @@ auto HandleParseNode(Context& context, Parse::TuplePatternId node_id) -> bool {
|
||||
context.node_stack()
|
||||
.PopAndDiscardSoloNodeId<Parse::NodeKind::TuplePatternStart>();
|
||||
|
||||
if (InNonStaticFieldDecl(context)) {
|
||||
CARBON_DIAGNOSTIC(FieldWithTuplePattern, Error,
|
||||
"tuple pattern in field declaration");
|
||||
context.emitter().Emit(node_id, FieldWithTuplePattern);
|
||||
context.node_stack().Push(node_id, SemIR::ErrorInst::InstId);
|
||||
BeginExprRegionForPattern(context);
|
||||
return true;
|
||||
}
|
||||
|
||||
const auto& inst_block = context.inst_blocks().Get(refs_id);
|
||||
llvm::SmallVector<SemIR::InstId> type_inst_ids;
|
||||
type_inst_ids.reserve(inst_block.size());
|
||||
for (auto inst : inst_block) {
|
||||
if (InNonStaticFieldDecl(context)) {
|
||||
CARBON_DIAGNOSTIC(FieldWithTuplePattern, Error,
|
||||
"found tuple pattern in class `var` decl");
|
||||
context.emitter().Emit(LocIdForDiagnostics::TokenOnly(node_id),
|
||||
FieldWithTuplePattern);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
auto type_id = ExtractScrutineeType(context.sem_ir(),
|
||||
context.insts().Get(inst).type_id());
|
||||
type_inst_ids.push_back(context.types().GetTypeInstId(type_id));
|
||||
@@ -153,20 +154,6 @@ auto HandleParseNode(Context& context, Parse::StructPatternId node_id) -> bool {
|
||||
EndExprRegionForPattern(context, context.node_stack());
|
||||
}
|
||||
|
||||
// TODO: Reject StructPatterns in classes during Parse, or treat patterns in a
|
||||
// class scope as patterns and generate the FieldDecl insts in a later
|
||||
// pattern-matching step.
|
||||
if (context.scope_stack().TryGetCurrentScopeAs<SemIR::ClassDecl>()) {
|
||||
bool is_var = context.full_pattern_stack().IsCurrentKindClassScopeVarDecl();
|
||||
CARBON_DIAGNOSTIC(
|
||||
FieldWithStructPattern, Error,
|
||||
"found struct pattern in class member {0:var|let} declaration",
|
||||
Diagnostics::BoolAsSelect);
|
||||
context.emitter().Emit(node_id, FieldWithStructPattern, is_var);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!context.node_stack().PeekIs(Parse::NodeCategory::MemberName)) {
|
||||
// Remove the last parameter from the node stack before collecting names.
|
||||
context.param_and_arg_refs_stack().EndNoPop(
|
||||
@@ -184,8 +171,13 @@ auto HandleParseNode(Context& context, Parse::StructPatternId node_id) -> bool {
|
||||
context.node_stack()
|
||||
.PopAndDiscardSoloNodeId<Parse::NodeKind::StructPatternStart>();
|
||||
|
||||
if (DiagnoseDuplicateNames(context, field_name_nodes, fields,
|
||||
StructKind::StructPattern)) {
|
||||
if (InNonStaticFieldDecl(context)) {
|
||||
CARBON_DIAGNOSTIC(FieldWithStructPattern, Error,
|
||||
"struct pattern in field declaration");
|
||||
context.emitter().Emit(node_id, FieldWithStructPattern);
|
||||
context.node_stack().Push(node_id, SemIR::ErrorInst::InstId);
|
||||
} else if (DiagnoseDuplicateNames(context, field_name_nodes, fields,
|
||||
StructKind::StructPattern)) {
|
||||
context.node_stack().Push(node_id, SemIR::ErrorInst::InstId);
|
||||
} else {
|
||||
auto type_id = GetPatternType(
|
||||
|
||||
@@ -19,8 +19,11 @@ auto HandleParseNode(Context& context, Parse::TypeOfExprOpenParenId /*node_id*/)
|
||||
// separate expression region that is not part of the enclosing control flow.
|
||||
context.inst_block_stack().Push();
|
||||
context.region_stack().PushRegion(context.inst_block_stack().PeekOrAdd());
|
||||
// Any cleanups created by the operand are never needed.
|
||||
context.scope_stack().PushForSameRegion(ScopeStack::CleanupScopeKind::None);
|
||||
// Any cleanups created by the operand are never needed, and enclosing
|
||||
// non-constant locals can be referenced in unevaluated `typeof` operands.
|
||||
context.scope_stack().PushForSameRegion(
|
||||
ScopeStack::CleanupScopeKind::None,
|
||||
ScopeStack::NonConstantAccess::Unevaluated);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -327,6 +327,10 @@ static auto LookupMemberNameInScope(Context& context, SemIR::LocId loc_id,
|
||||
return SemIR::ErrorInst::InstId;
|
||||
}
|
||||
|
||||
if (!TryGetLookupResultInCurrentScope(context, loc_id, name_id, result)) {
|
||||
return SemIR::ErrorInst::InstId;
|
||||
}
|
||||
|
||||
// TODO: Find a way to use `WrapInstForSpecific` here.
|
||||
auto type_id =
|
||||
SemIR::GetTypeOfInstInSpecific(context.sem_ir(), result.specific_id,
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "toolchain/diagnostics/format_providers.h"
|
||||
#include "toolchain/sem_ir/generic.h"
|
||||
#include "toolchain/sem_ir/ids.h"
|
||||
#include "toolchain/sem_ir/import_ir.h"
|
||||
#include "toolchain/sem_ir/name_scope.h"
|
||||
#include "toolchain/sem_ir/typed_insts.h"
|
||||
|
||||
@@ -116,6 +117,79 @@ static auto GetGenericForInst(Context& context, SemIR::InstId inst_id)
|
||||
return SemIR::GenericId::None;
|
||||
}
|
||||
|
||||
// Returns whether `inst_id` is, or is imported from, a `WrapperBinding`.
|
||||
static auto IsWrapperBinding(Context& context, SemIR::InstId inst_id) -> bool {
|
||||
auto [canonical_ir, canonical_inst_id] =
|
||||
SemIR::GetCanonicalFileAndInstId(&context.sem_ir(), inst_id);
|
||||
return canonical_ir->insts().Is<SemIR::WrapperBinding>(canonical_inst_id);
|
||||
}
|
||||
|
||||
auto TryGetLookupResultInCurrentScope(Context& context, SemIR::LocId loc_id,
|
||||
SemIR::NameId name_id,
|
||||
LookupResult& result) -> bool {
|
||||
if (!result.scope_result.is_found()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
auto target_inst_id = result.scope_result.target_inst_id();
|
||||
if (SemIR::GetConstantValueInSpecific(context.sem_ir(), result.specific_id,
|
||||
target_inst_id)
|
||||
.is_constant()) {
|
||||
// Constants don't need any special logic to access them.
|
||||
return true;
|
||||
}
|
||||
|
||||
auto type_id = context.insts().Get(target_inst_id).type_id();
|
||||
if (type_id == SemIR::ErrorInst::TypeId) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (result.lexical_scope_index.has_value()) {
|
||||
// A non-constant entity in a lexical scope is a local.
|
||||
switch (context.scope_stack().GetNonConstantAccess(
|
||||
result.lexical_scope_index)) {
|
||||
case ScopeStack::NonConstantAccess::Permitted:
|
||||
case ScopeStack::NonConstantAccess::Unevaluated:
|
||||
return true;
|
||||
|
||||
case ScopeStack::NonConstantAccess::Disallowed: {
|
||||
CARBON_DIAGNOSTIC(
|
||||
UncapturedLocal, Error,
|
||||
"cannot reference local `{0}` declared in enclosing scope",
|
||||
SemIR::NameId);
|
||||
CARBON_DIAGNOSTIC_LABEL(UncapturedLocalDecl, Info, "declared here");
|
||||
context.emitter()
|
||||
.Build(loc_id, UncapturedLocal, name_id)
|
||||
.Attach(target_inst_id, UncapturedLocalDecl)
|
||||
.Emit();
|
||||
return false;
|
||||
}
|
||||
|
||||
case ScopeStack::NonConstantAccess::Captured:
|
||||
// TODO: Record the capture and build an instruction to access it.
|
||||
context.TODO(loc_id, "capture of enclosing local");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// A non-constant entity in a non-lexical scope is a global or static
|
||||
// binding.
|
||||
CARBON_DCHECK(IsWrapperBinding(context, target_inst_id),
|
||||
"Unexpected non-constant entity in non-lexical scope: {0}",
|
||||
context.insts().Get(target_inst_id));
|
||||
|
||||
if (result.specific_id.has_value()) {
|
||||
context.TODO(loc_id, "non-constant `let` binding in generic");
|
||||
return false;
|
||||
}
|
||||
|
||||
auto global_ref_id = AddInst<SemIR::GlobalRef>(
|
||||
context, loc_id, {.type_id = type_id, .inst_id = target_inst_id});
|
||||
result.scope_result = SemIR::ScopeLookupResult::MakeFound(
|
||||
global_ref_id, result.scope_result.access_kind());
|
||||
return true;
|
||||
}
|
||||
|
||||
auto LookupUnqualifiedName(Context& context, SemIR::LocId loc_id,
|
||||
SemIR::NameId name_id, bool required)
|
||||
-> LookupResult {
|
||||
@@ -123,9 +197,10 @@ auto LookupUnqualifiedName(Context& context, SemIR::LocId loc_id,
|
||||
|
||||
// Find the results from ancestor lexical scopes. These will be combined with
|
||||
// results from non-lexical scopes such as namespaces and classes.
|
||||
auto [lexical_result, non_lexical_scopes] =
|
||||
auto [lexical_lookup_result, non_lexical_scopes] =
|
||||
context.scope_stack().LookupInLexicalScopes(
|
||||
name_id, loc_id, IsCurrentPositionReachable(context));
|
||||
auto lexical_result = lexical_lookup_result.inst_id;
|
||||
|
||||
// Walk the non-lexical scopes and perform lookups into each of them.
|
||||
for (auto [index, lookup_scope_id, specific_id] :
|
||||
@@ -187,9 +262,11 @@ auto LookupUnqualifiedName(Context& context, SemIR::LocId loc_id,
|
||||
if (decl_generic_id.has_value() && decl_generic_id != current_generic_id) {
|
||||
specific_id = context.generics().GetSelfSpecific(decl_generic_id);
|
||||
}
|
||||
|
||||
return {.specific_id = specific_id,
|
||||
.scope_result = SemIR::ScopeLookupResult::MakeFound(
|
||||
lexical_result, SemIR::AccessKind::Public)};
|
||||
lexical_result, SemIR::AccessKind::Public),
|
||||
.lexical_scope_index = lexical_lookup_result.scope_index};
|
||||
}
|
||||
|
||||
// We didn't find anything at all.
|
||||
|
||||
@@ -33,6 +33,11 @@ struct LookupResult {
|
||||
|
||||
// The result from the lookup in the scope.
|
||||
SemIR::ScopeLookupResult scope_result;
|
||||
|
||||
// If the result was found in a lexical scope, the index of that scope.
|
||||
// `None` if the result was found in a non-lexical scope, such as a namespace
|
||||
// or class, or wasn't found.
|
||||
ScopeIndex lexical_scope_index = ScopeIndex::None;
|
||||
};
|
||||
|
||||
// Information about an access.
|
||||
@@ -64,6 +69,21 @@ auto LookupUnqualifiedName(Context& context, SemIR::LocId loc_id,
|
||||
SemIR::NameId name_id, bool required = true)
|
||||
-> LookupResult;
|
||||
|
||||
// Prepares the result of a name lookup to be used as an expression in the
|
||||
// current scope. Name lookup doesn't check or build access to non-constant
|
||||
// entities; callers that use the result as a value should call this first.
|
||||
//
|
||||
// If the result names a non-constant entity, checks that it can be referenced
|
||||
// from the current position and, if needed, replaces the target with an
|
||||
// instruction that accesses it, such as a `GlobalRef` for a global binding.
|
||||
//
|
||||
// Returns `true` if the lookup result is usable, `false` if an error has been
|
||||
// diagnosed by either name lookup or by this function and no name reference
|
||||
// should be built.
|
||||
auto TryGetLookupResultInCurrentScope(Context& context, SemIR::LocId loc_id,
|
||||
SemIR::NameId name_id,
|
||||
LookupResult& result) -> bool;
|
||||
|
||||
// Performs a name lookup in a specified scope, returning the referenced
|
||||
// `InstId`. Does not look into extended scopes. Returns `InstId::None` if the
|
||||
// name is not found.
|
||||
|
||||
@@ -81,7 +81,9 @@ struct CalleeState {
|
||||
};
|
||||
|
||||
// State for local pattern matching.
|
||||
struct LocalState {};
|
||||
struct LocalState {
|
||||
bool in_global_init;
|
||||
};
|
||||
|
||||
// State for thunk pattern matching.
|
||||
struct ThunkState {
|
||||
@@ -432,6 +434,8 @@ auto MatchContext::DoPostWork(State state,
|
||||
}
|
||||
|
||||
if (specific_id_stack_.size() > 1) {
|
||||
// TODO: Is this dead code? It's not reached in any of our tests.
|
||||
|
||||
// If anything has been pushed onto the specific stack, that means
|
||||
// that `binding_pattern` is a constant inst. The bindings for constant
|
||||
// insts are not precomputed (see the documentation for bind_name_map), so
|
||||
@@ -442,6 +446,9 @@ auto MatchContext::DoPostWork(State state,
|
||||
return;
|
||||
}
|
||||
|
||||
auto* local_state = std::get_if<LocalState*>(&state);
|
||||
bool in_global_init = local_state && (*local_state)->in_global_init;
|
||||
|
||||
// We're logically consuming this map entry, so we invalidate it in order
|
||||
// to avoid accidentally consuming it twice.
|
||||
auto [bind_name_id, type_expr_region_id] =
|
||||
@@ -449,15 +456,38 @@ auto MatchContext::DoPostWork(State state,
|
||||
{.bind_name_id = SemIR::InstId::None,
|
||||
.type_expr_region_id = SemIR::ExprRegionId::None});
|
||||
if (type_expr_region_id.has_value()) {
|
||||
// For a global binding, put the type expression in the file block, not in
|
||||
// the global_init function.
|
||||
if (in_global_init) {
|
||||
context_.global_init().Suspend();
|
||||
}
|
||||
|
||||
InsertHere(context_, type_expr_region_id);
|
||||
|
||||
if (in_global_init) {
|
||||
context_.global_init().Resume();
|
||||
}
|
||||
}
|
||||
CARBON_CHECK(bind_name_id.has_value(), "bind_name_map entry used twice");
|
||||
|
||||
// For a global binding, put the binding in the file block if it's constant.
|
||||
// Otherwise it needs to go in the global_init block so that it can see the
|
||||
// non-constant value.
|
||||
bool suspend_global_init =
|
||||
in_global_init && context_.constant_values().Get(value_id).is_constant();
|
||||
if (suspend_global_init) {
|
||||
context_.global_init().Suspend();
|
||||
}
|
||||
|
||||
auto bind_name = context_.insts().GetAs<SemIR::AnyBinding>(bind_name_id);
|
||||
CARBON_CHECK(!bind_name.value_id.has_value());
|
||||
bind_name.value_id = value_id;
|
||||
ReplaceInstBeforeConstantUse(context_, bind_name_id, bind_name);
|
||||
context_.inst_block_stack().AddInstId(bind_name_id);
|
||||
|
||||
if (suspend_global_init) {
|
||||
context_.global_init().Resume();
|
||||
}
|
||||
}
|
||||
|
||||
// Returns the inst kind to use for the parameter corresponding to the given
|
||||
@@ -677,13 +707,6 @@ auto MatchContext::DoVarPreWorkImpl(State state,
|
||||
return scrutinee_id;
|
||||
}
|
||||
case CARBON_KIND(LocalState* _): {
|
||||
// TODO: Find a more efficient way to put these insts in the global_init
|
||||
// block (or drop the distinction between the global_init block and the
|
||||
// file scope?)
|
||||
if (UseGlobalInit(context_)) {
|
||||
context_.global_init().Resume();
|
||||
}
|
||||
|
||||
// In a `var`/`let` declaration, the `VarStorage` inst is created before
|
||||
// we start pattern matching.
|
||||
auto storage_id =
|
||||
@@ -698,10 +721,6 @@ auto MatchContext::DoVarPreWorkImpl(State state,
|
||||
AddInst<SemIR::Assign>(context_, SemIR::LocId(entry.pattern_id),
|
||||
{.lhs_id = storage_id, .rhs_id = init_id});
|
||||
}
|
||||
|
||||
if (UseGlobalInit(context_)) {
|
||||
context_.global_init().Suspend();
|
||||
}
|
||||
return storage_id;
|
||||
}
|
||||
case CARBON_KIND(CallerState* _): {
|
||||
@@ -1395,11 +1414,18 @@ auto CallerPatternMatch(
|
||||
auto LocalPatternMatch(Context& context, SemIR::LocId loc_id,
|
||||
SemIR::InstId pattern_id, SemIR::InstId scrutinee_id)
|
||||
-> void {
|
||||
LocalState state;
|
||||
bool use_global_init = UseGlobalInit(context);
|
||||
if (use_global_init) {
|
||||
context.global_init().Resume();
|
||||
}
|
||||
LocalState state = {.in_global_init = use_global_init};
|
||||
MatchContext match(context, loc_id);
|
||||
match.Match(&state,
|
||||
{.pattern_id = pattern_id,
|
||||
.work = MatchContext::PreWork{.scrutinee_id = scrutinee_id}});
|
||||
if (use_global_init) {
|
||||
context.global_init().Suspend();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace Carbon::Check
|
||||
@@ -54,6 +54,7 @@ auto ScopeStack::VerifyNextCompileTimeBindIndex(llvm::StringLiteral label,
|
||||
auto ScopeStack::Push(SemIR::InstId scope_inst_id, SemIR::NameScopeId scope_id,
|
||||
SemIR::SpecificId specific_id,
|
||||
CleanupScopeKind cleanup_scope_kind,
|
||||
NonConstantAccess non_constant_access,
|
||||
bool lexical_lookup_has_load_error) -> void {
|
||||
// If this scope doesn't have a specific of its own, it lives in the enclosing
|
||||
// scope's specific, if any.
|
||||
@@ -73,6 +74,7 @@ auto ScopeStack::Push(SemIR::InstId scope_inst_id, SemIR::NameScopeId scope_id,
|
||||
.lexical_lookup_has_load_error =
|
||||
LexicalLookupHasLoadError() || lexical_lookup_has_load_error,
|
||||
.cleanup_scope_kind = cleanup_scope_kind,
|
||||
.non_constant_access = non_constant_access,
|
||||
.cleanup_scope_depth = CleanupScopeDepth(destroy_id_stack_.size())});
|
||||
if (scope_stack_.back().is_lexical_scope()) {
|
||||
// For lexical lookups, unqualified lookup doesn't know how to find the
|
||||
@@ -100,9 +102,11 @@ auto ScopeStack::Push(SemIR::InstId scope_inst_id, SemIR::NameScopeId scope_id,
|
||||
VerifyNextCompileTimeBindIndex("Push", scope_stack_.back());
|
||||
}
|
||||
|
||||
auto ScopeStack::PushForDeclName() -> void {
|
||||
auto ScopeStack::PushForDeclName(NonConstantAccess non_constant_access)
|
||||
-> void {
|
||||
Push(SemIR::InstId::None, SemIR::NameScopeId::None, SemIR::SpecificId::None,
|
||||
CleanupScopeKind::None, /*lexical_lookup_has_load_error=*/false);
|
||||
CleanupScopeKind::None, non_constant_access,
|
||||
/*lexical_lookup_has_load_error=*/false);
|
||||
MarkNestingIfInReturnScope();
|
||||
}
|
||||
|
||||
@@ -113,11 +117,12 @@ auto ScopeStack::PushForEntity(SemIR::InstId scope_inst_id,
|
||||
CARBON_CHECK(scope_inst_id.has_value());
|
||||
CARBON_DCHECK(!sem_ir().insts().Is<SemIR::FunctionDecl>(scope_inst_id));
|
||||
Push(scope_inst_id, scope_id, specific_id, CleanupScopeKind::None,
|
||||
lexical_lookup_has_load_error);
|
||||
NonConstantAccess::Disallowed, lexical_lookup_has_load_error);
|
||||
MarkNestingIfInReturnScope();
|
||||
}
|
||||
|
||||
auto ScopeStack::PushForSameRegion(CleanupScopeKind cleanup_scope_kind)
|
||||
auto ScopeStack::PushForSameRegion(CleanupScopeKind cleanup_scope_kind,
|
||||
NonConstantAccess non_constant_access)
|
||||
-> void {
|
||||
if (cleanup_scope_kind == CleanupScopeKind::Inherited &&
|
||||
Peek().cleanup_scope_kind == CleanupScopeKind::None) {
|
||||
@@ -125,7 +130,8 @@ auto ScopeStack::PushForSameRegion(CleanupScopeKind cleanup_scope_kind)
|
||||
}
|
||||
|
||||
Push(SemIR::InstId::None, SemIR::NameScopeId::None, SemIR::SpecificId::None,
|
||||
cleanup_scope_kind, /*lexical_lookup_has_load_error=*/false);
|
||||
cleanup_scope_kind, non_constant_access,
|
||||
/*lexical_lookup_has_load_error=*/false);
|
||||
}
|
||||
|
||||
auto ScopeStack::PushForFunctionBody(SemIR::InstId scope_inst_id) -> void {
|
||||
@@ -134,7 +140,8 @@ auto ScopeStack::PushForFunctionBody(SemIR::InstId scope_inst_id) -> void {
|
||||
const auto& function = sem_ir().functions().Get(function_decl.function_id);
|
||||
auto self_specific = sem_ir().generics().GetSelfSpecific(function.generic_id);
|
||||
Push(scope_inst_id, SemIR::NameScopeId::None, self_specific,
|
||||
CleanupScopeKind::Owned, /*lexical_lookup_has_load_error=*/false);
|
||||
CleanupScopeKind::Owned, NonConstantAccess::Permitted,
|
||||
/*lexical_lookup_has_load_error=*/false);
|
||||
|
||||
return_scope_stack_.push_back(
|
||||
{.decl_id = scope_inst_id, .cleanup_scope_depth = cleanup_scope_depth()});
|
||||
@@ -278,7 +285,7 @@ auto ScopeStack::LookupInLexicalScopesWithin(SemIR::NameId name_id,
|
||||
auto ScopeStack::LookupInLexicalScopes(SemIR::NameId name_id,
|
||||
SemIR::LocId use_loc_id,
|
||||
bool is_reachable)
|
||||
-> std::pair<SemIR::InstId, llvm::ArrayRef<NonLexicalScope>> {
|
||||
-> std::pair<LexicalResult, llvm::ArrayRef<NonLexicalScope>> {
|
||||
// Find the results from lexical scopes. These will be combined with results
|
||||
// from non-lexical scopes such as namespaces and classes.
|
||||
llvm::ArrayRef<LexicalLookup::Result> lexical_results =
|
||||
@@ -286,8 +293,9 @@ auto ScopeStack::LookupInLexicalScopes(SemIR::NameId name_id,
|
||||
|
||||
// If we have no lexical results, check all non-lexical scopes.
|
||||
if (lexical_results.empty()) {
|
||||
return {LexicalLookupHasLoadError() ? SemIR::ErrorInst::InstId
|
||||
: SemIR::InstId::None,
|
||||
return {{.inst_id = LexicalLookupHasLoadError() ? SemIR::ErrorInst::InstId
|
||||
: SemIR::InstId::None,
|
||||
.scope_index = ScopeIndex::None},
|
||||
non_lexical_scope_stack_};
|
||||
}
|
||||
|
||||
@@ -302,10 +310,24 @@ auto ScopeStack::LookupInLexicalScopes(SemIR::NameId name_id,
|
||||
return scope.scope_index < index;
|
||||
});
|
||||
return {
|
||||
lexical_results.back().inst_id,
|
||||
{.inst_id = lexical_results.back().inst_id,
|
||||
.scope_index = lexical_results.back().scope_index},
|
||||
llvm::ArrayRef(first_non_lexical_scope, non_lexical_scope_stack_.end())};
|
||||
}
|
||||
|
||||
auto ScopeStack::GetNonConstantAccess(ScopeIndex target_scope_index) const
|
||||
-> NonConstantAccess {
|
||||
for (const auto& entry : llvm::reverse(scope_stack_)) {
|
||||
if (entry.index <= target_scope_index) {
|
||||
break;
|
||||
}
|
||||
if (entry.non_constant_access != NonConstantAccess::Permitted) {
|
||||
return entry.non_constant_access;
|
||||
}
|
||||
}
|
||||
return NonConstantAccess::Permitted;
|
||||
}
|
||||
|
||||
auto ScopeStack::LookupOrAddName(SemIR::NameId name_id, SemIR::InstId target_id,
|
||||
ScopeIndex scope_index, bool is_decl_reachable)
|
||||
-> SemIR::InstId {
|
||||
|
||||
@@ -71,12 +71,36 @@ class ScopeStack {
|
||||
SemIR::SpecificId specific_id;
|
||||
};
|
||||
|
||||
// How a scope affects access to non-constant values in enclosing lexical
|
||||
// scopes.
|
||||
enum class NonConstantAccess : uint8_t {
|
||||
// Non-constant locals in enclosing scopes can be used if permitted by the
|
||||
// parent scope (e.g. `if`, `for`, block scopes, and function body scopes
|
||||
// accessing their own parameter scope).
|
||||
Permitted,
|
||||
// Non-constant locals in enclosing scopes cannot be used (e.g. `class` or,
|
||||
// for now, nested `fn` scopes).
|
||||
Disallowed,
|
||||
// Non-constant locals in enclosing scopes can be used if captured.
|
||||
// TODO: This will eventually be used for `fn` scopes that have captures,
|
||||
// but is unused for now.
|
||||
Captured,
|
||||
// Non-constant locals in enclosing scopes can be used unconditionally
|
||||
// because the scope is unevaluated (e.g. `typeof(...)`).
|
||||
Unevaluated,
|
||||
};
|
||||
|
||||
// Information about a scope that has been temporarily removed from the stack.
|
||||
// This type is large, so moves of this type should be avoided.
|
||||
struct SuspendedScope;
|
||||
|
||||
// Pushes a scope for a declaration name's parameters.
|
||||
auto PushForDeclName() -> void;
|
||||
//
|
||||
// `non_constant_access` specifies whether lookups in this scope are allowed
|
||||
// to find and use non-constant locals in the enclosing scope. For most kinds
|
||||
// of nested declaration, this is not allowed.
|
||||
auto PushForDeclName(NonConstantAccess non_constant_access =
|
||||
NonConstantAccess::Disallowed) -> void;
|
||||
|
||||
// Pushes a non-function entity scope. Functions must use
|
||||
// `PushForFunctionBody` instead.
|
||||
@@ -87,8 +111,15 @@ class ScopeStack {
|
||||
// Pushes a scope which should be in the same region as the current scope.
|
||||
// These can be in a function without breaking `return` scoping. For example,
|
||||
// this is used by struct literals and code blocks.
|
||||
auto PushForSameRegion(CleanupScopeKind cleanup_scope_kind =
|
||||
CleanupScopeKind::Inherited) -> void;
|
||||
//
|
||||
// `non_constant_access` specifies whether lookups in this scope are allowed
|
||||
// to find and use non-constant locals in the enclosing scope. This is
|
||||
// typically allowed since the nested scope is in the same region as the
|
||||
// enclosing scope.
|
||||
auto PushForSameRegion(
|
||||
CleanupScopeKind cleanup_scope_kind = CleanupScopeKind::Inherited,
|
||||
NonConstantAccess non_constant_access = NonConstantAccess::Permitted)
|
||||
-> void;
|
||||
|
||||
// Pushes a function scope.
|
||||
auto PushForFunctionBody(SemIR::InstId scope_inst_id) -> void;
|
||||
@@ -237,6 +268,11 @@ class ScopeStack {
|
||||
SemIR::LocId use_loc_id, bool is_reachable)
|
||||
-> SemIR::InstId;
|
||||
|
||||
struct LexicalResult {
|
||||
SemIR::InstId inst_id;
|
||||
ScopeIndex scope_index;
|
||||
};
|
||||
|
||||
// Looks up the name `name_id` in the current scope and related lexical
|
||||
// scopes. Returns the innermost lexical lookup result, if any, along with a
|
||||
// list of non-lexical scopes in which lookup should also be performed,
|
||||
@@ -244,7 +280,14 @@ class ScopeStack {
|
||||
// name is marked as used at that location.
|
||||
auto LookupInLexicalScopes(SemIR::NameId name_id, SemIR::LocId use_loc_id,
|
||||
bool is_reachable)
|
||||
-> std::pair<SemIR::InstId, llvm::ArrayRef<NonLexicalScope>>;
|
||||
-> std::pair<LexicalResult, llvm::ArrayRef<NonLexicalScope>>;
|
||||
|
||||
// Classifies how a non-constant local declared in `target_scope_index` can be
|
||||
// referenced from the current scope. Returns the access kind of the innermost
|
||||
// intervening scope that doesn't permit direct access, or `Permitted` if
|
||||
// there is no such scope.
|
||||
auto GetNonConstantAccess(ScopeIndex target_scope_index) const
|
||||
-> NonConstantAccess;
|
||||
|
||||
// Looks up the name `name_id` in the current scope, or in `scope_index` if
|
||||
// specified. Returns the existing instruction if the name is already declared
|
||||
@@ -389,6 +432,9 @@ class ScopeStack {
|
||||
// The kind of cleanup scope that is associated with this scope.
|
||||
CleanupScopeKind cleanup_scope_kind = CleanupScopeKind::None;
|
||||
|
||||
// How this scope affects access to non-constant locals in outer scopes.
|
||||
NonConstantAccess non_constant_access = NonConstantAccess::Disallowed;
|
||||
|
||||
// The ambient cleanup scope depth in this scope. This is the depth that we
|
||||
// will return to at the end of a statement in this scope.
|
||||
CleanupScopeDepth cleanup_scope_depth;
|
||||
@@ -431,6 +477,7 @@ class ScopeStack {
|
||||
// namespace may contain a mix of both successful and failed name imports.
|
||||
auto Push(SemIR::InstId scope_inst_id, SemIR::NameScopeId scope_id,
|
||||
SemIR::SpecificId specific_id, CleanupScopeKind cleanup_scope_kind,
|
||||
NonConstantAccess non_constant_access,
|
||||
bool lexical_lookup_has_load_error) -> void;
|
||||
|
||||
auto Peek(int drop = 0) const -> const ScopeStackEntry& {
|
||||
|
||||
+7
-7
@@ -230,13 +230,8 @@ extern alias C = Class;
|
||||
// CHECK:STDOUT: %b: type = alias_binding b, %a.ref [concrete = constants.%C]
|
||||
// CHECK:STDOUT: %b.ref: type = name_ref b, %b [concrete = constants.%C]
|
||||
// CHECK:STDOUT: %c: type = alias_binding c, %b.ref [concrete = constants.%C]
|
||||
// CHECK:STDOUT: %.loc10_13.1: ref %C = temporary_storage
|
||||
// CHECK:STDOUT: %.loc10_13.2: init %C to %.loc10_13.1 = class_init () [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %.loc10_13.3: init %C = converted @__global_init.%.loc10, %.loc10_13.2 [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %.loc10_13.4: ref %C = temporary %.loc10_13.1, %.loc10_13.3 [concrete = constants.%.115]
|
||||
// CHECK:STDOUT: %.loc10_13.5: %C = acquire_value %.loc10_13.4 [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %c.ref: type = name_ref c, %c [concrete = constants.%C]
|
||||
// CHECK:STDOUT: %d: %C = wrapper_binding d, %.loc10_13.5
|
||||
// CHECK:STDOUT: %d: %C = wrapper_binding d, @__global_init.%.loc10_13.6
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %d.patt: %pattern_type = value_binding_pattern d [concrete = constants.%d.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -244,7 +239,12 @@ extern alias C = Class;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc10: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc10_13.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc10_13.2: ref %C = temporary_storage
|
||||
// CHECK:STDOUT: %.loc10_13.3: init %C to %.loc10_13.2 = class_init () [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %.loc10_13.4: init %C = converted %.loc10_13.1, %.loc10_13.3 [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %.loc10_13.5: ref %C = temporary %.loc10_13.2, %.loc10_13.4 [concrete = constants.%.115]
|
||||
// CHECK:STDOUT: %.loc10_13.6: %C = acquire_value %.loc10_13.5 [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+9
-7
@@ -195,7 +195,6 @@ var b: B = {.x = ()} as B;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %B.ref.loc22: type = name_ref B, %B.decl [concrete = constants.%B]
|
||||
// CHECK:STDOUT: %b_val: %B = wrapper_binding b_val, @__global_init.%.loc22_22.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b_val.patt: %pattern_type.e39 = value_binding_pattern b_val [concrete = constants.%b_val.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -219,10 +218,12 @@ var b: B = {.x = ()} as B;
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %a_val.ref: %A = name_ref a_val, file.%a_val
|
||||
// CHECK:STDOUT: %a_val.global_ref: %A = global_ref %a_val
|
||||
// CHECK:STDOUT: %a_val.ref: %A = name_ref a_val, %a_val.global_ref
|
||||
// CHECK:STDOUT: %B.ref.loc22: type = name_ref B, file.%B.decl [concrete = constants.%B]
|
||||
// CHECK:STDOUT: %.loc22_22.1: %B = as_compatible %a_val.ref
|
||||
// CHECK:STDOUT: %.loc22_22.2: %B = converted %a_val.ref, %.loc22_22.1
|
||||
// CHECK:STDOUT: %b_val: %B = wrapper_binding b_val, %.loc22_22.2
|
||||
// CHECK:STDOUT: %a_ref.ref.loc23: ref %A = name_ref a_ref, file.%a_ref [concrete = file.%a_ref.var]
|
||||
// CHECK:STDOUT: %B.ref.loc23: type = name_ref B, file.%B.decl [concrete = constants.%B]
|
||||
// CHECK:STDOUT: %.loc23_25.1: ref %B = as_compatible %a_ref.ref.loc23 [concrete = constants.%a_ref.var]
|
||||
@@ -280,7 +281,6 @@ var b: B = {.x = ()} as B;
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.9ef = value_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %n: %i32 = wrapper_binding n, @__global_init.%.loc10_16.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %n.patt: %pattern_type.d94 = value_binding_pattern n [concrete = constants.%n.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -300,10 +300,12 @@ var b: B = {.x = ()} as B;
|
||||
// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A]
|
||||
// CHECK:STDOUT: %.loc9_23.1: %A = as_compatible %.loc9_15.2 [concrete = constants.%int_1.403]
|
||||
// CHECK:STDOUT: %.loc9_23.2: %A = converted %.loc9_15.2, %.loc9_23.1 [concrete = constants.%int_1.403]
|
||||
// CHECK:STDOUT: %a.ref: %A = name_ref a, file.%a
|
||||
// CHECK:STDOUT: %a.global_ref: %A = global_ref file.%a
|
||||
// CHECK:STDOUT: %a.ref: %A = name_ref a, %a.global_ref
|
||||
// CHECK:STDOUT: %i32.loc10: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc10_16.1: %i32 = as_compatible %a.ref
|
||||
// CHECK:STDOUT: %.loc10_16.2: %i32 = converted %a.ref, %.loc10_16.1
|
||||
// CHECK:STDOUT: %n: %i32 = wrapper_binding n, %.loc10_16.2
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -379,10 +381,8 @@ var b: B = {.x = ()} as B;
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc14_42.1: ref %B = temporary @__global_init.%.loc14_34.3, @__global_init.%.loc14_42.2 [concrete = constants.%.a63]
|
||||
// CHECK:STDOUT: %.loc14_42.2: %B = acquire_value %.loc14_42.1 [concrete = constants.%B.val]
|
||||
// CHECK:STDOUT: %B.ref: type = name_ref B, %B.decl [concrete = constants.%B]
|
||||
// CHECK:STDOUT: %b_value: %B = wrapper_binding b_value, %.loc14_42.2
|
||||
// CHECK:STDOUT: %b_value: %B = wrapper_binding b_value, @__global_init.%.loc14_42.4
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b_value.patt: %pattern_type.e39 = value_binding_pattern b_value [concrete = constants.%b_value.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -416,6 +416,8 @@ var b: B = {.x = ()} as B;
|
||||
// CHECK:STDOUT: %B.ref: type = name_ref B, file.%B.decl [concrete = constants.%B]
|
||||
// CHECK:STDOUT: %.loc14_42.1: init %B = as_compatible %.loc14_36 [concrete = constants.%B.val]
|
||||
// CHECK:STDOUT: %.loc14_42.2: init %B = converted %.loc14_36, %.loc14_42.1 [concrete = constants.%B.val]
|
||||
// CHECK:STDOUT: %.loc14_42.3: ref %B = temporary %.loc14_34.3, %.loc14_42.2 [concrete = constants.%.a63]
|
||||
// CHECK:STDOUT: %.loc14_42.4: %B = acquire_value %.loc14_42.3 [concrete = constants.%B.val]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+3
-3
@@ -474,10 +474,7 @@ let n: {.x: ()} = {.x = ()} as {.x = ()};
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc19_29.1: ref %Y = temporary @__global_init.%.loc19_29.1, @__global_init.%.loc19_29.2
|
||||
// CHECK:STDOUT: %.loc19_29.2: %Y = acquire_value %.loc19_29.1
|
||||
// CHECK:STDOUT: %Y.ref: type = name_ref Y, %Y.decl [concrete = constants.%Y]
|
||||
// CHECK:STDOUT: %n: %Y = wrapper_binding n, %.loc19_29.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %n.patt: %pattern_type.7ab = value_binding_pattern n [concrete = constants.%n.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -503,6 +500,9 @@ let n: {.x: ()} = {.x = ()} as {.x = ()};
|
||||
// CHECK:STDOUT: %.loc19_23.3: %X = acquire_value %.loc19_23.2 [concrete = constants.%X.val]
|
||||
// CHECK:STDOUT: %X.as.As.impl.Convert.call: init %Y to %.loc19_29.1 = call %bound_method(%.loc19_23.3)
|
||||
// CHECK:STDOUT: %.loc19_29.2: init %Y = converted %.loc19_23.1, %X.as.As.impl.Convert.call
|
||||
// CHECK:STDOUT: %.loc19_29.3: ref %Y = temporary %.loc19_29.1, %.loc19_29.2
|
||||
// CHECK:STDOUT: %.loc19_29.4: %Y = acquire_value %.loc19_29.3
|
||||
// CHECK:STDOUT: %n: %Y = wrapper_binding n, %.loc19_29.4
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
+8
-4
@@ -159,7 +159,8 @@ fn Use() {
|
||||
// CHECK:STDOUT: %i.patt: %pattern_type.dfd = ref_binding_pattern i [concrete = constants.%i.patt]
|
||||
// CHECK:STDOUT: %i.var_patt: %pattern_type.dfd = var_pattern %i.patt [concrete = constants.%i.var_patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %value.ref: %X = name_ref value, file.%value
|
||||
// CHECK:STDOUT: %value.global_ref: %X = global_ref @__global_init.%value
|
||||
// CHECK:STDOUT: %value.ref: %X = name_ref value, %value.global_ref
|
||||
// CHECK:STDOUT: %X.ref.loc15_42: type = name_ref X, file.%X.decl [concrete = constants.%X]
|
||||
// CHECK:STDOUT: %const.loc15_36: type = const_type %X.ref.loc15_42 [concrete = constants.%const]
|
||||
// CHECK:STDOUT: %.loc15_33.1: %const = as_compatible %value.ref
|
||||
@@ -187,7 +188,8 @@ fn Use() {
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.7f7 = value_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %ptr.ref: %ptr.db8 = name_ref ptr, file.%ptr.loc9_8
|
||||
// CHECK:STDOUT: %ptr.global_ref: %ptr.db8 = global_ref file.%ptr.loc9_8
|
||||
// CHECK:STDOUT: %ptr.ref: %ptr.db8 = name_ref ptr, %ptr.global_ref
|
||||
// CHECK:STDOUT: %X.ref.loc17_41: type = name_ref X, file.%X.decl [concrete = constants.%X]
|
||||
// CHECK:STDOUT: %const.loc17_35: type = const_type %X.ref.loc17_41 [concrete = constants.%const]
|
||||
// CHECK:STDOUT: %ptr.loc17_42: type = ptr_type %const.loc17_35 [concrete = constants.%ptr.faf]
|
||||
@@ -273,7 +275,8 @@ fn Use() {
|
||||
// CHECK:STDOUT: %i.patt: %pattern_type.6cb = ref_binding_pattern i [concrete = constants.%i.patt]
|
||||
// CHECK:STDOUT: %i.var_patt: %pattern_type.6cb = var_pattern %i.patt [concrete = constants.%i.var_patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %value.ref: %const = name_ref value, file.%value
|
||||
// CHECK:STDOUT: %value.global_ref: %const = global_ref @__global_init.%value
|
||||
// CHECK:STDOUT: %value.ref: %const = name_ref value, %value.global_ref
|
||||
// CHECK:STDOUT: %X.ref.loc13_30: type = name_ref X, file.%X.decl [concrete = constants.%X]
|
||||
// CHECK:STDOUT: %.loc13_27.1: %X = as_compatible %value.ref
|
||||
// CHECK:STDOUT: %.loc13_27.2: %X = converted %value.ref, %.loc13_27.1
|
||||
@@ -330,7 +333,8 @@ fn Use() {
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.990 = value_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %ptr.ref: %ptr.faf = name_ref ptr, file.%ptr.loc7_8
|
||||
// CHECK:STDOUT: %ptr.global_ref: %ptr.faf = global_ref file.%ptr.loc7_8
|
||||
// CHECK:STDOUT: %ptr.ref: %ptr.faf = name_ref ptr, %ptr.global_ref
|
||||
// CHECK:STDOUT: %X.ref.loc12_36: type = name_ref X, file.%X.decl [concrete = constants.%X]
|
||||
// CHECK:STDOUT: %ptr.loc12_37: type = ptr_type %X.ref.loc12_36 [concrete = constants.%ptr.db8]
|
||||
// CHECK:STDOUT: %.loc12_33.1: %ptr.db8 = as_compatible %ptr.ref
|
||||
|
||||
+8
-4
@@ -217,7 +217,8 @@ fn Use() {
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.d77 = value_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %ptr.ref: %ptr.db8 = name_ref ptr, file.%ptr.loc7_8
|
||||
// CHECK:STDOUT: %ptr.global_ref: %ptr.db8 = global_ref file.%ptr.loc7_8
|
||||
// CHECK:STDOUT: %ptr.ref: %ptr.db8 = name_ref ptr, %ptr.global_ref
|
||||
// CHECK:STDOUT: %Core.ref.loc13_49: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
|
||||
// CHECK:STDOUT: %MaybeUnformed.ref.loc13_53: %MaybeUnformed.type = name_ref MaybeUnformed, imports.%Core.MaybeUnformed [concrete = constants.%MaybeUnformed.generic]
|
||||
// CHECK:STDOUT: %X.ref.loc13_68: type = name_ref X, file.%X.decl [concrete = constants.%X]
|
||||
@@ -316,7 +317,8 @@ fn Use() {
|
||||
// CHECK:STDOUT: %i.patt: %pattern_type.55d = ref_binding_pattern i [concrete = constants.%i.patt]
|
||||
// CHECK:STDOUT: %i.var_patt: %pattern_type.55d = var_pattern %i.patt [concrete = constants.%i.var_patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %value.ref: %X = name_ref value, file.%value
|
||||
// CHECK:STDOUT: %value.global_ref: %X = global_ref @__global_init.%value
|
||||
// CHECK:STDOUT: %value.ref: %X = name_ref value, %value.global_ref
|
||||
// CHECK:STDOUT: %Core.ref.loc41_50: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
|
||||
// CHECK:STDOUT: %MaybeUnformed.ref.loc41_54: %MaybeUnformed.type = name_ref MaybeUnformed, imports.%Core.MaybeUnformed [concrete = constants.%MaybeUnformed.generic]
|
||||
// CHECK:STDOUT: %X.ref.loc41_69: type = name_ref X, file.%X.decl [concrete = constants.%X]
|
||||
@@ -376,7 +378,8 @@ fn Use() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Use() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %value.ref: %MaybeUnformed.67f = name_ref value, file.%value
|
||||
// CHECK:STDOUT: %value.global_ref: %MaybeUnformed.67f = global_ref @__global_init.%value
|
||||
// CHECK:STDOUT: %value.ref: %MaybeUnformed.67f = name_ref value, %value.global_ref
|
||||
// CHECK:STDOUT: %X.ref.loc13_37: type = name_ref X, file.%X.decl [concrete = constants.%X]
|
||||
// CHECK:STDOUT: %.loc13_34.1: %X = as_compatible %value.ref
|
||||
// CHECK:STDOUT: %.loc13_34.2: %X = converted %value.ref, %.loc13_34.1
|
||||
@@ -398,7 +401,8 @@ fn Use() {
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.990 = value_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %ptr.ref: %ptr.6d8 = name_ref ptr, file.%ptr.loc9_8
|
||||
// CHECK:STDOUT: %ptr.global_ref: %ptr.6d8 = global_ref file.%ptr.loc9_8
|
||||
// CHECK:STDOUT: %ptr.ref: %ptr.6d8 = name_ref ptr, %ptr.global_ref
|
||||
// CHECK:STDOUT: %X.ref.loc15_36: type = name_ref X, file.%X.decl [concrete = constants.%X]
|
||||
// CHECK:STDOUT: %ptr.loc15_37: type = ptr_type %X.ref.loc15_36 [concrete = constants.%ptr.db8]
|
||||
// CHECK:STDOUT: %.loc15_33.1: %ptr.db8 = as_compatible %ptr.ref
|
||||
|
||||
+8
-4
@@ -177,7 +177,8 @@ fn Use() {
|
||||
// CHECK:STDOUT: %i.patt: %pattern_type.53b = ref_binding_pattern i [concrete = constants.%i.patt]
|
||||
// CHECK:STDOUT: %i.var_patt: %pattern_type.53b = var_pattern %i.patt [concrete = constants.%i.var_patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %value.ref: %X = name_ref value, file.%value
|
||||
// CHECK:STDOUT: %value.global_ref: %X = global_ref @__global_init.%value
|
||||
// CHECK:STDOUT: %value.ref: %X = name_ref value, %value.global_ref
|
||||
// CHECK:STDOUT: %X.ref.loc15_46: type = name_ref X, file.%X.decl [concrete = constants.%X]
|
||||
// CHECK:STDOUT: %.loc15_38: type = partial_type %X.ref.loc15_46 [concrete = constants.%.d74]
|
||||
// CHECK:STDOUT: %.loc15_35.1: %.d74 = as_compatible %value.ref
|
||||
@@ -205,7 +206,8 @@ fn Use() {
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.12c = value_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %ptr.ref: %ptr.db8 = name_ref ptr, file.%ptr.loc9_8
|
||||
// CHECK:STDOUT: %ptr.global_ref: %ptr.db8 = global_ref file.%ptr.loc9_8
|
||||
// CHECK:STDOUT: %ptr.ref: %ptr.db8 = name_ref ptr, %ptr.global_ref
|
||||
// CHECK:STDOUT: %X.ref.loc17_45: type = name_ref X, file.%X.decl [concrete = constants.%X]
|
||||
// CHECK:STDOUT: %.loc17_37: type = partial_type %X.ref.loc17_45 [concrete = constants.%.d74]
|
||||
// CHECK:STDOUT: %ptr.loc17_46: type = ptr_type %.loc17_37 [concrete = constants.%ptr.44a]
|
||||
@@ -360,7 +362,8 @@ fn Use() {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @Use() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %value.ref: %.d74 = name_ref value, file.%value
|
||||
// CHECK:STDOUT: %value.global_ref: %.d74 = global_ref @__global_init.%value
|
||||
// CHECK:STDOUT: %value.ref: %.d74 = name_ref value, %value.global_ref
|
||||
// CHECK:STDOUT: %X.ref.loc14_37: type = name_ref X, file.%X.decl [concrete = constants.%X]
|
||||
// CHECK:STDOUT: %.loc14_34.1: %X = as_compatible %value.ref
|
||||
// CHECK:STDOUT: %.loc14_34.2: %X = converted %value.ref, %.loc14_34.1
|
||||
@@ -382,7 +385,8 @@ fn Use() {
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.990 = value_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %ptr.ref: %ptr.44a = name_ref ptr, file.%ptr.loc10_8
|
||||
// CHECK:STDOUT: %ptr.global_ref: %ptr.44a = global_ref file.%ptr.loc10_8
|
||||
// CHECK:STDOUT: %ptr.ref: %ptr.44a = name_ref ptr, %ptr.global_ref
|
||||
// CHECK:STDOUT: %X.ref.loc16_36: type = name_ref X, file.%X.decl [concrete = constants.%X]
|
||||
// CHECK:STDOUT: %ptr.loc16_37: type = ptr_type %X.ref.loc16_36 [concrete = constants.%ptr.db8]
|
||||
// CHECK:STDOUT: %.loc16_33.1: %ptr.db8 = as_compatible %ptr.ref
|
||||
|
||||
+15
-15
@@ -112,24 +112,18 @@ let c: CharLiteral = AddCharInt('a', Negate(98));
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc12_39.1: Core.CharLiteral = value_of_initializer @__global_init.%AddCharInt.call.loc12 [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %.loc12_39.2: Core.CharLiteral = converted @__global_init.%AddCharInt.call.loc12, %.loc12_39.1 [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %CharLiteral.ref.loc12: type = name_ref CharLiteral, %CharLiteral [concrete = Core.CharLiteral]
|
||||
// CHECK:STDOUT: %a: Core.CharLiteral = wrapper_binding a, %.loc12_39.2
|
||||
// CHECK:STDOUT: %a: Core.CharLiteral = wrapper_binding a, @__global_init.%.loc12_39.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.8c6 = value_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc15_44.1: Core.CharLiteral = value_of_initializer @__global_init.%AddCharInt.call.loc15 [concrete = constants.%.ae7]
|
||||
// CHECK:STDOUT: %.loc15_44.2: Core.CharLiteral = converted @__global_init.%AddCharInt.call.loc15, %.loc15_44.1 [concrete = constants.%.ae7]
|
||||
// CHECK:STDOUT: %CharLiteral.ref.loc15: type = name_ref CharLiteral, %CharLiteral [concrete = Core.CharLiteral]
|
||||
// CHECK:STDOUT: %b: Core.CharLiteral = wrapper_binding b, %.loc15_44.2
|
||||
// CHECK:STDOUT: %b: Core.CharLiteral = wrapper_binding b, @__global_init.%.loc15_44.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.8c6 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc16_44.1: Core.CharLiteral = value_of_initializer @__global_init.%AddCharInt.call.loc16 [concrete = constants.%.a8b]
|
||||
// CHECK:STDOUT: %.loc16_44.2: Core.CharLiteral = converted @__global_init.%AddCharInt.call.loc16, %.loc16_44.1 [concrete = constants.%.a8b]
|
||||
// CHECK:STDOUT: %CharLiteral.ref.loc16: type = name_ref CharLiteral, %CharLiteral [concrete = Core.CharLiteral]
|
||||
// CHECK:STDOUT: %c: Core.CharLiteral = wrapper_binding c, %.loc16_44.2
|
||||
// CHECK:STDOUT: %c: Core.CharLiteral = wrapper_binding c, @__global_init.%.loc16_44.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %c.patt: %pattern_type.8c6 = value_binding_pattern c [concrete = constants.%c.patt.c30]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -138,17 +132,23 @@ let c: CharLiteral = AddCharInt('a', Negate(98));
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %AddCharInt.ref.loc12: %AddCharInt.type = name_ref AddCharInt, file.%AddCharInt.decl [concrete = constants.%AddCharInt]
|
||||
// CHECK:STDOUT: %.loc12: Core.CharLiteral = char_value U+0061 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %.loc12_33: Core.CharLiteral = char_value U+0061 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %int_1.loc12: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
|
||||
// CHECK:STDOUT: %AddCharInt.call.loc12: init Core.CharLiteral = call %AddCharInt.ref.loc12(%.loc12, %int_1.loc12) [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %AddCharInt.call.loc12: init Core.CharLiteral = call %AddCharInt.ref.loc12(%.loc12_33, %int_1.loc12) [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %.loc12_39.1: Core.CharLiteral = value_of_initializer %AddCharInt.call.loc12 [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %.loc12_39.2: Core.CharLiteral = converted %AddCharInt.call.loc12, %.loc12_39.1 [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %AddCharInt.ref.loc15: %AddCharInt.type = name_ref AddCharInt, file.%AddCharInt.decl [concrete = constants.%AddCharInt]
|
||||
// CHECK:STDOUT: %.loc15: Core.CharLiteral = char_value U+007F [concrete = constants.%.e28]
|
||||
// CHECK:STDOUT: %.loc15_33: Core.CharLiteral = char_value U+007F [concrete = constants.%.e28]
|
||||
// CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
|
||||
// CHECK:STDOUT: %AddCharInt.call.loc15: init Core.CharLiteral = call %AddCharInt.ref.loc15(%.loc15, %int_1.loc15) [concrete = constants.%.ae7]
|
||||
// CHECK:STDOUT: %AddCharInt.call.loc15: init Core.CharLiteral = call %AddCharInt.ref.loc15(%.loc15_33, %int_1.loc15) [concrete = constants.%.ae7]
|
||||
// CHECK:STDOUT: %.loc15_44.1: Core.CharLiteral = value_of_initializer %AddCharInt.call.loc15 [concrete = constants.%.ae7]
|
||||
// CHECK:STDOUT: %.loc15_44.2: Core.CharLiteral = converted %AddCharInt.call.loc15, %.loc15_44.1 [concrete = constants.%.ae7]
|
||||
// CHECK:STDOUT: %AddCharInt.ref.loc16: %AddCharInt.type = name_ref AddCharInt, file.%AddCharInt.decl [concrete = constants.%AddCharInt]
|
||||
// CHECK:STDOUT: %.loc16: Core.CharLiteral = char_value U+00FF [concrete = constants.%.ad8]
|
||||
// CHECK:STDOUT: %.loc16_33: Core.CharLiteral = char_value U+00FF [concrete = constants.%.ad8]
|
||||
// CHECK:STDOUT: %int_1.loc16: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
|
||||
// CHECK:STDOUT: %AddCharInt.call.loc16: init Core.CharLiteral = call %AddCharInt.ref.loc16(%.loc16, %int_1.loc16) [concrete = constants.%.a8b]
|
||||
// CHECK:STDOUT: %AddCharInt.call.loc16: init Core.CharLiteral = call %AddCharInt.ref.loc16(%.loc16_33, %int_1.loc16) [concrete = constants.%.a8b]
|
||||
// CHECK:STDOUT: %.loc16_44.1: Core.CharLiteral = value_of_initializer %AddCharInt.call.loc16 [concrete = constants.%.a8b]
|
||||
// CHECK:STDOUT: %.loc16_44.2: Core.CharLiteral = converted %AddCharInt.call.loc16, %.loc16_44.1 [concrete = constants.%.a8b]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -143,8 +143,6 @@ let c: UInt(8) = ToChar('\u{1E15}');
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc6_29.1: %u8.builtin = value_of_initializer @__global_init.%ToChar.call.loc6 [concrete = constants.%int_0]
|
||||
// CHECK:STDOUT: %.loc6_29.2: %u8.builtin = converted @__global_init.%ToChar.call.loc6, %.loc6_29.1 [concrete = constants.%int_0]
|
||||
// CHECK:STDOUT: %.loc6_14.1: type = splice_block %.loc6_14.3 [concrete = constants.%u8.builtin] {
|
||||
// CHECK:STDOUT: %UInt.ref.loc6: %UInt.type = name_ref UInt, imports.%Main.UInt [concrete = constants.%UInt]
|
||||
// CHECK:STDOUT: %int_8.loc6: Core.IntLiteral = int_value 8 [concrete = constants.%int_8]
|
||||
@@ -152,12 +150,10 @@ let c: UInt(8) = ToChar('\u{1E15}');
|
||||
// CHECK:STDOUT: %.loc6_14.2: type = value_of_initializer %UInt.call.loc6 [concrete = constants.%u8.builtin]
|
||||
// CHECK:STDOUT: %.loc6_14.3: type = converted %UInt.call.loc6, %.loc6_14.2 [concrete = constants.%u8.builtin]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %a: %u8.builtin = wrapper_binding a, %.loc6_29.2
|
||||
// CHECK:STDOUT: %a: %u8.builtin = wrapper_binding a, @__global_init.%.loc6_29.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.456 = value_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc7_28.1: %u8.builtin = value_of_initializer @__global_init.%ToChar.call.loc7 [concrete = constants.%int_98]
|
||||
// CHECK:STDOUT: %.loc7_28.2: %u8.builtin = converted @__global_init.%ToChar.call.loc7, %.loc7_28.1 [concrete = constants.%int_98]
|
||||
// CHECK:STDOUT: %.loc7_14.1: type = splice_block %.loc7_14.3 [concrete = constants.%u8.builtin] {
|
||||
// CHECK:STDOUT: %UInt.ref.loc7: %UInt.type = name_ref UInt, imports.%Main.UInt [concrete = constants.%UInt]
|
||||
// CHECK:STDOUT: %int_8.loc7: Core.IntLiteral = int_value 8 [concrete = constants.%int_8]
|
||||
@@ -165,12 +161,10 @@ let c: UInt(8) = ToChar('\u{1E15}');
|
||||
// CHECK:STDOUT: %.loc7_14.2: type = value_of_initializer %UInt.call.loc7 [concrete = constants.%u8.builtin]
|
||||
// CHECK:STDOUT: %.loc7_14.3: type = converted %UInt.call.loc7, %.loc7_14.2 [concrete = constants.%u8.builtin]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %b: %u8.builtin = wrapper_binding b, %.loc7_28.2
|
||||
// CHECK:STDOUT: %b: %u8.builtin = wrapper_binding b, @__global_init.%.loc7_28.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.456 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc8_33.1: %u8.builtin = value_of_initializer @__global_init.%ToChar.call.loc8 [concrete = constants.%int_127]
|
||||
// CHECK:STDOUT: %.loc8_33.2: %u8.builtin = converted @__global_init.%ToChar.call.loc8, %.loc8_33.1 [concrete = constants.%int_127]
|
||||
// CHECK:STDOUT: %.loc8_14.1: type = splice_block %.loc8_14.3 [concrete = constants.%u8.builtin] {
|
||||
// CHECK:STDOUT: %UInt.ref.loc8: %UInt.type = name_ref UInt, imports.%Main.UInt [concrete = constants.%UInt]
|
||||
// CHECK:STDOUT: %int_8.loc8: Core.IntLiteral = int_value 8 [concrete = constants.%int_8]
|
||||
@@ -178,7 +172,7 @@ let c: UInt(8) = ToChar('\u{1E15}');
|
||||
// CHECK:STDOUT: %.loc8_14.2: type = value_of_initializer %UInt.call.loc8 [concrete = constants.%u8.builtin]
|
||||
// CHECK:STDOUT: %.loc8_14.3: type = converted %UInt.call.loc8, %.loc8_14.2 [concrete = constants.%u8.builtin]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %c: %u8.builtin = wrapper_binding c, %.loc8_33.2
|
||||
// CHECK:STDOUT: %c: %u8.builtin = wrapper_binding c, @__global_init.%.loc8_33.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %c.patt: %pattern_type.456 = value_binding_pattern c [concrete = constants.%c.patt.7eb]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -187,14 +181,20 @@ let c: UInt(8) = ToChar('\u{1E15}');
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %ToChar.ref.loc6: %ToChar.type = name_ref ToChar, imports.%Main.ToChar [concrete = constants.%ToChar]
|
||||
// CHECK:STDOUT: %.loc6: Core.CharLiteral = char_value U+0000 [concrete = constants.%.dc9]
|
||||
// CHECK:STDOUT: %ToChar.call.loc6: init %u8.builtin = call %ToChar.ref.loc6(%.loc6) [concrete = constants.%int_0]
|
||||
// CHECK:STDOUT: %.loc6_25: Core.CharLiteral = char_value U+0000 [concrete = constants.%.dc9]
|
||||
// CHECK:STDOUT: %ToChar.call.loc6: init %u8.builtin = call %ToChar.ref.loc6(%.loc6_25) [concrete = constants.%int_0]
|
||||
// CHECK:STDOUT: %.loc6_29.1: %u8.builtin = value_of_initializer %ToChar.call.loc6 [concrete = constants.%int_0]
|
||||
// CHECK:STDOUT: %.loc6_29.2: %u8.builtin = converted %ToChar.call.loc6, %.loc6_29.1 [concrete = constants.%int_0]
|
||||
// CHECK:STDOUT: %ToChar.ref.loc7: %ToChar.type = name_ref ToChar, imports.%Main.ToChar [concrete = constants.%ToChar]
|
||||
// CHECK:STDOUT: %.loc7: Core.CharLiteral = char_value U+0062 [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %ToChar.call.loc7: init %u8.builtin = call %ToChar.ref.loc7(%.loc7) [concrete = constants.%int_98]
|
||||
// CHECK:STDOUT: %.loc7_25: Core.CharLiteral = char_value U+0062 [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %ToChar.call.loc7: init %u8.builtin = call %ToChar.ref.loc7(%.loc7_25) [concrete = constants.%int_98]
|
||||
// CHECK:STDOUT: %.loc7_28.1: %u8.builtin = value_of_initializer %ToChar.call.loc7 [concrete = constants.%int_98]
|
||||
// CHECK:STDOUT: %.loc7_28.2: %u8.builtin = converted %ToChar.call.loc7, %.loc7_28.1 [concrete = constants.%int_98]
|
||||
// CHECK:STDOUT: %ToChar.ref.loc8: %ToChar.type = name_ref ToChar, imports.%Main.ToChar [concrete = constants.%ToChar]
|
||||
// CHECK:STDOUT: %.loc8: Core.CharLiteral = char_value U+007F [concrete = constants.%.e28]
|
||||
// CHECK:STDOUT: %ToChar.call.loc8: init %u8.builtin = call %ToChar.ref.loc8(%.loc8) [concrete = constants.%int_127]
|
||||
// CHECK:STDOUT: %.loc8_25: Core.CharLiteral = char_value U+007F [concrete = constants.%.e28]
|
||||
// CHECK:STDOUT: %ToChar.call.loc8: init %u8.builtin = call %ToChar.ref.loc8(%.loc8_25) [concrete = constants.%int_127]
|
||||
// CHECK:STDOUT: %.loc8_33.1: %u8.builtin = value_of_initializer %ToChar.call.loc8 [concrete = constants.%int_127]
|
||||
// CHECK:STDOUT: %.loc8_33.2: %u8.builtin = converted %ToChar.call.loc8, %.loc8_33.1 [concrete = constants.%int_127]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -113,45 +113,33 @@ let g: u8 = ConvertToU8('\u{100}');
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc14_30.1: %i32 = value_of_initializer @__global_init.%ConvertToI32.call [concrete = constants.%int_97]
|
||||
// CHECK:STDOUT: %.loc14_30.2: %i32 = converted @__global_init.%ConvertToI32.call, %.loc14_30.1 [concrete = constants.%int_97]
|
||||
// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %a: %i32 = wrapper_binding a, %.loc14_30.2
|
||||
// CHECK:STDOUT: %a: %i32 = wrapper_binding a, @__global_init.%.loc14_30.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.d94 = value_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc15_30.1: %u32 = value_of_initializer @__global_init.%ConvertToU32.call [concrete = constants.%int_98]
|
||||
// CHECK:STDOUT: %.loc15_30.2: %u32 = converted @__global_init.%ConvertToU32.call, %.loc15_30.1 [concrete = constants.%int_98]
|
||||
// CHECK:STDOUT: %u32: type = type_literal constants.%u32 [concrete = constants.%u32]
|
||||
// CHECK:STDOUT: %b: %u32 = wrapper_binding b, %.loc15_30.2
|
||||
// CHECK:STDOUT: %b: %u32 = wrapper_binding b, @__global_init.%.loc15_30.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.129 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc16_39.1: %i64 = value_of_initializer @__global_init.%ConvertToI64.call [concrete = constants.%int_1114111]
|
||||
// CHECK:STDOUT: %.loc16_39.2: %i64 = converted @__global_init.%ConvertToI64.call, %.loc16_39.1 [concrete = constants.%int_1114111]
|
||||
// CHECK:STDOUT: %i64: type = type_literal constants.%i64 [concrete = constants.%i64]
|
||||
// CHECK:STDOUT: %c: %i64 = wrapper_binding c, %.loc16_39.2
|
||||
// CHECK:STDOUT: %c: %i64 = wrapper_binding c, @__global_init.%.loc16_39.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %c.patt: %pattern_type.c0e = value_binding_pattern c [concrete = constants.%c.patt.e2c]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc17_31.1: %u64 = value_of_initializer @__global_init.%ConvertToU64.call [concrete = constants.%int_0]
|
||||
// CHECK:STDOUT: %.loc17_31.2: %u64 = converted @__global_init.%ConvertToU64.call, %.loc17_31.1 [concrete = constants.%int_0]
|
||||
// CHECK:STDOUT: %u64: type = type_literal constants.%u64 [concrete = constants.%u64]
|
||||
// CHECK:STDOUT: %d: %u64 = wrapper_binding d, %.loc17_31.2
|
||||
// CHECK:STDOUT: %d: %u64 = wrapper_binding d, @__global_init.%.loc17_31.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %d.patt: %pattern_type.dd7 = value_binding_pattern d [concrete = constants.%d.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc19_33.1: %u8 = value_of_initializer @__global_init.%ConvertToU8.call.loc19 [concrete = constants.%int_128]
|
||||
// CHECK:STDOUT: %.loc19_33.2: %u8 = converted @__global_init.%ConvertToU8.call.loc19, %.loc19_33.1 [concrete = constants.%int_128]
|
||||
// CHECK:STDOUT: %u8.loc19: type = type_literal constants.%u8 [concrete = constants.%u8]
|
||||
// CHECK:STDOUT: %e: %u8 = wrapper_binding e, %.loc19_33.2
|
||||
// CHECK:STDOUT: %e: %u8 = wrapper_binding e, @__global_init.%.loc19_33.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %e.patt: %pattern_type.e53 = value_binding_pattern e [concrete = constants.%e.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc20_33.1: %u8 = value_of_initializer @__global_init.%ConvertToU8.call.loc20 [concrete = constants.%int_255]
|
||||
// CHECK:STDOUT: %.loc20_33.2: %u8 = converted @__global_init.%ConvertToU8.call.loc20, %.loc20_33.1 [concrete = constants.%int_255]
|
||||
// CHECK:STDOUT: %u8.loc20: type = type_literal constants.%u8 [concrete = constants.%u8]
|
||||
// CHECK:STDOUT: %f: %u8 = wrapper_binding f, %.loc20_33.2
|
||||
// CHECK:STDOUT: %f: %u8 = wrapper_binding f, @__global_init.%.loc20_33.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %f.patt: %pattern_type.e53 = value_binding_pattern f [concrete = constants.%f.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -160,23 +148,35 @@ let g: u8 = ConvertToU8('\u{100}');
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %ConvertToI32.ref: %ConvertToI32.type = name_ref ConvertToI32, file.%ConvertToI32.decl [concrete = constants.%ConvertToI32]
|
||||
// CHECK:STDOUT: %.loc14: Core.CharLiteral = char_value U+0061 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %ConvertToI32.call: init %i32 = call %ConvertToI32.ref(%.loc14) [concrete = constants.%int_97]
|
||||
// CHECK:STDOUT: %.loc14_27: Core.CharLiteral = char_value U+0061 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %ConvertToI32.call: init %i32 = call %ConvertToI32.ref(%.loc14_27) [concrete = constants.%int_97]
|
||||
// CHECK:STDOUT: %.loc14_30.1: %i32 = value_of_initializer %ConvertToI32.call [concrete = constants.%int_97]
|
||||
// CHECK:STDOUT: %.loc14_30.2: %i32 = converted %ConvertToI32.call, %.loc14_30.1 [concrete = constants.%int_97]
|
||||
// CHECK:STDOUT: %ConvertToU32.ref: %ConvertToU32.type = name_ref ConvertToU32, file.%ConvertToU32.decl [concrete = constants.%ConvertToU32]
|
||||
// CHECK:STDOUT: %.loc15: Core.CharLiteral = char_value U+0062 [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %ConvertToU32.call: init %u32 = call %ConvertToU32.ref(%.loc15) [concrete = constants.%int_98]
|
||||
// CHECK:STDOUT: %.loc15_27: Core.CharLiteral = char_value U+0062 [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %ConvertToU32.call: init %u32 = call %ConvertToU32.ref(%.loc15_27) [concrete = constants.%int_98]
|
||||
// CHECK:STDOUT: %.loc15_30.1: %u32 = value_of_initializer %ConvertToU32.call [concrete = constants.%int_98]
|
||||
// CHECK:STDOUT: %.loc15_30.2: %u32 = converted %ConvertToU32.call, %.loc15_30.1 [concrete = constants.%int_98]
|
||||
// CHECK:STDOUT: %ConvertToI64.ref: %ConvertToI64.type = name_ref ConvertToI64, file.%ConvertToI64.decl [concrete = constants.%ConvertToI64]
|
||||
// CHECK:STDOUT: %.loc16: Core.CharLiteral = char_value U+10FFFF [concrete = constants.%.914]
|
||||
// CHECK:STDOUT: %ConvertToI64.call: init %i64 = call %ConvertToI64.ref(%.loc16) [concrete = constants.%int_1114111]
|
||||
// CHECK:STDOUT: %.loc16_27: Core.CharLiteral = char_value U+10FFFF [concrete = constants.%.914]
|
||||
// CHECK:STDOUT: %ConvertToI64.call: init %i64 = call %ConvertToI64.ref(%.loc16_27) [concrete = constants.%int_1114111]
|
||||
// CHECK:STDOUT: %.loc16_39.1: %i64 = value_of_initializer %ConvertToI64.call [concrete = constants.%int_1114111]
|
||||
// CHECK:STDOUT: %.loc16_39.2: %i64 = converted %ConvertToI64.call, %.loc16_39.1 [concrete = constants.%int_1114111]
|
||||
// CHECK:STDOUT: %ConvertToU64.ref: %ConvertToU64.type = name_ref ConvertToU64, file.%ConvertToU64.decl [concrete = constants.%ConvertToU64]
|
||||
// CHECK:STDOUT: %.loc17: Core.CharLiteral = char_value U+0000 [concrete = constants.%.dc9]
|
||||
// CHECK:STDOUT: %ConvertToU64.call: init %u64 = call %ConvertToU64.ref(%.loc17) [concrete = constants.%int_0]
|
||||
// CHECK:STDOUT: %.loc17_27: Core.CharLiteral = char_value U+0000 [concrete = constants.%.dc9]
|
||||
// CHECK:STDOUT: %ConvertToU64.call: init %u64 = call %ConvertToU64.ref(%.loc17_27) [concrete = constants.%int_0]
|
||||
// CHECK:STDOUT: %.loc17_31.1: %u64 = value_of_initializer %ConvertToU64.call [concrete = constants.%int_0]
|
||||
// CHECK:STDOUT: %.loc17_31.2: %u64 = converted %ConvertToU64.call, %.loc17_31.1 [concrete = constants.%int_0]
|
||||
// CHECK:STDOUT: %ConvertToU8.ref.loc19: %ConvertToU8.type = name_ref ConvertToU8, file.%ConvertToU8.decl [concrete = constants.%ConvertToU8]
|
||||
// CHECK:STDOUT: %.loc19: Core.CharLiteral = char_value U+0080 [concrete = constants.%.ae7]
|
||||
// CHECK:STDOUT: %ConvertToU8.call.loc19: init %u8 = call %ConvertToU8.ref.loc19(%.loc19) [concrete = constants.%int_128]
|
||||
// CHECK:STDOUT: %.loc19_25: Core.CharLiteral = char_value U+0080 [concrete = constants.%.ae7]
|
||||
// CHECK:STDOUT: %ConvertToU8.call.loc19: init %u8 = call %ConvertToU8.ref.loc19(%.loc19_25) [concrete = constants.%int_128]
|
||||
// CHECK:STDOUT: %.loc19_33.1: %u8 = value_of_initializer %ConvertToU8.call.loc19 [concrete = constants.%int_128]
|
||||
// CHECK:STDOUT: %.loc19_33.2: %u8 = converted %ConvertToU8.call.loc19, %.loc19_33.1 [concrete = constants.%int_128]
|
||||
// CHECK:STDOUT: %ConvertToU8.ref.loc20: %ConvertToU8.type = name_ref ConvertToU8, file.%ConvertToU8.decl [concrete = constants.%ConvertToU8]
|
||||
// CHECK:STDOUT: %.loc20: Core.CharLiteral = char_value U+00FF [concrete = constants.%.ad8]
|
||||
// CHECK:STDOUT: %ConvertToU8.call.loc20: init %u8 = call %ConvertToU8.ref.loc20(%.loc20) [concrete = constants.%int_255]
|
||||
// CHECK:STDOUT: %.loc20_25: Core.CharLiteral = char_value U+00FF [concrete = constants.%.ad8]
|
||||
// CHECK:STDOUT: %ConvertToU8.call.loc20: init %u8 = call %ConvertToU8.ref.loc20(%.loc20_25) [concrete = constants.%int_255]
|
||||
// CHECK:STDOUT: %.loc20_33.1: %u8 = value_of_initializer %ConvertToU8.call.loc20 [concrete = constants.%int_255]
|
||||
// CHECK:STDOUT: %.loc20_33.2: %u8 = converted %ConvertToU8.call.loc20, %.loc20_33.1 [concrete = constants.%int_255]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -38,17 +38,13 @@ let b: bool = Eq('a', 'b');
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc21_26.1: bool = value_of_initializer @__global_init.%Eq.call.loc21 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc21_26.2: bool = converted @__global_init.%Eq.call.loc21, %.loc21_26.1 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc21_8: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %a: bool = wrapper_binding a, %.loc21_26.2
|
||||
// CHECK:STDOUT: %.loc21: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %a: bool = wrapper_binding a, @__global_init.%.loc21_26.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.831 = value_binding_pattern a [concrete = constants.%a.patt.567]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc22_26.1: bool = value_of_initializer @__global_init.%Eq.call.loc22 [concrete = constants.%false]
|
||||
// CHECK:STDOUT: %.loc22_26.2: bool = converted @__global_init.%Eq.call.loc22, %.loc22_26.1 [concrete = constants.%false]
|
||||
// CHECK:STDOUT: %.loc22_8: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %b: bool = wrapper_binding b, %.loc22_26.2
|
||||
// CHECK:STDOUT: %.loc22: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %b: bool = wrapper_binding b, @__global_init.%.loc22_26.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.831 = value_binding_pattern b [concrete = constants.%b.patt.438]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -60,10 +56,14 @@ let b: bool = Eq('a', 'b');
|
||||
// CHECK:STDOUT: %.loc21_18: Core.CharLiteral = char_value U+0061 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %.loc21_23: Core.CharLiteral = char_value U+0061 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %Eq.call.loc21: init bool = call %Eq.ref.loc21(%.loc21_18, %.loc21_23) [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc21_26.1: bool = value_of_initializer %Eq.call.loc21 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc21_26.2: bool = converted %Eq.call.loc21, %.loc21_26.1 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %Eq.ref.loc22: %Eq.type = name_ref Eq, file.%Eq.decl [concrete = constants.%Eq]
|
||||
// CHECK:STDOUT: %.loc22_18: Core.CharLiteral = char_value U+0061 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %.loc22_23: Core.CharLiteral = char_value U+0062 [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %Eq.call.loc22: init bool = call %Eq.ref.loc22(%.loc22_18, %.loc22_23) [concrete = constants.%false]
|
||||
// CHECK:STDOUT: %.loc22_26.1: bool = value_of_initializer %Eq.call.loc22 [concrete = constants.%false]
|
||||
// CHECK:STDOUT: %.loc22_26.2: bool = converted %Eq.call.loc22, %.loc22_26.1 [concrete = constants.%false]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -38,17 +38,13 @@ let b: bool = Greater('a', 'b');
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc21_31.1: bool = value_of_initializer @__global_init.%Greater.call.loc21 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc21_31.2: bool = converted @__global_init.%Greater.call.loc21, %.loc21_31.1 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc21_8: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %a: bool = wrapper_binding a, %.loc21_31.2
|
||||
// CHECK:STDOUT: %.loc21: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %a: bool = wrapper_binding a, @__global_init.%.loc21_31.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.831 = value_binding_pattern a [concrete = constants.%a.patt.567]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc22_31.1: bool = value_of_initializer @__global_init.%Greater.call.loc22 [concrete = constants.%false]
|
||||
// CHECK:STDOUT: %.loc22_31.2: bool = converted @__global_init.%Greater.call.loc22, %.loc22_31.1 [concrete = constants.%false]
|
||||
// CHECK:STDOUT: %.loc22_8: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %b: bool = wrapper_binding b, %.loc22_31.2
|
||||
// CHECK:STDOUT: %.loc22: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %b: bool = wrapper_binding b, @__global_init.%.loc22_31.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.831 = value_binding_pattern b [concrete = constants.%b.patt.438]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -60,10 +56,14 @@ let b: bool = Greater('a', 'b');
|
||||
// CHECK:STDOUT: %.loc21_23: Core.CharLiteral = char_value U+0062 [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %.loc21_28: Core.CharLiteral = char_value U+0061 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %Greater.call.loc21: init bool = call %Greater.ref.loc21(%.loc21_23, %.loc21_28) [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc21_31.1: bool = value_of_initializer %Greater.call.loc21 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc21_31.2: bool = converted %Greater.call.loc21, %.loc21_31.1 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %Greater.ref.loc22: %Greater.type = name_ref Greater, file.%Greater.decl [concrete = constants.%Greater]
|
||||
// CHECK:STDOUT: %.loc22_23: Core.CharLiteral = char_value U+0061 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %.loc22_28: Core.CharLiteral = char_value U+0062 [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %Greater.call.loc22: init bool = call %Greater.ref.loc22(%.loc22_23, %.loc22_28) [concrete = constants.%false]
|
||||
// CHECK:STDOUT: %.loc22_31.1: bool = value_of_initializer %Greater.call.loc22 [concrete = constants.%false]
|
||||
// CHECK:STDOUT: %.loc22_31.2: bool = converted %Greater.call.loc22, %.loc22_31.1 [concrete = constants.%false]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -40,24 +40,18 @@ let c: bool = GreaterEq('a', 'b');
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc21_33.1: bool = value_of_initializer @__global_init.%GreaterEq.call.loc21 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc21_33.2: bool = converted @__global_init.%GreaterEq.call.loc21, %.loc21_33.1 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc21_8: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %a: bool = wrapper_binding a, %.loc21_33.2
|
||||
// CHECK:STDOUT: %.loc21: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %a: bool = wrapper_binding a, @__global_init.%.loc21_33.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.831 = value_binding_pattern a [concrete = constants.%a.patt.567]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc22_33.1: bool = value_of_initializer @__global_init.%GreaterEq.call.loc22 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc22_33.2: bool = converted @__global_init.%GreaterEq.call.loc22, %.loc22_33.1 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc22_8: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %b: bool = wrapper_binding b, %.loc22_33.2
|
||||
// CHECK:STDOUT: %.loc22: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %b: bool = wrapper_binding b, @__global_init.%.loc22_33.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.831 = value_binding_pattern b [concrete = constants.%b.patt.438]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc23_33.1: bool = value_of_initializer @__global_init.%GreaterEq.call.loc23 [concrete = constants.%false]
|
||||
// CHECK:STDOUT: %.loc23_33.2: bool = converted @__global_init.%GreaterEq.call.loc23, %.loc23_33.1 [concrete = constants.%false]
|
||||
// CHECK:STDOUT: %.loc23_8: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %c: bool = wrapper_binding c, %.loc23_33.2
|
||||
// CHECK:STDOUT: %.loc23: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %c: bool = wrapper_binding c, @__global_init.%.loc23_33.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %c.patt: %pattern_type.831 = value_binding_pattern c [concrete = constants.%c.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -69,14 +63,20 @@ let c: bool = GreaterEq('a', 'b');
|
||||
// CHECK:STDOUT: %.loc21_25: Core.CharLiteral = char_value U+0061 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %.loc21_30: Core.CharLiteral = char_value U+0061 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %GreaterEq.call.loc21: init bool = call %GreaterEq.ref.loc21(%.loc21_25, %.loc21_30) [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc21_33.1: bool = value_of_initializer %GreaterEq.call.loc21 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc21_33.2: bool = converted %GreaterEq.call.loc21, %.loc21_33.1 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %GreaterEq.ref.loc22: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [concrete = constants.%GreaterEq]
|
||||
// CHECK:STDOUT: %.loc22_25: Core.CharLiteral = char_value U+0062 [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %.loc22_30: Core.CharLiteral = char_value U+0061 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %GreaterEq.call.loc22: init bool = call %GreaterEq.ref.loc22(%.loc22_25, %.loc22_30) [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc22_33.1: bool = value_of_initializer %GreaterEq.call.loc22 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc22_33.2: bool = converted %GreaterEq.call.loc22, %.loc22_33.1 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %GreaterEq.ref.loc23: %GreaterEq.type = name_ref GreaterEq, file.%GreaterEq.decl [concrete = constants.%GreaterEq]
|
||||
// CHECK:STDOUT: %.loc23_25: Core.CharLiteral = char_value U+0061 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %.loc23_30: Core.CharLiteral = char_value U+0062 [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %GreaterEq.call.loc23: init bool = call %GreaterEq.ref.loc23(%.loc23_25, %.loc23_30) [concrete = constants.%false]
|
||||
// CHECK:STDOUT: %.loc23_33.1: bool = value_of_initializer %GreaterEq.call.loc23 [concrete = constants.%false]
|
||||
// CHECK:STDOUT: %.loc23_33.2: bool = converted %GreaterEq.call.loc23, %.loc23_33.1 [concrete = constants.%false]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -38,17 +38,13 @@ let b: bool = Less('b', 'a');
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc21_28.1: bool = value_of_initializer @__global_init.%Less.call.loc21 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc21_28.2: bool = converted @__global_init.%Less.call.loc21, %.loc21_28.1 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc21_8: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %a: bool = wrapper_binding a, %.loc21_28.2
|
||||
// CHECK:STDOUT: %.loc21: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %a: bool = wrapper_binding a, @__global_init.%.loc21_28.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.831 = value_binding_pattern a [concrete = constants.%a.patt.567]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc22_28.1: bool = value_of_initializer @__global_init.%Less.call.loc22 [concrete = constants.%false]
|
||||
// CHECK:STDOUT: %.loc22_28.2: bool = converted @__global_init.%Less.call.loc22, %.loc22_28.1 [concrete = constants.%false]
|
||||
// CHECK:STDOUT: %.loc22_8: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %b: bool = wrapper_binding b, %.loc22_28.2
|
||||
// CHECK:STDOUT: %.loc22: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %b: bool = wrapper_binding b, @__global_init.%.loc22_28.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.831 = value_binding_pattern b [concrete = constants.%b.patt.438]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -60,10 +56,14 @@ let b: bool = Less('b', 'a');
|
||||
// CHECK:STDOUT: %.loc21_20: Core.CharLiteral = char_value U+0061 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %.loc21_25: Core.CharLiteral = char_value U+0062 [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %Less.call.loc21: init bool = call %Less.ref.loc21(%.loc21_20, %.loc21_25) [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc21_28.1: bool = value_of_initializer %Less.call.loc21 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc21_28.2: bool = converted %Less.call.loc21, %.loc21_28.1 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %Less.ref.loc22: %Less.type = name_ref Less, file.%Less.decl [concrete = constants.%Less]
|
||||
// CHECK:STDOUT: %.loc22_20: Core.CharLiteral = char_value U+0062 [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %.loc22_25: Core.CharLiteral = char_value U+0061 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %Less.call.loc22: init bool = call %Less.ref.loc22(%.loc22_20, %.loc22_25) [concrete = constants.%false]
|
||||
// CHECK:STDOUT: %.loc22_28.1: bool = value_of_initializer %Less.call.loc22 [concrete = constants.%false]
|
||||
// CHECK:STDOUT: %.loc22_28.2: bool = converted %Less.call.loc22, %.loc22_28.1 [concrete = constants.%false]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
+12
-12
@@ -40,24 +40,18 @@ let c: bool = LessEq('b', 'a');
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc21_30.1: bool = value_of_initializer @__global_init.%LessEq.call.loc21 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc21_30.2: bool = converted @__global_init.%LessEq.call.loc21, %.loc21_30.1 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc21_8: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %a: bool = wrapper_binding a, %.loc21_30.2
|
||||
// CHECK:STDOUT: %.loc21: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %a: bool = wrapper_binding a, @__global_init.%.loc21_30.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.831 = value_binding_pattern a [concrete = constants.%a.patt.567]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc22_30.1: bool = value_of_initializer @__global_init.%LessEq.call.loc22 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc22_30.2: bool = converted @__global_init.%LessEq.call.loc22, %.loc22_30.1 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc22_8: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %b: bool = wrapper_binding b, %.loc22_30.2
|
||||
// CHECK:STDOUT: %.loc22: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %b: bool = wrapper_binding b, @__global_init.%.loc22_30.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.831 = value_binding_pattern b [concrete = constants.%b.patt.438]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc23_30.1: bool = value_of_initializer @__global_init.%LessEq.call.loc23 [concrete = constants.%false]
|
||||
// CHECK:STDOUT: %.loc23_30.2: bool = converted @__global_init.%LessEq.call.loc23, %.loc23_30.1 [concrete = constants.%false]
|
||||
// CHECK:STDOUT: %.loc23_8: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %c: bool = wrapper_binding c, %.loc23_30.2
|
||||
// CHECK:STDOUT: %.loc23: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %c: bool = wrapper_binding c, @__global_init.%.loc23_30.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %c.patt: %pattern_type.831 = value_binding_pattern c [concrete = constants.%c.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -69,14 +63,20 @@ let c: bool = LessEq('b', 'a');
|
||||
// CHECK:STDOUT: %.loc21_22: Core.CharLiteral = char_value U+0061 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %.loc21_27: Core.CharLiteral = char_value U+0061 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %LessEq.call.loc21: init bool = call %LessEq.ref.loc21(%.loc21_22, %.loc21_27) [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc21_30.1: bool = value_of_initializer %LessEq.call.loc21 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc21_30.2: bool = converted %LessEq.call.loc21, %.loc21_30.1 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %LessEq.ref.loc22: %LessEq.type = name_ref LessEq, file.%LessEq.decl [concrete = constants.%LessEq]
|
||||
// CHECK:STDOUT: %.loc22_22: Core.CharLiteral = char_value U+0061 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %.loc22_27: Core.CharLiteral = char_value U+0062 [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %LessEq.call.loc22: init bool = call %LessEq.ref.loc22(%.loc22_22, %.loc22_27) [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc22_30.1: bool = value_of_initializer %LessEq.call.loc22 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc22_30.2: bool = converted %LessEq.call.loc22, %.loc22_30.1 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %LessEq.ref.loc23: %LessEq.type = name_ref LessEq, file.%LessEq.decl [concrete = constants.%LessEq]
|
||||
// CHECK:STDOUT: %.loc23_22: Core.CharLiteral = char_value U+0062 [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %.loc23_27: Core.CharLiteral = char_value U+0061 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %LessEq.call.loc23: init bool = call %LessEq.ref.loc23(%.loc23_22, %.loc23_27) [concrete = constants.%false]
|
||||
// CHECK:STDOUT: %.loc23_30.1: bool = value_of_initializer %LessEq.call.loc23 [concrete = constants.%false]
|
||||
// CHECK:STDOUT: %.loc23_30.2: bool = converted %LessEq.call.loc23, %.loc23_30.1 [concrete = constants.%false]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -38,17 +38,13 @@ let b: bool = Neq('a', 'a');
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc21_27.1: bool = value_of_initializer @__global_init.%Neq.call.loc21 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc21_27.2: bool = converted @__global_init.%Neq.call.loc21, %.loc21_27.1 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc21_8: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %a: bool = wrapper_binding a, %.loc21_27.2
|
||||
// CHECK:STDOUT: %.loc21: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %a: bool = wrapper_binding a, @__global_init.%.loc21_27.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.831 = value_binding_pattern a [concrete = constants.%a.patt.567]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc22_27.1: bool = value_of_initializer @__global_init.%Neq.call.loc22 [concrete = constants.%false]
|
||||
// CHECK:STDOUT: %.loc22_27.2: bool = converted @__global_init.%Neq.call.loc22, %.loc22_27.1 [concrete = constants.%false]
|
||||
// CHECK:STDOUT: %.loc22_8: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %b: bool = wrapper_binding b, %.loc22_27.2
|
||||
// CHECK:STDOUT: %.loc22: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %b: bool = wrapper_binding b, @__global_init.%.loc22_27.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.831 = value_binding_pattern b [concrete = constants.%b.patt.438]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -60,10 +56,14 @@ let b: bool = Neq('a', 'a');
|
||||
// CHECK:STDOUT: %.loc21_19: Core.CharLiteral = char_value U+0061 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %.loc21_24: Core.CharLiteral = char_value U+0062 [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %Neq.call.loc21: init bool = call %Neq.ref.loc21(%.loc21_19, %.loc21_24) [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc21_27.1: bool = value_of_initializer %Neq.call.loc21 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc21_27.2: bool = converted %Neq.call.loc21, %.loc21_27.1 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %Neq.ref.loc22: %Neq.type = name_ref Neq, file.%Neq.decl [concrete = constants.%Neq]
|
||||
// CHECK:STDOUT: %.loc22_19: Core.CharLiteral = char_value U+0061 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %.loc22_24: Core.CharLiteral = char_value U+0061 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %Neq.call.loc22: init bool = call %Neq.ref.loc22(%.loc22_19, %.loc22_24) [concrete = constants.%false]
|
||||
// CHECK:STDOUT: %.loc22_27.1: bool = value_of_initializer %Neq.call.loc22 [concrete = constants.%false]
|
||||
// CHECK:STDOUT: %.loc22_27.2: bool = converted %Neq.call.loc22, %.loc22_27.1 [concrete = constants.%false]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
+18
-18
@@ -60,45 +60,33 @@ let min: i32 = SubCharCharToI32('\u{0}', '\u{10FFFF}');
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc24_53.1: Core.IntLiteral = value_of_initializer @__global_init.%SubCharCharToIntLiteral.call.loc24 [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %.loc24_53.2: Core.IntLiteral = converted @__global_init.%SubCharCharToIntLiteral.call.loc24, %.loc24_53.1 [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %IntLiteral.ref.loc24: type = name_ref IntLiteral, %IntLiteral [concrete = Core.IntLiteral]
|
||||
// CHECK:STDOUT: %a: Core.IntLiteral = wrapper_binding a, %.loc24_53.2
|
||||
// CHECK:STDOUT: %a: Core.IntLiteral = wrapper_binding a, @__global_init.%.loc24_53.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.dc0 = value_binding_pattern a [concrete = constants.%a.patt.b0e]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc25_39.1: %i32 = value_of_initializer @__global_init.%SubCharCharToI32.call.loc25 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc25_39.2: %i32 = converted @__global_init.%SubCharCharToI32.call.loc25, %.loc25_39.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %i32.loc25: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %b: %i32 = wrapper_binding b, %.loc25_39.2
|
||||
// CHECK:STDOUT: %b: %i32 = wrapper_binding b, @__global_init.%.loc25_39.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.d94 = value_binding_pattern b [concrete = constants.%b.patt.e34]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc26_53.1: Core.IntLiteral = value_of_initializer @__global_init.%SubCharCharToIntLiteral.call.loc26 [concrete = constants.%int_-1.638]
|
||||
// CHECK:STDOUT: %.loc26_53.2: Core.IntLiteral = converted @__global_init.%SubCharCharToIntLiteral.call.loc26, %.loc26_53.1 [concrete = constants.%int_-1.638]
|
||||
// CHECK:STDOUT: %IntLiteral.ref.loc26: type = name_ref IntLiteral, %IntLiteral [concrete = Core.IntLiteral]
|
||||
// CHECK:STDOUT: %c: Core.IntLiteral = wrapper_binding c, %.loc26_53.2
|
||||
// CHECK:STDOUT: %c: Core.IntLiteral = wrapper_binding c, @__global_init.%.loc26_53.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %c.patt: %pattern_type.dc0 = value_binding_pattern c [concrete = constants.%c.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc27_39.1: %i32 = value_of_initializer @__global_init.%SubCharCharToI32.call.loc27 [concrete = constants.%int_-1.782]
|
||||
// CHECK:STDOUT: %.loc27_39.2: %i32 = converted @__global_init.%SubCharCharToI32.call.loc27, %.loc27_39.1 [concrete = constants.%int_-1.782]
|
||||
// CHECK:STDOUT: %i32.loc27: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %d: %i32 = wrapper_binding d, %.loc27_39.2
|
||||
// CHECK:STDOUT: %d: %i32 = wrapper_binding d, @__global_init.%.loc27_39.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %d.patt: %pattern_type.d94 = value_binding_pattern d [concrete = constants.%d.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc28_54.1: %i32 = value_of_initializer @__global_init.%SubCharCharToI32.call.loc28 [concrete = constants.%int_1114111]
|
||||
// CHECK:STDOUT: %.loc28_54.2: %i32 = converted @__global_init.%SubCharCharToI32.call.loc28, %.loc28_54.1 [concrete = constants.%int_1114111]
|
||||
// CHECK:STDOUT: %i32.loc28: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %max: %i32 = wrapper_binding max, %.loc28_54.2
|
||||
// CHECK:STDOUT: %max: %i32 = wrapper_binding max, @__global_init.%.loc28_54.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %max.patt: %pattern_type.d94 = value_binding_pattern max [concrete = constants.%max.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc29_54.1: %i32 = value_of_initializer @__global_init.%SubCharCharToI32.call.loc29 [concrete = constants.%int_-1114111]
|
||||
// CHECK:STDOUT: %.loc29_54.2: %i32 = converted @__global_init.%SubCharCharToI32.call.loc29, %.loc29_54.1 [concrete = constants.%int_-1114111]
|
||||
// CHECK:STDOUT: %i32.loc29: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %min: %i32 = wrapper_binding min, %.loc29_54.2
|
||||
// CHECK:STDOUT: %min: %i32 = wrapper_binding min, @__global_init.%.loc29_54.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %min.patt: %pattern_type.d94 = value_binding_pattern min [concrete = constants.%min.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -110,26 +98,38 @@ let min: i32 = SubCharCharToI32('\u{0}', '\u{10FFFF}');
|
||||
// CHECK:STDOUT: %.loc24_45: Core.CharLiteral = char_value U+0062 [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %.loc24_50: Core.CharLiteral = char_value U+0061 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %SubCharCharToIntLiteral.call.loc24: init Core.IntLiteral = call %SubCharCharToIntLiteral.ref.loc24(%.loc24_45, %.loc24_50) [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %.loc24_53.1: Core.IntLiteral = value_of_initializer %SubCharCharToIntLiteral.call.loc24 [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %.loc24_53.2: Core.IntLiteral = converted %SubCharCharToIntLiteral.call.loc24, %.loc24_53.1 [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %SubCharCharToI32.ref.loc25: %SubCharCharToI32.type = name_ref SubCharCharToI32, file.%SubCharCharToI32.decl [concrete = constants.%SubCharCharToI32]
|
||||
// CHECK:STDOUT: %.loc25_31: Core.CharLiteral = char_value U+0062 [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %.loc25_36: Core.CharLiteral = char_value U+0061 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %SubCharCharToI32.call.loc25: init %i32 = call %SubCharCharToI32.ref.loc25(%.loc25_31, %.loc25_36) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc25_39.1: %i32 = value_of_initializer %SubCharCharToI32.call.loc25 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc25_39.2: %i32 = converted %SubCharCharToI32.call.loc25, %.loc25_39.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %SubCharCharToIntLiteral.ref.loc26: %SubCharCharToIntLiteral.type = name_ref SubCharCharToIntLiteral, file.%SubCharCharToIntLiteral.decl [concrete = constants.%SubCharCharToIntLiteral]
|
||||
// CHECK:STDOUT: %.loc26_45: Core.CharLiteral = char_value U+0061 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %.loc26_50: Core.CharLiteral = char_value U+0062 [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %SubCharCharToIntLiteral.call.loc26: init Core.IntLiteral = call %SubCharCharToIntLiteral.ref.loc26(%.loc26_45, %.loc26_50) [concrete = constants.%int_-1.638]
|
||||
// CHECK:STDOUT: %.loc26_53.1: Core.IntLiteral = value_of_initializer %SubCharCharToIntLiteral.call.loc26 [concrete = constants.%int_-1.638]
|
||||
// CHECK:STDOUT: %.loc26_53.2: Core.IntLiteral = converted %SubCharCharToIntLiteral.call.loc26, %.loc26_53.1 [concrete = constants.%int_-1.638]
|
||||
// CHECK:STDOUT: %SubCharCharToI32.ref.loc27: %SubCharCharToI32.type = name_ref SubCharCharToI32, file.%SubCharCharToI32.decl [concrete = constants.%SubCharCharToI32]
|
||||
// CHECK:STDOUT: %.loc27_31: Core.CharLiteral = char_value U+0061 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %.loc27_36: Core.CharLiteral = char_value U+0062 [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %SubCharCharToI32.call.loc27: init %i32 = call %SubCharCharToI32.ref.loc27(%.loc27_31, %.loc27_36) [concrete = constants.%int_-1.782]
|
||||
// CHECK:STDOUT: %.loc27_39.1: %i32 = value_of_initializer %SubCharCharToI32.call.loc27 [concrete = constants.%int_-1.782]
|
||||
// CHECK:STDOUT: %.loc27_39.2: %i32 = converted %SubCharCharToI32.call.loc27, %.loc27_39.1 [concrete = constants.%int_-1.782]
|
||||
// CHECK:STDOUT: %SubCharCharToI32.ref.loc28: %SubCharCharToI32.type = name_ref SubCharCharToI32, file.%SubCharCharToI32.decl [concrete = constants.%SubCharCharToI32]
|
||||
// CHECK:STDOUT: %.loc28_33: Core.CharLiteral = char_value U+10FFFF [concrete = constants.%.914]
|
||||
// CHECK:STDOUT: %.loc28_47: Core.CharLiteral = char_value U+0000 [concrete = constants.%.dc9]
|
||||
// CHECK:STDOUT: %SubCharCharToI32.call.loc28: init %i32 = call %SubCharCharToI32.ref.loc28(%.loc28_33, %.loc28_47) [concrete = constants.%int_1114111]
|
||||
// CHECK:STDOUT: %.loc28_54.1: %i32 = value_of_initializer %SubCharCharToI32.call.loc28 [concrete = constants.%int_1114111]
|
||||
// CHECK:STDOUT: %.loc28_54.2: %i32 = converted %SubCharCharToI32.call.loc28, %.loc28_54.1 [concrete = constants.%int_1114111]
|
||||
// CHECK:STDOUT: %SubCharCharToI32.ref.loc29: %SubCharCharToI32.type = name_ref SubCharCharToI32, file.%SubCharCharToI32.decl [concrete = constants.%SubCharCharToI32]
|
||||
// CHECK:STDOUT: %.loc29_33: Core.CharLiteral = char_value U+0000 [concrete = constants.%.dc9]
|
||||
// CHECK:STDOUT: %.loc29_42: Core.CharLiteral = char_value U+10FFFF [concrete = constants.%.914]
|
||||
// CHECK:STDOUT: %SubCharCharToI32.call.loc29: init %i32 = call %SubCharCharToI32.ref.loc29(%.loc29_33, %.loc29_42) [concrete = constants.%int_-1114111]
|
||||
// CHECK:STDOUT: %.loc29_54.1: %i32 = value_of_initializer %SubCharCharToI32.call.loc29 [concrete = constants.%int_-1114111]
|
||||
// CHECK:STDOUT: %.loc29_54.2: %i32 = converted %SubCharCharToI32.call.loc29, %.loc29_54.1 [concrete = constants.%int_-1114111]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
+11
-11
@@ -85,24 +85,18 @@ let b: CharLiteral = SubCharInt('\u{10FFFF}', Negate(1));
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc13_39.1: Core.CharLiteral = value_of_initializer @__global_init.%SubCharInt.call.loc13 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %.loc13_39.2: Core.CharLiteral = converted @__global_init.%SubCharInt.call.loc13, %.loc13_39.1 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %CharLiteral.ref.loc13: type = name_ref CharLiteral, %CharLiteral [concrete = Core.CharLiteral]
|
||||
// CHECK:STDOUT: %a: Core.CharLiteral = wrapper_binding a, %.loc13_39.2
|
||||
// CHECK:STDOUT: %a: Core.CharLiteral = wrapper_binding a, @__global_init.%.loc13_39.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.8c6 = value_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc16_52.1: Core.CharLiteral = value_of_initializer @__global_init.%SubCharInt.call.loc16 [concrete = constants.%.ae7]
|
||||
// CHECK:STDOUT: %.loc16_52.2: Core.CharLiteral = converted @__global_init.%SubCharInt.call.loc16, %.loc16_52.1 [concrete = constants.%.ae7]
|
||||
// CHECK:STDOUT: %CharLiteral.ref.loc16: type = name_ref CharLiteral, %CharLiteral [concrete = Core.CharLiteral]
|
||||
// CHECK:STDOUT: %b: Core.CharLiteral = wrapper_binding b, %.loc16_52.2
|
||||
// CHECK:STDOUT: %b: Core.CharLiteral = wrapper_binding b, @__global_init.%.loc16_52.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.8c6 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc17_52.1: Core.CharLiteral = value_of_initializer @__global_init.%SubCharInt.call.loc17 [concrete = constants.%.a8b]
|
||||
// CHECK:STDOUT: %.loc17_52.2: Core.CharLiteral = converted @__global_init.%SubCharInt.call.loc17, %.loc17_52.1 [concrete = constants.%.a8b]
|
||||
// CHECK:STDOUT: %CharLiteral.ref.loc17: type = name_ref CharLiteral, %CharLiteral [concrete = Core.CharLiteral]
|
||||
// CHECK:STDOUT: %c: Core.CharLiteral = wrapper_binding c, %.loc17_52.2
|
||||
// CHECK:STDOUT: %c: Core.CharLiteral = wrapper_binding c, @__global_init.%.loc17_52.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %c.patt: %pattern_type.8c6 = value_binding_pattern c [concrete = constants.%c.patt.c30]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -111,9 +105,11 @@ let b: CharLiteral = SubCharInt('\u{10FFFF}', Negate(1));
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %SubCharInt.ref.loc13: %SubCharInt.type = name_ref SubCharInt, file.%SubCharInt.decl [concrete = constants.%SubCharInt]
|
||||
// CHECK:STDOUT: %.loc13: Core.CharLiteral = char_value U+0062 [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %.loc13_33: Core.CharLiteral = char_value U+0062 [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %int_1.loc13: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
|
||||
// CHECK:STDOUT: %SubCharInt.call.loc13: init Core.CharLiteral = call %SubCharInt.ref.loc13(%.loc13, %int_1.loc13) [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %SubCharInt.call.loc13: init Core.CharLiteral = call %SubCharInt.ref.loc13(%.loc13_33, %int_1.loc13) [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %.loc13_39.1: Core.CharLiteral = value_of_initializer %SubCharInt.call.loc13 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %.loc13_39.2: Core.CharLiteral = converted %SubCharInt.call.loc13, %.loc13_39.1 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %SubCharInt.ref.loc16: %SubCharInt.type = name_ref SubCharInt, file.%SubCharInt.decl [concrete = constants.%SubCharInt]
|
||||
// CHECK:STDOUT: %.loc16_33: Core.CharLiteral = char_value U+007F [concrete = constants.%.e28]
|
||||
// CHECK:STDOUT: %Negate.ref.loc16: %Negate.type = name_ref Negate, file.%Negate.decl [concrete = constants.%Negate]
|
||||
@@ -122,6 +118,8 @@ let b: CharLiteral = SubCharInt('\u{10FFFF}', Negate(1));
|
||||
// CHECK:STDOUT: %.loc16_51.1: Core.IntLiteral = value_of_initializer %Negate.call.loc16 [concrete = constants.%int_-1]
|
||||
// CHECK:STDOUT: %.loc16_51.2: Core.IntLiteral = converted %Negate.call.loc16, %.loc16_51.1 [concrete = constants.%int_-1]
|
||||
// CHECK:STDOUT: %SubCharInt.call.loc16: init Core.CharLiteral = call %SubCharInt.ref.loc16(%.loc16_33, %.loc16_51.2) [concrete = constants.%.ae7]
|
||||
// CHECK:STDOUT: %.loc16_52.1: Core.CharLiteral = value_of_initializer %SubCharInt.call.loc16 [concrete = constants.%.ae7]
|
||||
// CHECK:STDOUT: %.loc16_52.2: Core.CharLiteral = converted %SubCharInt.call.loc16, %.loc16_52.1 [concrete = constants.%.ae7]
|
||||
// CHECK:STDOUT: %SubCharInt.ref.loc17: %SubCharInt.type = name_ref SubCharInt, file.%SubCharInt.decl [concrete = constants.%SubCharInt]
|
||||
// CHECK:STDOUT: %.loc17_33: Core.CharLiteral = char_value U+00FF [concrete = constants.%.ad8]
|
||||
// CHECK:STDOUT: %Negate.ref.loc17: %Negate.type = name_ref Negate, file.%Negate.decl [concrete = constants.%Negate]
|
||||
@@ -130,6 +128,8 @@ let b: CharLiteral = SubCharInt('\u{10FFFF}', Negate(1));
|
||||
// CHECK:STDOUT: %.loc17_51.1: Core.IntLiteral = value_of_initializer %Negate.call.loc17 [concrete = constants.%int_-1]
|
||||
// CHECK:STDOUT: %.loc17_51.2: Core.IntLiteral = converted %Negate.call.loc17, %.loc17_51.1 [concrete = constants.%int_-1]
|
||||
// CHECK:STDOUT: %SubCharInt.call.loc17: init Core.CharLiteral = call %SubCharInt.ref.loc17(%.loc17_33, %.loc17_51.2) [concrete = constants.%.a8b]
|
||||
// CHECK:STDOUT: %.loc17_52.1: Core.CharLiteral = value_of_initializer %SubCharInt.call.loc17 [concrete = constants.%.a8b]
|
||||
// CHECK:STDOUT: %.loc17_52.2: Core.CharLiteral = converted %SubCharInt.call.loc17, %.loc17_52.1 [concrete = constants.%.a8b]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
+57
-57
@@ -136,10 +136,8 @@ let b: f64 = Float32ToFloat64(1.0e30);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc6_53.1: Core.FloatLiteral = value_of_initializer @__global_init.%FloatLiteralToFloatLiteral.call [concrete = constants.%float]
|
||||
// CHECK:STDOUT: %.loc6_53.2: Core.FloatLiteral = converted @__global_init.%FloatLiteralToFloatLiteral.call, %.loc6_53.1 [concrete = constants.%float]
|
||||
// CHECK:STDOUT: %FloatLiteral.ref: type = name_ref FloatLiteral, imports.%Main.FloatLiteral [concrete = Core.FloatLiteral]
|
||||
// CHECK:STDOUT: %f: Core.FloatLiteral = wrapper_binding f, %.loc6_53.2
|
||||
// CHECK:STDOUT: %f: Core.FloatLiteral = wrapper_binding f, @__global_init.%.loc6_53.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %f.patt: %pattern_type = value_binding_pattern f [concrete = constants.%f.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -150,6 +148,8 @@ let b: f64 = Float32ToFloat64(1.0e30);
|
||||
// CHECK:STDOUT: %FloatLiteralToFloatLiteral.ref: %FloatLiteralToFloatLiteral.type = name_ref FloatLiteralToFloatLiteral, imports.%Main.FloatLiteralToFloatLiteral [concrete = constants.%FloatLiteralToFloatLiteral]
|
||||
// CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float]
|
||||
// CHECK:STDOUT: %FloatLiteralToFloatLiteral.call: init Core.FloatLiteral = call %FloatLiteralToFloatLiteral.ref(%float) [concrete = constants.%float]
|
||||
// CHECK:STDOUT: %.loc6_53.1: Core.FloatLiteral = value_of_initializer %FloatLiteralToFloatLiteral.call [concrete = constants.%float]
|
||||
// CHECK:STDOUT: %.loc6_53.2: Core.FloatLiteral = converted %FloatLiteralToFloatLiteral.call, %.loc6_53.1 [concrete = constants.%float]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -181,31 +181,23 @@ let b: f64 = Float32ToFloat64(1.0e30);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc6_39.1: %f64.761 = value_of_initializer @__global_init.%FloatLiteralToFloat64.call.loc6 [concrete = constants.%float.73e]
|
||||
// CHECK:STDOUT: %.loc6_39.2: %f64.761 = converted @__global_init.%FloatLiteralToFloat64.call.loc6, %.loc6_39.1 [concrete = constants.%float.73e]
|
||||
// CHECK:STDOUT: %f64.loc6: type = type_literal constants.%f64.761 [concrete = constants.%f64.761]
|
||||
// CHECK:STDOUT: %a: %f64.761 = wrapper_binding a, %.loc6_39.2
|
||||
// CHECK:STDOUT: %a: %f64.761 = wrapper_binding a, @__global_init.%.loc6_39.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.667 = value_binding_pattern a [concrete = constants.%a.patt.6ca]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc7_39.1: %f64.761 = value_of_initializer @__global_init.%FloatLiteralToFloat64.call.loc7 [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %.loc7_39.2: %f64.761 = converted @__global_init.%FloatLiteralToFloat64.call.loc7, %.loc7_39.1 [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %f64.loc7: type = type_literal constants.%f64.761 [concrete = constants.%f64.761]
|
||||
// CHECK:STDOUT: %b: %f64.761 = wrapper_binding b, %.loc7_39.2
|
||||
// CHECK:STDOUT: %b: %f64.761 = wrapper_binding b, @__global_init.%.loc7_39.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.667 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc8_43.1: %f64.761 = value_of_initializer @__global_init.%FloatLiteralToFloat64.call.loc8 [concrete = constants.%float.781]
|
||||
// CHECK:STDOUT: %.loc8_43.2: %f64.761 = converted @__global_init.%FloatLiteralToFloat64.call.loc8, %.loc8_43.1 [concrete = constants.%float.781]
|
||||
// CHECK:STDOUT: %f64.loc8: type = type_literal constants.%f64.761 [concrete = constants.%f64.761]
|
||||
// CHECK:STDOUT: %c: %f64.761 = wrapper_binding c, %.loc8_43.2
|
||||
// CHECK:STDOUT: %c: %f64.761 = wrapper_binding c, @__global_init.%.loc8_43.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %c.patt: %pattern_type.667 = value_binding_pattern c [concrete = constants.%c.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc10_43.1: %f64.761 = value_of_initializer @__global_init.%FloatLiteralToFloat64.call.loc10 [concrete = constants.%float.62c]
|
||||
// CHECK:STDOUT: %.loc10_43.2: %f64.761 = converted @__global_init.%FloatLiteralToFloat64.call.loc10, %.loc10_43.1 [concrete = constants.%float.62c]
|
||||
// CHECK:STDOUT: %f64.loc10: type = type_literal constants.%f64.761 [concrete = constants.%f64.761]
|
||||
// CHECK:STDOUT: %d: %f64.761 = wrapper_binding d, %.loc10_43.2
|
||||
// CHECK:STDOUT: %d: %f64.761 = wrapper_binding d, @__global_init.%.loc10_43.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %d.patt: %pattern_type.667 = value_binding_pattern d [concrete = constants.%d.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -216,15 +208,23 @@ let b: f64 = Float32ToFloat64(1.0e30);
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat64.ref.loc6: %FloatLiteralToFloat64.type = name_ref FloatLiteralToFloat64, imports.%Main.FloatLiteralToFloat64 [concrete = constants.%FloatLiteralToFloat64]
|
||||
// CHECK:STDOUT: %float.loc6: Core.FloatLiteral = float_literal_value 0e-1 [concrete = constants.%float.1f7]
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat64.call.loc6: init %f64.761 = call %FloatLiteralToFloat64.ref.loc6(%float.loc6) [concrete = constants.%float.73e]
|
||||
// CHECK:STDOUT: %.loc6_39.1: %f64.761 = value_of_initializer %FloatLiteralToFloat64.call.loc6 [concrete = constants.%float.73e]
|
||||
// CHECK:STDOUT: %.loc6_39.2: %f64.761 = converted %FloatLiteralToFloat64.call.loc6, %.loc6_39.1 [concrete = constants.%float.73e]
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat64.ref.loc7: %FloatLiteralToFloat64.type = name_ref FloatLiteralToFloat64, imports.%Main.FloatLiteralToFloat64 [concrete = constants.%FloatLiteralToFloat64]
|
||||
// CHECK:STDOUT: %float.loc7: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.6da]
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat64.call.loc7: init %f64.761 = call %FloatLiteralToFloat64.ref.loc7(%float.loc7) [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %.loc7_39.1: %f64.761 = value_of_initializer %FloatLiteralToFloat64.call.loc7 [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %.loc7_39.2: %f64.761 = converted %FloatLiteralToFloat64.call.loc7, %.loc7_39.1 [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat64.ref.loc8: %FloatLiteralToFloat64.type = name_ref FloatLiteralToFloat64, imports.%Main.FloatLiteralToFloat64 [concrete = constants.%FloatLiteralToFloat64]
|
||||
// CHECK:STDOUT: %float.loc8: Core.FloatLiteral = float_literal_value 10e307 [concrete = constants.%float.12a]
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat64.call.loc8: init %f64.761 = call %FloatLiteralToFloat64.ref.loc8(%float.loc8) [concrete = constants.%float.781]
|
||||
// CHECK:STDOUT: %.loc8_43.1: %f64.761 = value_of_initializer %FloatLiteralToFloat64.call.loc8 [concrete = constants.%float.781]
|
||||
// CHECK:STDOUT: %.loc8_43.2: %f64.761 = converted %FloatLiteralToFloat64.call.loc8, %.loc8_43.1 [concrete = constants.%float.781]
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat64.ref.loc10: %FloatLiteralToFloat64.type = name_ref FloatLiteralToFloat64, imports.%Main.FloatLiteralToFloat64 [concrete = constants.%FloatLiteralToFloat64]
|
||||
// CHECK:STDOUT: %float.loc10: Core.FloatLiteral = float_literal_value 10e308 [concrete = constants.%float.82f]
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat64.call.loc10: init %f64.761 = call %FloatLiteralToFloat64.ref.loc10(%float.loc10) [concrete = constants.%float.62c]
|
||||
// CHECK:STDOUT: %.loc10_43.1: %f64.761 = value_of_initializer %FloatLiteralToFloat64.call.loc10 [concrete = constants.%float.62c]
|
||||
// CHECK:STDOUT: %.loc10_43.2: %f64.761 = converted %FloatLiteralToFloat64.call.loc10, %.loc10_43.1 [concrete = constants.%float.62c]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -256,31 +256,23 @@ let b: f64 = Float32ToFloat64(1.0e30);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc6_39.1: %f32.3bc = value_of_initializer @__global_init.%FloatLiteralToFloat32.call.loc6 [concrete = constants.%float.3f9]
|
||||
// CHECK:STDOUT: %.loc6_39.2: %f32.3bc = converted @__global_init.%FloatLiteralToFloat32.call.loc6, %.loc6_39.1 [concrete = constants.%float.3f9]
|
||||
// CHECK:STDOUT: %f32.loc6: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc]
|
||||
// CHECK:STDOUT: %a: %f32.3bc = wrapper_binding a, %.loc6_39.2
|
||||
// CHECK:STDOUT: %a: %f32.3bc = wrapper_binding a, @__global_init.%.loc6_39.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.239 = value_binding_pattern a [concrete = constants.%a.patt.56d]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc7_39.1: %f32.3bc = value_of_initializer @__global_init.%FloatLiteralToFloat32.call.loc7 [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %.loc7_39.2: %f32.3bc = converted @__global_init.%FloatLiteralToFloat32.call.loc7, %.loc7_39.1 [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %f32.loc7: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc]
|
||||
// CHECK:STDOUT: %b: %f32.3bc = wrapper_binding b, %.loc7_39.2
|
||||
// CHECK:STDOUT: %b: %f32.3bc = wrapper_binding b, @__global_init.%.loc7_39.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.239 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc8_42.1: %f32.3bc = value_of_initializer @__global_init.%FloatLiteralToFloat32.call.loc8 [concrete = constants.%float.823]
|
||||
// CHECK:STDOUT: %.loc8_42.2: %f32.3bc = converted @__global_init.%FloatLiteralToFloat32.call.loc8, %.loc8_42.1 [concrete = constants.%float.823]
|
||||
// CHECK:STDOUT: %f32.loc8: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc]
|
||||
// CHECK:STDOUT: %c: %f32.3bc = wrapper_binding c, %.loc8_42.2
|
||||
// CHECK:STDOUT: %c: %f32.3bc = wrapper_binding c, @__global_init.%.loc8_42.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %c.patt: %pattern_type.239 = value_binding_pattern c [concrete = constants.%c.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc10_42.1: %f32.3bc = value_of_initializer @__global_init.%FloatLiteralToFloat32.call.loc10 [concrete = constants.%float.5a5]
|
||||
// CHECK:STDOUT: %.loc10_42.2: %f32.3bc = converted @__global_init.%FloatLiteralToFloat32.call.loc10, %.loc10_42.1 [concrete = constants.%float.5a5]
|
||||
// CHECK:STDOUT: %f32.loc10: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc]
|
||||
// CHECK:STDOUT: %d: %f32.3bc = wrapper_binding d, %.loc10_42.2
|
||||
// CHECK:STDOUT: %d: %f32.3bc = wrapper_binding d, @__global_init.%.loc10_42.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %d.patt: %pattern_type.239 = value_binding_pattern d [concrete = constants.%d.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -291,15 +283,23 @@ let b: f64 = Float32ToFloat64(1.0e30);
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat32.ref.loc6: %FloatLiteralToFloat32.type = name_ref FloatLiteralToFloat32, imports.%Main.FloatLiteralToFloat32 [concrete = constants.%FloatLiteralToFloat32]
|
||||
// CHECK:STDOUT: %float.loc6: Core.FloatLiteral = float_literal_value 0e-1 [concrete = constants.%float.1f7]
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat32.call.loc6: init %f32.3bc = call %FloatLiteralToFloat32.ref.loc6(%float.loc6) [concrete = constants.%float.3f9]
|
||||
// CHECK:STDOUT: %.loc6_39.1: %f32.3bc = value_of_initializer %FloatLiteralToFloat32.call.loc6 [concrete = constants.%float.3f9]
|
||||
// CHECK:STDOUT: %.loc6_39.2: %f32.3bc = converted %FloatLiteralToFloat32.call.loc6, %.loc6_39.1 [concrete = constants.%float.3f9]
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat32.ref.loc7: %FloatLiteralToFloat32.type = name_ref FloatLiteralToFloat32, imports.%Main.FloatLiteralToFloat32 [concrete = constants.%FloatLiteralToFloat32]
|
||||
// CHECK:STDOUT: %float.loc7: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.6da]
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat32.call.loc7: init %f32.3bc = call %FloatLiteralToFloat32.ref.loc7(%float.loc7) [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %.loc7_39.1: %f32.3bc = value_of_initializer %FloatLiteralToFloat32.call.loc7 [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %.loc7_39.2: %f32.3bc = converted %FloatLiteralToFloat32.call.loc7, %.loc7_39.1 [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat32.ref.loc8: %FloatLiteralToFloat32.type = name_ref FloatLiteralToFloat32, imports.%Main.FloatLiteralToFloat32 [concrete = constants.%FloatLiteralToFloat32]
|
||||
// CHECK:STDOUT: %float.loc8: Core.FloatLiteral = float_literal_value 10e37 [concrete = constants.%float.8d2]
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat32.call.loc8: init %f32.3bc = call %FloatLiteralToFloat32.ref.loc8(%float.loc8) [concrete = constants.%float.823]
|
||||
// CHECK:STDOUT: %.loc8_42.1: %f32.3bc = value_of_initializer %FloatLiteralToFloat32.call.loc8 [concrete = constants.%float.823]
|
||||
// CHECK:STDOUT: %.loc8_42.2: %f32.3bc = converted %FloatLiteralToFloat32.call.loc8, %.loc8_42.1 [concrete = constants.%float.823]
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat32.ref.loc10: %FloatLiteralToFloat32.type = name_ref FloatLiteralToFloat32, imports.%Main.FloatLiteralToFloat32 [concrete = constants.%FloatLiteralToFloat32]
|
||||
// CHECK:STDOUT: %float.loc10: Core.FloatLiteral = float_literal_value 10e38 [concrete = constants.%float.cfc]
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat32.call.loc10: init %f32.3bc = call %FloatLiteralToFloat32.ref.loc10(%float.loc10) [concrete = constants.%float.5a5]
|
||||
// CHECK:STDOUT: %.loc10_42.1: %f32.3bc = value_of_initializer %FloatLiteralToFloat32.call.loc10 [concrete = constants.%float.5a5]
|
||||
// CHECK:STDOUT: %.loc10_42.2: %f32.3bc = converted %FloatLiteralToFloat32.call.loc10, %.loc10_42.1 [concrete = constants.%float.5a5]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -347,24 +347,18 @@ let b: f64 = Float32ToFloat64(1.0e30);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc6_34.1: %f64.761 = value_of_initializer @__global_init.%Float64ToFloat64.call.loc6 [concrete = constants.%float.73e]
|
||||
// CHECK:STDOUT: %.loc6_34.2: %f64.761 = converted @__global_init.%Float64ToFloat64.call.loc6, %.loc6_34.1 [concrete = constants.%float.73e]
|
||||
// CHECK:STDOUT: %f64.loc6: type = type_literal constants.%f64.761 [concrete = constants.%f64.761]
|
||||
// CHECK:STDOUT: %a: %f64.761 = wrapper_binding a, %.loc6_34.2
|
||||
// CHECK:STDOUT: %a: %f64.761 = wrapper_binding a, @__global_init.%.loc6_34.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.667 = value_binding_pattern a [concrete = constants.%a.patt.6ca]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc7_34.1: %f64.761 = value_of_initializer @__global_init.%Float64ToFloat64.call.loc7 [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %.loc7_34.2: %f64.761 = converted @__global_init.%Float64ToFloat64.call.loc7, %.loc7_34.1 [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %f64.loc7: type = type_literal constants.%f64.761 [concrete = constants.%f64.761]
|
||||
// CHECK:STDOUT: %b: %f64.761 = wrapper_binding b, %.loc7_34.2
|
||||
// CHECK:STDOUT: %b: %f64.761 = wrapper_binding b, @__global_init.%.loc7_34.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.667 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc8_38.1: %f64.761 = value_of_initializer @__global_init.%Float64ToFloat64.call.loc8 [concrete = constants.%float.781]
|
||||
// CHECK:STDOUT: %.loc8_38.2: %f64.761 = converted @__global_init.%Float64ToFloat64.call.loc8, %.loc8_38.1 [concrete = constants.%float.781]
|
||||
// CHECK:STDOUT: %f64.loc8: type = type_literal constants.%f64.761 [concrete = constants.%f64.761]
|
||||
// CHECK:STDOUT: %c: %f64.761 = wrapper_binding c, %.loc8_38.2
|
||||
// CHECK:STDOUT: %c: %f64.761 = wrapper_binding c, @__global_init.%.loc8_38.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %c.patt: %pattern_type.667 = value_binding_pattern c [concrete = constants.%c.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -382,6 +376,8 @@ let b: f64 = Float32ToFloat64(1.0e30);
|
||||
// CHECK:STDOUT: %.loc6_31.1: %f64.761 = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call.loc6 [concrete = constants.%float.73e]
|
||||
// CHECK:STDOUT: %.loc6_31.2: %f64.761 = converted %float.loc6, %.loc6_31.1 [concrete = constants.%float.73e]
|
||||
// CHECK:STDOUT: %Float64ToFloat64.call.loc6: init %f64.761 = call %Float64ToFloat64.ref.loc6(%.loc6_31.2) [concrete = constants.%float.73e]
|
||||
// CHECK:STDOUT: %.loc6_34.1: %f64.761 = value_of_initializer %Float64ToFloat64.call.loc6 [concrete = constants.%float.73e]
|
||||
// CHECK:STDOUT: %.loc6_34.2: %f64.761 = converted %Float64ToFloat64.call.loc6, %.loc6_34.1 [concrete = constants.%float.73e]
|
||||
// CHECK:STDOUT: %Float64ToFloat64.ref.loc7: %Float64ToFloat64.type = name_ref Float64ToFloat64, imports.%Main.Float64ToFloat64 [concrete = constants.%Float64ToFloat64]
|
||||
// CHECK:STDOUT: %float.loc7: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.6da]
|
||||
// CHECK:STDOUT: %impl.elem0.loc7: %.b5b = impl_witness_access constants.%ImplicitAs.impl_witness.1d6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.9d0]
|
||||
@@ -392,6 +388,8 @@ let b: f64 = Float32ToFloat64(1.0e30);
|
||||
// CHECK:STDOUT: %.loc7_31.1: %f64.761 = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call.loc7 [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %.loc7_31.2: %f64.761 = converted %float.loc7, %.loc7_31.1 [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %Float64ToFloat64.call.loc7: init %f64.761 = call %Float64ToFloat64.ref.loc7(%.loc7_31.2) [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %.loc7_34.1: %f64.761 = value_of_initializer %Float64ToFloat64.call.loc7 [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %.loc7_34.2: %f64.761 = converted %Float64ToFloat64.call.loc7, %.loc7_34.1 [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %Float64ToFloat64.ref.loc8: %Float64ToFloat64.type = name_ref Float64ToFloat64, imports.%Main.Float64ToFloat64 [concrete = constants.%Float64ToFloat64]
|
||||
// CHECK:STDOUT: %float.loc8: Core.FloatLiteral = float_literal_value 10e307 [concrete = constants.%float.12a]
|
||||
// CHECK:STDOUT: %impl.elem0.loc8: %.b5b = impl_witness_access constants.%ImplicitAs.impl_witness.1d6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.9d0]
|
||||
@@ -402,6 +400,8 @@ let b: f64 = Float32ToFloat64(1.0e30);
|
||||
// CHECK:STDOUT: %.loc8_31.1: %f64.761 = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%float.781]
|
||||
// CHECK:STDOUT: %.loc8_31.2: %f64.761 = converted %float.loc8, %.loc8_31.1 [concrete = constants.%float.781]
|
||||
// CHECK:STDOUT: %Float64ToFloat64.call.loc8: init %f64.761 = call %Float64ToFloat64.ref.loc8(%.loc8_31.2) [concrete = constants.%float.781]
|
||||
// CHECK:STDOUT: %.loc8_38.1: %f64.761 = value_of_initializer %Float64ToFloat64.call.loc8 [concrete = constants.%float.781]
|
||||
// CHECK:STDOUT: %.loc8_38.2: %f64.761 = converted %Float64ToFloat64.call.loc8, %.loc8_38.1 [concrete = constants.%float.781]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -449,24 +449,18 @@ let b: f64 = Float32ToFloat64(1.0e30);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc6_34.1: %f32.3bc = value_of_initializer @__global_init.%Float32ToFloat32.call.loc6 [concrete = constants.%float.3f9]
|
||||
// CHECK:STDOUT: %.loc6_34.2: %f32.3bc = converted @__global_init.%Float32ToFloat32.call.loc6, %.loc6_34.1 [concrete = constants.%float.3f9]
|
||||
// CHECK:STDOUT: %f32.loc6: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc]
|
||||
// CHECK:STDOUT: %a: %f32.3bc = wrapper_binding a, %.loc6_34.2
|
||||
// CHECK:STDOUT: %a: %f32.3bc = wrapper_binding a, @__global_init.%.loc6_34.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.239 = value_binding_pattern a [concrete = constants.%a.patt.56d]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc7_34.1: %f32.3bc = value_of_initializer @__global_init.%Float32ToFloat32.call.loc7 [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %.loc7_34.2: %f32.3bc = converted @__global_init.%Float32ToFloat32.call.loc7, %.loc7_34.1 [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %f32.loc7: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc]
|
||||
// CHECK:STDOUT: %b: %f32.3bc = wrapper_binding b, %.loc7_34.2
|
||||
// CHECK:STDOUT: %b: %f32.3bc = wrapper_binding b, @__global_init.%.loc7_34.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.239 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc8_37.1: %f32.3bc = value_of_initializer @__global_init.%Float32ToFloat32.call.loc8 [concrete = constants.%float.823]
|
||||
// CHECK:STDOUT: %.loc8_37.2: %f32.3bc = converted @__global_init.%Float32ToFloat32.call.loc8, %.loc8_37.1 [concrete = constants.%float.823]
|
||||
// CHECK:STDOUT: %f32.loc8: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc]
|
||||
// CHECK:STDOUT: %c: %f32.3bc = wrapper_binding c, %.loc8_37.2
|
||||
// CHECK:STDOUT: %c: %f32.3bc = wrapper_binding c, @__global_init.%.loc8_37.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %c.patt: %pattern_type.239 = value_binding_pattern c [concrete = constants.%c.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -484,6 +478,8 @@ let b: f64 = Float32ToFloat64(1.0e30);
|
||||
// CHECK:STDOUT: %.loc6_31.1: %f32.3bc = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call.loc6 [concrete = constants.%float.3f9]
|
||||
// CHECK:STDOUT: %.loc6_31.2: %f32.3bc = converted %float.loc6, %.loc6_31.1 [concrete = constants.%float.3f9]
|
||||
// CHECK:STDOUT: %Float32ToFloat32.call.loc6: init %f32.3bc = call %Float32ToFloat32.ref.loc6(%.loc6_31.2) [concrete = constants.%float.3f9]
|
||||
// CHECK:STDOUT: %.loc6_34.1: %f32.3bc = value_of_initializer %Float32ToFloat32.call.loc6 [concrete = constants.%float.3f9]
|
||||
// CHECK:STDOUT: %.loc6_34.2: %f32.3bc = converted %Float32ToFloat32.call.loc6, %.loc6_34.1 [concrete = constants.%float.3f9]
|
||||
// CHECK:STDOUT: %Float32ToFloat32.ref.loc7: %Float32ToFloat32.type = name_ref Float32ToFloat32, imports.%Main.Float32ToFloat32 [concrete = constants.%Float32ToFloat32]
|
||||
// CHECK:STDOUT: %float.loc7: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.6da]
|
||||
// CHECK:STDOUT: %impl.elem0.loc7: %.f72 = impl_witness_access constants.%ImplicitAs.impl_witness.409, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b]
|
||||
@@ -494,6 +490,8 @@ let b: f64 = Float32ToFloat64(1.0e30);
|
||||
// CHECK:STDOUT: %.loc7_31.1: %f32.3bc = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call.loc7 [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %.loc7_31.2: %f32.3bc = converted %float.loc7, %.loc7_31.1 [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %Float32ToFloat32.call.loc7: init %f32.3bc = call %Float32ToFloat32.ref.loc7(%.loc7_31.2) [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %.loc7_34.1: %f32.3bc = value_of_initializer %Float32ToFloat32.call.loc7 [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %.loc7_34.2: %f32.3bc = converted %Float32ToFloat32.call.loc7, %.loc7_34.1 [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %Float32ToFloat32.ref.loc8: %Float32ToFloat32.type = name_ref Float32ToFloat32, imports.%Main.Float32ToFloat32 [concrete = constants.%Float32ToFloat32]
|
||||
// CHECK:STDOUT: %float.loc8: Core.FloatLiteral = float_literal_value 10e37 [concrete = constants.%float.8d2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc8: %.f72 = impl_witness_access constants.%ImplicitAs.impl_witness.409, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b]
|
||||
@@ -504,6 +502,8 @@ let b: f64 = Float32ToFloat64(1.0e30);
|
||||
// CHECK:STDOUT: %.loc8_31.1: %f32.3bc = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%float.823]
|
||||
// CHECK:STDOUT: %.loc8_31.2: %f32.3bc = converted %float.loc8, %.loc8_31.1 [concrete = constants.%float.823]
|
||||
// CHECK:STDOUT: %Float32ToFloat32.call.loc8: init %f32.3bc = call %Float32ToFloat32.ref.loc8(%.loc8_31.2) [concrete = constants.%float.823]
|
||||
// CHECK:STDOUT: %.loc8_37.1: %f32.3bc = value_of_initializer %Float32ToFloat32.call.loc8 [concrete = constants.%float.823]
|
||||
// CHECK:STDOUT: %.loc8_37.2: %f32.3bc = converted %Float32ToFloat32.call.loc8, %.loc8_37.1 [concrete = constants.%float.823]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -550,17 +550,13 @@ let b: f64 = Float32ToFloat64(1.0e30);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc7_34.1: %f32.3bc = value_of_initializer @__global_init.%Float64ToFloat32.call.loc7 [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %.loc7_34.2: %f32.3bc = converted @__global_init.%Float64ToFloat32.call.loc7, %.loc7_34.1 [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %f32.loc7: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc]
|
||||
// CHECK:STDOUT: %a: %f32.3bc = wrapper_binding a, %.loc7_34.2
|
||||
// CHECK:STDOUT: %a: %f32.3bc = wrapper_binding a, @__global_init.%.loc7_34.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.239 = value_binding_pattern a [concrete = constants.%a.patt.56d]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc9_37.1: %f32.3bc = value_of_initializer @__global_init.%Float64ToFloat32.call.loc9 [concrete = constants.%float.5a5]
|
||||
// CHECK:STDOUT: %.loc9_37.2: %f32.3bc = converted @__global_init.%Float64ToFloat32.call.loc9, %.loc9_37.1 [concrete = constants.%float.5a5]
|
||||
// CHECK:STDOUT: %f32.loc9: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc]
|
||||
// CHECK:STDOUT: %b: %f32.3bc = wrapper_binding b, %.loc9_37.2
|
||||
// CHECK:STDOUT: %b: %f32.3bc = wrapper_binding b, @__global_init.%.loc9_37.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.239 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -578,6 +574,8 @@ let b: f64 = Float32ToFloat64(1.0e30);
|
||||
// CHECK:STDOUT: %.loc7_31.1: %f64.761 = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call.loc7 [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %.loc7_31.2: %f64.761 = converted %float.loc7, %.loc7_31.1 [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %Float64ToFloat32.call.loc7: init %f32.3bc = call %Float64ToFloat32.ref.loc7(%.loc7_31.2) [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %.loc7_34.1: %f32.3bc = value_of_initializer %Float64ToFloat32.call.loc7 [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %.loc7_34.2: %f32.3bc = converted %Float64ToFloat32.call.loc7, %.loc7_34.1 [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %Float64ToFloat32.ref.loc9: %Float64ToFloat32.type = name_ref Float64ToFloat32, imports.%Main.Float64ToFloat32 [concrete = constants.%Float64ToFloat32]
|
||||
// CHECK:STDOUT: %float.loc9: Core.FloatLiteral = float_literal_value 10e38 [concrete = constants.%float.cfc]
|
||||
// CHECK:STDOUT: %impl.elem0.loc9: %.b5b = impl_witness_access constants.%ImplicitAs.impl_witness.1d6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.9d0]
|
||||
@@ -588,6 +586,8 @@ let b: f64 = Float32ToFloat64(1.0e30);
|
||||
// CHECK:STDOUT: %.loc9_31.1: %f64.761 = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call.loc9 [concrete = constants.%float.8d8]
|
||||
// CHECK:STDOUT: %.loc9_31.2: %f64.761 = converted %float.loc9, %.loc9_31.1 [concrete = constants.%float.8d8]
|
||||
// CHECK:STDOUT: %Float64ToFloat32.call.loc9: init %f32.3bc = call %Float64ToFloat32.ref.loc9(%.loc9_31.2) [concrete = constants.%float.5a5]
|
||||
// CHECK:STDOUT: %.loc9_37.1: %f32.3bc = value_of_initializer %Float64ToFloat32.call.loc9 [concrete = constants.%float.5a5]
|
||||
// CHECK:STDOUT: %.loc9_37.2: %f32.3bc = converted %Float64ToFloat32.call.loc9, %.loc9_37.1 [concrete = constants.%float.5a5]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -634,17 +634,13 @@ let b: f64 = Float32ToFloat64(1.0e30);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc7_34.1: %f64.761 = value_of_initializer @__global_init.%Float32ToFloat64.call.loc7 [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %.loc7_34.2: %f64.761 = converted @__global_init.%Float32ToFloat64.call.loc7, %.loc7_34.1 [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %f64.loc7: type = type_literal constants.%f64.761 [concrete = constants.%f64.761]
|
||||
// CHECK:STDOUT: %a: %f64.761 = wrapper_binding a, %.loc7_34.2
|
||||
// CHECK:STDOUT: %a: %f64.761 = wrapper_binding a, @__global_init.%.loc7_34.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.667 = value_binding_pattern a [concrete = constants.%a.patt.6ca]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc8_37.1: %f64.761 = value_of_initializer @__global_init.%Float32ToFloat64.call.loc8 [concrete = constants.%float.f9b]
|
||||
// CHECK:STDOUT: %.loc8_37.2: %f64.761 = converted @__global_init.%Float32ToFloat64.call.loc8, %.loc8_37.1 [concrete = constants.%float.f9b]
|
||||
// CHECK:STDOUT: %f64.loc8: type = type_literal constants.%f64.761 [concrete = constants.%f64.761]
|
||||
// CHECK:STDOUT: %b: %f64.761 = wrapper_binding b, %.loc8_37.2
|
||||
// CHECK:STDOUT: %b: %f64.761 = wrapper_binding b, @__global_init.%.loc8_37.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.667 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -662,6 +658,8 @@ let b: f64 = Float32ToFloat64(1.0e30);
|
||||
// CHECK:STDOUT: %.loc7_31.1: %f32.3bc = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call.loc7 [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %.loc7_31.2: %f32.3bc = converted %float.loc7, %.loc7_31.1 [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %Float32ToFloat64.call.loc7: init %f64.761 = call %Float32ToFloat64.ref.loc7(%.loc7_31.2) [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %.loc7_34.1: %f64.761 = value_of_initializer %Float32ToFloat64.call.loc7 [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %.loc7_34.2: %f64.761 = converted %Float32ToFloat64.call.loc7, %.loc7_34.1 [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %Float32ToFloat64.ref.loc8: %Float32ToFloat64.type = name_ref Float32ToFloat64, imports.%Main.Float32ToFloat64 [concrete = constants.%Float32ToFloat64]
|
||||
// CHECK:STDOUT: %float.loc8: Core.FloatLiteral = float_literal_value 10e29 [concrete = constants.%float.c02]
|
||||
// CHECK:STDOUT: %impl.elem0.loc8: %.f72 = impl_witness_access constants.%ImplicitAs.impl_witness.409, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b]
|
||||
@@ -672,6 +670,8 @@ let b: f64 = Float32ToFloat64(1.0e30);
|
||||
// CHECK:STDOUT: %.loc8_31.1: %f32.3bc = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%float.aba]
|
||||
// CHECK:STDOUT: %.loc8_31.2: %f32.3bc = converted %float.loc8, %.loc8_31.1 [concrete = constants.%float.aba]
|
||||
// CHECK:STDOUT: %Float32ToFloat64.call.loc8: init %f64.761 = call %Float32ToFloat64.ref.loc8(%.loc8_31.2) [concrete = constants.%float.f9b]
|
||||
// CHECK:STDOUT: %.loc8_37.1: %f64.761 = value_of_initializer %Float32ToFloat64.call.loc8 [concrete = constants.%float.f9b]
|
||||
// CHECK:STDOUT: %.loc8_37.2: %f64.761 = converted %Float32ToFloat64.call.loc8, %.loc8_37.1 [concrete = constants.%float.f9b]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
+70
-69
@@ -188,10 +188,8 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc6_53.1: Core.FloatLiteral = value_of_initializer @__global_init.%FloatLiteralToFloatLiteral.call [concrete = constants.%float]
|
||||
// CHECK:STDOUT: %.loc6_53.2: Core.FloatLiteral = converted @__global_init.%FloatLiteralToFloatLiteral.call, %.loc6_53.1 [concrete = constants.%float]
|
||||
// CHECK:STDOUT: %FloatLiteral.ref: type = name_ref FloatLiteral, imports.%Main.FloatLiteral [concrete = Core.FloatLiteral]
|
||||
// CHECK:STDOUT: %f: Core.FloatLiteral = wrapper_binding f, %.loc6_53.2
|
||||
// CHECK:STDOUT: %f: Core.FloatLiteral = wrapper_binding f, @__global_init.%.loc6_53.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %f.patt: %pattern_type = value_binding_pattern f [concrete = constants.%f.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -202,6 +200,8 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64);
|
||||
// CHECK:STDOUT: %FloatLiteralToFloatLiteral.ref: %FloatLiteralToFloatLiteral.type = name_ref FloatLiteralToFloatLiteral, imports.%Main.FloatLiteralToFloatLiteral [concrete = constants.%FloatLiteralToFloatLiteral]
|
||||
// CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float]
|
||||
// CHECK:STDOUT: %FloatLiteralToFloatLiteral.call: init Core.FloatLiteral = call %FloatLiteralToFloatLiteral.ref(%float) [concrete = constants.%float]
|
||||
// CHECK:STDOUT: %.loc6_53.1: Core.FloatLiteral = value_of_initializer %FloatLiteralToFloatLiteral.call [concrete = constants.%float]
|
||||
// CHECK:STDOUT: %.loc6_53.2: Core.FloatLiteral = converted %FloatLiteralToFloatLiteral.call, %.loc6_53.1 [concrete = constants.%float]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -230,24 +230,18 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc6_39.1: %f64.761 = value_of_initializer @__global_init.%FloatLiteralToFloat64.call.loc6 [concrete = constants.%float.73e]
|
||||
// CHECK:STDOUT: %.loc6_39.2: %f64.761 = converted @__global_init.%FloatLiteralToFloat64.call.loc6, %.loc6_39.1 [concrete = constants.%float.73e]
|
||||
// CHECK:STDOUT: %f64.loc6: type = type_literal constants.%f64.761 [concrete = constants.%f64.761]
|
||||
// CHECK:STDOUT: %a: %f64.761 = wrapper_binding a, %.loc6_39.2
|
||||
// CHECK:STDOUT: %a: %f64.761 = wrapper_binding a, @__global_init.%.loc6_39.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.667 = value_binding_pattern a [concrete = constants.%a.patt.6ca]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc7_39.1: %f64.761 = value_of_initializer @__global_init.%FloatLiteralToFloat64.call.loc7 [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %.loc7_39.2: %f64.761 = converted @__global_init.%FloatLiteralToFloat64.call.loc7, %.loc7_39.1 [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %f64.loc7: type = type_literal constants.%f64.761 [concrete = constants.%f64.761]
|
||||
// CHECK:STDOUT: %b: %f64.761 = wrapper_binding b, %.loc7_39.2
|
||||
// CHECK:STDOUT: %b: %f64.761 = wrapper_binding b, @__global_init.%.loc7_39.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.667 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc8_43.1: %f64.761 = value_of_initializer @__global_init.%FloatLiteralToFloat64.call.loc8 [concrete = constants.%float.781]
|
||||
// CHECK:STDOUT: %.loc8_43.2: %f64.761 = converted @__global_init.%FloatLiteralToFloat64.call.loc8, %.loc8_43.1 [concrete = constants.%float.781]
|
||||
// CHECK:STDOUT: %f64.loc8: type = type_literal constants.%f64.761 [concrete = constants.%f64.761]
|
||||
// CHECK:STDOUT: %c: %f64.761 = wrapper_binding c, %.loc8_43.2
|
||||
// CHECK:STDOUT: %c: %f64.761 = wrapper_binding c, @__global_init.%.loc8_43.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %c.patt: %pattern_type.667 = value_binding_pattern c [concrete = constants.%c.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -258,12 +252,18 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64);
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat64.ref.loc6: %FloatLiteralToFloat64.type = name_ref FloatLiteralToFloat64, imports.%Main.FloatLiteralToFloat64 [concrete = constants.%FloatLiteralToFloat64]
|
||||
// CHECK:STDOUT: %float.loc6: Core.FloatLiteral = float_literal_value 0e-1 [concrete = constants.%float.1f7]
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat64.call.loc6: init %f64.761 = call %FloatLiteralToFloat64.ref.loc6(%float.loc6) [concrete = constants.%float.73e]
|
||||
// CHECK:STDOUT: %.loc6_39.1: %f64.761 = value_of_initializer %FloatLiteralToFloat64.call.loc6 [concrete = constants.%float.73e]
|
||||
// CHECK:STDOUT: %.loc6_39.2: %f64.761 = converted %FloatLiteralToFloat64.call.loc6, %.loc6_39.1 [concrete = constants.%float.73e]
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat64.ref.loc7: %FloatLiteralToFloat64.type = name_ref FloatLiteralToFloat64, imports.%Main.FloatLiteralToFloat64 [concrete = constants.%FloatLiteralToFloat64]
|
||||
// CHECK:STDOUT: %float.loc7: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.6da]
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat64.call.loc7: init %f64.761 = call %FloatLiteralToFloat64.ref.loc7(%float.loc7) [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %.loc7_39.1: %f64.761 = value_of_initializer %FloatLiteralToFloat64.call.loc7 [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %.loc7_39.2: %f64.761 = converted %FloatLiteralToFloat64.call.loc7, %.loc7_39.1 [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat64.ref.loc8: %FloatLiteralToFloat64.type = name_ref FloatLiteralToFloat64, imports.%Main.FloatLiteralToFloat64 [concrete = constants.%FloatLiteralToFloat64]
|
||||
// CHECK:STDOUT: %float.loc8: Core.FloatLiteral = float_literal_value 10e307 [concrete = constants.%float.12a]
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat64.call.loc8: init %f64.761 = call %FloatLiteralToFloat64.ref.loc8(%float.loc8) [concrete = constants.%float.781]
|
||||
// CHECK:STDOUT: %.loc8_43.1: %f64.761 = value_of_initializer %FloatLiteralToFloat64.call.loc8 [concrete = constants.%float.781]
|
||||
// CHECK:STDOUT: %.loc8_43.2: %f64.761 = converted %FloatLiteralToFloat64.call.loc8, %.loc8_43.1 [concrete = constants.%float.781]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -292,24 +292,18 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc6_39.1: %f32.3bc = value_of_initializer @__global_init.%FloatLiteralToFloat32.call.loc6 [concrete = constants.%float.3f9]
|
||||
// CHECK:STDOUT: %.loc6_39.2: %f32.3bc = converted @__global_init.%FloatLiteralToFloat32.call.loc6, %.loc6_39.1 [concrete = constants.%float.3f9]
|
||||
// CHECK:STDOUT: %f32.loc6: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc]
|
||||
// CHECK:STDOUT: %a: %f32.3bc = wrapper_binding a, %.loc6_39.2
|
||||
// CHECK:STDOUT: %a: %f32.3bc = wrapper_binding a, @__global_init.%.loc6_39.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.239 = value_binding_pattern a [concrete = constants.%a.patt.56d]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc7_39.1: %f32.3bc = value_of_initializer @__global_init.%FloatLiteralToFloat32.call.loc7 [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %.loc7_39.2: %f32.3bc = converted @__global_init.%FloatLiteralToFloat32.call.loc7, %.loc7_39.1 [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %f32.loc7: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc]
|
||||
// CHECK:STDOUT: %b: %f32.3bc = wrapper_binding b, %.loc7_39.2
|
||||
// CHECK:STDOUT: %b: %f32.3bc = wrapper_binding b, @__global_init.%.loc7_39.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.239 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc8_42.1: %f32.3bc = value_of_initializer @__global_init.%FloatLiteralToFloat32.call.loc8 [concrete = constants.%float.823]
|
||||
// CHECK:STDOUT: %.loc8_42.2: %f32.3bc = converted @__global_init.%FloatLiteralToFloat32.call.loc8, %.loc8_42.1 [concrete = constants.%float.823]
|
||||
// CHECK:STDOUT: %f32.loc8: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc]
|
||||
// CHECK:STDOUT: %c: %f32.3bc = wrapper_binding c, %.loc8_42.2
|
||||
// CHECK:STDOUT: %c: %f32.3bc = wrapper_binding c, @__global_init.%.loc8_42.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %c.patt: %pattern_type.239 = value_binding_pattern c [concrete = constants.%c.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -320,12 +314,18 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64);
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat32.ref.loc6: %FloatLiteralToFloat32.type = name_ref FloatLiteralToFloat32, imports.%Main.FloatLiteralToFloat32 [concrete = constants.%FloatLiteralToFloat32]
|
||||
// CHECK:STDOUT: %float.loc6: Core.FloatLiteral = float_literal_value 0e-1 [concrete = constants.%float.1f7]
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat32.call.loc6: init %f32.3bc = call %FloatLiteralToFloat32.ref.loc6(%float.loc6) [concrete = constants.%float.3f9]
|
||||
// CHECK:STDOUT: %.loc6_39.1: %f32.3bc = value_of_initializer %FloatLiteralToFloat32.call.loc6 [concrete = constants.%float.3f9]
|
||||
// CHECK:STDOUT: %.loc6_39.2: %f32.3bc = converted %FloatLiteralToFloat32.call.loc6, %.loc6_39.1 [concrete = constants.%float.3f9]
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat32.ref.loc7: %FloatLiteralToFloat32.type = name_ref FloatLiteralToFloat32, imports.%Main.FloatLiteralToFloat32 [concrete = constants.%FloatLiteralToFloat32]
|
||||
// CHECK:STDOUT: %float.loc7: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.6da]
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat32.call.loc7: init %f32.3bc = call %FloatLiteralToFloat32.ref.loc7(%float.loc7) [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %.loc7_39.1: %f32.3bc = value_of_initializer %FloatLiteralToFloat32.call.loc7 [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %.loc7_39.2: %f32.3bc = converted %FloatLiteralToFloat32.call.loc7, %.loc7_39.1 [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat32.ref.loc8: %FloatLiteralToFloat32.type = name_ref FloatLiteralToFloat32, imports.%Main.FloatLiteralToFloat32 [concrete = constants.%FloatLiteralToFloat32]
|
||||
// CHECK:STDOUT: %float.loc8: Core.FloatLiteral = float_literal_value 10e37 [concrete = constants.%float.8d2]
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat32.call.loc8: init %f32.3bc = call %FloatLiteralToFloat32.ref.loc8(%float.loc8) [concrete = constants.%float.823]
|
||||
// CHECK:STDOUT: %.loc8_42.1: %f32.3bc = value_of_initializer %FloatLiteralToFloat32.call.loc8 [concrete = constants.%float.823]
|
||||
// CHECK:STDOUT: %.loc8_42.2: %f32.3bc = converted %FloatLiteralToFloat32.call.loc8, %.loc8_42.1 [concrete = constants.%float.823]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -373,24 +373,18 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc6_34.1: %f64.761 = value_of_initializer @__global_init.%Float64ToFloat64.call.loc6 [concrete = constants.%float.73e]
|
||||
// CHECK:STDOUT: %.loc6_34.2: %f64.761 = converted @__global_init.%Float64ToFloat64.call.loc6, %.loc6_34.1 [concrete = constants.%float.73e]
|
||||
// CHECK:STDOUT: %f64.loc6: type = type_literal constants.%f64.761 [concrete = constants.%f64.761]
|
||||
// CHECK:STDOUT: %a: %f64.761 = wrapper_binding a, %.loc6_34.2
|
||||
// CHECK:STDOUT: %a: %f64.761 = wrapper_binding a, @__global_init.%.loc6_34.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.667 = value_binding_pattern a [concrete = constants.%a.patt.6ca]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc7_34.1: %f64.761 = value_of_initializer @__global_init.%Float64ToFloat64.call.loc7 [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %.loc7_34.2: %f64.761 = converted @__global_init.%Float64ToFloat64.call.loc7, %.loc7_34.1 [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %f64.loc7: type = type_literal constants.%f64.761 [concrete = constants.%f64.761]
|
||||
// CHECK:STDOUT: %b: %f64.761 = wrapper_binding b, %.loc7_34.2
|
||||
// CHECK:STDOUT: %b: %f64.761 = wrapper_binding b, @__global_init.%.loc7_34.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.667 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc8_38.1: %f64.761 = value_of_initializer @__global_init.%Float64ToFloat64.call.loc8 [concrete = constants.%float.781]
|
||||
// CHECK:STDOUT: %.loc8_38.2: %f64.761 = converted @__global_init.%Float64ToFloat64.call.loc8, %.loc8_38.1 [concrete = constants.%float.781]
|
||||
// CHECK:STDOUT: %f64.loc8: type = type_literal constants.%f64.761 [concrete = constants.%f64.761]
|
||||
// CHECK:STDOUT: %c: %f64.761 = wrapper_binding c, %.loc8_38.2
|
||||
// CHECK:STDOUT: %c: %f64.761 = wrapper_binding c, @__global_init.%.loc8_38.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %c.patt: %pattern_type.667 = value_binding_pattern c [concrete = constants.%c.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -408,6 +402,8 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64);
|
||||
// CHECK:STDOUT: %.loc6_31.1: %f64.761 = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call.loc6 [concrete = constants.%float.73e]
|
||||
// CHECK:STDOUT: %.loc6_31.2: %f64.761 = converted %float.loc6, %.loc6_31.1 [concrete = constants.%float.73e]
|
||||
// CHECK:STDOUT: %Float64ToFloat64.call.loc6: init %f64.761 = call %Float64ToFloat64.ref.loc6(%.loc6_31.2) [concrete = constants.%float.73e]
|
||||
// CHECK:STDOUT: %.loc6_34.1: %f64.761 = value_of_initializer %Float64ToFloat64.call.loc6 [concrete = constants.%float.73e]
|
||||
// CHECK:STDOUT: %.loc6_34.2: %f64.761 = converted %Float64ToFloat64.call.loc6, %.loc6_34.1 [concrete = constants.%float.73e]
|
||||
// CHECK:STDOUT: %Float64ToFloat64.ref.loc7: %Float64ToFloat64.type = name_ref Float64ToFloat64, imports.%Main.Float64ToFloat64 [concrete = constants.%Float64ToFloat64]
|
||||
// CHECK:STDOUT: %float.loc7: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.6da]
|
||||
// CHECK:STDOUT: %impl.elem0.loc7: %.b5b = impl_witness_access constants.%ImplicitAs.impl_witness.1d6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.9d0]
|
||||
@@ -418,6 +414,8 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64);
|
||||
// CHECK:STDOUT: %.loc7_31.1: %f64.761 = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call.loc7 [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %.loc7_31.2: %f64.761 = converted %float.loc7, %.loc7_31.1 [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %Float64ToFloat64.call.loc7: init %f64.761 = call %Float64ToFloat64.ref.loc7(%.loc7_31.2) [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %.loc7_34.1: %f64.761 = value_of_initializer %Float64ToFloat64.call.loc7 [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %.loc7_34.2: %f64.761 = converted %Float64ToFloat64.call.loc7, %.loc7_34.1 [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %Float64ToFloat64.ref.loc8: %Float64ToFloat64.type = name_ref Float64ToFloat64, imports.%Main.Float64ToFloat64 [concrete = constants.%Float64ToFloat64]
|
||||
// CHECK:STDOUT: %float.loc8: Core.FloatLiteral = float_literal_value 10e307 [concrete = constants.%float.12a]
|
||||
// CHECK:STDOUT: %impl.elem0.loc8: %.b5b = impl_witness_access constants.%ImplicitAs.impl_witness.1d6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.9d0]
|
||||
@@ -428,6 +426,8 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64);
|
||||
// CHECK:STDOUT: %.loc8_31.1: %f64.761 = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%float.781]
|
||||
// CHECK:STDOUT: %.loc8_31.2: %f64.761 = converted %float.loc8, %.loc8_31.1 [concrete = constants.%float.781]
|
||||
// CHECK:STDOUT: %Float64ToFloat64.call.loc8: init %f64.761 = call %Float64ToFloat64.ref.loc8(%.loc8_31.2) [concrete = constants.%float.781]
|
||||
// CHECK:STDOUT: %.loc8_38.1: %f64.761 = value_of_initializer %Float64ToFloat64.call.loc8 [concrete = constants.%float.781]
|
||||
// CHECK:STDOUT: %.loc8_38.2: %f64.761 = converted %Float64ToFloat64.call.loc8, %.loc8_38.1 [concrete = constants.%float.781]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -475,24 +475,18 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc6_34.1: %f32.3bc = value_of_initializer @__global_init.%Float32ToFloat32.call.loc6 [concrete = constants.%float.3f9]
|
||||
// CHECK:STDOUT: %.loc6_34.2: %f32.3bc = converted @__global_init.%Float32ToFloat32.call.loc6, %.loc6_34.1 [concrete = constants.%float.3f9]
|
||||
// CHECK:STDOUT: %f32.loc6: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc]
|
||||
// CHECK:STDOUT: %a: %f32.3bc = wrapper_binding a, %.loc6_34.2
|
||||
// CHECK:STDOUT: %a: %f32.3bc = wrapper_binding a, @__global_init.%.loc6_34.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.239 = value_binding_pattern a [concrete = constants.%a.patt.56d]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc7_34.1: %f32.3bc = value_of_initializer @__global_init.%Float32ToFloat32.call.loc7 [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %.loc7_34.2: %f32.3bc = converted @__global_init.%Float32ToFloat32.call.loc7, %.loc7_34.1 [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %f32.loc7: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc]
|
||||
// CHECK:STDOUT: %b: %f32.3bc = wrapper_binding b, %.loc7_34.2
|
||||
// CHECK:STDOUT: %b: %f32.3bc = wrapper_binding b, @__global_init.%.loc7_34.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.239 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc8_37.1: %f32.3bc = value_of_initializer @__global_init.%Float32ToFloat32.call.loc8 [concrete = constants.%float.823]
|
||||
// CHECK:STDOUT: %.loc8_37.2: %f32.3bc = converted @__global_init.%Float32ToFloat32.call.loc8, %.loc8_37.1 [concrete = constants.%float.823]
|
||||
// CHECK:STDOUT: %f32.loc8: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc]
|
||||
// CHECK:STDOUT: %c: %f32.3bc = wrapper_binding c, %.loc8_37.2
|
||||
// CHECK:STDOUT: %c: %f32.3bc = wrapper_binding c, @__global_init.%.loc8_37.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %c.patt: %pattern_type.239 = value_binding_pattern c [concrete = constants.%c.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -510,6 +504,8 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64);
|
||||
// CHECK:STDOUT: %.loc6_31.1: %f32.3bc = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call.loc6 [concrete = constants.%float.3f9]
|
||||
// CHECK:STDOUT: %.loc6_31.2: %f32.3bc = converted %float.loc6, %.loc6_31.1 [concrete = constants.%float.3f9]
|
||||
// CHECK:STDOUT: %Float32ToFloat32.call.loc6: init %f32.3bc = call %Float32ToFloat32.ref.loc6(%.loc6_31.2) [concrete = constants.%float.3f9]
|
||||
// CHECK:STDOUT: %.loc6_34.1: %f32.3bc = value_of_initializer %Float32ToFloat32.call.loc6 [concrete = constants.%float.3f9]
|
||||
// CHECK:STDOUT: %.loc6_34.2: %f32.3bc = converted %Float32ToFloat32.call.loc6, %.loc6_34.1 [concrete = constants.%float.3f9]
|
||||
// CHECK:STDOUT: %Float32ToFloat32.ref.loc7: %Float32ToFloat32.type = name_ref Float32ToFloat32, imports.%Main.Float32ToFloat32 [concrete = constants.%Float32ToFloat32]
|
||||
// CHECK:STDOUT: %float.loc7: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.6da]
|
||||
// CHECK:STDOUT: %impl.elem0.loc7: %.f72 = impl_witness_access constants.%ImplicitAs.impl_witness.409, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b]
|
||||
@@ -520,6 +516,8 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64);
|
||||
// CHECK:STDOUT: %.loc7_31.1: %f32.3bc = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call.loc7 [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %.loc7_31.2: %f32.3bc = converted %float.loc7, %.loc7_31.1 [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %Float32ToFloat32.call.loc7: init %f32.3bc = call %Float32ToFloat32.ref.loc7(%.loc7_31.2) [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %.loc7_34.1: %f32.3bc = value_of_initializer %Float32ToFloat32.call.loc7 [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %.loc7_34.2: %f32.3bc = converted %Float32ToFloat32.call.loc7, %.loc7_34.1 [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %Float32ToFloat32.ref.loc8: %Float32ToFloat32.type = name_ref Float32ToFloat32, imports.%Main.Float32ToFloat32 [concrete = constants.%Float32ToFloat32]
|
||||
// CHECK:STDOUT: %float.loc8: Core.FloatLiteral = float_literal_value 10e37 [concrete = constants.%float.8d2]
|
||||
// CHECK:STDOUT: %impl.elem0.loc8: %.f72 = impl_witness_access constants.%ImplicitAs.impl_witness.409, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b]
|
||||
@@ -530,6 +528,8 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64);
|
||||
// CHECK:STDOUT: %.loc8_31.1: %f32.3bc = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%float.823]
|
||||
// CHECK:STDOUT: %.loc8_31.2: %f32.3bc = converted %float.loc8, %.loc8_31.1 [concrete = constants.%float.823]
|
||||
// CHECK:STDOUT: %Float32ToFloat32.call.loc8: init %f32.3bc = call %Float32ToFloat32.ref.loc8(%.loc8_31.2) [concrete = constants.%float.823]
|
||||
// CHECK:STDOUT: %.loc8_37.1: %f32.3bc = value_of_initializer %Float32ToFloat32.call.loc8 [concrete = constants.%float.823]
|
||||
// CHECK:STDOUT: %.loc8_37.2: %f32.3bc = converted %Float32ToFloat32.call.loc8, %.loc8_37.1 [concrete = constants.%float.823]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -570,10 +570,8 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc6_34.1: %f32.3bc = value_of_initializer @__global_init.%Float64ToFloat32.call [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %.loc6_34.2: %f32.3bc = converted @__global_init.%Float64ToFloat32.call, %.loc6_34.1 [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %f32: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc]
|
||||
// CHECK:STDOUT: %a: %f32.3bc = wrapper_binding a, %.loc6_34.2
|
||||
// CHECK:STDOUT: %a: %f32.3bc = wrapper_binding a, @__global_init.%.loc6_34.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.239 = value_binding_pattern a [concrete = constants.%a.patt.56d]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -591,6 +589,8 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64);
|
||||
// CHECK:STDOUT: %.loc6_31.1: %f64.761 = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %.loc6_31.2: %f64.761 = converted %float, %.loc6_31.1 [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %Float64ToFloat32.call: init %f32.3bc = call %Float64ToFloat32.ref(%.loc6_31.2) [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %.loc6_34.1: %f32.3bc = value_of_initializer %Float64ToFloat32.call [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %.loc6_34.2: %f32.3bc = converted %Float64ToFloat32.call, %.loc6_34.1 [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -641,24 +641,18 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc15_37.1: %f32.3bc = value_of_initializer @__global_init.%Float64ToFloat32.call [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc15_37.2: %f32.3bc = converted @__global_init.%Float64ToFloat32.call, %.loc15_37.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %f32.loc15: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc]
|
||||
// CHECK:STDOUT: %a: %f32.3bc = wrapper_binding a, %.loc15_37.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: %a: %f32.3bc = wrapper_binding a, @__global_init.%.loc15_37.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.239 = value_binding_pattern a [concrete = constants.%a.patt.56d]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc23_42.1: %f32.3bc = value_of_initializer @__global_init.%FloatLiteralToFloat32.call [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc23_42.2: %f32.3bc = converted @__global_init.%FloatLiteralToFloat32.call, %.loc23_42.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %f32.loc23: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc]
|
||||
// CHECK:STDOUT: %b: %f32.3bc = wrapper_binding b, %.loc23_42.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: %b: %f32.3bc = wrapper_binding b, @__global_init.%.loc23_42.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.239 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc31_43.1: %f64.761 = value_of_initializer @__global_init.%FloatLiteralToFloat64.call [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc31_43.2: %f64.761 = converted @__global_init.%FloatLiteralToFloat64.call, %.loc31_43.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %f64: type = type_literal constants.%f64.761 [concrete = constants.%f64.761]
|
||||
// CHECK:STDOUT: %c: %f64.761 = wrapper_binding c, %.loc31_43.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: %c: %f64.761 = wrapper_binding c, @__global_init.%.loc31_43.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %c.patt: %pattern_type.667 = value_binding_pattern c [concrete = constants.%c.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -676,12 +670,18 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64);
|
||||
// CHECK:STDOUT: %.loc15_31.1: %f64.761 = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.8d8]
|
||||
// CHECK:STDOUT: %.loc15_31.2: %f64.761 = converted %float.loc15, %.loc15_31.1 [concrete = constants.%float.8d8]
|
||||
// CHECK:STDOUT: %Float64ToFloat32.call: init %f32.3bc = call %Float64ToFloat32.ref(%.loc15_31.2) [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc15_37.1: %f32.3bc = value_of_initializer %Float64ToFloat32.call [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc15_37.2: %f32.3bc = converted %Float64ToFloat32.call, %.loc15_37.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat32.ref: %FloatLiteralToFloat32.type = name_ref FloatLiteralToFloat32, imports.%Main.FloatLiteralToFloat32 [concrete = constants.%FloatLiteralToFloat32]
|
||||
// CHECK:STDOUT: %float.loc23: Core.FloatLiteral = float_literal_value 10e38 [concrete = constants.%float.cfcfd2.2]
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat32.call: init %f32.3bc = call %FloatLiteralToFloat32.ref(%float.loc23) [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc23_42.1: %f32.3bc = value_of_initializer %FloatLiteralToFloat32.call [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc23_42.2: %f32.3bc = converted %FloatLiteralToFloat32.call, %.loc23_42.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat64.ref: %FloatLiteralToFloat64.type = name_ref FloatLiteralToFloat64, imports.%Main.FloatLiteralToFloat64 [concrete = constants.%FloatLiteralToFloat64]
|
||||
// CHECK:STDOUT: %float.loc31: Core.FloatLiteral = float_literal_value 10e308 [concrete = constants.%float.82f]
|
||||
// CHECK:STDOUT: %FloatLiteralToFloat64.call: init %f64.761 = call %FloatLiteralToFloat64.ref(%float.loc31) [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc31_43.1: %f64.761 = value_of_initializer %FloatLiteralToFloat64.call [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc31_43.2: %f64.761 = converted %FloatLiteralToFloat64.call, %.loc31_43.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -728,17 +728,13 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc6_34.1: %f64.761 = value_of_initializer @__global_init.%Float32ToFloat64.call.loc6 [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %.loc6_34.2: %f64.761 = converted @__global_init.%Float32ToFloat64.call.loc6, %.loc6_34.1 [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %f64.loc6: type = type_literal constants.%f64.761 [concrete = constants.%f64.761]
|
||||
// CHECK:STDOUT: %a: %f64.761 = wrapper_binding a, %.loc6_34.2
|
||||
// CHECK:STDOUT: %a: %f64.761 = wrapper_binding a, @__global_init.%.loc6_34.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.667 = value_binding_pattern a [concrete = constants.%a.patt.6ca]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc7_37.1: %f64.761 = value_of_initializer @__global_init.%Float32ToFloat64.call.loc7 [concrete = constants.%float.f9b]
|
||||
// CHECK:STDOUT: %.loc7_37.2: %f64.761 = converted @__global_init.%Float32ToFloat64.call.loc7, %.loc7_37.1 [concrete = constants.%float.f9b]
|
||||
// CHECK:STDOUT: %f64.loc7: type = type_literal constants.%f64.761 [concrete = constants.%f64.761]
|
||||
// CHECK:STDOUT: %b: %f64.761 = wrapper_binding b, %.loc7_37.2
|
||||
// CHECK:STDOUT: %b: %f64.761 = wrapper_binding b, @__global_init.%.loc7_37.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.667 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -756,6 +752,8 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64);
|
||||
// CHECK:STDOUT: %.loc6_31.1: %f32.3bc = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call.loc6 [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %.loc6_31.2: %f32.3bc = converted %float.loc6, %.loc6_31.1 [concrete = constants.%float.239]
|
||||
// CHECK:STDOUT: %Float32ToFloat64.call.loc6: init %f64.761 = call %Float32ToFloat64.ref.loc6(%.loc6_31.2) [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %.loc6_34.1: %f64.761 = value_of_initializer %Float32ToFloat64.call.loc6 [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %.loc6_34.2: %f64.761 = converted %Float32ToFloat64.call.loc6, %.loc6_34.1 [concrete = constants.%float.a71]
|
||||
// CHECK:STDOUT: %Float32ToFloat64.ref.loc7: %Float32ToFloat64.type = name_ref Float32ToFloat64, imports.%Main.Float32ToFloat64 [concrete = constants.%Float32ToFloat64]
|
||||
// CHECK:STDOUT: %float.loc7: Core.FloatLiteral = float_literal_value 10e29 [concrete = constants.%float.c02]
|
||||
// CHECK:STDOUT: %impl.elem0.loc7: %.f72 = impl_witness_access constants.%ImplicitAs.impl_witness.409, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b]
|
||||
@@ -766,6 +764,8 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64);
|
||||
// CHECK:STDOUT: %.loc7_31.1: %f32.3bc = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call.loc7 [concrete = constants.%float.aba]
|
||||
// CHECK:STDOUT: %.loc7_31.2: %f32.3bc = converted %float.loc7, %.loc7_31.1 [concrete = constants.%float.aba]
|
||||
// CHECK:STDOUT: %Float32ToFloat64.call.loc7: init %f64.761 = call %Float32ToFloat64.ref.loc7(%.loc7_31.2) [concrete = constants.%float.f9b]
|
||||
// CHECK:STDOUT: %.loc7_37.1: %f64.761 = value_of_initializer %Float32ToFloat64.call.loc7 [concrete = constants.%float.f9b]
|
||||
// CHECK:STDOUT: %.loc7_37.2: %f64.761 = converted %Float32ToFloat64.call.loc7, %.loc7_37.1 [concrete = constants.%float.f9b]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -804,22 +804,12 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %impl.elem0: %.b5b = impl_witness_access constants.%ImplicitAs.impl_witness.1d6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.9d0]
|
||||
// CHECK:STDOUT: %bound_method.loc6_28.1: <bound method> = bound_method @__global_init.%float, %impl.elem0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc6_28.2: <bound method> = bound_method @__global_init.%float, %specific_fn [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f64.761 = call %bound_method.loc6_28.2(@__global_init.%float) [concrete = constants.%float.73e]
|
||||
// CHECK:STDOUT: %.loc6_28.1: %f64.761 = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.73e]
|
||||
// CHECK:STDOUT: %.loc6_28.2: %f64.761 = converted @__global_init.%float, %.loc6_28.1 [concrete = constants.%float.73e]
|
||||
// CHECK:STDOUT: %f64.loc6: type = type_literal constants.%f64.761 [concrete = constants.%f64.761]
|
||||
// CHECK:STDOUT: %not_constant_64: %f64.761 = wrapper_binding not_constant_64, %.loc6_28.2
|
||||
// CHECK:STDOUT: %not_constant_64: %f64.761 = wrapper_binding not_constant_64, @__global_init.%.loc6_28.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %not_constant_64.patt: %pattern_type.667 = value_binding_pattern not_constant_64 [concrete = constants.%not_constant_64.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc21_65.1: %f64.761 = value_of_initializer @__global_init.%Float64ToFloat64.call
|
||||
// CHECK:STDOUT: %.loc21_65.2: %f64.761 = converted @__global_init.%Float64ToFloat64.call, %.loc21_65.1
|
||||
// CHECK:STDOUT: %f64.loc21: type = type_literal constants.%f64.761 [concrete = constants.%f64.761]
|
||||
// CHECK:STDOUT: %convert_not_constant: %f64.761 = wrapper_binding convert_not_constant, %.loc21_65.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %convert_not_constant.patt: %pattern_type.667 = value_binding_pattern convert_not_constant [concrete = constants.%convert_not_constant.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -828,9 +818,20 @@ let convert_not_constant: f64 = Float64ToFloat64(not_constant_64);
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 0e-1 [concrete = constants.%float.1f7]
|
||||
// CHECK:STDOUT: %impl.elem0: %.b5b = impl_witness_access constants.%ImplicitAs.impl_witness.1d6, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.9d0]
|
||||
// CHECK:STDOUT: %bound_method.loc6_28.1: <bound method> = bound_method %float, %impl.elem0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_64) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc6_28.2: <bound method> = bound_method %float, %specific_fn [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f64.761 = call %bound_method.loc6_28.2(%float) [concrete = constants.%float.73e]
|
||||
// CHECK:STDOUT: %.loc6_28.1: %f64.761 = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.73e]
|
||||
// CHECK:STDOUT: %.loc6_28.2: %f64.761 = converted %float, %.loc6_28.1 [concrete = constants.%float.73e]
|
||||
// CHECK:STDOUT: %Float64ToFloat64.ref: %Float64ToFloat64.type = name_ref Float64ToFloat64, imports.%Main.Float64ToFloat64 [concrete = constants.%Float64ToFloat64]
|
||||
// CHECK:STDOUT: %not_constant_64.ref: %f64.761 = name_ref not_constant_64, file.%not_constant_64
|
||||
// CHECK:STDOUT: %not_constant_64.global_ref: %f64.761 = global_ref file.%not_constant_64
|
||||
// CHECK:STDOUT: %not_constant_64.ref: %f64.761 = name_ref not_constant_64, %not_constant_64.global_ref
|
||||
// CHECK:STDOUT: %Float64ToFloat64.call: init %f64.761 = call %Float64ToFloat64.ref(%not_constant_64.ref)
|
||||
// CHECK:STDOUT: %.loc21_65.1: %f64.761 = value_of_initializer %Float64ToFloat64.call
|
||||
// CHECK:STDOUT: %.loc21_65.2: %f64.761 = converted %Float64ToFloat64.call, %.loc21_65.1
|
||||
// CHECK:STDOUT: %convert_not_constant: %f64.761 = wrapper_binding convert_not_constant, %.loc21_65.2
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
+53
-53
@@ -404,114 +404,84 @@ let inf_val: i32 = ConvertF64ToI32(Div(1.0, 0.0));
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc13_49.1: %i32 = value_of_initializer @__global_init.%ConvertF64ToI32.call.loc13 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc13_49.2: %i32 = converted @__global_init.%ConvertF64ToI32.call.loc13, %.loc13_49.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %i32.loc13: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %overflow: %i32 = wrapper_binding overflow, %.loc13_49.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: %overflow: %i32 = wrapper_binding overflow, @__global_init.%.loc13_49.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %overflow.patt: %pattern_type.d94 = value_binding_pattern overflow [concrete = constants.%overflow.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc23_58.1: %i32 = value_of_initializer @__global_init.%ConvertF64ToI32.call.loc23 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc23_58.2: %i32 = converted @__global_init.%ConvertF64ToI32.call.loc23, %.loc23_58.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %i32.loc23: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %underflow: %i32 = wrapper_binding underflow, %.loc23_58.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: %underflow: %i32 = wrapper_binding underflow, @__global_init.%.loc23_58.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %underflow.patt: %pattern_type.d94 = value_binding_pattern underflow [concrete = constants.%underflow.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc33_52.1: %u32 = value_of_initializer @__global_init.%ConvertF64ToU32.call [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc33_52.2: %u32 = converted @__global_init.%ConvertF64ToU32.call, %.loc33_52.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %u32.loc33: type = type_literal constants.%u32 [concrete = constants.%u32]
|
||||
// CHECK:STDOUT: %unsigned_neg: %u32 = wrapper_binding unsigned_neg, %.loc33_52.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: %unsigned_neg: %u32 = wrapper_binding unsigned_neg, @__global_init.%.loc33_52.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %unsigned_neg.patt: %pattern_type.129 = value_binding_pattern unsigned_neg [concrete = constants.%unsigned_neg.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc43_66.1: %i32 = value_of_initializer @__global_init.%ConvertFloatLiteralToI32.call.loc43 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc43_66.2: %i32 = converted @__global_init.%ConvertFloatLiteralToI32.call.loc43, %.loc43_66.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %i32.loc43: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %literal_overflow: %i32 = wrapper_binding literal_overflow, %.loc43_66.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: %literal_overflow: %i32 = wrapper_binding literal_overflow, @__global_init.%.loc43_66.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %literal_overflow.patt: %pattern_type.d94 = value_binding_pattern literal_overflow [concrete = constants.%literal_overflow.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc53_71.1: %i32 = value_of_initializer @__global_init.%ConvertFloatLiteralToI32.call.loc53 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc53_71.2: %i32 = converted @__global_init.%ConvertFloatLiteralToI32.call.loc53, %.loc53_71.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %i32.loc53: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %giant_literal_overflow: %i32 = wrapper_binding giant_literal_overflow, %.loc53_71.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: %giant_literal_overflow: %i32 = wrapper_binding giant_literal_overflow, @__global_init.%.loc53_71.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %giant_literal_overflow.patt: %pattern_type.d94 = value_binding_pattern giant_literal_overflow [concrete = constants.%giant_literal_overflow.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc67_106.1: Core.IntLiteral = value_of_initializer @__global_init.%ConvertFloatLiteralToIntLiteral.call.loc67 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc67_106.2: Core.IntLiteral = converted @__global_init.%ConvertFloatLiteralToIntLiteral.call.loc67, %.loc67_106.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc67_48: type = splice_block %IntLiteral.ref.loc67 [concrete = Core.IntLiteral] {
|
||||
// CHECK:STDOUT: %.loc67: type = splice_block %IntLiteral.ref.loc67 [concrete = Core.IntLiteral] {
|
||||
// CHECK:STDOUT: %Core.ref.loc67: <namespace> = name_ref Core, imports.%Core.048aa3.1 [concrete = imports.%Core.048aa3.1]
|
||||
// CHECK:STDOUT: %IntLiteral.ref.loc67: type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = Core.IntLiteral]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %giant_literal_to_int_literal_overflow: Core.IntLiteral = wrapper_binding giant_literal_to_int_literal_overflow, %.loc67_106.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: %giant_literal_to_int_literal_overflow: Core.IntLiteral = wrapper_binding giant_literal_to_int_literal_overflow, @__global_init.%.loc67_106.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %giant_literal_to_int_literal_overflow.patt: %pattern_type.dc0 = value_binding_pattern giant_literal_to_int_literal_overflow [concrete = constants.%giant_literal_to_int_literal_overflow.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc79_107.1: %i32 = value_of_initializer @__global_init.%ConvertFloatLiteralToI32.call.loc79 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc79_107.2: %i32 = converted @__global_init.%ConvertFloatLiteralToI32.call.loc79, %.loc79_107.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %i32.loc79: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %giant_exponent_literal_overflow: %i32 = wrapper_binding giant_exponent_literal_overflow, %.loc79_107.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: %giant_exponent_literal_overflow: %i32 = wrapper_binding giant_exponent_literal_overflow, @__global_init.%.loc79_107.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %giant_exponent_literal_overflow.patt: %pattern_type.d94 = value_binding_pattern giant_exponent_literal_overflow [concrete = constants.%giant_exponent_literal_overflow.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc94_141.1: Core.IntLiteral = value_of_initializer @__global_init.%ConvertFloatLiteralToIntLiteral.call.loc94 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc94_141.2: Core.IntLiteral = converted @__global_init.%ConvertFloatLiteralToIntLiteral.call.loc94, %.loc94_141.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc94_57: type = splice_block %IntLiteral.ref.loc94 [concrete = Core.IntLiteral] {
|
||||
// CHECK:STDOUT: %.loc94: type = splice_block %IntLiteral.ref.loc94 [concrete = Core.IntLiteral] {
|
||||
// CHECK:STDOUT: %Core.ref.loc94: <namespace> = name_ref Core, imports.%Core.048aa3.1 [concrete = imports.%Core.048aa3.1]
|
||||
// CHECK:STDOUT: %IntLiteral.ref.loc94: type = name_ref IntLiteral, imports.%Core.IntLiteral [concrete = Core.IntLiteral]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %giant_exponent_literal_to_int_literal_overflow: Core.IntLiteral = wrapper_binding giant_exponent_literal_to_int_literal_overflow, %.loc94_141.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: %giant_exponent_literal_to_int_literal_overflow: Core.IntLiteral = wrapper_binding giant_exponent_literal_to_int_literal_overflow, @__global_init.%.loc94_141.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %giant_exponent_literal_to_int_literal_overflow.patt: %pattern_type.dc0 = value_binding_pattern giant_exponent_literal_to_int_literal_overflow [concrete = constants.%giant_exponent_literal_to_int_literal_overflow.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc106_82.1: %i32 = value_of_initializer @__global_init.%ConvertFloatLiteralToI32.call.loc106 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc106_82.2: %i32 = converted @__global_init.%ConvertFloatLiteralToI32.call.loc106, %.loc106_82.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %i32.loc106: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %literal_overflow_large_mantissa: %i32 = wrapper_binding literal_overflow_large_mantissa, %.loc106_82.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: %literal_overflow_large_mantissa: %i32 = wrapper_binding literal_overflow_large_mantissa, @__global_init.%.loc106_82.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %literal_overflow_large_mantissa.patt: %pattern_type.d94 = value_binding_pattern literal_overflow_large_mantissa [concrete = constants.%literal_overflow_large_mantissa.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc118_80.1: %i32 = value_of_initializer @__global_init.%ConvertFloatLiteralToI32.call.loc118 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc118_80.2: %i32 = converted @__global_init.%ConvertFloatLiteralToI32.call.loc118, %.loc118_80.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %i32.loc118: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %literal_overflow_med_mantissa: %i32 = wrapper_binding literal_overflow_med_mantissa, %.loc118_80.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: %literal_overflow_med_mantissa: %i32 = wrapper_binding literal_overflow_med_mantissa, @__global_init.%.loc118_80.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %literal_overflow_med_mantissa.patt: %pattern_type.d94 = value_binding_pattern literal_overflow_med_mantissa [concrete = constants.%literal_overflow_med_mantissa.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc130_85.1: %i32 = value_of_initializer @__global_init.%ConvertFloatLiteralToI32.call.loc130 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc130_85.2: %i32 = converted @__global_init.%ConvertFloatLiteralToI32.call.loc130, %.loc130_85.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %i32.loc130: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %literal_overflow_hex_med_mantissa: %i32 = wrapper_binding literal_overflow_hex_med_mantissa, %.loc130_85.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: %literal_overflow_hex_med_mantissa: %i32 = wrapper_binding literal_overflow_hex_med_mantissa, @__global_init.%.loc130_85.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %literal_overflow_hex_med_mantissa.patt: %pattern_type.d94 = value_binding_pattern literal_overflow_hex_med_mantissa [concrete = constants.%literal_overflow_hex_med_mantissa.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc142_75.1: %i32 = value_of_initializer @__global_init.%ConvertFloatLiteralToI32.call.loc142 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc142_75.2: %i32 = converted @__global_init.%ConvertFloatLiteralToI32.call.loc142, %.loc142_75.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %i32.loc142: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %literal_overflow_small_mantissa: %i32 = wrapper_binding literal_overflow_small_mantissa, %.loc142_75.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: %literal_overflow_small_mantissa: %i32 = wrapper_binding literal_overflow_small_mantissa, @__global_init.%.loc142_75.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %literal_overflow_small_mantissa.patt: %pattern_type.d94 = value_binding_pattern literal_overflow_small_mantissa [concrete = constants.%literal_overflow_small_mantissa.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc154_81.1: %i32 = value_of_initializer @__global_init.%ConvertFloatLiteralToI32.call.loc154 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc154_81.2: %i32 = converted @__global_init.%ConvertFloatLiteralToI32.call.loc154, %.loc154_81.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %i32.loc154: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %literal_overflow_bin_small_mantissa: %i32 = wrapper_binding literal_overflow_bin_small_mantissa, %.loc154_81.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: %literal_overflow_bin_small_mantissa: %i32 = wrapper_binding literal_overflow_bin_small_mantissa, @__global_init.%.loc154_81.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %literal_overflow_bin_small_mantissa.patt: %pattern_type.d94 = value_binding_pattern literal_overflow_bin_small_mantissa [concrete = constants.%literal_overflow_bin_small_mantissa.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc166_72.1: %u32 = value_of_initializer @__global_init.%ConvertFloatLiteralToU32.call.loc166 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc166_72.2: %u32 = converted @__global_init.%ConvertFloatLiteralToU32.call.loc166, %.loc166_72.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %u32.loc166: type = type_literal constants.%u32 [concrete = constants.%u32]
|
||||
// CHECK:STDOUT: %literal_overflow_unsigned_neg: %u32 = wrapper_binding literal_overflow_unsigned_neg, %.loc166_72.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: %literal_overflow_unsigned_neg: %u32 = wrapper_binding literal_overflow_unsigned_neg, @__global_init.%.loc166_72.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %literal_overflow_unsigned_neg.patt: %pattern_type.129 = value_binding_pattern literal_overflow_unsigned_neg [concrete = constants.%literal_overflow_unsigned_neg.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc178_79.1: %u32 = value_of_initializer @__global_init.%ConvertFloatLiteralToU32.call.loc178 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc178_79.2: %u32 = converted @__global_init.%ConvertFloatLiteralToU32.call.loc178, %.loc178_79.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %u32.loc178: type = type_literal constants.%u32 [concrete = constants.%u32]
|
||||
// CHECK:STDOUT: %literal_overflow_bin_unsigned_neg: %u32 = wrapper_binding literal_overflow_bin_unsigned_neg, %.loc178_79.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: %literal_overflow_bin_unsigned_neg: %u32 = wrapper_binding literal_overflow_bin_unsigned_neg, @__global_init.%.loc178_79.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %literal_overflow_bin_unsigned_neg.patt: %pattern_type.129 = value_binding_pattern literal_overflow_bin_unsigned_neg [concrete = constants.%literal_overflow_bin_unsigned_neg.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -529,6 +499,8 @@ let inf_val: i32 = ConvertF64ToI32(Div(1.0, 0.0));
|
||||
// CHECK:STDOUT: %.loc13_37.1: %f64.761 = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call.loc13 [concrete = constants.%float.ab7]
|
||||
// CHECK:STDOUT: %.loc13_37.2: %f64.761 = converted %float.loc13, %.loc13_37.1 [concrete = constants.%float.ab7]
|
||||
// CHECK:STDOUT: %ConvertF64ToI32.call.loc13: init %i32 = call %ConvertF64ToI32.ref.loc13(%.loc13_37.2) [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc13_49.1: %i32 = value_of_initializer %ConvertF64ToI32.call.loc13 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc13_49.2: %i32 = converted %ConvertF64ToI32.call.loc13, %.loc13_49.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %ConvertF64ToI32.ref.loc23: %ConvertF64ToI32.type = name_ref ConvertF64ToI32, imports.%Main.ConvertF64ToI32 [concrete = constants.%ConvertF64ToI32]
|
||||
// CHECK:STDOUT: %Negate.ref.loc23: %Negate.type = name_ref Negate, imports.%Main.Negate [concrete = constants.%Negate]
|
||||
// CHECK:STDOUT: %float.loc23: Core.FloatLiteral = float_literal_value 21474836490e-1 [concrete = constants.%float.449]
|
||||
@@ -543,6 +515,8 @@ let inf_val: i32 = ConvertF64ToI32(Div(1.0, 0.0));
|
||||
// CHECK:STDOUT: %.loc23_57.1: %f64.761 = value_of_initializer %Negate.call.loc23 [concrete = constants.%float.5e1]
|
||||
// CHECK:STDOUT: %.loc23_57.2: %f64.761 = converted %Negate.call.loc23, %.loc23_57.1 [concrete = constants.%float.5e1]
|
||||
// CHECK:STDOUT: %ConvertF64ToI32.call.loc23: init %i32 = call %ConvertF64ToI32.ref.loc23(%.loc23_57.2) [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc23_58.1: %i32 = value_of_initializer %ConvertF64ToI32.call.loc23 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc23_58.2: %i32 = converted %ConvertF64ToI32.call.loc23, %.loc23_58.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %ConvertF64ToU32.ref: %ConvertF64ToU32.type = name_ref ConvertF64ToU32, imports.%Main.ConvertF64ToU32 [concrete = constants.%ConvertF64ToU32]
|
||||
// CHECK:STDOUT: %Negate.ref.loc33: %Negate.type = name_ref Negate, imports.%Main.Negate [concrete = constants.%Negate]
|
||||
// CHECK:STDOUT: %float.loc33: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.6da]
|
||||
@@ -557,42 +531,68 @@ let inf_val: i32 = ConvertF64ToI32(Div(1.0, 0.0));
|
||||
// CHECK:STDOUT: %.loc33_51.1: %f64.761 = value_of_initializer %Negate.call.loc33 [concrete = constants.%float.c4b]
|
||||
// CHECK:STDOUT: %.loc33_51.2: %f64.761 = converted %Negate.call.loc33, %.loc33_51.1 [concrete = constants.%float.c4b]
|
||||
// CHECK:STDOUT: %ConvertF64ToU32.call: init %u32 = call %ConvertF64ToU32.ref(%.loc33_51.2) [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc33_52.1: %u32 = value_of_initializer %ConvertF64ToU32.call [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc33_52.2: %u32 = converted %ConvertF64ToU32.call, %.loc33_52.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %ConvertFloatLiteralToI32.ref.loc43: %ConvertFloatLiteralToI32.type = name_ref ConvertFloatLiteralToI32, imports.%Main.ConvertFloatLiteralToI32 [concrete = constants.%ConvertFloatLiteralToI32]
|
||||
// CHECK:STDOUT: %float.loc43: Core.FloatLiteral = float_literal_value 21474836480e-1 [concrete = constants.%float.bab60c.2]
|
||||
// CHECK:STDOUT: %ConvertFloatLiteralToI32.call.loc43: init %i32 = call %ConvertFloatLiteralToI32.ref.loc43(%float.loc43) [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc43_66.1: %i32 = value_of_initializer %ConvertFloatLiteralToI32.call.loc43 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc43_66.2: %i32 = converted %ConvertFloatLiteralToI32.call.loc43, %.loc43_66.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %ConvertFloatLiteralToI32.ref.loc53: %ConvertFloatLiteralToI32.type = name_ref ConvertFloatLiteralToI32, imports.%Main.ConvertFloatLiteralToI32 [concrete = constants.%ConvertFloatLiteralToI32]
|
||||
// CHECK:STDOUT: %float.loc53: Core.FloatLiteral = float_literal_value 10e999999 [concrete = constants.%float.53d]
|
||||
// CHECK:STDOUT: %ConvertFloatLiteralToI32.call.loc53: init %i32 = call %ConvertFloatLiteralToI32.ref.loc53(%float.loc53) [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc53_71.1: %i32 = value_of_initializer %ConvertFloatLiteralToI32.call.loc53 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc53_71.2: %i32 = converted %ConvertFloatLiteralToI32.call.loc53, %.loc53_71.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %ConvertFloatLiteralToIntLiteral.ref.loc67: %ConvertFloatLiteralToIntLiteral.type = name_ref ConvertFloatLiteralToIntLiteral, imports.%Main.ConvertFloatLiteralToIntLiteral [concrete = constants.%ConvertFloatLiteralToIntLiteral]
|
||||
// CHECK:STDOUT: %float.loc67: Core.FloatLiteral = float_literal_value 10e9999999 [concrete = constants.%float.ef09]
|
||||
// CHECK:STDOUT: %ConvertFloatLiteralToIntLiteral.call.loc67: init Core.IntLiteral = call %ConvertFloatLiteralToIntLiteral.ref.loc67(%float.loc67) [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc67_106.1: Core.IntLiteral = value_of_initializer %ConvertFloatLiteralToIntLiteral.call.loc67 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc67_106.2: Core.IntLiteral = converted %ConvertFloatLiteralToIntLiteral.call.loc67, %.loc67_106.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %ConvertFloatLiteralToI32.ref.loc79: %ConvertFloatLiteralToI32.type = name_ref ConvertFloatLiteralToI32, imports.%Main.ConvertFloatLiteralToI32 [concrete = constants.%ConvertFloatLiteralToI32]
|
||||
// CHECK:STDOUT: %float.loc79: Core.FloatLiteral = float_literal_value 10e999999999999999999999999999999999 [concrete = constants.%float.f461ee.1]
|
||||
// CHECK:STDOUT: %ConvertFloatLiteralToI32.call.loc79: init %i32 = call %ConvertFloatLiteralToI32.ref.loc79(%float.loc79) [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc79_107.1: %i32 = value_of_initializer %ConvertFloatLiteralToI32.call.loc79 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc79_107.2: %i32 = converted %ConvertFloatLiteralToI32.call.loc79, %.loc79_107.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %ConvertFloatLiteralToIntLiteral.ref.loc94: %ConvertFloatLiteralToIntLiteral.type = name_ref ConvertFloatLiteralToIntLiteral, imports.%Main.ConvertFloatLiteralToIntLiteral [concrete = constants.%ConvertFloatLiteralToIntLiteral]
|
||||
// CHECK:STDOUT: %float.loc94: Core.FloatLiteral = float_literal_value 10e999999999999999999999999999999999 [concrete = constants.%float.f461ee.2]
|
||||
// CHECK:STDOUT: %ConvertFloatLiteralToIntLiteral.call.loc94: init Core.IntLiteral = call %ConvertFloatLiteralToIntLiteral.ref.loc94(%float.loc94) [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc94_141.1: Core.IntLiteral = value_of_initializer %ConvertFloatLiteralToIntLiteral.call.loc94 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc94_141.2: Core.IntLiteral = converted %ConvertFloatLiteralToIntLiteral.call.loc94, %.loc94_141.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %ConvertFloatLiteralToI32.ref.loc106: %ConvertFloatLiteralToI32.type = name_ref ConvertFloatLiteralToI32, imports.%Main.ConvertFloatLiteralToI32 [concrete = constants.%ConvertFloatLiteralToI32]
|
||||
// CHECK:STDOUT: %float.loc106: Core.FloatLiteral = float_literal_value 2147483648e0 [concrete = constants.%float.e12922.1]
|
||||
// CHECK:STDOUT: %ConvertFloatLiteralToI32.call.loc106: init %i32 = call %ConvertFloatLiteralToI32.ref.loc106(%float.loc106) [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc106_82.1: %i32 = value_of_initializer %ConvertFloatLiteralToI32.call.loc106 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc106_82.2: %i32 = converted %ConvertFloatLiteralToI32.call.loc106, %.loc106_82.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %ConvertFloatLiteralToI32.ref.loc118: %ConvertFloatLiteralToI32.type = name_ref ConvertFloatLiteralToI32, imports.%Main.ConvertFloatLiteralToI32 [concrete = constants.%ConvertFloatLiteralToI32]
|
||||
// CHECK:STDOUT: %float.loc118: Core.FloatLiteral = float_literal_value 2147483648e0 [concrete = constants.%float.e12922.2]
|
||||
// CHECK:STDOUT: %ConvertFloatLiteralToI32.call.loc118: init %i32 = call %ConvertFloatLiteralToI32.ref.loc118(%float.loc118) [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc118_80.1: %i32 = value_of_initializer %ConvertFloatLiteralToI32.call.loc118 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc118_80.2: %i32 = converted %ConvertFloatLiteralToI32.call.loc118, %.loc118_80.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %ConvertFloatLiteralToI32.ref.loc130: %ConvertFloatLiteralToI32.type = name_ref ConvertFloatLiteralToI32, imports.%Main.ConvertFloatLiteralToI32 [concrete = constants.%ConvertFloatLiteralToI32]
|
||||
// CHECK:STDOUT: %float.loc130: Core.FloatLiteral = float_literal_value 2147483648p0 [concrete = constants.%float.ef03]
|
||||
// CHECK:STDOUT: %ConvertFloatLiteralToI32.call.loc130: init %i32 = call %ConvertFloatLiteralToI32.ref.loc130(%float.loc130) [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc130_85.1: %i32 = value_of_initializer %ConvertFloatLiteralToI32.call.loc130 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc130_85.2: %i32 = converted %ConvertFloatLiteralToI32.call.loc130, %.loc130_85.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %ConvertFloatLiteralToI32.ref.loc142: %ConvertFloatLiteralToI32.type = name_ref ConvertFloatLiteralToI32, imports.%Main.ConvertFloatLiteralToI32 [concrete = constants.%ConvertFloatLiteralToI32]
|
||||
// CHECK:STDOUT: %float.loc142: Core.FloatLiteral = float_literal_value 10e9 [concrete = constants.%float.9d5]
|
||||
// CHECK:STDOUT: %ConvertFloatLiteralToI32.call.loc142: init %i32 = call %ConvertFloatLiteralToI32.ref.loc142(%float.loc142) [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc142_75.1: %i32 = value_of_initializer %ConvertFloatLiteralToI32.call.loc142 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc142_75.2: %i32 = converted %ConvertFloatLiteralToI32.call.loc142, %.loc142_75.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %ConvertFloatLiteralToI32.ref.loc154: %ConvertFloatLiteralToI32.type = name_ref ConvertFloatLiteralToI32, imports.%Main.ConvertFloatLiteralToI32 [concrete = constants.%ConvertFloatLiteralToI32]
|
||||
// CHECK:STDOUT: %float.loc154: Core.FloatLiteral = float_literal_value 16p27 [concrete = constants.%float.c0c]
|
||||
// CHECK:STDOUT: %ConvertFloatLiteralToI32.call.loc154: init %i32 = call %ConvertFloatLiteralToI32.ref.loc154(%float.loc154) [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc154_81.1: %i32 = value_of_initializer %ConvertFloatLiteralToI32.call.loc154 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc154_81.2: %i32 = converted %ConvertFloatLiteralToI32.call.loc154, %.loc154_81.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %ConvertFloatLiteralToU32.ref.loc166: %ConvertFloatLiteralToU32.type = name_ref ConvertFloatLiteralToU32, imports.%Main.ConvertFloatLiteralToU32 [concrete = constants.%ConvertFloatLiteralToU32]
|
||||
// CHECK:STDOUT: %float.loc166: Core.FloatLiteral = float_literal_value 50e8 [concrete = constants.%float.4f4]
|
||||
// CHECK:STDOUT: %ConvertFloatLiteralToU32.call.loc166: init %u32 = call %ConvertFloatLiteralToU32.ref.loc166(%float.loc166) [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc166_72.1: %u32 = value_of_initializer %ConvertFloatLiteralToU32.call.loc166 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc166_72.2: %u32 = converted %ConvertFloatLiteralToU32.call.loc166, %.loc166_72.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %ConvertFloatLiteralToU32.ref.loc178: %ConvertFloatLiteralToU32.type = name_ref ConvertFloatLiteralToU32, imports.%Main.ConvertFloatLiteralToU32 [concrete = constants.%ConvertFloatLiteralToU32]
|
||||
// CHECK:STDOUT: %float.loc178: Core.FloatLiteral = float_literal_value 16p28 [concrete = constants.%float.97b]
|
||||
// CHECK:STDOUT: %ConvertFloatLiteralToU32.call.loc178: init %u32 = call %ConvertFloatLiteralToU32.ref.loc178(%float.loc178) [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc178_79.1: %u32 = value_of_initializer %ConvertFloatLiteralToU32.call.loc178 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc178_79.2: %u32 = converted %ConvertFloatLiteralToU32.call.loc178, %.loc178_79.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -648,17 +648,13 @@ let inf_val: i32 = ConvertF64ToI32(Div(1.0, 0.0));
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc12_49.1: %i32 = value_of_initializer @__global_init.%ConvertF64ToI32.call.loc12 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc12_49.2: %i32 = converted @__global_init.%ConvertF64ToI32.call.loc12, %.loc12_49.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %i32.loc12: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %nan_val: %i32 = wrapper_binding nan_val, %.loc12_49.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: %nan_val: %i32 = wrapper_binding nan_val, @__global_init.%.loc12_49.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %nan_val.patt: %pattern_type.d94 = value_binding_pattern nan_val [concrete = constants.%nan_val.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc21_49.1: %i32 = value_of_initializer @__global_init.%ConvertF64ToI32.call.loc21 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc21_49.2: %i32 = converted @__global_init.%ConvertF64ToI32.call.loc21, %.loc21_49.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %i32.loc21: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %inf_val: %i32 = wrapper_binding inf_val, %.loc21_49.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: %inf_val: %i32 = wrapper_binding inf_val, @__global_init.%.loc21_49.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %inf_val.patt: %pattern_type.d94 = value_binding_pattern inf_val [concrete = constants.%inf_val.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -688,6 +684,8 @@ let inf_val: i32 = ConvertF64ToI32(Div(1.0, 0.0));
|
||||
// CHECK:STDOUT: %.loc12_48.1: %f64.761 = value_of_initializer %Div.call.loc12 [concrete = constants.%float.61c]
|
||||
// CHECK:STDOUT: %.loc12_48.2: %f64.761 = converted %Div.call.loc12, %.loc12_48.1 [concrete = constants.%float.61c]
|
||||
// CHECK:STDOUT: %ConvertF64ToI32.call.loc12: init %i32 = call %ConvertF64ToI32.ref.loc12(%.loc12_48.2) [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc12_49.1: %i32 = value_of_initializer %ConvertF64ToI32.call.loc12 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc12_49.2: %i32 = converted %ConvertF64ToI32.call.loc12, %.loc12_49.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %ConvertF64ToI32.ref.loc21: %ConvertF64ToI32.type = name_ref ConvertF64ToI32, imports.%Main.ConvertF64ToI32 [concrete = constants.%ConvertF64ToI32]
|
||||
// CHECK:STDOUT: %Div.ref.loc21: %Div.type = name_ref Div, imports.%Main.Div [concrete = constants.%Div]
|
||||
// CHECK:STDOUT: %float.loc21_40: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.6da]
|
||||
@@ -710,6 +708,8 @@ let inf_val: i32 = ConvertF64ToI32(Div(1.0, 0.0));
|
||||
// CHECK:STDOUT: %.loc21_48.1: %f64.761 = value_of_initializer %Div.call.loc21 [concrete = constants.%float.62c]
|
||||
// CHECK:STDOUT: %.loc21_48.2: %f64.761 = converted %Div.call.loc21, %.loc21_48.1 [concrete = constants.%float.62c]
|
||||
// CHECK:STDOUT: %ConvertF64ToI32.call.loc21: init %i32 = call %ConvertF64ToI32.ref.loc21(%.loc21_48.2) [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc21_49.1: %i32 = value_of_initializer %ConvertF64ToI32.call.loc21 [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc21_49.2: %i32 = converted %ConvertF64ToI32.call.loc21, %.loc21_49.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -92,23 +92,19 @@ fn F(){
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc11_54.1: Core.FloatLiteral = value_of_initializer @__global_init.%Add.call.loc11 [concrete = constants.%float.9f6]
|
||||
// CHECK:STDOUT: %.loc11_54.2: Core.FloatLiteral = converted @__global_init.%Add.call.loc11, %.loc11_54.1 [concrete = constants.%float.9f6]
|
||||
// CHECK:STDOUT: %.loc11_13: type = splice_block %FloatLiteral.ref.loc11 [concrete = Core.FloatLiteral] {
|
||||
// CHECK:STDOUT: %.loc11: type = splice_block %FloatLiteral.ref.loc11 [concrete = Core.FloatLiteral] {
|
||||
// CHECK:STDOUT: %Core.ref.loc11: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
|
||||
// CHECK:STDOUT: %FloatLiteral.ref.loc11: type = name_ref FloatLiteral, imports.%Core.FloatLiteral [concrete = Core.FloatLiteral]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %v1: Core.FloatLiteral = wrapper_binding v1, %.loc11_54.2
|
||||
// CHECK:STDOUT: %v1: Core.FloatLiteral = wrapper_binding v1, @__global_init.%.loc11_54.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %v1.patt: %pattern_type.dab = value_binding_pattern v1 [concrete = constants.%v1.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc12_54.1: Core.FloatLiteral = value_of_initializer @__global_init.%Add.call.loc12 [concrete = constants.%float.283]
|
||||
// CHECK:STDOUT: %.loc12_54.2: Core.FloatLiteral = converted @__global_init.%Add.call.loc12, %.loc12_54.1 [concrete = constants.%float.283]
|
||||
// CHECK:STDOUT: %.loc12_13: type = splice_block %FloatLiteral.ref.loc12 [concrete = Core.FloatLiteral] {
|
||||
// CHECK:STDOUT: %.loc12: type = splice_block %FloatLiteral.ref.loc12 [concrete = Core.FloatLiteral] {
|
||||
// CHECK:STDOUT: %Core.ref.loc12: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
|
||||
// CHECK:STDOUT: %FloatLiteral.ref.loc12: type = name_ref FloatLiteral, imports.%Core.FloatLiteral [concrete = Core.FloatLiteral]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %v2: Core.FloatLiteral = wrapper_binding v2, %.loc12_54.2
|
||||
// CHECK:STDOUT: %v2: Core.FloatLiteral = wrapper_binding v2, @__global_init.%.loc12_54.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %v2.patt: %pattern_type.dab = value_binding_pattern v2 [concrete = constants.%v2.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -120,10 +116,14 @@ fn F(){
|
||||
// CHECK:STDOUT: %float.loc11_33: Core.FloatLiteral = float_literal_value 1099511627776p-40 [concrete = constants.%float.b0f]
|
||||
// CHECK:STDOUT: %float.loc11_49: Core.FloatLiteral = float_literal_value 1000e-1 [concrete = constants.%float.471]
|
||||
// CHECK:STDOUT: %Add.call.loc11: init Core.FloatLiteral = call %Add.ref.loc11(%float.loc11_33, %float.loc11_49) [concrete = constants.%float.9f6]
|
||||
// CHECK:STDOUT: %.loc11_54.1: Core.FloatLiteral = value_of_initializer %Add.call.loc11 [concrete = constants.%float.9f6]
|
||||
// CHECK:STDOUT: %.loc11_54.2: Core.FloatLiteral = converted %Add.call.loc11, %.loc11_54.1 [concrete = constants.%float.9f6]
|
||||
// CHECK:STDOUT: %Add.ref.loc12: %Add.type = name_ref Add, file.%Add.decl [concrete = constants.%Add]
|
||||
// CHECK:STDOUT: %float.loc12_33: Core.FloatLiteral = float_literal_value 65536p6 [concrete = constants.%float.846]
|
||||
// CHECK:STDOUT: %float.loc12_46: Core.FloatLiteral = float_literal_value 16p6 [concrete = constants.%float.333]
|
||||
// CHECK:STDOUT: %Add.call.loc12: init Core.FloatLiteral = call %Add.ref.loc12(%float.loc12_33, %float.loc12_46) [concrete = constants.%float.283]
|
||||
// CHECK:STDOUT: %.loc12_54.1: Core.FloatLiteral = value_of_initializer %Add.call.loc12 [concrete = constants.%float.283]
|
||||
// CHECK:STDOUT: %.loc12_54.2: Core.FloatLiteral = converted %Add.call.loc12, %.loc12_54.1 [concrete = constants.%float.283]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
+24
-24
@@ -68,63 +68,51 @@ let v6: Core.FloatLiteral = Negate(Negate(0.0));
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc19_39.1: Core.FloatLiteral = value_of_initializer @__global_init.%Negate.call.loc19 [concrete = constants.%float.84a]
|
||||
// CHECK:STDOUT: %.loc19_39.2: Core.FloatLiteral = converted @__global_init.%Negate.call.loc19, %.loc19_39.1 [concrete = constants.%float.84a]
|
||||
// CHECK:STDOUT: %.loc19_13: type = splice_block %FloatLiteral.ref.loc19 [concrete = Core.FloatLiteral] {
|
||||
// CHECK:STDOUT: %.loc19: type = splice_block %FloatLiteral.ref.loc19 [concrete = Core.FloatLiteral] {
|
||||
// CHECK:STDOUT: %Core.ref.loc19: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
|
||||
// CHECK:STDOUT: %FloatLiteral.ref.loc19: type = name_ref FloatLiteral, imports.%Core.FloatLiteral [concrete = Core.FloatLiteral]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %v1: Core.FloatLiteral = wrapper_binding v1, %.loc19_39.2
|
||||
// CHECK:STDOUT: %v1: Core.FloatLiteral = wrapper_binding v1, @__global_init.%.loc19_39.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %v1.patt: %pattern_type = value_binding_pattern v1 [concrete = constants.%v1.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc20_41.1: Core.FloatLiteral = value_of_initializer @__global_init.%Negate.call.loc20 [concrete = constants.%float.838]
|
||||
// CHECK:STDOUT: %.loc20_41.2: Core.FloatLiteral = converted @__global_init.%Negate.call.loc20, %.loc20_41.1 [concrete = constants.%float.838]
|
||||
// CHECK:STDOUT: %.loc20_13: type = splice_block %FloatLiteral.ref.loc20 [concrete = Core.FloatLiteral] {
|
||||
// CHECK:STDOUT: %.loc20: type = splice_block %FloatLiteral.ref.loc20 [concrete = Core.FloatLiteral] {
|
||||
// CHECK:STDOUT: %Core.ref.loc20: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
|
||||
// CHECK:STDOUT: %FloatLiteral.ref.loc20: type = name_ref FloatLiteral, imports.%Core.FloatLiteral [concrete = Core.FloatLiteral]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %v2: Core.FloatLiteral = wrapper_binding v2, %.loc20_41.2
|
||||
// CHECK:STDOUT: %v2: Core.FloatLiteral = wrapper_binding v2, @__global_init.%.loc20_41.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %v2.patt: %pattern_type = value_binding_pattern v2 [concrete = constants.%v2.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc23_49.1: Core.FloatLiteral = value_of_initializer @__global_init.%Negate.call.loc23_49 [concrete = constants.%float.b21268.2]
|
||||
// CHECK:STDOUT: %.loc23_49.2: Core.FloatLiteral = converted @__global_init.%Negate.call.loc23_49, %.loc23_49.1 [concrete = constants.%float.b21268.2]
|
||||
// CHECK:STDOUT: %.loc23_13: type = splice_block %FloatLiteral.ref.loc23 [concrete = Core.FloatLiteral] {
|
||||
// CHECK:STDOUT: %.loc23: type = splice_block %FloatLiteral.ref.loc23 [concrete = Core.FloatLiteral] {
|
||||
// CHECK:STDOUT: %Core.ref.loc23: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
|
||||
// CHECK:STDOUT: %FloatLiteral.ref.loc23: type = name_ref FloatLiteral, imports.%Core.FloatLiteral [concrete = Core.FloatLiteral]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %v3: Core.FloatLiteral = wrapper_binding v3, %.loc23_49.2
|
||||
// CHECK:STDOUT: %v3: Core.FloatLiteral = wrapper_binding v3, @__global_init.%.loc23_49.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %v3.patt: %pattern_type = value_binding_pattern v3 [concrete = constants.%v3.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc24_51.1: Core.FloatLiteral = value_of_initializer @__global_init.%Negate.call.loc24_51 [concrete = constants.%float.eda197.2]
|
||||
// CHECK:STDOUT: %.loc24_51.2: Core.FloatLiteral = converted @__global_init.%Negate.call.loc24_51, %.loc24_51.1 [concrete = constants.%float.eda197.2]
|
||||
// CHECK:STDOUT: %.loc24_13: type = splice_block %FloatLiteral.ref.loc24 [concrete = Core.FloatLiteral] {
|
||||
// CHECK:STDOUT: %.loc24: type = splice_block %FloatLiteral.ref.loc24 [concrete = Core.FloatLiteral] {
|
||||
// CHECK:STDOUT: %Core.ref.loc24: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
|
||||
// CHECK:STDOUT: %FloatLiteral.ref.loc24: type = name_ref FloatLiteral, imports.%Core.FloatLiteral [concrete = Core.FloatLiteral]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %v4: Core.FloatLiteral = wrapper_binding v4, %.loc24_51.2
|
||||
// CHECK:STDOUT: %v4: Core.FloatLiteral = wrapper_binding v4, @__global_init.%.loc24_51.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %v4.patt: %pattern_type = value_binding_pattern v4 [concrete = constants.%v4.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc27_39.1: Core.FloatLiteral = value_of_initializer @__global_init.%Negate.call.loc27 [concrete = constants.%float.1f75e4.2]
|
||||
// CHECK:STDOUT: %.loc27_39.2: Core.FloatLiteral = converted @__global_init.%Negate.call.loc27, %.loc27_39.1 [concrete = constants.%float.1f75e4.2]
|
||||
// CHECK:STDOUT: %.loc27_13: type = splice_block %FloatLiteral.ref.loc27 [concrete = Core.FloatLiteral] {
|
||||
// CHECK:STDOUT: %.loc27: type = splice_block %FloatLiteral.ref.loc27 [concrete = Core.FloatLiteral] {
|
||||
// CHECK:STDOUT: %Core.ref.loc27: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
|
||||
// CHECK:STDOUT: %FloatLiteral.ref.loc27: type = name_ref FloatLiteral, imports.%Core.FloatLiteral [concrete = Core.FloatLiteral]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %v5: Core.FloatLiteral = wrapper_binding v5, %.loc27_39.2
|
||||
// CHECK:STDOUT: %v5: Core.FloatLiteral = wrapper_binding v5, @__global_init.%.loc27_39.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %v5.patt: %pattern_type = value_binding_pattern v5 [concrete = constants.%v5.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc28_47.1: Core.FloatLiteral = value_of_initializer @__global_init.%Negate.call.loc28_47 [concrete = constants.%float.1f75e4.5]
|
||||
// CHECK:STDOUT: %.loc28_47.2: Core.FloatLiteral = converted @__global_init.%Negate.call.loc28_47, %.loc28_47.1 [concrete = constants.%float.1f75e4.5]
|
||||
// CHECK:STDOUT: %.loc28_13: type = splice_block %FloatLiteral.ref.loc28 [concrete = Core.FloatLiteral] {
|
||||
// CHECK:STDOUT: %.loc28: type = splice_block %FloatLiteral.ref.loc28 [concrete = Core.FloatLiteral] {
|
||||
// CHECK:STDOUT: %Core.ref.loc28: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
|
||||
// CHECK:STDOUT: %FloatLiteral.ref.loc28: type = name_ref FloatLiteral, imports.%Core.FloatLiteral [concrete = Core.FloatLiteral]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %v6: Core.FloatLiteral = wrapper_binding v6, %.loc28_47.2
|
||||
// CHECK:STDOUT: %v6: Core.FloatLiteral = wrapper_binding v6, @__global_init.%.loc28_47.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %v6.patt: %pattern_type = value_binding_pattern v6 [concrete = constants.%v6.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -135,9 +123,13 @@ let v6: Core.FloatLiteral = Negate(Negate(0.0));
|
||||
// CHECK:STDOUT: %Negate.ref.loc19: %Negate.type = name_ref Negate, file.%Negate.decl [concrete = constants.%Negate]
|
||||
// CHECK:STDOUT: %float.loc19: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.6da]
|
||||
// CHECK:STDOUT: %Negate.call.loc19: init Core.FloatLiteral = call %Negate.ref.loc19(%float.loc19) [concrete = constants.%float.84a]
|
||||
// CHECK:STDOUT: %.loc19_39.1: Core.FloatLiteral = value_of_initializer %Negate.call.loc19 [concrete = constants.%float.84a]
|
||||
// CHECK:STDOUT: %.loc19_39.2: Core.FloatLiteral = converted %Negate.call.loc19, %.loc19_39.1 [concrete = constants.%float.84a]
|
||||
// CHECK:STDOUT: %Negate.ref.loc20: %Negate.type = name_ref Negate, file.%Negate.decl [concrete = constants.%Negate]
|
||||
// CHECK:STDOUT: %float.loc20: Core.FloatLiteral = float_literal_value 18e8 [concrete = constants.%float.c59]
|
||||
// CHECK:STDOUT: %Negate.call.loc20: init Core.FloatLiteral = call %Negate.ref.loc20(%float.loc20) [concrete = constants.%float.838]
|
||||
// CHECK:STDOUT: %.loc20_41.1: Core.FloatLiteral = value_of_initializer %Negate.call.loc20 [concrete = constants.%float.838]
|
||||
// CHECK:STDOUT: %.loc20_41.2: Core.FloatLiteral = converted %Negate.call.loc20, %.loc20_41.1 [concrete = constants.%float.838]
|
||||
// CHECK:STDOUT: %Negate.ref.loc23_29: %Negate.type = name_ref Negate, file.%Negate.decl [concrete = constants.%Negate]
|
||||
// CHECK:STDOUT: %Negate.ref.loc23_36: %Negate.type = name_ref Negate, file.%Negate.decl [concrete = constants.%Negate]
|
||||
// CHECK:STDOUT: %float.loc23: Core.FloatLiteral = float_literal_value 8787e-2 [concrete = constants.%float.b21268.1]
|
||||
@@ -145,6 +137,8 @@ let v6: Core.FloatLiteral = Negate(Negate(0.0));
|
||||
// CHECK:STDOUT: %.loc23_48.1: Core.FloatLiteral = value_of_initializer %Negate.call.loc23_48 [concrete = constants.%float.923]
|
||||
// CHECK:STDOUT: %.loc23_48.2: Core.FloatLiteral = converted %Negate.call.loc23_48, %.loc23_48.1 [concrete = constants.%float.923]
|
||||
// CHECK:STDOUT: %Negate.call.loc23_49: init Core.FloatLiteral = call %Negate.ref.loc23_29(%.loc23_48.2) [concrete = constants.%float.b21268.2]
|
||||
// CHECK:STDOUT: %.loc23_49.1: Core.FloatLiteral = value_of_initializer %Negate.call.loc23_49 [concrete = constants.%float.b21268.2]
|
||||
// CHECK:STDOUT: %.loc23_49.2: Core.FloatLiteral = converted %Negate.call.loc23_49, %.loc23_49.1 [concrete = constants.%float.b21268.2]
|
||||
// CHECK:STDOUT: %Negate.ref.loc24_29: %Negate.type = name_ref Negate, file.%Negate.decl [concrete = constants.%Negate]
|
||||
// CHECK:STDOUT: %Negate.ref.loc24_36: %Negate.type = name_ref Negate, file.%Negate.decl [concrete = constants.%Negate]
|
||||
// CHECK:STDOUT: %float.loc24: Core.FloatLiteral = float_literal_value 24p-3 [concrete = constants.%float.eda197.1]
|
||||
@@ -152,9 +146,13 @@ let v6: Core.FloatLiteral = Negate(Negate(0.0));
|
||||
// CHECK:STDOUT: %.loc24_50.1: Core.FloatLiteral = value_of_initializer %Negate.call.loc24_50 [concrete = constants.%float.0b3]
|
||||
// CHECK:STDOUT: %.loc24_50.2: Core.FloatLiteral = converted %Negate.call.loc24_50, %.loc24_50.1 [concrete = constants.%float.0b3]
|
||||
// CHECK:STDOUT: %Negate.call.loc24_51: init Core.FloatLiteral = call %Negate.ref.loc24_29(%.loc24_50.2) [concrete = constants.%float.eda197.2]
|
||||
// CHECK:STDOUT: %.loc24_51.1: Core.FloatLiteral = value_of_initializer %Negate.call.loc24_51 [concrete = constants.%float.eda197.2]
|
||||
// CHECK:STDOUT: %.loc24_51.2: Core.FloatLiteral = converted %Negate.call.loc24_51, %.loc24_51.1 [concrete = constants.%float.eda197.2]
|
||||
// CHECK:STDOUT: %Negate.ref.loc27: %Negate.type = name_ref Negate, file.%Negate.decl [concrete = constants.%Negate]
|
||||
// CHECK:STDOUT: %float.loc27: Core.FloatLiteral = float_literal_value 0e-1 [concrete = constants.%float.1f75e4.1]
|
||||
// CHECK:STDOUT: %Negate.call.loc27: init Core.FloatLiteral = call %Negate.ref.loc27(%float.loc27) [concrete = constants.%float.1f75e4.2]
|
||||
// CHECK:STDOUT: %.loc27_39.1: Core.FloatLiteral = value_of_initializer %Negate.call.loc27 [concrete = constants.%float.1f75e4.2]
|
||||
// CHECK:STDOUT: %.loc27_39.2: Core.FloatLiteral = converted %Negate.call.loc27, %.loc27_39.1 [concrete = constants.%float.1f75e4.2]
|
||||
// CHECK:STDOUT: %Negate.ref.loc28_29: %Negate.type = name_ref Negate, file.%Negate.decl [concrete = constants.%Negate]
|
||||
// CHECK:STDOUT: %Negate.ref.loc28_36: %Negate.type = name_ref Negate, file.%Negate.decl [concrete = constants.%Negate]
|
||||
// CHECK:STDOUT: %float.loc28: Core.FloatLiteral = float_literal_value 0e-1 [concrete = constants.%float.1f75e4.3]
|
||||
@@ -162,6 +160,8 @@ let v6: Core.FloatLiteral = Negate(Negate(0.0));
|
||||
// CHECK:STDOUT: %.loc28_46.1: Core.FloatLiteral = value_of_initializer %Negate.call.loc28_46 [concrete = constants.%float.1f75e4.4]
|
||||
// CHECK:STDOUT: %.loc28_46.2: Core.FloatLiteral = converted %Negate.call.loc28_46, %.loc28_46.1 [concrete = constants.%float.1f75e4.4]
|
||||
// CHECK:STDOUT: %Negate.call.loc28_47: init Core.FloatLiteral = call %Negate.ref.loc28_29(%.loc28_46.2) [concrete = constants.%float.1f75e4.5]
|
||||
// CHECK:STDOUT: %.loc28_47.1: Core.FloatLiteral = value_of_initializer %Negate.call.loc28_47 [concrete = constants.%float.1f75e4.5]
|
||||
// CHECK:STDOUT: %.loc28_47.2: Core.FloatLiteral = converted %Negate.call.loc28_47, %.loc28_47.1 [concrete = constants.%float.1f75e4.5]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -95,23 +95,19 @@ let v1: Core.FloatLiteral = Sub(0x1.0p1024000000000, 0.0000000000000000001);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc12_41.1: Core.FloatLiteral = value_of_initializer @__global_init.%Sub.call.loc12 [concrete = constants.%float.e85]
|
||||
// CHECK:STDOUT: %.loc12_41.2: Core.FloatLiteral = converted @__global_init.%Sub.call.loc12, %.loc12_41.1 [concrete = constants.%float.e85]
|
||||
// CHECK:STDOUT: %.loc12_13: type = splice_block %FloatLiteral.ref.loc12 [concrete = Core.FloatLiteral] {
|
||||
// CHECK:STDOUT: %.loc12: type = splice_block %FloatLiteral.ref.loc12 [concrete = Core.FloatLiteral] {
|
||||
// CHECK:STDOUT: %Core.ref.loc12: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
|
||||
// CHECK:STDOUT: %FloatLiteral.ref.loc12: type = name_ref FloatLiteral, imports.%Core.FloatLiteral [concrete = Core.FloatLiteral]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %v1: Core.FloatLiteral = wrapper_binding v1, %.loc12_41.2
|
||||
// CHECK:STDOUT: %v1: Core.FloatLiteral = wrapper_binding v1, @__global_init.%.loc12_41.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %v1.patt: %pattern_type.dab = value_binding_pattern v1 [concrete = constants.%v1.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc13_54.1: Core.FloatLiteral = value_of_initializer @__global_init.%Sub.call.loc13 [concrete = constants.%float.bec4a4.1]
|
||||
// CHECK:STDOUT: %.loc13_54.2: Core.FloatLiteral = converted @__global_init.%Sub.call.loc13, %.loc13_54.1 [concrete = constants.%float.bec4a4.1]
|
||||
// CHECK:STDOUT: %.loc13_13: type = splice_block %FloatLiteral.ref.loc13 [concrete = Core.FloatLiteral] {
|
||||
// CHECK:STDOUT: %.loc13: type = splice_block %FloatLiteral.ref.loc13 [concrete = Core.FloatLiteral] {
|
||||
// CHECK:STDOUT: %Core.ref.loc13: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
|
||||
// CHECK:STDOUT: %FloatLiteral.ref.loc13: type = name_ref FloatLiteral, imports.%Core.FloatLiteral [concrete = Core.FloatLiteral]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %v2: Core.FloatLiteral = wrapper_binding v2, %.loc13_54.2
|
||||
// CHECK:STDOUT: %v2: Core.FloatLiteral = wrapper_binding v2, @__global_init.%.loc13_54.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %v2.patt: %pattern_type.dab = value_binding_pattern v2 [concrete = constants.%v2.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -123,10 +119,14 @@ let v1: Core.FloatLiteral = Sub(0x1.0p1024000000000, 0.0000000000000000001);
|
||||
// CHECK:STDOUT: %float.loc12_33: Core.FloatLiteral = float_literal_value 10e-1 [concrete = constants.%float.6daae3.1]
|
||||
// CHECK:STDOUT: %float.loc12_38: Core.FloatLiteral = float_literal_value 20e-1 [concrete = constants.%float.cceb42.1]
|
||||
// CHECK:STDOUT: %Sub.call.loc12: init Core.FloatLiteral = call %Sub.ref.loc12(%float.loc12_33, %float.loc12_38) [concrete = constants.%float.e85]
|
||||
// CHECK:STDOUT: %.loc12_41.1: Core.FloatLiteral = value_of_initializer %Sub.call.loc12 [concrete = constants.%float.e85]
|
||||
// CHECK:STDOUT: %.loc12_41.2: Core.FloatLiteral = converted %Sub.call.loc12, %.loc12_41.1 [concrete = constants.%float.e85]
|
||||
// CHECK:STDOUT: %Sub.ref.loc13: %Sub.type = name_ref Sub, file.%Sub.decl [concrete = constants.%Sub]
|
||||
// CHECK:STDOUT: %float.loc13_33: Core.FloatLiteral = float_literal_value 65536p6 [concrete = constants.%float.8466d5.1]
|
||||
// CHECK:STDOUT: %float.loc13_46: Core.FloatLiteral = float_literal_value 16p6 [concrete = constants.%float.333a1f.1]
|
||||
// CHECK:STDOUT: %Sub.call.loc13: init Core.FloatLiteral = call %Sub.ref.loc13(%float.loc13_33, %float.loc13_46) [concrete = constants.%float.bec4a4.1]
|
||||
// CHECK:STDOUT: %.loc13_54.1: Core.FloatLiteral = value_of_initializer %Sub.call.loc13 [concrete = constants.%float.bec4a4.1]
|
||||
// CHECK:STDOUT: %.loc13_54.2: Core.FloatLiteral = converted %Sub.call.loc13, %.loc13_54.1 [concrete = constants.%float.bec4a4.1]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -102,10 +102,8 @@ let c: CharLiteral = AddIntChar(Negate(98), 'a');
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc12_39.1: Core.CharLiteral = value_of_initializer @__global_init.%AddIntChar.call [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %.loc12_39.2: Core.CharLiteral = converted @__global_init.%AddIntChar.call, %.loc12_39.1 [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %CharLiteral.ref: type = name_ref CharLiteral, %CharLiteral [concrete = Core.CharLiteral]
|
||||
// CHECK:STDOUT: %a: Core.CharLiteral = wrapper_binding a, %.loc12_39.2
|
||||
// CHECK:STDOUT: %a: Core.CharLiteral = wrapper_binding a, @__global_init.%.loc12_39.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.8c6 = value_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -115,8 +113,10 @@ let c: CharLiteral = AddIntChar(Negate(98), 'a');
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %AddIntChar.ref: %AddIntChar.type = name_ref AddIntChar, file.%AddIntChar.decl [concrete = constants.%AddIntChar]
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
|
||||
// CHECK:STDOUT: %.loc12: Core.CharLiteral = char_value U+0061 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %AddIntChar.call: init Core.CharLiteral = call %AddIntChar.ref(%int_1, %.loc12) [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %.loc12_36: Core.CharLiteral = char_value U+0061 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %AddIntChar.call: init Core.CharLiteral = call %AddIntChar.ref(%int_1, %.loc12_36) [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %.loc12_39.1: Core.CharLiteral = value_of_initializer %AddIntChar.call [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %.loc12_39.2: Core.CharLiteral = converted %AddIntChar.call, %.loc12_39.1 [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -130,24 +130,18 @@ let c: CharLiteral = ConvertFromIntLiteral(0x110000);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc14_46.1: Core.CharLiteral = value_of_initializer @__global_init.%ConvertFromIntLiteral.call [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %.loc14_46.2: Core.CharLiteral = converted @__global_init.%ConvertFromIntLiteral.call, %.loc14_46.1 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %CharLiteral.ref.loc14: type = name_ref CharLiteral, %CharLiteral [concrete = Core.CharLiteral]
|
||||
// CHECK:STDOUT: %a: Core.CharLiteral = wrapper_binding a, %.loc14_46.2
|
||||
// CHECK:STDOUT: %a: Core.CharLiteral = wrapper_binding a, @__global_init.%.loc14_46.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.8c6 = value_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc15_39.1: Core.CharLiteral = value_of_initializer @__global_init.%ConvertFromI32.call [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %.loc15_39.2: Core.CharLiteral = converted @__global_init.%ConvertFromI32.call, %.loc15_39.1 [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %CharLiteral.ref.loc15: type = name_ref CharLiteral, %CharLiteral [concrete = Core.CharLiteral]
|
||||
// CHECK:STDOUT: %b: Core.CharLiteral = wrapper_binding b, %.loc15_39.2
|
||||
// CHECK:STDOUT: %b: Core.CharLiteral = wrapper_binding b, @__global_init.%.loc15_39.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.8c6 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc16_39.1: Core.CharLiteral = value_of_initializer @__global_init.%ConvertFromU32.call [concrete = constants.%.b9b]
|
||||
// CHECK:STDOUT: %.loc16_39.2: Core.CharLiteral = converted @__global_init.%ConvertFromU32.call, %.loc16_39.1 [concrete = constants.%.b9b]
|
||||
// CHECK:STDOUT: %CharLiteral.ref.loc16: type = name_ref CharLiteral, %CharLiteral [concrete = Core.CharLiteral]
|
||||
// CHECK:STDOUT: %c: Core.CharLiteral = wrapper_binding c, %.loc16_39.2
|
||||
// CHECK:STDOUT: %c: Core.CharLiteral = wrapper_binding c, @__global_init.%.loc16_39.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %c.patt: %pattern_type.8c6 = value_binding_pattern c [concrete = constants.%c.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -158,6 +152,8 @@ let c: CharLiteral = ConvertFromIntLiteral(0x110000);
|
||||
// CHECK:STDOUT: %ConvertFromIntLiteral.ref: %ConvertFromIntLiteral.type = name_ref ConvertFromIntLiteral, file.%ConvertFromIntLiteral.decl [concrete = constants.%ConvertFromIntLiteral]
|
||||
// CHECK:STDOUT: %int_97: Core.IntLiteral = int_value 97 [concrete = constants.%int_97]
|
||||
// CHECK:STDOUT: %ConvertFromIntLiteral.call: init Core.CharLiteral = call %ConvertFromIntLiteral.ref(%int_97) [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %.loc14_46.1: Core.CharLiteral = value_of_initializer %ConvertFromIntLiteral.call [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %.loc14_46.2: Core.CharLiteral = converted %ConvertFromIntLiteral.call, %.loc14_46.1 [concrete = constants.%.54f]
|
||||
// CHECK:STDOUT: %ConvertFromI32.ref: %ConvertFromI32.type = name_ref ConvertFromI32, file.%ConvertFromI32.decl [concrete = constants.%ConvertFromI32]
|
||||
// CHECK:STDOUT: %int_98: Core.IntLiteral = int_value 98 [concrete = constants.%int_98.fb6]
|
||||
// CHECK:STDOUT: %impl.elem0.loc15: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
@@ -168,6 +164,8 @@ let c: CharLiteral = ConvertFromIntLiteral(0x110000);
|
||||
// CHECK:STDOUT: %.loc15_37.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc15 [concrete = constants.%int_98.f19]
|
||||
// CHECK:STDOUT: %.loc15_37.2: %i32 = converted %int_98, %.loc15_37.1 [concrete = constants.%int_98.f19]
|
||||
// CHECK:STDOUT: %ConvertFromI32.call: init Core.CharLiteral = call %ConvertFromI32.ref(%.loc15_37.2) [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %.loc15_39.1: Core.CharLiteral = value_of_initializer %ConvertFromI32.call [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %.loc15_39.2: Core.CharLiteral = converted %ConvertFromI32.call, %.loc15_39.1 [concrete = constants.%.711]
|
||||
// CHECK:STDOUT: %ConvertFromU32.ref: %ConvertFromU32.type = name_ref ConvertFromU32, file.%ConvertFromU32.decl [concrete = constants.%ConvertFromU32]
|
||||
// CHECK:STDOUT: %int_99: Core.IntLiteral = int_value 99 [concrete = constants.%int_99.6d1]
|
||||
// CHECK:STDOUT: %impl.elem0.loc16: %.8ad = impl_witness_access constants.%ImplicitAs.impl_witness.88f, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.14a]
|
||||
@@ -178,6 +176,8 @@ let c: CharLiteral = ConvertFromIntLiteral(0x110000);
|
||||
// CHECK:STDOUT: %.loc16_37.1: %u32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc16 [concrete = constants.%int_99.7cf]
|
||||
// CHECK:STDOUT: %.loc16_37.2: %u32 = converted %int_99, %.loc16_37.1 [concrete = constants.%int_99.7cf]
|
||||
// CHECK:STDOUT: %ConvertFromU32.call: init Core.CharLiteral = call %ConvertFromU32.ref(%.loc16_37.2) [concrete = constants.%.b9b]
|
||||
// CHECK:STDOUT: %.loc16_39.1: Core.CharLiteral = value_of_initializer %ConvertFromU32.call [concrete = constants.%.b9b]
|
||||
// CHECK:STDOUT: %.loc16_39.2: Core.CharLiteral = converted %ConvertFromU32.call, %.loc16_39.1 [concrete = constants.%.b9b]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -364,24 +364,18 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc6_42.1: %u32 = value_of_initializer @__global_init.%Int32ToUint32.call [concrete = constants.%int_1.b0b]
|
||||
// CHECK:STDOUT: %.loc6_42.2: %u32 = converted @__global_init.%Int32ToUint32.call, %.loc6_42.1 [concrete = constants.%int_1.b0b]
|
||||
// CHECK:STDOUT: %u32: type = type_literal constants.%u32 [concrete = constants.%u32]
|
||||
// CHECK:STDOUT: %SizePreserving: %u32 = wrapper_binding SizePreserving, %.loc6_42.2
|
||||
// CHECK:STDOUT: %SizePreserving: %u32 = wrapper_binding SizePreserving, @__global_init.%.loc6_42.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %SizePreserving.patt: %pattern_type.129 = value_binding_pattern SizePreserving [concrete = constants.%SizePreserving.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc7_36.1: %i16 = value_of_initializer @__global_init.%Int32ToInt16.call [concrete = constants.%int_1.6e1]
|
||||
// CHECK:STDOUT: %.loc7_36.2: %i16 = converted @__global_init.%Int32ToInt16.call, %.loc7_36.1 [concrete = constants.%int_1.6e1]
|
||||
// CHECK:STDOUT: %i16: type = type_literal constants.%i16 [concrete = constants.%i16]
|
||||
// CHECK:STDOUT: %Narrowing: %i16 = wrapper_binding Narrowing, %.loc7_36.2
|
||||
// CHECK:STDOUT: %Narrowing: %i16 = wrapper_binding Narrowing, @__global_init.%.loc7_36.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %Narrowing.patt: %pattern_type.9bc = value_binding_pattern Narrowing [concrete = constants.%Narrowing.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc8_35.1: %i64 = value_of_initializer @__global_init.%Int32ToInt64.call [concrete = constants.%int_1.836]
|
||||
// CHECK:STDOUT: %.loc8_35.2: %i64 = converted @__global_init.%Int32ToInt64.call, %.loc8_35.1 [concrete = constants.%int_1.836]
|
||||
// CHECK:STDOUT: %i64: type = type_literal constants.%i64 [concrete = constants.%i64]
|
||||
// CHECK:STDOUT: %Widening: %i64 = wrapper_binding Widening, %.loc8_35.2
|
||||
// CHECK:STDOUT: %Widening: %i64 = wrapper_binding Widening, @__global_init.%.loc8_35.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %Widening.patt: %pattern_type.c0e = value_binding_pattern Widening [concrete = constants.%Widening.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -399,6 +393,8 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant);
|
||||
// CHECK:STDOUT: %.loc6_41.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc6 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc6_41.2: %i32 = converted %int_1.loc6, %.loc6_41.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %Int32ToUint32.call: init %u32 = call %Int32ToUint32.ref(%.loc6_41.2) [concrete = constants.%int_1.b0b]
|
||||
// CHECK:STDOUT: %.loc6_42.1: %u32 = value_of_initializer %Int32ToUint32.call [concrete = constants.%int_1.b0b]
|
||||
// CHECK:STDOUT: %.loc6_42.2: %u32 = converted %Int32ToUint32.call, %.loc6_42.1 [concrete = constants.%int_1.b0b]
|
||||
// CHECK:STDOUT: %Int32ToInt16.ref: %Int32ToInt16.type = name_ref Int32ToInt16, imports.%Main.Int32ToInt16 [concrete = constants.%Int32ToInt16]
|
||||
// CHECK:STDOUT: %int_1.loc7: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %impl.elem0.loc7: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
@@ -409,6 +405,8 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant);
|
||||
// CHECK:STDOUT: %.loc7_35.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc7 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc7_35.2: %i32 = converted %int_1.loc7, %.loc7_35.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %Int32ToInt16.call: init %i16 = call %Int32ToInt16.ref(%.loc7_35.2) [concrete = constants.%int_1.6e1]
|
||||
// CHECK:STDOUT: %.loc7_36.1: %i16 = value_of_initializer %Int32ToInt16.call [concrete = constants.%int_1.6e1]
|
||||
// CHECK:STDOUT: %.loc7_36.2: %i16 = converted %Int32ToInt16.call, %.loc7_36.1 [concrete = constants.%int_1.6e1]
|
||||
// CHECK:STDOUT: %Int32ToInt64.ref: %Int32ToInt64.type = name_ref Int32ToInt64, imports.%Main.Int32ToInt64 [concrete = constants.%Int32ToInt64]
|
||||
// CHECK:STDOUT: %int_1.loc8: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %impl.elem0.loc8: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
@@ -419,6 +417,8 @@ let convert_not_constant_widen: i64 = Int32ToInt64(not_constant);
|
||||
// CHECK:STDOUT: %.loc8_34.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc8 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc8_34.2: %i32 = converted %int_1.loc8, %.loc8_34.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %Int32ToInt64.call: init %i64 = call %Int32ToInt64.ref(%.loc8_34.2) [concrete = constants.%int_1.836]
|
||||
// CHECK:STDOUT: %.loc8_35.1: %i64 = value_of_initializer %Int32ToInt64.call [concrete = constants.%int_1.836]
|
||||
// CHECK:STDOUT: %.loc8_35.2: %i64 = converted %Int32ToInt64.call, %.loc8_35.1 [concrete = constants.%int_1.836]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -79,10 +79,8 @@ let overflow: f64 = ConvertIntLiteralToF64(1000000000000000000000000000000000000
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc15_354.1: %f64.761 = value_of_initializer @__global_init.%ConvertIntLiteralToF64.call [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc15_354.2: %f64.761 = converted @__global_init.%ConvertIntLiteralToF64.call, %.loc15_354.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %f64: type = type_literal constants.%f64.761 [concrete = constants.%f64.761]
|
||||
// CHECK:STDOUT: %overflow: %f64.761 = wrapper_binding overflow, %.loc15_354.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: %overflow: %f64.761 = wrapper_binding overflow, @__global_init.%.loc15_354.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %overflow.patt: %pattern_type.667 = value_binding_pattern overflow [concrete = constants.%overflow.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -93,6 +91,8 @@ let overflow: f64 = ConvertIntLiteralToF64(1000000000000000000000000000000000000
|
||||
// CHECK:STDOUT: %ConvertIntLiteralToF64.ref: %ConvertIntLiteralToF64.type = name_ref ConvertIntLiteralToF64, imports.%Main.ConvertIntLiteralToF64 [concrete = constants.%ConvertIntLiteralToF64]
|
||||
// CHECK:STDOUT: %int_1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000: Core.IntLiteral = int_value 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 [concrete = constants.%int_1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000]
|
||||
// CHECK:STDOUT: %ConvertIntLiteralToF64.call: init %f64.761 = call %ConvertIntLiteralToF64.ref(%int_1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc15_354.1: %f64.761 = value_of_initializer %ConvertIntLiteralToF64.call [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc15_354.2: %f64.761 = converted %ConvertIntLiteralToF64.call, %.loc15_354.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -65,10 +65,8 @@ let lossy: f32 = ConvertIntLiteralToF32(123456789);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc13_50.1: %f32.3bc = value_of_initializer @__global_init.%ConvertIntLiteralToF32.call [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc13_50.2: %f32.3bc = converted @__global_init.%ConvertIntLiteralToF32.call, %.loc13_50.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: %f32: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc]
|
||||
// CHECK:STDOUT: %lossy: %f32.3bc = wrapper_binding lossy, %.loc13_50.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: %lossy: %f32.3bc = wrapper_binding lossy, @__global_init.%.loc13_50.2 [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %lossy.patt: %pattern_type.239 = value_binding_pattern lossy [concrete = constants.%lossy.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -79,6 +77,8 @@ let lossy: f32 = ConvertIntLiteralToF32(123456789);
|
||||
// CHECK:STDOUT: %ConvertIntLiteralToF32.ref: %ConvertIntLiteralToF32.type = name_ref ConvertIntLiteralToF32, imports.%Main.ConvertIntLiteralToF32 [concrete = constants.%ConvertIntLiteralToF32]
|
||||
// CHECK:STDOUT: %int_123456789: Core.IntLiteral = int_value 123456789 [concrete = constants.%int_123456789]
|
||||
// CHECK:STDOUT: %ConvertIntLiteralToF32.call: init %f32.3bc = call %ConvertIntLiteralToF32.ref(%int_123456789) [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc13_50.1: %f32.3bc = value_of_initializer %ConvertIntLiteralToF32.call [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc13_50.2: %f32.3bc = converted %ConvertIntLiteralToF32.call, %.loc13_50.1 [concrete = <error>]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -125,16 +125,12 @@ fn ColonBangParam(generic T: type) -> type = "maybe_unformed.make_type";
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc7_16: type = converted @__global_init.%.loc7, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: %.loc7_8: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %t: type = wrapper_binding t, %.loc7_16
|
||||
// CHECK:STDOUT: %.loc7: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %t: type = wrapper_binding t, @__global_init.%.loc7_16.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %t.patt: %pattern_type = value_binding_pattern t [concrete = constants.%t.patt.81f]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc8_21.1: type = value_of_initializer @__global_init.%Make.call
|
||||
// CHECK:STDOUT: %.loc8_21.2: type = converted @__global_init.%Make.call, %.loc8_21.1
|
||||
// CHECK:STDOUT: %.loc8_8: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %u: type = wrapper_binding u, %.loc8_21.2
|
||||
// CHECK:STDOUT: %.loc8: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %u.patt: %pattern_type = value_binding_pattern u [concrete = constants.%u.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -142,10 +138,15 @@ fn ColonBangParam(generic T: type) -> type = "maybe_unformed.make_type";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc7: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc7_16.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc7_16.2: type = converted %.loc7_16.1, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: %Make.ref: %Make.type = name_ref Make, imports.%Main.Make [concrete = constants.%Make]
|
||||
// CHECK:STDOUT: %t.ref: type = name_ref t, file.%t
|
||||
// CHECK:STDOUT: %t.global_ref: type = global_ref file.%t
|
||||
// CHECK:STDOUT: %t.ref: type = name_ref t, %t.global_ref
|
||||
// CHECK:STDOUT: %Make.call: init type = call %Make.ref(%t.ref)
|
||||
// CHECK:STDOUT: %.loc8_21.1: type = value_of_initializer %Make.call
|
||||
// CHECK:STDOUT: %.loc8_21.2: type = converted %Make.call, %.loc8_21.1
|
||||
// CHECK:STDOUT: %u: type = wrapper_binding u, %.loc8_21.2
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
+13
-13
@@ -96,8 +96,6 @@ fn NotPointer() -> MakeUnformed({}) = "pointer.make_null";
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc11_48.1: %.b2d = value_of_initializer @__global_init.%MakeNullEmptyStruct.call
|
||||
// CHECK:STDOUT: %.loc11_48.2: %.b2d = converted @__global_init.%MakeNullEmptyStruct.call, %.loc11_48.1
|
||||
// CHECK:STDOUT: %.loc11_24.1: type = splice_block %.loc11_24.3 [concrete = constants.%.b2d] {
|
||||
// CHECK:STDOUT: %MakeUnformed.ref.loc11: %MakeUnformed.type = name_ref MakeUnformed, %MakeUnformed.decl [concrete = constants.%MakeUnformed]
|
||||
// CHECK:STDOUT: %.loc11_22: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
@@ -107,12 +105,9 @@ fn NotPointer() -> MakeUnformed({}) = "pointer.make_null";
|
||||
// CHECK:STDOUT: %.loc11_24.2: type = value_of_initializer %MakeUnformed.call.loc11 [concrete = constants.%.b2d]
|
||||
// CHECK:STDOUT: %.loc11_24.3: type = converted %MakeUnformed.call.loc11, %.loc11_24.2 [concrete = constants.%.b2d]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %s: %.b2d = wrapper_binding s, %.loc11_48.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %s.patt: %pattern_type.b42 = value_binding_pattern s [concrete = constants.%s.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc12_37.1: %.9e8 = value_of_initializer @__global_init.%MakeNullC.call
|
||||
// CHECK:STDOUT: %.loc12_37.2: %.9e8 = converted @__global_init.%MakeNullC.call, %.loc12_37.1
|
||||
// CHECK:STDOUT: %.loc12_23.1: type = splice_block %.loc12_23.3 [concrete = constants.%.9e8] {
|
||||
// CHECK:STDOUT: %MakeUnformed.ref.loc12: %MakeUnformed.type = name_ref MakeUnformed, %MakeUnformed.decl [concrete = constants.%MakeUnformed]
|
||||
// CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [concrete = constants.%C]
|
||||
@@ -121,7 +116,6 @@ fn NotPointer() -> MakeUnformed({}) = "pointer.make_null";
|
||||
// CHECK:STDOUT: %.loc12_23.2: type = value_of_initializer %MakeUnformed.call.loc12 [concrete = constants.%.9e8]
|
||||
// CHECK:STDOUT: %.loc12_23.3: type = converted %MakeUnformed.call.loc12, %.loc12_23.2 [concrete = constants.%.9e8]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %c: %.9e8 = wrapper_binding c, %.loc12_37.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %c.patt: %pattern_type.e22 = value_binding_pattern c [concrete = constants.%c.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -131,8 +125,14 @@ fn NotPointer() -> MakeUnformed({}) = "pointer.make_null";
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %MakeNullEmptyStruct.ref: %MakeNullEmptyStruct.type = name_ref MakeNullEmptyStruct, file.%MakeNullEmptyStruct.decl [concrete = constants.%MakeNullEmptyStruct]
|
||||
// CHECK:STDOUT: %MakeNullEmptyStruct.call: init %.b2d = call %MakeNullEmptyStruct.ref()
|
||||
// CHECK:STDOUT: %.loc11_48.1: %.b2d = value_of_initializer %MakeNullEmptyStruct.call
|
||||
// CHECK:STDOUT: %.loc11_48.2: %.b2d = converted %MakeNullEmptyStruct.call, %.loc11_48.1
|
||||
// CHECK:STDOUT: %s: %.b2d = wrapper_binding s, %.loc11_48.2
|
||||
// CHECK:STDOUT: %MakeNullC.ref: %MakeNullC.type = name_ref MakeNullC, file.%MakeNullC.decl [concrete = constants.%MakeNullC]
|
||||
// CHECK:STDOUT: %MakeNullC.call: init %.9e8 = call %MakeNullC.ref()
|
||||
// CHECK:STDOUT: %.loc12_37.1: %.9e8 = value_of_initializer %MakeNullC.call
|
||||
// CHECK:STDOUT: %.loc12_37.2: %.9e8 = converted %MakeNullC.call, %.loc12_37.1
|
||||
// CHECK:STDOUT: %c: %.9e8 = wrapper_binding c, %.loc12_37.2
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -160,8 +160,6 @@ fn NotPointer() -> MakeUnformed({}) = "pointer.make_null";
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc10_39.1: %.b2d = value_of_initializer @__global_init.%MakeNull.call.loc10
|
||||
// CHECK:STDOUT: %.loc10_39.2: %.b2d = converted @__global_init.%MakeNull.call.loc10, %.loc10_39.1
|
||||
// CHECK:STDOUT: %.loc10_24.1: type = splice_block %.loc10_24.3 [concrete = constants.%.b2d] {
|
||||
// CHECK:STDOUT: %MakeUnformed.ref.loc10: %MakeUnformed.type = name_ref MakeUnformed, %MakeUnformed.decl [concrete = constants.%MakeUnformed]
|
||||
// CHECK:STDOUT: %.loc10_22: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
@@ -171,12 +169,9 @@ fn NotPointer() -> MakeUnformed({}) = "pointer.make_null";
|
||||
// CHECK:STDOUT: %.loc10_24.2: type = value_of_initializer %MakeUnformed.call.loc10 [concrete = constants.%.b2d]
|
||||
// CHECK:STDOUT: %.loc10_24.3: type = converted %MakeUnformed.call.loc10, %.loc10_24.2 [concrete = constants.%.b2d]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %s: %.b2d = wrapper_binding s, %.loc10_39.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %s.patt: %pattern_type.b42 = value_binding_pattern s [concrete = constants.%s.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc11_37.1: %.9e8 = value_of_initializer @__global_init.%MakeNull.call.loc11
|
||||
// CHECK:STDOUT: %.loc11_37.2: %.9e8 = converted @__global_init.%MakeNull.call.loc11, %.loc11_37.1
|
||||
// CHECK:STDOUT: %.loc11_23.1: type = splice_block %.loc11_23.3 [concrete = constants.%.9e8] {
|
||||
// CHECK:STDOUT: %MakeUnformed.ref.loc11: %MakeUnformed.type = name_ref MakeUnformed, %MakeUnformed.decl [concrete = constants.%MakeUnformed]
|
||||
// CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [concrete = constants.%C]
|
||||
@@ -185,7 +180,6 @@ fn NotPointer() -> MakeUnformed({}) = "pointer.make_null";
|
||||
// CHECK:STDOUT: %.loc11_23.2: type = value_of_initializer %MakeUnformed.call.loc11 [concrete = constants.%.9e8]
|
||||
// CHECK:STDOUT: %.loc11_23.3: type = converted %MakeUnformed.call.loc11, %.loc11_23.2 [concrete = constants.%.9e8]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %c: %.9e8 = wrapper_binding c, %.loc11_37.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %c.patt: %pattern_type.e22 = value_binding_pattern c [concrete = constants.%c.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -195,13 +189,19 @@ fn NotPointer() -> MakeUnformed({}) = "pointer.make_null";
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %MakeNull.ref.loc10: %MakeNull.type = name_ref MakeNull, file.%MakeNull.decl [concrete = constants.%MakeNull]
|
||||
// CHECK:STDOUT: %.loc10_38: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc10_39: type = converted %.loc10_38, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: %.loc10_39.1: type = converted %.loc10_38, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: %MakeNull.specific_fn.loc10: <specific function> = specific_function %MakeNull.ref.loc10, @MakeNull(constants.%empty_struct_type) [concrete = constants.%MakeNull.specific_fn.3e4]
|
||||
// CHECK:STDOUT: %MakeNull.call.loc10: init %.b2d = call %MakeNull.specific_fn.loc10()
|
||||
// CHECK:STDOUT: %.loc10_39.2: %.b2d = value_of_initializer %MakeNull.call.loc10
|
||||
// CHECK:STDOUT: %.loc10_39.3: %.b2d = converted %MakeNull.call.loc10, %.loc10_39.2
|
||||
// CHECK:STDOUT: %s: %.b2d = wrapper_binding s, %.loc10_39.3
|
||||
// CHECK:STDOUT: %MakeNull.ref.loc11: %MakeNull.type = name_ref MakeNull, file.%MakeNull.decl [concrete = constants.%MakeNull]
|
||||
// CHECK:STDOUT: %C.ref: type = name_ref C, file.%C.decl [concrete = constants.%C]
|
||||
// CHECK:STDOUT: %MakeNull.specific_fn.loc11: <specific function> = specific_function %MakeNull.ref.loc11, @MakeNull(constants.%C) [concrete = constants.%MakeNull.specific_fn.e96]
|
||||
// CHECK:STDOUT: %MakeNull.call.loc11: init %.9e8 = call %MakeNull.specific_fn.loc11()
|
||||
// CHECK:STDOUT: %.loc11_37.1: %.9e8 = value_of_initializer %MakeNull.call.loc11
|
||||
// CHECK:STDOUT: %.loc11_37.2: %.9e8 = converted %MakeNull.call.loc11, %.loc11_37.1
|
||||
// CHECK:STDOUT: %c: %.9e8 = wrapper_binding c, %.loc11_37.2
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
+10
-10
@@ -138,7 +138,7 @@ let never: Never = {};
|
||||
// CHECK:STDOUT: %.loc6_1.10: init %Always = converted %.loc6_1.3, %.loc6_1.9 [concrete = constants.%Always.val]
|
||||
// CHECK:STDOUT: %.loc6_1.11: ref %Always = temporary %.loc6_1.4, %.loc6_1.10 [concrete = constants.%.302]
|
||||
// CHECK:STDOUT: %.loc6_1.12: %Always = acquire_value %.loc6_1.11 [concrete = constants.%Always.val]
|
||||
// CHECK:STDOUT: %Sunny: %Always = wrapper_binding Sunny, %.loc6_1.12
|
||||
// CHECK:STDOUT: %Sunny: %Always = alias_binding Sunny, %.loc6_1.12 [concrete = constants.%Always.val]
|
||||
// CHECK:STDOUT: complete_type_witness = %complete_type
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -149,7 +149,7 @@ let never: Never = {};
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %Always.ref: type = name_ref Always, file.%Always.decl [concrete = constants.%Always]
|
||||
// CHECK:STDOUT: %Sunny.ref: %Always = name_ref Sunny, @Always.%Sunny
|
||||
// CHECK:STDOUT: %Sunny.ref: %Always = name_ref Sunny, @Always.%Sunny [concrete = constants.%Always.val]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -280,7 +280,7 @@ let never: Never = {};
|
||||
// CHECK:STDOUT: %.loc5_7.8: init %Ordering = converted %.loc5_7.3, %.loc5_7.7 [concrete = constants.%Ordering.val.cff]
|
||||
// CHECK:STDOUT: %.loc5_7.9: ref %Ordering = temporary %.loc5_7.4, %.loc5_7.8 [concrete = constants.%.51f]
|
||||
// CHECK:STDOUT: %.loc5_7.10: %Ordering = acquire_value %.loc5_7.9 [concrete = constants.%Ordering.val.cff]
|
||||
// CHECK:STDOUT: %Less: %Ordering = wrapper_binding Less, %.loc5_7.10
|
||||
// CHECK:STDOUT: %Less: %Ordering = alias_binding Less, %.loc5_7.10 [concrete = constants.%Ordering.val.cff]
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %impl.elem0.loc6_13.1: %.935 = impl_witness_access constants.%ImplicitAs.impl_witness.28a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.dcc]
|
||||
// CHECK:STDOUT: %bound_method.loc6_13.1: <bound method> = bound_method %int_1, %impl.elem0.loc6_13.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.758]
|
||||
@@ -302,7 +302,7 @@ let never: Never = {};
|
||||
// CHECK:STDOUT: %.loc6_13.8: init %Ordering = converted %.loc6_13.3, %.loc6_13.7 [concrete = constants.%Ordering.val.168]
|
||||
// CHECK:STDOUT: %.loc6_13.9: ref %Ordering = temporary %.loc6_13.4, %.loc6_13.8 [concrete = constants.%.6c9]
|
||||
// CHECK:STDOUT: %.loc6_13.10: %Ordering = acquire_value %.loc6_13.9 [concrete = constants.%Ordering.val.168]
|
||||
// CHECK:STDOUT: %Equivalent: %Ordering = wrapper_binding Equivalent, %.loc6_13.10
|
||||
// CHECK:STDOUT: %Equivalent: %Ordering = alias_binding Equivalent, %.loc6_13.10 [concrete = constants.%Ordering.val.168]
|
||||
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
|
||||
// CHECK:STDOUT: %impl.elem0.loc7_10.1: %.935 = impl_witness_access constants.%ImplicitAs.impl_witness.28a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.dcc]
|
||||
// CHECK:STDOUT: %bound_method.loc7_10.1: <bound method> = bound_method %int_2, %impl.elem0.loc7_10.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.5fc]
|
||||
@@ -324,7 +324,7 @@ let never: Never = {};
|
||||
// CHECK:STDOUT: %.loc7_10.8: init %Ordering = converted %.loc7_10.3, %.loc7_10.7 [concrete = constants.%Ordering.val.b35]
|
||||
// CHECK:STDOUT: %.loc7_10.9: ref %Ordering = temporary %.loc7_10.4, %.loc7_10.8 [concrete = constants.%.14c]
|
||||
// CHECK:STDOUT: %.loc7_10.10: %Ordering = acquire_value %.loc7_10.9 [concrete = constants.%Ordering.val.b35]
|
||||
// CHECK:STDOUT: %Greater: %Ordering = wrapper_binding Greater, %.loc7_10.10
|
||||
// CHECK:STDOUT: %Greater: %Ordering = alias_binding Greater, %.loc7_10.10 [concrete = constants.%Ordering.val.b35]
|
||||
// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba]
|
||||
// CHECK:STDOUT: %impl.elem0.loc9_1.1: %.935 = impl_witness_access constants.%ImplicitAs.impl_witness.28a, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.dcc]
|
||||
// CHECK:STDOUT: %bound_method.loc9_1.1: <bound method> = bound_method %int_3, %impl.elem0.loc9_1.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.65d]
|
||||
@@ -346,7 +346,7 @@ let never: Never = {};
|
||||
// CHECK:STDOUT: %.loc9_1.8: init %Ordering = converted %.loc9_1.3, %.loc9_1.7 [concrete = constants.%Ordering.val.40a]
|
||||
// CHECK:STDOUT: %.loc9_1.9: ref %Ordering = temporary %.loc9_1.4, %.loc9_1.8 [concrete = constants.%.7f3]
|
||||
// CHECK:STDOUT: %.loc9_1.10: %Ordering = acquire_value %.loc9_1.9 [concrete = constants.%Ordering.val.40a]
|
||||
// CHECK:STDOUT: %Incomparable: %Ordering = wrapper_binding Incomparable, %.loc9_1.10
|
||||
// CHECK:STDOUT: %Incomparable: %Ordering = alias_binding Incomparable, %.loc9_1.10 [concrete = constants.%Ordering.val.40a]
|
||||
// CHECK:STDOUT: complete_type_witness = %complete_type
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
@@ -360,13 +360,13 @@ let never: Never = {};
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %Ordering.ref.loc11: type = name_ref Ordering, file.%Ordering.decl [concrete = constants.%Ordering]
|
||||
// CHECK:STDOUT: %Less.ref: %Ordering = name_ref Less, @Ordering.%Less
|
||||
// CHECK:STDOUT: %Less.ref: %Ordering = name_ref Less, @Ordering.%Less [concrete = constants.%Ordering.val.cff]
|
||||
// CHECK:STDOUT: %Ordering.ref.loc12: type = name_ref Ordering, file.%Ordering.decl [concrete = constants.%Ordering]
|
||||
// CHECK:STDOUT: %Equivalent.ref: %Ordering = name_ref Equivalent, @Ordering.%Equivalent
|
||||
// CHECK:STDOUT: %Equivalent.ref: %Ordering = name_ref Equivalent, @Ordering.%Equivalent [concrete = constants.%Ordering.val.168]
|
||||
// CHECK:STDOUT: %Ordering.ref.loc13: type = name_ref Ordering, file.%Ordering.decl [concrete = constants.%Ordering]
|
||||
// CHECK:STDOUT: %Greater.ref: %Ordering = name_ref Greater, @Ordering.%Greater
|
||||
// CHECK:STDOUT: %Greater.ref: %Ordering = name_ref Greater, @Ordering.%Greater [concrete = constants.%Ordering.val.b35]
|
||||
// CHECK:STDOUT: %Ordering.ref.loc14: type = name_ref Ordering, file.%Ordering.decl [concrete = constants.%Ordering]
|
||||
// CHECK:STDOUT: %Incomparable.ref: %Ordering = name_ref Incomparable, @Ordering.%Incomparable
|
||||
// CHECK:STDOUT: %Incomparable.ref: %Ordering = name_ref Incomparable, @Ordering.%Incomparable [concrete = constants.%Ordering.val.40a]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
+1
-1
@@ -74,7 +74,7 @@ choice Always(T: type) {
|
||||
// CHECK:STDOUT: %.loc16_1.10: init @Always.%Always (%Always) = converted %.loc16_1.3, %.loc16_1.9 [symbolic = %Always.val (constants.%Always.val)]
|
||||
// CHECK:STDOUT: %.loc16_1.11: ref @Always.%Always (%Always) = temporary %.loc16_1.4, %.loc16_1.10 [symbolic = %.loc16_1.13 (constants.%.f82)]
|
||||
// CHECK:STDOUT: %.loc16_1.12: @Always.%Always (%Always) = acquire_value %.loc16_1.11 [symbolic = %Always.val (constants.%Always.val)]
|
||||
// CHECK:STDOUT: %Sunny: @Always.%Always (%Always) = wrapper_binding Sunny, %.loc16_1.12
|
||||
// CHECK:STDOUT: %Sunny: @Always.%Always (%Always) = alias_binding Sunny, %.loc16_1.12 [symbolic = %Always.val (constants.%Always.val)]
|
||||
// CHECK:STDOUT: complete_type_witness = %complete_type
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
|
||||
@@ -371,6 +371,11 @@ class A {
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_protected_field_access.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
@@ -519,7 +524,6 @@ class A {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %x: %i32 = wrapper_binding x, @__global_init.%x.ref
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type.d94 = value_binding_pattern x [concrete = constants.%x.patt.ea2]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -527,8 +531,11 @@ class A {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %A.ref: type = name_ref A, file.%A.decl [concrete = constants.%A]
|
||||
// CHECK:STDOUT: %x.ref: %i32 = name_ref x, @A.%x
|
||||
// CHECK:STDOUT: %x.global_ref: %i32 = global_ref @A.%x
|
||||
// CHECK:STDOUT: %x.ref: %i32 = name_ref x, %x.global_ref
|
||||
// CHECK:STDOUT: %x: %i32 = wrapper_binding x, %x.ref
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -559,6 +566,7 @@ class A {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %A.ref.loc20: type = name_ref A, file.%A.decl [concrete = constants.%A]
|
||||
// CHECK:STDOUT: %x.ref: <error> = name_ref x, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %A.ref.loc32: type = name_ref A, file.%A.decl [concrete = constants.%A]
|
||||
|
||||
+58
-55
@@ -186,8 +186,8 @@ var e: C = MakeAdaptC();
|
||||
// CHECK:STDOUT: .C = %C.decl
|
||||
// CHECK:STDOUT: .AdaptC = %AdaptC.decl
|
||||
// CHECK:STDOUT: .a = %a
|
||||
// CHECK:STDOUT: .b = %b
|
||||
// CHECK:STDOUT: .c = %c
|
||||
// CHECK:STDOUT: .b = @__global_init.%b
|
||||
// CHECK:STDOUT: .c = @__global_init.%c
|
||||
// CHECK:STDOUT: .MakeC = %MakeC.decl
|
||||
// CHECK:STDOUT: .MakeAdaptC = %MakeAdaptC.decl
|
||||
// CHECK:STDOUT: .d = %d
|
||||
@@ -196,39 +196,16 @@ var e: C = MakeAdaptC();
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
|
||||
// CHECK:STDOUT: %AdaptC.decl: type = class_decl @AdaptC [concrete = constants.%AdaptC] {} {}
|
||||
// CHECK:STDOUT: %impl.elem0.loc13_27.1: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc13_27.1: <bound method> = bound_method @__global_init.%int_1, %impl.elem0.loc13_27.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.282]
|
||||
// CHECK:STDOUT: %specific_fn.loc13_27.1: <specific function> = specific_function %impl.elem0.loc13_27.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc13_27.2: <bound method> = bound_method @__global_init.%int_1, %specific_fn.loc13_27.1 [concrete = constants.%bound_method.3bd]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13_27.1: init %i32 = call %bound_method.loc13_27.2(@__global_init.%int_1) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc13_27.1: init %i32 = converted @__global_init.%int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13_27.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc13_27.2: ref %C = temporary_storage
|
||||
// CHECK:STDOUT: %.loc13_27.3: ref %i32 = class_element_access %.loc13_27.2, element0
|
||||
// CHECK:STDOUT: %.loc13_27.4: init %i32 to %.loc13_27.3 = in_place_init %.loc13_27.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %impl.elem0.loc13_27.2: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc13_27.3: <bound method> = bound_method @__global_init.%int_2, %impl.elem0.loc13_27.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a6]
|
||||
// CHECK:STDOUT: %specific_fn.loc13_27.2: <specific function> = specific_function %impl.elem0.loc13_27.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc13_27.4: <bound method> = bound_method @__global_init.%int_2, %specific_fn.loc13_27.2 [concrete = constants.%bound_method.a55]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13_27.2: init %i32 = call %bound_method.loc13_27.4(@__global_init.%int_2) [concrete = constants.%int_2.2e0]
|
||||
// CHECK:STDOUT: %.loc13_27.5: init %i32 = converted @__global_init.%int_2, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13_27.2 [concrete = constants.%int_2.2e0]
|
||||
// CHECK:STDOUT: %.loc13_27.6: ref %i32 = class_element_access %.loc13_27.2, element1
|
||||
// CHECK:STDOUT: %.loc13_27.7: init %i32 to %.loc13_27.6 = in_place_init %.loc13_27.5 [concrete = constants.%int_2.2e0]
|
||||
// CHECK:STDOUT: %.loc13_27.8: init %C to %.loc13_27.2 = class_init (%.loc13_27.4, %.loc13_27.7) [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %.loc13_27.9: init %C = converted @__global_init.%.loc13, %.loc13_27.8 [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %.loc13_27.10: ref %C = temporary %.loc13_27.2, %.loc13_27.9 [concrete = constants.%.1cf]
|
||||
// CHECK:STDOUT: %.loc13_27.11: %C = acquire_value %.loc13_27.10 [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %C.ref.loc13: type = name_ref C, %C.decl [concrete = constants.%C]
|
||||
// CHECK:STDOUT: %a: %C = wrapper_binding a, %.loc13_27.11
|
||||
// CHECK:STDOUT: %a: %C = wrapper_binding a, @__global_init.%.loc13_27.12
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.98b = value_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %AdaptC.ref.loc15: type = name_ref AdaptC, %AdaptC.decl [concrete = constants.%AdaptC]
|
||||
// CHECK:STDOUT: %b: %AdaptC = wrapper_binding b, @__global_init.%.loc15_19.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.720 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %C.ref.loc17: type = name_ref C, %C.decl [concrete = constants.%C]
|
||||
// CHECK:STDOUT: %c: %C = wrapper_binding c, @__global_init.%.loc17_14.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %c.patt: %pattern_type.98b = value_binding_pattern c [concrete = constants.%c.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -301,15 +278,40 @@ var e: C = MakeAdaptC();
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
|
||||
// CHECK:STDOUT: %.loc13: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) [concrete = constants.%struct]
|
||||
// CHECK:STDOUT: %a.ref: %C = name_ref a, file.%a
|
||||
// CHECK:STDOUT: %.loc13_27.1: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) [concrete = constants.%struct]
|
||||
// CHECK:STDOUT: %impl.elem0.loc13_27.1: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc13_27.1: <bound method> = bound_method %int_1, %impl.elem0.loc13_27.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.282]
|
||||
// CHECK:STDOUT: %specific_fn.loc13_27.1: <specific function> = specific_function %impl.elem0.loc13_27.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc13_27.2: <bound method> = bound_method %int_1, %specific_fn.loc13_27.1 [concrete = constants.%bound_method.3bd]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13_27.1: init %i32 = call %bound_method.loc13_27.2(%int_1) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc13_27.2: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13_27.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc13_27.3: ref %C = temporary_storage
|
||||
// CHECK:STDOUT: %.loc13_27.4: ref %i32 = class_element_access %.loc13_27.3, element0
|
||||
// CHECK:STDOUT: %.loc13_27.5: init %i32 to %.loc13_27.4 = in_place_init %.loc13_27.2 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %impl.elem0.loc13_27.2: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc13_27.3: <bound method> = bound_method %int_2, %impl.elem0.loc13_27.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a6]
|
||||
// CHECK:STDOUT: %specific_fn.loc13_27.2: <specific function> = specific_function %impl.elem0.loc13_27.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc13_27.4: <bound method> = bound_method %int_2, %specific_fn.loc13_27.2 [concrete = constants.%bound_method.a55]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13_27.2: init %i32 = call %bound_method.loc13_27.4(%int_2) [concrete = constants.%int_2.2e0]
|
||||
// CHECK:STDOUT: %.loc13_27.6: init %i32 = converted %int_2, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13_27.2 [concrete = constants.%int_2.2e0]
|
||||
// CHECK:STDOUT: %.loc13_27.7: ref %i32 = class_element_access %.loc13_27.3, element1
|
||||
// CHECK:STDOUT: %.loc13_27.8: init %i32 to %.loc13_27.7 = in_place_init %.loc13_27.6 [concrete = constants.%int_2.2e0]
|
||||
// CHECK:STDOUT: %.loc13_27.9: init %C to %.loc13_27.3 = class_init (%.loc13_27.5, %.loc13_27.8) [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %.loc13_27.10: init %C = converted %.loc13_27.1, %.loc13_27.9 [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %.loc13_27.11: ref %C = temporary %.loc13_27.3, %.loc13_27.10 [concrete = constants.%.1cf]
|
||||
// CHECK:STDOUT: %.loc13_27.12: %C = acquire_value %.loc13_27.11 [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %a.global_ref: %C = global_ref file.%a
|
||||
// CHECK:STDOUT: %a.ref: %C = name_ref a, %a.global_ref
|
||||
// CHECK:STDOUT: %AdaptC.ref.loc15: type = name_ref AdaptC, file.%AdaptC.decl [concrete = constants.%AdaptC]
|
||||
// CHECK:STDOUT: %.loc15_19.1: %AdaptC = as_compatible %a.ref
|
||||
// CHECK:STDOUT: %.loc15_19.2: %AdaptC = converted %a.ref, %.loc15_19.1
|
||||
// CHECK:STDOUT: %b.ref: %AdaptC = name_ref b, file.%b
|
||||
// CHECK:STDOUT: %b: %AdaptC = wrapper_binding b, %.loc15_19.2
|
||||
// CHECK:STDOUT: %b.global_ref: %AdaptC = global_ref %b
|
||||
// CHECK:STDOUT: %b.ref: %AdaptC = name_ref b, %b.global_ref
|
||||
// CHECK:STDOUT: %C.ref.loc17: type = name_ref C, file.%C.decl [concrete = constants.%C]
|
||||
// CHECK:STDOUT: %.loc17_14.1: %C = as_compatible %b.ref
|
||||
// CHECK:STDOUT: %.loc17_14.2: %C = converted %b.ref, %.loc17_14.1
|
||||
// CHECK:STDOUT: %c: %C = wrapper_binding c, %.loc17_14.2
|
||||
// CHECK:STDOUT: %MakeC.ref: %MakeC.type = name_ref MakeC, file.%MakeC.decl [concrete = constants.%MakeC]
|
||||
// CHECK:STDOUT: %.loc23_1: ref %AdaptC = splice_block file.%d.var [concrete = file.%d.var] {}
|
||||
// CHECK:STDOUT: %MakeC.call: init %C to %.loc23_1 = call %MakeC.ref()
|
||||
@@ -415,39 +417,16 @@ var e: C = MakeAdaptC();
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
|
||||
// CHECK:STDOUT: %AdaptC.decl: type = class_decl @AdaptC [concrete = constants.%AdaptC] {} {}
|
||||
// CHECK:STDOUT: %impl.elem0.loc13_27.1: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc13_27.1: <bound method> = bound_method @__global_init.%int_1, %impl.elem0.loc13_27.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.282]
|
||||
// CHECK:STDOUT: %specific_fn.loc13_27.1: <specific function> = specific_function %impl.elem0.loc13_27.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc13_27.2: <bound method> = bound_method @__global_init.%int_1, %specific_fn.loc13_27.1 [concrete = constants.%bound_method.3bd]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13_27.1: init %i32 = call %bound_method.loc13_27.2(@__global_init.%int_1) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc13_27.1: init %i32 = converted @__global_init.%int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13_27.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc13_27.2: ref %C = temporary_storage
|
||||
// CHECK:STDOUT: %.loc13_27.3: ref %i32 = class_element_access %.loc13_27.2, element0
|
||||
// CHECK:STDOUT: %.loc13_27.4: init %i32 to %.loc13_27.3 = in_place_init %.loc13_27.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %impl.elem0.loc13_27.2: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc13_27.3: <bound method> = bound_method @__global_init.%int_2, %impl.elem0.loc13_27.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a6]
|
||||
// CHECK:STDOUT: %specific_fn.loc13_27.2: <specific function> = specific_function %impl.elem0.loc13_27.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc13_27.4: <bound method> = bound_method @__global_init.%int_2, %specific_fn.loc13_27.2 [concrete = constants.%bound_method.a55]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13_27.2: init %i32 = call %bound_method.loc13_27.4(@__global_init.%int_2) [concrete = constants.%int_2.2e0]
|
||||
// CHECK:STDOUT: %.loc13_27.5: init %i32 = converted @__global_init.%int_2, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13_27.2 [concrete = constants.%int_2.2e0]
|
||||
// CHECK:STDOUT: %.loc13_27.6: ref %i32 = class_element_access %.loc13_27.2, element1
|
||||
// CHECK:STDOUT: %.loc13_27.7: init %i32 to %.loc13_27.6 = in_place_init %.loc13_27.5 [concrete = constants.%int_2.2e0]
|
||||
// CHECK:STDOUT: %.loc13_27.8: init %C to %.loc13_27.2 = class_init (%.loc13_27.4, %.loc13_27.7) [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %.loc13_27.9: init %C = converted @__global_init.%.loc13, %.loc13_27.8 [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %.loc13_27.10: ref %C = temporary %.loc13_27.2, %.loc13_27.9 [concrete = constants.%.1cf]
|
||||
// CHECK:STDOUT: %.loc13_27.11: %C = acquire_value %.loc13_27.10 [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %C.ref.loc13: type = name_ref C, %C.decl [concrete = constants.%C]
|
||||
// CHECK:STDOUT: %a: %C = wrapper_binding a, %.loc13_27.11
|
||||
// CHECK:STDOUT: %a: %C = wrapper_binding a, @__global_init.%.loc13_27.12
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.98b = value_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc28: %AdaptC = converted @__global_init.%a.ref, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %AdaptC.ref.loc28: type = name_ref AdaptC, %AdaptC.decl [concrete = constants.%AdaptC]
|
||||
// CHECK:STDOUT: %b: %AdaptC = wrapper_binding b, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.720 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc41: %C = converted @__global_init.%b.ref, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %C.ref.loc41: type = name_ref C, %C.decl [concrete = constants.%C]
|
||||
// CHECK:STDOUT: %c: %C = wrapper_binding c, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
@@ -522,9 +501,33 @@ var e: C = MakeAdaptC();
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
|
||||
// CHECK:STDOUT: %.loc13: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) [concrete = constants.%struct]
|
||||
// CHECK:STDOUT: %a.ref: %C = name_ref a, file.%a
|
||||
// CHECK:STDOUT: %.loc13_27.1: %struct_type.a.b.cfd = struct_literal (%int_1, %int_2) [concrete = constants.%struct]
|
||||
// CHECK:STDOUT: %impl.elem0.loc13_27.1: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc13_27.1: <bound method> = bound_method %int_1, %impl.elem0.loc13_27.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.282]
|
||||
// CHECK:STDOUT: %specific_fn.loc13_27.1: <specific function> = specific_function %impl.elem0.loc13_27.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc13_27.2: <bound method> = bound_method %int_1, %specific_fn.loc13_27.1 [concrete = constants.%bound_method.3bd]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13_27.1: init %i32 = call %bound_method.loc13_27.2(%int_1) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc13_27.2: init %i32 = converted %int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13_27.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc13_27.3: ref %C = temporary_storage
|
||||
// CHECK:STDOUT: %.loc13_27.4: ref %i32 = class_element_access %.loc13_27.3, element0
|
||||
// CHECK:STDOUT: %.loc13_27.5: init %i32 to %.loc13_27.4 = in_place_init %.loc13_27.2 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %impl.elem0.loc13_27.2: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc13_27.3: <bound method> = bound_method %int_2, %impl.elem0.loc13_27.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a6]
|
||||
// CHECK:STDOUT: %specific_fn.loc13_27.2: <specific function> = specific_function %impl.elem0.loc13_27.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc13_27.4: <bound method> = bound_method %int_2, %specific_fn.loc13_27.2 [concrete = constants.%bound_method.a55]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13_27.2: init %i32 = call %bound_method.loc13_27.4(%int_2) [concrete = constants.%int_2.2e0]
|
||||
// CHECK:STDOUT: %.loc13_27.6: init %i32 = converted %int_2, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc13_27.2 [concrete = constants.%int_2.2e0]
|
||||
// CHECK:STDOUT: %.loc13_27.7: ref %i32 = class_element_access %.loc13_27.3, element1
|
||||
// CHECK:STDOUT: %.loc13_27.8: init %i32 to %.loc13_27.7 = in_place_init %.loc13_27.6 [concrete = constants.%int_2.2e0]
|
||||
// CHECK:STDOUT: %.loc13_27.9: init %C to %.loc13_27.3 = class_init (%.loc13_27.5, %.loc13_27.8) [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %.loc13_27.10: init %C = converted %.loc13_27.1, %.loc13_27.9 [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %.loc13_27.11: ref %C = temporary %.loc13_27.3, %.loc13_27.10 [concrete = constants.%.1cf]
|
||||
// CHECK:STDOUT: %.loc13_27.12: %C = acquire_value %.loc13_27.11 [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %a.global_ref: %C = global_ref file.%a
|
||||
// CHECK:STDOUT: %a.ref: %C = name_ref a, %a.global_ref
|
||||
// CHECK:STDOUT: %.loc28: %AdaptC = converted %a.ref, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %b.ref: %AdaptC = name_ref b, file.%b [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc41: %C = converted %b.ref, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %MakeC.ref: %MakeC.type = name_ref MakeC, file.%MakeC.decl [concrete = constants.%MakeC]
|
||||
// CHECK:STDOUT: %.loc56_23: ref %C = temporary_storage
|
||||
// CHECK:STDOUT: %MakeC.call: init %C to %.loc56_23 = call %MakeC.ref()
|
||||
|
||||
@@ -94,21 +94,19 @@ var x: Class = {};
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @Class {
|
||||
// CHECK:STDOUT: %Class.ref.loc14: type = name_ref Class, file.%Class.decl [concrete = constants.%Class]
|
||||
// CHECK:STDOUT: %.loc14_18.1: type = splice_block %.loc14_18.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc14: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc14_18.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %A: type = wrapper_binding A, %Class.ref.loc14
|
||||
// CHECK:STDOUT: %A: type = wrapper_binding A, @__global_init.%Class.ref.loc14
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %A.patt: %pattern_type = value_binding_pattern A [concrete = constants.%A.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Class.ref.loc24: type = name_ref Class, file.%Class.decl [concrete = constants.%Class]
|
||||
// CHECK:STDOUT: %.loc24_19.1: type = splice_block %.loc24_19.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc24: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc24_19.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %B: type = wrapper_binding B, %Class.ref.loc24
|
||||
// CHECK:STDOUT: %B: type = wrapper_binding B, @__global_init.%Class.ref.loc24
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %B.patt: %pattern_type = value_binding_pattern B [concrete = constants.%B.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -122,6 +120,13 @@ var x: Class = {};
|
||||
// CHECK:STDOUT: .B = %B
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %Class.ref.loc14: type = name_ref Class, file.%Class.decl [concrete = constants.%Class]
|
||||
// CHECK:STDOUT: %Class.ref.loc24: type = name_ref Class, file.%Class.decl [concrete = constants.%Class]
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_var.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
|
||||
+38
-38
@@ -136,38 +136,6 @@ let n: array(i32, G()) = (1, 2, 3);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_35.1: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc11_35.1: <bound method> = bound_method @__global_init.%int_1, %impl.elem0.loc11_35.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.282]
|
||||
// CHECK:STDOUT: %specific_fn.loc11_35.1: <specific function> = specific_function %impl.elem0.loc11_35.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc11_35.2: <bound method> = bound_method @__global_init.%int_1, %specific_fn.loc11_35.1 [concrete = constants.%bound_method.3bd]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11_35.1: init %i32 = call %bound_method.loc11_35.2(@__global_init.%int_1) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc11_35.1: init %i32 = converted @__global_init.%int_1, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11_35.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc11_35.2: ref %Array.95c = temporary_storage
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
|
||||
// CHECK:STDOUT: %.loc11_35.3: ref %i32 = array_index %.loc11_35.2, %int_0
|
||||
// CHECK:STDOUT: %.loc11_35.4: init %i32 to %.loc11_35.3 = in_place_init %.loc11_35.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_35.2: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc11_35.3: <bound method> = bound_method @__global_init.%int_2, %impl.elem0.loc11_35.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a6]
|
||||
// CHECK:STDOUT: %specific_fn.loc11_35.2: <specific function> = specific_function %impl.elem0.loc11_35.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc11_35.4: <bound method> = bound_method @__global_init.%int_2, %specific_fn.loc11_35.2 [concrete = constants.%bound_method.a55]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11_35.2: init %i32 = call %bound_method.loc11_35.4(@__global_init.%int_2) [concrete = constants.%int_2.2e0]
|
||||
// CHECK:STDOUT: %.loc11_35.5: init %i32 = converted @__global_init.%int_2, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11_35.2 [concrete = constants.%int_2.2e0]
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %.loc11_35.6: ref %i32 = array_index %.loc11_35.2, %int_1
|
||||
// CHECK:STDOUT: %.loc11_35.7: init %i32 to %.loc11_35.6 = in_place_init %.loc11_35.5 [concrete = constants.%int_2.2e0]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_35.3: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc11_35.5: <bound method> = bound_method @__global_init.%int_3, %impl.elem0.loc11_35.3 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b3c]
|
||||
// CHECK:STDOUT: %specific_fn.loc11_35.3: <specific function> = specific_function %impl.elem0.loc11_35.3, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc11_35.6: <bound method> = bound_method @__global_init.%int_3, %specific_fn.loc11_35.3 [concrete = constants.%bound_method.fb0]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11_35.3: init %i32 = call %bound_method.loc11_35.6(@__global_init.%int_3) [concrete = constants.%int_3.9f3]
|
||||
// CHECK:STDOUT: %.loc11_35.8: init %i32 = converted @__global_init.%int_3, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11_35.3 [concrete = constants.%int_3.9f3]
|
||||
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
|
||||
// CHECK:STDOUT: %.loc11_35.9: ref %i32 = array_index %.loc11_35.2, %int_2
|
||||
// CHECK:STDOUT: %.loc11_35.10: init %i32 to %.loc11_35.9 = in_place_init %.loc11_35.8 [concrete = constants.%int_3.9f3]
|
||||
// CHECK:STDOUT: %.loc11_35.11: init %Array.95c to %.loc11_35.2 = array_init (%.loc11_35.4, %.loc11_35.7, %.loc11_35.10) [concrete = constants.%array]
|
||||
// CHECK:STDOUT: %.loc11_35.12: init %Array.95c = converted @__global_init.%.loc11, %.loc11_35.11 [concrete = constants.%array]
|
||||
// CHECK:STDOUT: %.loc11_35.13: ref %Array.95c = temporary %.loc11_35.2, %.loc11_35.12 [concrete = constants.%.c07]
|
||||
// CHECK:STDOUT: %.loc11_35.14: %Array.95c = acquire_value %.loc11_35.13 [concrete = constants.%array]
|
||||
// CHECK:STDOUT: %.loc11_23: type = splice_block %Array [concrete = constants.%Array.95c] {
|
||||
// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, %F.decl [concrete = constants.%F]
|
||||
@@ -176,8 +144,8 @@ let n: array(i32, G()) = (1, 2, 3);
|
||||
// CHECK:STDOUT: %bound_method.loc11_21.1: <bound method> = bound_method %int_3, %impl.elem0.loc11_21 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b3c]
|
||||
// CHECK:STDOUT: %specific_fn.loc11_21: <specific function> = specific_function %impl.elem0.loc11_21, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc11_21.2: <bound method> = bound_method %int_3, %specific_fn.loc11_21 [concrete = constants.%bound_method.fb0]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11_21: init %i32 = call %bound_method.loc11_21.2(%int_3) [concrete = constants.%int_3.9f3]
|
||||
// CHECK:STDOUT: %.loc11_21.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11_21 [concrete = constants.%int_3.9f3]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc11_21.2(%int_3) [concrete = constants.%int_3.9f3]
|
||||
// CHECK:STDOUT: %.loc11_21.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_3.9f3]
|
||||
// CHECK:STDOUT: %.loc11_21.2: %i32 = converted %int_3, %.loc11_21.1 [concrete = constants.%int_3.9f3]
|
||||
// CHECK:STDOUT: %F.call: init %i32 = call %F.ref(%.loc11_21.2) [concrete = constants.%int_3.9f3]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_22: %.ce7 = impl_witness_access constants.%ImplicitAs.impl_witness.323, element0 [concrete = constants.%Int.as.ImplicitAs.impl.Convert.779]
|
||||
@@ -191,7 +159,7 @@ let n: array(i32, G()) = (1, 2, 3);
|
||||
// CHECK:STDOUT: %.loc11_22.4: Core.IntLiteral = converted %F.call, %.loc11_22.3 [concrete = constants.%int_3.1ba]
|
||||
// CHECK:STDOUT: %Array: type = class_type @Array, @Array(constants.%i32, constants.%int_3.1ba) [concrete = constants.%Array.95c]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %n: %Array.95c = wrapper_binding n, %.loc11_35.14
|
||||
// CHECK:STDOUT: %n: %Array.95c = wrapper_binding n, @__global_init.%.loc11_35.15
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %n.patt: %pattern_type.d4e = value_binding_pattern n [concrete = constants.%n.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -199,10 +167,42 @@ let n: array(i32, G()) = (1, 2, 3);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
|
||||
// CHECK:STDOUT: %int_1.loc11_28: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %int_2.loc11_31: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
|
||||
// CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3.1ba]
|
||||
// CHECK:STDOUT: %.loc11: %tuple.type.37f = tuple_literal (%int_1, %int_2, %int_3) [concrete = constants.%tuple.2d5]
|
||||
// CHECK:STDOUT: %.loc11_35.1: %tuple.type.37f = tuple_literal (%int_1.loc11_28, %int_2.loc11_31, %int_3) [concrete = constants.%tuple.2d5]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_35.1: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc11_35.1: <bound method> = bound_method %int_1.loc11_28, %impl.elem0.loc11_35.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.282]
|
||||
// CHECK:STDOUT: %specific_fn.loc11_35.1: <specific function> = specific_function %impl.elem0.loc11_35.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc11_35.2: <bound method> = bound_method %int_1.loc11_28, %specific_fn.loc11_35.1 [concrete = constants.%bound_method.3bd]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11_35.1: init %i32 = call %bound_method.loc11_35.2(%int_1.loc11_28) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc11_35.2: init %i32 = converted %int_1.loc11_28, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11_35.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc11_35.3: ref %Array.95c = temporary_storage
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
|
||||
// CHECK:STDOUT: %.loc11_35.4: ref %i32 = array_index %.loc11_35.3, %int_0
|
||||
// CHECK:STDOUT: %.loc11_35.5: init %i32 to %.loc11_35.4 = in_place_init %.loc11_35.2 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_35.2: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc11_35.3: <bound method> = bound_method %int_2.loc11_31, %impl.elem0.loc11_35.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a6]
|
||||
// CHECK:STDOUT: %specific_fn.loc11_35.2: <specific function> = specific_function %impl.elem0.loc11_35.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc11_35.4: <bound method> = bound_method %int_2.loc11_31, %specific_fn.loc11_35.2 [concrete = constants.%bound_method.a55]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11_35.2: init %i32 = call %bound_method.loc11_35.4(%int_2.loc11_31) [concrete = constants.%int_2.2e0]
|
||||
// CHECK:STDOUT: %.loc11_35.6: init %i32 = converted %int_2.loc11_31, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11_35.2 [concrete = constants.%int_2.2e0]
|
||||
// CHECK:STDOUT: %int_1.loc11_35: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %.loc11_35.7: ref %i32 = array_index %.loc11_35.3, %int_1.loc11_35
|
||||
// CHECK:STDOUT: %.loc11_35.8: init %i32 to %.loc11_35.7 = in_place_init %.loc11_35.6 [concrete = constants.%int_2.2e0]
|
||||
// CHECK:STDOUT: %impl.elem0.loc11_35.3: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc11_35.5: <bound method> = bound_method %int_3, %impl.elem0.loc11_35.3 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b3c]
|
||||
// CHECK:STDOUT: %specific_fn.loc11_35.3: <specific function> = specific_function %impl.elem0.loc11_35.3, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc11_35.6: <bound method> = bound_method %int_3, %specific_fn.loc11_35.3 [concrete = constants.%bound_method.fb0]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11_35.3: init %i32 = call %bound_method.loc11_35.6(%int_3) [concrete = constants.%int_3.9f3]
|
||||
// CHECK:STDOUT: %.loc11_35.9: init %i32 = converted %int_3, %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc11_35.3 [concrete = constants.%int_3.9f3]
|
||||
// CHECK:STDOUT: %int_2.loc11_35: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
|
||||
// CHECK:STDOUT: %.loc11_35.10: ref %i32 = array_index %.loc11_35.3, %int_2.loc11_35
|
||||
// CHECK:STDOUT: %.loc11_35.11: init %i32 to %.loc11_35.10 = in_place_init %.loc11_35.9 [concrete = constants.%int_3.9f3]
|
||||
// CHECK:STDOUT: %.loc11_35.12: init %Array.95c to %.loc11_35.3 = array_init (%.loc11_35.5, %.loc11_35.8, %.loc11_35.11) [concrete = constants.%array]
|
||||
// CHECK:STDOUT: %.loc11_35.13: init %Array.95c = converted %.loc11_35.1, %.loc11_35.12 [concrete = constants.%array]
|
||||
// CHECK:STDOUT: %.loc11_35.14: ref %Array.95c = temporary %.loc11_35.3, %.loc11_35.13 [concrete = constants.%.c07]
|
||||
// CHECK:STDOUT: %.loc11_35.15: %Array.95c = acquire_value %.loc11_35.14 [concrete = constants.%array]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
+552
-21
@@ -2,7 +2,7 @@
|
||||
// Exceptions. See /LICENSE for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/primitives.carbon
|
||||
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/int.carbon
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// TIP: To test this file alone, run:
|
||||
@@ -10,7 +10,7 @@
|
||||
// TIP: To dump output, run:
|
||||
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/capture/uncaptured_locals.carbon
|
||||
|
||||
// --- fail_todo_reference_uncaptured.carbon
|
||||
// --- fail_reference_uncaptured.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
class X {}
|
||||
@@ -18,21 +18,64 @@ class X {}
|
||||
fn Test() {
|
||||
let x: X = {};
|
||||
fn Inner() {
|
||||
// TODO: This should fail. We can't reference `x` from here.
|
||||
// CHECK:STDERR: ╭─┤ fail_reference_uncaptured.carbon:[[@LINE+12]]:23
|
||||
// CHECK:STDERR: │ let x: X = {};
|
||||
// CHECK:STDERR: · ──┬─
|
||||
// CHECK:STDERR: · ╰──┤ declared here [UncapturedLocalDecl]
|
||||
// CHECK:STDERR: ┆
|
||||
// CHECK:STDERR: -> │ let unused y: X = x;
|
||||
// CHECK:STDERR: · ┳
|
||||
// CHECK:STDERR: · ┗━━┫ error: cannot reference local `x` declared in
|
||||
// CHECK:STDERR: · ┃ enclosing scope
|
||||
// CHECK:STDERR: · ┃ [UncapturedLocal]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
let unused y: X = x;
|
||||
}
|
||||
}
|
||||
|
||||
// Intentionally include an error here so we skip dominance checking, which CHECK-fails for the above example.
|
||||
// CHECK:STDERR: ╭─┤ fail_todo_reference_uncaptured.carbon:[[@LINE+6]]:14
|
||||
// CHECK:STDERR: -> │ fn Error() { error; }
|
||||
// CHECK:STDERR: · ━━┳━━
|
||||
// CHECK:STDERR: · ┗━━┫ error: name `error` not found [NameNotFound]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
fn Error() { error; }
|
||||
// --- fail_reference_uncaptured_var.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
// --- fail_todo_reference_uncaptured_lambda.carbon
|
||||
fn Test() {
|
||||
var n: i32;
|
||||
fn G() -> i32 {
|
||||
// CHECK:STDERR: ╭─┤ fail_reference_uncaptured_var.carbon:[[@LINE+11]]:12
|
||||
// CHECK:STDERR: │ var n: i32;
|
||||
// CHECK:STDERR: · ───┬──
|
||||
// CHECK:STDERR: · ╰──┤ declared here [UncapturedLocalDecl]
|
||||
// CHECK:STDERR: ┆
|
||||
// CHECK:STDERR: -> │ return n;
|
||||
// CHECK:STDERR: · ┳
|
||||
// CHECK:STDERR: · ┗━━┫ error: cannot reference local `n` declared in enclosing scope
|
||||
// CHECK:STDERR: · ┃ [UncapturedLocal]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
return n;
|
||||
}
|
||||
}
|
||||
|
||||
// --- fail_reference_uncaptured_param.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
fn Test(p: i32) {
|
||||
fn H() -> i32 {
|
||||
// CHECK:STDERR: ╭─┤ fail_reference_uncaptured_param.carbon:[[@LINE+11]]:12
|
||||
// CHECK:STDERR: │ fn Test(p: i32) {
|
||||
// CHECK:STDERR: · ───┬──
|
||||
// CHECK:STDERR: · ╰──┤ declared here [UncapturedLocalDecl]
|
||||
// CHECK:STDERR: ┆
|
||||
// CHECK:STDERR: -> │ return p;
|
||||
// CHECK:STDERR: · ┳
|
||||
// CHECK:STDERR: · ┗━━┫ error: cannot reference local `p` declared in enclosing scope
|
||||
// CHECK:STDERR: · ┃ [UncapturedLocal]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
||||
// --- fail_reference_uncaptured_lambda.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
class X {}
|
||||
@@ -40,16 +83,504 @@ class X {}
|
||||
fn Test() {
|
||||
let x: X = {};
|
||||
(fn() {
|
||||
// TODO: This should fail. We can't reference `x` from here.
|
||||
// CHECK:STDERR: ╭─┤ fail_reference_uncaptured_lambda.carbon:[[@LINE+12]]:23
|
||||
// CHECK:STDERR: │ let x: X = {};
|
||||
// CHECK:STDERR: · ──┬─
|
||||
// CHECK:STDERR: · ╰──┤ declared here [UncapturedLocalDecl]
|
||||
// CHECK:STDERR: ┆
|
||||
// CHECK:STDERR: -> │ let unused y: X = x;
|
||||
// CHECK:STDERR: · ┳
|
||||
// CHECK:STDERR: · ┗━━┫ error: cannot reference local `x` declared in
|
||||
// CHECK:STDERR: · ┃ enclosing scope
|
||||
// CHECK:STDERR: · ┃ [UncapturedLocal]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
let unused y: X = x;
|
||||
});
|
||||
}
|
||||
|
||||
// Intentionally include an error here so we skip dominance checking, which CHECK-fails for the above example.
|
||||
// CHECK:STDERR: ╭─┤ fail_todo_reference_uncaptured_lambda.carbon:[[@LINE+6]]:14
|
||||
// CHECK:STDERR: -> │ fn Error() { error; }
|
||||
// CHECK:STDERR: · ━━┳━━
|
||||
// CHECK:STDERR: · ┗━━┫ error: name `error` not found [NameNotFound]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
fn Error() { error; }
|
||||
// --- fail_reference_uncaptured_local_var_in_class.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
fn F() {
|
||||
var n: i32 = 0;
|
||||
class Local {
|
||||
// CHECK:STDERR: ╭─┤ fail_reference_uncaptured_local_var_in_class.carbon:[[@LINE+12]]:22
|
||||
// CHECK:STDERR: │ var n: i32 = 0;
|
||||
// CHECK:STDERR: · ───┬──
|
||||
// CHECK:STDERR: · ╰──┤ declared here [UncapturedLocalDecl]
|
||||
// CHECK:STDERR: ┆
|
||||
// CHECK:STDERR: -> │ var field: i32 = n;
|
||||
// CHECK:STDERR: · ┳
|
||||
// CHECK:STDERR: · ┗━━┫ error: cannot reference local `n` declared in
|
||||
// CHECK:STDERR: · ┃ enclosing scope
|
||||
// CHECK:STDERR: · ┃ [UncapturedLocal]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
var field: i32 = n;
|
||||
}
|
||||
}
|
||||
|
||||
// --- fail_reference_uncaptured_local_let_in_class.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
fn F() {
|
||||
let m: i32 = 1;
|
||||
class Local {
|
||||
// CHECK:STDERR: ╭─┤ fail_reference_uncaptured_local_let_in_class.carbon:[[@LINE+12]]:27
|
||||
// CHECK:STDERR: │ let m: i32 = 1;
|
||||
// CHECK:STDERR: · ───┬──
|
||||
// CHECK:STDERR: · ╰──┤ declared here [UncapturedLocalDecl]
|
||||
// CHECK:STDERR: ┆
|
||||
// CHECK:STDERR: -> │ let member_let: i32 = m;
|
||||
// CHECK:STDERR: · ┳
|
||||
// CHECK:STDERR: · ┗━━┫ error: cannot reference local `m` declared in
|
||||
// CHECK:STDERR: · ┃ enclosing scope
|
||||
// CHECK:STDERR: · ┃ [UncapturedLocal]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
let member_let: i32 = m;
|
||||
}
|
||||
}
|
||||
|
||||
// --- fail_reference_uncaptured_local_var_in_method.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
fn F() {
|
||||
var n: i32 = 0;
|
||||
class Local {
|
||||
fn Method() -> i32 {
|
||||
// CHECK:STDERR: ╭─┤ fail_reference_uncaptured_local_var_in_method.carbon:[[@LINE+11]]:14
|
||||
// CHECK:STDERR: │ var n: i32 = 0;
|
||||
// CHECK:STDERR: · ───┬──
|
||||
// CHECK:STDERR: · ╰──┤ declared here [UncapturedLocalDecl]
|
||||
// CHECK:STDERR: ┆
|
||||
// CHECK:STDERR: -> │ return n;
|
||||
// CHECK:STDERR: · ┳
|
||||
// CHECK:STDERR: · ┗━━┫ error: cannot reference local `n` declared in enclosing scope
|
||||
// CHECK:STDERR: · ┃ [UncapturedLocal]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
return n;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// --- fail_reference_uncaptured_local_in_interface.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
class C {}
|
||||
|
||||
fn F() {
|
||||
var n: i32 = 0;
|
||||
interface LocalIface {
|
||||
// CHECK:STDERR: ╭─┤ fail_reference_uncaptured_local_in_interface.carbon:[[@LINE+12]]:18
|
||||
// CHECK:STDERR: │ var n: i32 = 0;
|
||||
// CHECK:STDERR: · ───┬──
|
||||
// CHECK:STDERR: · ╰──┤ declared here [UncapturedLocalDecl]
|
||||
// CHECK:STDERR: ┆
|
||||
// CHECK:STDERR: -> │ let X: i32 = n;
|
||||
// CHECK:STDERR: · ┳
|
||||
// CHECK:STDERR: · ┗━━┫ error: cannot reference local `n` declared in enclosing
|
||||
// CHECK:STDERR: · ┃ scope
|
||||
// CHECK:STDERR: · ┃ [UncapturedLocal]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
let X: i32 = n;
|
||||
}
|
||||
}
|
||||
|
||||
// --- fail_reference_uncaptured_local_in_impl.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
class C {}
|
||||
|
||||
fn F() {
|
||||
var n: i32 = 0;
|
||||
interface LocalIface {
|
||||
let Y: i32;
|
||||
}
|
||||
// CHECK:STDERR: ╭─┤ fail_reference_uncaptured_local_in_impl.carbon:[[@LINE+26]]:35
|
||||
// CHECK:STDERR: │ var n: i32 = 0;
|
||||
// CHECK:STDERR: · ───┬──
|
||||
// CHECK:STDERR: · ╰──┤ declared here [UncapturedLocalDecl]
|
||||
// CHECK:STDERR: ┆
|
||||
// CHECK:STDERR: -> │ impl C as LocalIface where .Y = n {};
|
||||
// CHECK:STDERR: · ┳
|
||||
// CHECK:STDERR: · ┗━━┫ error: cannot reference local `n`
|
||||
// CHECK:STDERR: · ┃ declared in enclosing scope
|
||||
// CHECK:STDERR: · ┃ [UncapturedLocal]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
// CHECK:STDERR: ╭─┤ fail_reference_uncaptured_local_in_impl.carbon:[[@LINE+14]]:39
|
||||
// CHECK:STDERR: -> │ impl C as LocalIface where .Y = n {};
|
||||
// CHECK:STDERR: · ┳
|
||||
// CHECK:STDERR: · ┗━━┫ error: expected expression
|
||||
// CHECK:STDERR: · ┃ [ExpectedExpr]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
// CHECK:STDERR: ╭─┤ fail_reference_uncaptured_local_in_impl.carbon:[[@LINE+7]]:39
|
||||
// CHECK:STDERR: -> │ impl C as LocalIface where .Y = n {};
|
||||
// CHECK:STDERR: · ┳
|
||||
// CHECK:STDERR: · ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
|
||||
// CHECK:STDERR: · ┃ error: semantics TODO: `handle invalid parse trees in `check`` [SemanticsTodo]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
impl C as LocalIface where .Y = n {};
|
||||
}
|
||||
|
||||
// --- fail_reference_uncaptured_local_in_interface_member.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
class C {}
|
||||
|
||||
fn F() {
|
||||
var n: i32 = 0;
|
||||
interface LocalIface {
|
||||
fn Get(self) -> i32;
|
||||
}
|
||||
impl C as LocalIface {
|
||||
fn Get(unused self) -> i32 {
|
||||
// CHECK:STDERR: ╭─┤ fail_reference_uncaptured_local_in_interface_member.carbon:[[@LINE+11]]:14
|
||||
// CHECK:STDERR: │ var n: i32 = 0;
|
||||
// CHECK:STDERR: · ───┬──
|
||||
// CHECK:STDERR: · ╰──┤ declared here [UncapturedLocalDecl]
|
||||
// CHECK:STDERR: ┆
|
||||
// CHECK:STDERR: -> │ return n;
|
||||
// CHECK:STDERR: · ┳
|
||||
// CHECK:STDERR: · ┗━━┫ error: cannot reference local `n` declared in enclosing scope
|
||||
// CHECK:STDERR: · ┃ [UncapturedLocal]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
return n;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// --- fail_non_constant_alias_to_local.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
fn F() -> i32 {
|
||||
var x: i32 = 0;
|
||||
// This should produce an error indicating that the alias initializer is
|
||||
// non-constant, not that we cannot reference the local from the alias.
|
||||
// CHECK:STDERR: ╭─┤ fail_non_constant_alias_to_local.carbon:[[@LINE+7]]:13
|
||||
// CHECK:STDERR: -> │ alias a = x;
|
||||
// CHECK:STDERR: · ┳
|
||||
// CHECK:STDERR: · ┗━━┫ error: alias refers to a runtime value
|
||||
// CHECK:STDERR: · ┃ [AliasRequiresConstantValue]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
alias a = x;
|
||||
return a;
|
||||
}
|
||||
|
||||
// --- fail_typeof_nested_lambda.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
fn F() {
|
||||
var n: i32 = 0;
|
||||
// CHECK:STDERR: ╭─┤ fail_typeof_nested_lambda.carbon:[[@LINE+13]]:46
|
||||
// CHECK:STDERR: │ var n: i32 = 0;
|
||||
// CHECK:STDERR: · ───┬──
|
||||
// CHECK:STDERR: · ╰──┤ declared here [UncapturedLocalDecl]
|
||||
// CHECK:STDERR: ┆
|
||||
// CHECK:STDERR: -> │ let unused x: typeof((fn() -> i32 { return n; })()) = 0;
|
||||
// CHECK:STDERR: · ┳
|
||||
// CHECK:STDERR: · ┗━━┫ error: cannot reference local
|
||||
// CHECK:STDERR: · ┃ `n` declared in
|
||||
// CHECK:STDERR: · ┃ enclosing scope
|
||||
// CHECK:STDERR: · ┃ [UncapturedLocal]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
let unused x: typeof((fn() -> i32 { return n; })()) = 0;
|
||||
}
|
||||
|
||||
// --- allowed_scopes.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
var global_var: i32 = 1;
|
||||
let global_let: i32 = 2;
|
||||
|
||||
fn Outer(generic T: type, p: i32) -> i32 {
|
||||
var local_var: i32 = p;
|
||||
let local_let: i32 = global_let;
|
||||
alias const_alias = 3;
|
||||
|
||||
if (true) {
|
||||
local_var = local_let;
|
||||
}
|
||||
|
||||
while (false) {
|
||||
local_var = p;
|
||||
}
|
||||
|
||||
if (false) {
|
||||
let inner_block: i32 = local_var;
|
||||
local_var = inner_block;
|
||||
}
|
||||
|
||||
class LocalClass {}
|
||||
fn LocalHelper() -> i32 {
|
||||
return global_var;
|
||||
}
|
||||
|
||||
//@dump-sem-ir-begin
|
||||
// The value of `local_var` is not accessible, but its type is.
|
||||
fn Nested() -> typeof(local_var) {
|
||||
let unused t_type: type = T;
|
||||
var unused c_val: LocalClass = {};
|
||||
// The value of `local_let` is not accessible, but its type is.
|
||||
let unused a: typeof(local_let) = LocalHelper();
|
||||
// The value of `p` is not accessible, but its type is.
|
||||
let b: typeof(p) = global_let;
|
||||
let unused d: i32 = const_alias;
|
||||
return b;
|
||||
}
|
||||
//@dump-sem-ir-end
|
||||
|
||||
return Nested();
|
||||
}
|
||||
|
||||
// CHECK:STDOUT: --- allowed_scopes.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [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.d94: type = pattern_type %i32 [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.9a587c.1: type = pattern_type type [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.type.6b0: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
|
||||
// CHECK:STDOUT: %To: Core.IntLiteral = symbolic_binding To, 0 [symbolic]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%To) [symbolic]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %ImplicitAs.impl_witness.d73: <witness> = impl_witness imports.%ImplicitAs.impl_witness_table.f53, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.6b0 = facet_value Core.IntLiteral, (%ImplicitAs.impl_witness.d73) [concrete]
|
||||
// CHECK:STDOUT: %ImplicitAs.WithSelf.Convert.type.58f: type = fn_type @ImplicitAs.WithSelf.Convert, @ImplicitAs.WithSelf(%i32, %ImplicitAs.facet) [concrete]
|
||||
// CHECK:STDOUT: %.33a: type = fn_type_with_self_type %ImplicitAs.WithSelf.Convert.type.58f, %ImplicitAs.facet [concrete]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.766: type = fn_type @Core.IntLiteral.as.ImplicitAs.impl.Convert, @Core.IntLiteral.as.ImplicitAs.impl(%int_32) [concrete]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60: %Core.IntLiteral.as.ImplicitAs.impl.Convert.type.766 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %.0b3: Core.Form = init_form %i32 [concrete]
|
||||
// CHECK:STDOUT: %return.param_patt.299: %pattern_type.d94 = out_param_pattern [concrete]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn: <specific function> = specific_function %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60, @Core.IntLiteral.as.ImplicitAs.impl.Convert(%int_32) [concrete]
|
||||
// CHECK:STDOUT: %T.patt.3a0592.1: %pattern_type.9a587c.1 = symbolic_binding_pattern T, 0 [symbolic]
|
||||
// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic]
|
||||
// CHECK:STDOUT: %return.patt.6fa: %pattern_type.d94 = return_slot_pattern %return.param_patt.299, %i32 [concrete]
|
||||
// CHECK:STDOUT: %Copy.type: type = facet_type <@Copy> [concrete]
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.a1d: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%N) [symbolic]
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.3c1: %Int.as.Copy.impl.Op.type.a1d = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %Copy.impl_witness.8af: <witness> = impl_witness imports.%Copy.impl_witness_table.f44, @Int.as.Copy.impl(%int_32) [concrete]
|
||||
// CHECK:STDOUT: %Copy.facet: %Copy.type = facet_value %i32, (%Copy.impl_witness.8af) [concrete]
|
||||
// CHECK:STDOUT: %Copy.WithSelf.Op.type.f76: type = fn_type @Copy.WithSelf.Op, @Copy.WithSelf(%Copy.facet) [concrete]
|
||||
// CHECK:STDOUT: %.2b9: type = fn_type_with_self_type %Copy.WithSelf.Op.type.f76, %Copy.facet [concrete]
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.type.648: type = fn_type @Int.as.Copy.impl.Op, @Int.as.Copy.impl(%int_32) [concrete]
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.cae: %Int.as.Copy.impl.Op.type.648 = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.specific_fn: <specific function> = specific_function %Int.as.Copy.impl.Op.cae, @Int.as.Copy.impl.Op(%int_32) [concrete]
|
||||
// CHECK:STDOUT: %int_3.1ba: Core.IntLiteral = int_value 3 [concrete]
|
||||
// CHECK:STDOUT: %LocalClass: type = class_type @LocalClass, @LocalClass(%T.67d) [symbolic]
|
||||
// CHECK:STDOUT: %empty_struct_type: type = struct_type {} [concrete]
|
||||
// CHECK:STDOUT: %LocalHelper.type: type = fn_type @LocalHelper, @Outer(%T.67d) [symbolic]
|
||||
// CHECK:STDOUT: %LocalHelper: %LocalHelper.type = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %Nested.type: type = fn_type @Nested, @Outer(%T.67d) [symbolic]
|
||||
// CHECK:STDOUT: %Nested: %Nested.type = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %t_type.patt: %pattern_type.9a587c.1 = value_binding_pattern t_type [concrete]
|
||||
// CHECK:STDOUT: %require_complete.9cd: <witness> = require_complete_type %LocalClass [symbolic]
|
||||
// CHECK:STDOUT: %pattern_type.16b: type = pattern_type %LocalClass [symbolic]
|
||||
// CHECK:STDOUT: %c_val.patt: %pattern_type.16b = ref_binding_pattern c_val [symbolic]
|
||||
// CHECK:STDOUT: %c_val.var_patt: %pattern_type.16b = var_pattern %c_val.patt [symbolic]
|
||||
// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %LocalClass.val: %LocalClass = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.d94 = value_binding_pattern a [concrete]
|
||||
// CHECK:STDOUT: %LocalHelper.specific_fn: <specific function> = specific_function %LocalHelper, @LocalHelper(%T.67d) [symbolic]
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.d94 = value_binding_pattern b [concrete]
|
||||
// CHECK:STDOUT: %d.patt: %pattern_type.d94 = value_binding_pattern d [concrete]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b3c: <bound method> = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.f60 [concrete]
|
||||
// CHECK:STDOUT: %bound_method.fb0: <bound method> = bound_method %int_3.1ba, %Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn [concrete]
|
||||
// CHECK:STDOUT: %int_3.9f3: %i32 = int_value 3 [concrete]
|
||||
// CHECK:STDOUT: %SelfDestruct.type: type = fn_type @SelfDestruct [concrete]
|
||||
// CHECK:STDOUT: %SelfDestruct: %SelfDestruct.type = struct_value () [concrete]
|
||||
// CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
|
||||
// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness.5c4: <witness> = lookup_impl_witness %LocalClass, @DestroyImpl [symbolic]
|
||||
// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness.91b: <witness> = lookup_impl_witness %LocalClass, @SubobjectDestroy [symbolic]
|
||||
// CHECK:STDOUT: %Destroy.facet.50c: %Destroy.type = facet_value %LocalClass, (%DestroyImpl.lookup_impl_witness.5c4, %SubobjectDestroy.lookup_impl_witness.91b) [symbolic]
|
||||
// CHECK:STDOUT: %SelfDestruct.specific_fn.b99: <specific function> = specific_function %SelfDestruct, @SelfDestruct(%Destroy.facet.50c) [symbolic]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core.import_ref.e47: @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert.type (%Core.IntLiteral.as.ImplicitAs.impl.Convert.type.3c6) = import_ref Core//prelude/parts/int, loc{{\d+_\d+}}, loaded [symbolic = @Core.IntLiteral.as.ImplicitAs.impl.%Core.IntLiteral.as.ImplicitAs.impl.Convert (constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.6f2)]
|
||||
// CHECK:STDOUT: %ImplicitAs.impl_witness_table.f53 = impl_witness_table (%Core.import_ref.e47), @Core.IntLiteral.as.ImplicitAs.impl [concrete]
|
||||
// CHECK:STDOUT: %Core.import_ref.72f: @Int.as.Copy.impl.%Int.as.Copy.impl.Op.type (%Int.as.Copy.impl.Op.type.a1d) = 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.3c1)]
|
||||
// CHECK:STDOUT: %Copy.impl_witness_table.f44 = impl_witness_table (%Core.import_ref.72f), @Int.as.Copy.impl [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @Outer(%T.loc6_19.2: type) {
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %Nested.type: type = fn_type @Nested, @Outer(%T.loc6_19.1) [symbolic = %Nested.type (constants.%Nested.type)]
|
||||
// CHECK:STDOUT: %Nested: @Outer.%Nested.type (%Nested.type) = struct_value () [symbolic = %Nested (constants.%Nested)]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn(%p.param: %i32) -> out %return.param: %i32 {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !if.then.loc11:
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !if.else.loc11:
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !while.cond:
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !while.body:
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !while.done:
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !if.then.loc19:
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !if.else.loc19:
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %Nested.decl: @Outer.%Nested.type (%Nested.type) = fn_decl @Nested [symbolic = @Outer.%Nested (constants.%Nested)] {
|
||||
// CHECK:STDOUT: %return.param_patt: %pattern_type.d94 = out_param_pattern [concrete = constants.%return.param_patt.299]
|
||||
// CHECK:STDOUT: %return.patt: %pattern_type.d94 = return_slot_pattern %return.param_patt, %.loc31_34.1 [concrete = constants.%return.patt.6fa]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %.loc31_34.1: type = type_of %local_var.ref in [concrete = constants.%i32] {
|
||||
// CHECK:STDOUT: %local_var.ref: ref %i32 = name_ref local_var, @Outer.%local_var
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc31_34.2: Core.Form = init_form %.loc31_34.1 [concrete = constants.%.0b3]
|
||||
// CHECK:STDOUT: %return.param: ref %i32 = out_param call_param0
|
||||
// CHECK:STDOUT: %return: ref %i32 = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: generic fn @Nested(@Outer.%T.loc6_19.2: type) {
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %T: type = symbolic_binding T, 0 [symbolic = %T (constants.%T.67d)]
|
||||
// CHECK:STDOUT: %LocalClass: type = class_type @LocalClass, @LocalClass(%T) [symbolic = %LocalClass (constants.%LocalClass)]
|
||||
// CHECK:STDOUT: %require_complete: <witness> = require_complete_type %LocalClass [symbolic = %require_complete (constants.%require_complete.9cd)]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %LocalClass [symbolic = %pattern_type (constants.%pattern_type.16b)]
|
||||
// CHECK:STDOUT: %c_val.patt.loc33_21.2: @Nested.%pattern_type (%pattern_type.16b) = ref_binding_pattern c_val [symbolic = %c_val.patt.loc33_21.2 (constants.%c_val.patt)]
|
||||
// CHECK:STDOUT: %c_val.var_patt.loc33_5.2: @Nested.%pattern_type (%pattern_type.16b) = var_pattern %c_val.patt.loc33_21.2 [symbolic = %c_val.var_patt.loc33_5.2 (constants.%c_val.var_patt)]
|
||||
// CHECK:STDOUT: %LocalClass.val: @Nested.%LocalClass (%LocalClass) = struct_value () [symbolic = %LocalClass.val (constants.%LocalClass.val)]
|
||||
// CHECK:STDOUT: %LocalHelper.type: type = fn_type @LocalHelper, @Outer(%T) [symbolic = %LocalHelper.type (constants.%LocalHelper.type)]
|
||||
// CHECK:STDOUT: %LocalHelper: @Nested.%LocalHelper.type (%LocalHelper.type) = struct_value () [symbolic = %LocalHelper (constants.%LocalHelper)]
|
||||
// CHECK:STDOUT: %LocalHelper.specific_fn.loc35_39.2: <specific function> = specific_function %LocalHelper, @LocalHelper(%T) [symbolic = %LocalHelper.specific_fn.loc35_39.2 (constants.%LocalHelper.specific_fn)]
|
||||
// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness: <witness> = lookup_impl_witness %LocalClass, @DestroyImpl [symbolic = %DestroyImpl.lookup_impl_witness (constants.%DestroyImpl.lookup_impl_witness.5c4)]
|
||||
// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness: <witness> = lookup_impl_witness %LocalClass, @SubobjectDestroy [symbolic = %SubobjectDestroy.lookup_impl_witness (constants.%SubobjectDestroy.lookup_impl_witness.91b)]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc33_5.3: %Destroy.type = facet_value %LocalClass, (%DestroyImpl.lookup_impl_witness, %SubobjectDestroy.lookup_impl_witness) [symbolic = %Destroy.facet.loc33_5.3 (constants.%Destroy.facet.50c)]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn() -> out %return.param: %i32 {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc32_31: type = specific_constant @Outer.%T.loc6_19.2, @Outer(constants.%T.67d) [symbolic = %T (constants.%T.67d)]
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, %.loc32_31 [symbolic = %T (constants.%T.67d)]
|
||||
// CHECK:STDOUT: %.loc32_24: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: %t_type: type = wrapper_binding t_type, %T.ref
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %t_type.patt: %pattern_type.9a587c.1 = value_binding_pattern t_type [concrete = constants.%t_type.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %c_val.var: ref @Nested.%LocalClass (%LocalClass) = var_storage %c_val.var_patt.loc33_5.1
|
||||
// CHECK:STDOUT: %.loc33_37.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc33_37.2: init @Nested.%LocalClass (%LocalClass) to %c_val.var = class_init () [symbolic = %LocalClass.val (constants.%LocalClass.val)]
|
||||
// CHECK:STDOUT: %.loc33_5.1: init @Nested.%LocalClass (%LocalClass) = converted %.loc33_37.1, %.loc33_37.2 [symbolic = %LocalClass.val (constants.%LocalClass.val)]
|
||||
// CHECK:STDOUT: assign %c_val.var, %.loc33_5.1
|
||||
// CHECK:STDOUT: %.loc33_23.1: type = splice_block %LocalClass.ref [symbolic = %LocalClass (constants.%LocalClass)] {
|
||||
// CHECK:STDOUT: %.loc33_23.2: type = specific_constant @Outer.%LocalClass.decl, @Outer(constants.%T.67d) [symbolic = %LocalClass (constants.%LocalClass)]
|
||||
// CHECK:STDOUT: %LocalClass.ref: type = name_ref LocalClass, %.loc33_23.2 [symbolic = %LocalClass (constants.%LocalClass)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %c_val: ref @Nested.%LocalClass (%LocalClass) = wrapper_binding c_val, %c_val.var
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %c_val.patt.loc33_21.1: @Nested.%pattern_type (%pattern_type.16b) = ref_binding_pattern c_val [symbolic = %c_val.patt.loc33_21.2 (constants.%c_val.patt)]
|
||||
// CHECK:STDOUT: %c_val.var_patt.loc33_5.1: @Nested.%pattern_type (%pattern_type.16b) = var_pattern %c_val.patt.loc33_21.1 [symbolic = %c_val.var_patt.loc33_5.2 (constants.%c_val.var_patt)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc35_39: @Nested.%LocalHelper.type (%LocalHelper.type) = specific_constant @Outer.%LocalHelper.decl, @Outer(constants.%T.67d) [symbolic = %LocalHelper (constants.%LocalHelper)]
|
||||
// CHECK:STDOUT: %LocalHelper.ref: @Nested.%LocalHelper.type (%LocalHelper.type) = name_ref LocalHelper, %.loc35_39 [symbolic = %LocalHelper (constants.%LocalHelper)]
|
||||
// CHECK:STDOUT: %LocalHelper.specific_fn.loc35_39.1: <specific function> = specific_function %LocalHelper.ref, @LocalHelper(constants.%T.67d) [symbolic = %LocalHelper.specific_fn.loc35_39.2 (constants.%LocalHelper.specific_fn)]
|
||||
// CHECK:STDOUT: %LocalHelper.call: init %i32 = call %LocalHelper.specific_fn.loc35_39.1()
|
||||
// CHECK:STDOUT: %.loc35_51.1: %i32 = value_of_initializer %LocalHelper.call
|
||||
// CHECK:STDOUT: %.loc35_51.2: %i32 = converted %LocalHelper.call, %.loc35_51.1
|
||||
// CHECK:STDOUT: %.loc35_35: type = type_of %local_let.ref in [concrete = constants.%i32] {
|
||||
// CHECK:STDOUT: %local_let.ref: %i32 = name_ref local_let, @Outer.%local_let
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %a: %i32 = wrapper_binding a, %.loc35_51.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.d94 = value_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %global_let.global_ref: %i32 = global_ref file.%global_let
|
||||
// CHECK:STDOUT: %global_let.ref: %i32 = name_ref global_let, %global_let.global_ref
|
||||
// CHECK:STDOUT: %.loc37: type = type_of %p.ref in [concrete = constants.%i32] {
|
||||
// CHECK:STDOUT: %p.ref: %i32 = name_ref p, @Outer.%p
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %b: %i32 = wrapper_binding b, %global_let.ref
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.d94 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %const_alias.ref: Core.IntLiteral = name_ref const_alias, @Outer.%const_alias [concrete = constants.%int_3.1ba]
|
||||
// CHECK:STDOUT: %impl.elem0.loc38: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc38_25.1: <bound method> = bound_method %const_alias.ref, %impl.elem0.loc38 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.b3c]
|
||||
// CHECK:STDOUT: %specific_fn.loc38: <specific function> = specific_function %impl.elem0.loc38, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc38_25.2: <bound method> = bound_method %const_alias.ref, %specific_fn.loc38 [concrete = constants.%bound_method.fb0]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc38_25.2(%const_alias.ref) [concrete = constants.%int_3.9f3]
|
||||
// CHECK:STDOUT: %.loc38_25.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_3.9f3]
|
||||
// CHECK:STDOUT: %.loc38_25.2: %i32 = converted %const_alias.ref, %.loc38_25.1 [concrete = constants.%int_3.9f3]
|
||||
// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %d: %i32 = wrapper_binding d, %.loc38_25.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %d.patt: %pattern_type.d94 = value_binding_pattern d [concrete = constants.%d.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %b.ref: %i32 = name_ref b, %b
|
||||
// CHECK:STDOUT: %impl.elem0.loc39: %.2b9 = impl_witness_access constants.%Copy.impl_witness.8af, element0 [concrete = constants.%Int.as.Copy.impl.Op.cae]
|
||||
// CHECK:STDOUT: %bound_method.loc39_12.1: <bound method> = bound_method %b.ref, %impl.elem0.loc39
|
||||
// CHECK:STDOUT: %specific_fn.loc39: <specific function> = specific_function %impl.elem0.loc39, @Int.as.Copy.impl.Op(constants.%int_32) [concrete = constants.%Int.as.Copy.impl.Op.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc39_12.2: <bound method> = bound_method %b.ref, %specific_fn.loc39
|
||||
// CHECK:STDOUT: %Int.as.Copy.impl.Op.call: init %i32 = call %bound_method.loc39_12.2(%b.ref)
|
||||
// CHECK:STDOUT: %Destroy.facet.loc33_5.1: %Destroy.type = facet_value constants.%LocalClass, (constants.%DestroyImpl.lookup_impl_witness.5c4, constants.%SubobjectDestroy.lookup_impl_witness.91b) [symbolic = %Destroy.facet.loc33_5.3 (constants.%Destroy.facet.50c)]
|
||||
// CHECK:STDOUT: %.loc33_5.2: %Destroy.type = converted constants.%LocalClass, %Destroy.facet.loc33_5.1 [symbolic = %Destroy.facet.loc33_5.3 (constants.%Destroy.facet.50c)]
|
||||
// CHECK:STDOUT: %Destroy.facet.loc33_5.2: %Destroy.type = facet_value constants.%LocalClass, (constants.%DestroyImpl.lookup_impl_witness.5c4, constants.%SubobjectDestroy.lookup_impl_witness.91b) [symbolic = %Destroy.facet.loc33_5.3 (constants.%Destroy.facet.50c)]
|
||||
// CHECK:STDOUT: %.loc33_5.3: %Destroy.type = converted constants.%LocalClass, %Destroy.facet.loc33_5.2 [symbolic = %Destroy.facet.loc33_5.3 (constants.%Destroy.facet.50c)]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %SelfDestruct.call: init %empty_tuple.type = call %SelfDestruct.specific_fn.1(%c_val.var)
|
||||
// CHECK:STDOUT: return %Int.as.Copy.impl.Op.call
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @SubobjectDestroy.WithSelf.Op.loc33(%self.param: ref %empty_struct_type) = "no_op";
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Outer(constants.%T.67d) {
|
||||
// CHECK:STDOUT: %T.patt.loc6_19.2 => constants.%T.patt.3a0592.1
|
||||
// CHECK:STDOUT: %T.loc6_19.1 => constants.%T.67d
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: specific @Nested(constants.%T.67d) {
|
||||
// CHECK:STDOUT: !definition:
|
||||
// CHECK:STDOUT: %T => constants.%T.67d
|
||||
// CHECK:STDOUT: %LocalClass => constants.%LocalClass
|
||||
// CHECK:STDOUT: %require_complete => constants.%require_complete.9cd
|
||||
// CHECK:STDOUT: %pattern_type => constants.%pattern_type.16b
|
||||
// CHECK:STDOUT: %c_val.patt.loc33_21.2 => constants.%c_val.patt
|
||||
// CHECK:STDOUT: %c_val.var_patt.loc33_5.2 => constants.%c_val.var_patt
|
||||
// CHECK:STDOUT: %LocalClass.val => constants.%LocalClass.val
|
||||
// CHECK:STDOUT: %LocalHelper.type => constants.%LocalHelper.type
|
||||
// CHECK:STDOUT: %LocalHelper => constants.%LocalHelper
|
||||
// CHECK:STDOUT: %LocalHelper.specific_fn.loc35_39.2 => constants.%LocalHelper.specific_fn
|
||||
// CHECK:STDOUT: %DestroyImpl.lookup_impl_witness => constants.%DestroyImpl.lookup_impl_witness.5c4
|
||||
// CHECK:STDOUT: %SubobjectDestroy.lookup_impl_witness => constants.%SubobjectDestroy.lookup_impl_witness.91b
|
||||
// CHECK:STDOUT: %Destroy.facet.loc33_5.3 => constants.%Destroy.facet.50c
|
||||
// CHECK:STDOUT: %SelfDestruct.specific_fn.2 => constants.%SelfDestruct.specific_fn.b99
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
+8
-8
@@ -710,8 +710,6 @@ impl C as Y {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc7: <witness> = impl_self_witness @C.as.I.impl.%C.ref.loc7, @I [concrete = constants.%.b7f]
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc9_19: %empty_tuple.type = converted @__global_init.%.loc9, %empty_tuple [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc9_9.1: type = splice_block %impl.elem0 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [concrete = constants.%C]
|
||||
// CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [concrete = constants.%I.type]
|
||||
@@ -720,7 +718,7 @@ impl C as Y {}
|
||||
// CHECK:STDOUT: %.loc9_9.2: %I.type = converted %C.ref, %I.facet [concrete = constants.%I.facet.a71]
|
||||
// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %x: %empty_tuple.type = wrapper_binding x, %.loc9_19
|
||||
// CHECK:STDOUT: %x: %empty_tuple.type = wrapper_binding x, @__global_init.%.loc9_19.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type = value_binding_pattern x [concrete = constants.%x.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -784,7 +782,9 @@ impl C as Y {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc9: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc9_19.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc9_19.2: %empty_tuple.type = converted %.loc9_19.1, %empty_tuple [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -866,8 +866,6 @@ impl C as Y {}
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc7: <witness> = impl_self_witness @C.as.I.impl.%C.ref.loc7, @I [concrete = constants.%.b7f]
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc9_22: %empty_tuple.type = converted @__global_init.%.loc9, %empty_tuple [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc9_16.1: type = splice_block %impl.elem0 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [concrete = constants.%C]
|
||||
// CHECK:STDOUT: %I.ref: type = name_ref I, %I.decl [concrete = constants.%I.type]
|
||||
@@ -878,7 +876,7 @@ impl C as Y {}
|
||||
// CHECK:STDOUT: %T.ref: %I.assoc_type = name_ref T, @T.%assoc0 [concrete = constants.%assoc0]
|
||||
// CHECK:STDOUT: %impl.elem0: type = impl_witness_access constants.%I.impl_witness, element0 [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %x: %empty_tuple.type = wrapper_binding x, %.loc9_22
|
||||
// CHECK:STDOUT: %x: %empty_tuple.type = wrapper_binding x, @__global_init.%.loc9_22.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type = value_binding_pattern x [concrete = constants.%x.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -942,7 +940,9 @@ impl C as Y {}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc9: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc9_22.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc9_22.2: %empty_tuple.type = converted %.loc9_22.1, %empty_tuple [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+37
-32
@@ -283,15 +283,12 @@ impl i32 as Empty {
|
||||
// CHECK:STDOUT: %return.param: ref %empty_tuple.type = out_param call_param0
|
||||
// CHECK:STDOUT: %return: ref %empty_tuple.type = return_slot %return.param
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc15_24.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc15_24.2: %empty_tuple.type = converted %.loc15_24.1, %empty_tuple [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc15_19.1: type = splice_block %.loc15_19.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc15_19.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc15_19.3: type = converted %.loc15_19.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %x: %empty_tuple.type = wrapper_binding x, %.loc15_24.2
|
||||
// CHECK:STDOUT: %x: %empty_tuple.type = wrapper_binding x, @__global_init.%.loc15_24.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type = value_binding_pattern x [concrete = constants.%x.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -306,12 +303,21 @@ impl i32 as Empty {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @C.F() -> out %return.param: %empty_tuple.type {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %x.ref: %empty_tuple.type = name_ref x, @C.%x
|
||||
// CHECK:STDOUT: %x.global_ref: %empty_tuple.type = global_ref @C.%x
|
||||
// CHECK:STDOUT: %x.ref: %empty_tuple.type = name_ref x, %x.global_ref
|
||||
// CHECK:STDOUT: %.loc5_25: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_26: init %empty_tuple.type = converted %x.ref, %.loc5_25 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: return %.loc5_26
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc15_24.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc15_24.2: %empty_tuple.type = converted %.loc15_24.1, %empty_tuple [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_let_before.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
@@ -348,15 +354,12 @@ impl i32 as Empty {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @C {
|
||||
// CHECK:STDOUT: %.loc14_24.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc14_24.2: %empty_tuple.type = converted %.loc14_24.1, %empty_tuple [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc14_19.1: type = splice_block %.loc14_19.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc14_19.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc14_19.3: type = converted %.loc14_19.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %x: %empty_tuple.type = wrapper_binding x, %.loc14_24.2
|
||||
// CHECK:STDOUT: %x: %empty_tuple.type = wrapper_binding x, @__global_init.%.loc14_24.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type = value_binding_pattern x [concrete = constants.%x.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -381,12 +384,21 @@ impl i32 as Empty {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @C.F() -> out %return.param: %empty_tuple.type {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %x.ref: %empty_tuple.type = name_ref x, @C.%x
|
||||
// CHECK:STDOUT: %x.global_ref: %empty_tuple.type = global_ref @C.%x
|
||||
// CHECK:STDOUT: %x.ref: %empty_tuple.type = name_ref x, %x.global_ref
|
||||
// CHECK:STDOUT: %.loc15_25: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc15_26: init %empty_tuple.type = converted %x.ref, %.loc15_25 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: return %.loc15_26
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc14_24.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc14_24.2: %empty_tuple.type = converted %.loc14_24.1, %empty_tuple [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_multiple_lets.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
@@ -413,15 +425,12 @@ impl i32 as Empty {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @C {
|
||||
// CHECK:STDOUT: %.loc14_24.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %empty_tuple.loc14: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc14_24.2: %empty_tuple.type = converted %.loc14_24.1, %empty_tuple.loc14 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc14_19.1: type = splice_block %.loc14_19.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc14: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc14_19.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc14_19.3: type = converted %.loc14_19.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %a: %empty_tuple.type = wrapper_binding a, %.loc14_24.2
|
||||
// CHECK:STDOUT: %a: %empty_tuple.type = wrapper_binding a, <unexpected>.inst{{[0-9A-F]+}}.loc14_24
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.cb1 = value_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -437,18 +446,6 @@ impl i32 as Empty {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %b.loc15_17.2: %tuple.type.9fb = symbolic_binding b, 0 [symbolic = %b.loc15_17.1 (constants.%b)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc41_35: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc41_39: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc41_43: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc41_44.1: %tuple.type.2d5 = tuple_literal (%.loc41_35, %.loc41_39, %.loc41_43) [concrete = constants.%tuple.7e4]
|
||||
// CHECK:STDOUT: %empty_tuple.loc41_35: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc41_44.2: %empty_tuple.type = converted %.loc41_35, %empty_tuple.loc41_35 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %empty_tuple.loc41_39: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc41_44.3: %empty_tuple.type = converted %.loc41_39, %empty_tuple.loc41_39 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %empty_tuple.loc41_43: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc41_44.4: %empty_tuple.type = converted %.loc41_43, %empty_tuple.loc41_43 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %tuple: %tuple.type.2d5 = tuple_value (%.loc41_44.2, %.loc41_44.3, %.loc41_44.4) [concrete = constants.%tuple.7e4]
|
||||
// CHECK:STDOUT: %.loc41_44.5: %tuple.type.2d5 = converted %.loc41_44.1, %tuple [concrete = constants.%tuple.7e4]
|
||||
// CHECK:STDOUT: %.loc41_29.1: type = splice_block %.loc41_29.6 [concrete = constants.%tuple.type.2d5] {
|
||||
// CHECK:STDOUT: %.Self.frozen.loc41: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc41_20: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
@@ -460,7 +457,7 @@ impl i32 as Empty {
|
||||
// CHECK:STDOUT: %.loc41_29.5: type = converted constants.%empty_tuple, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: %.loc41_29.6: type = converted %.loc41_29.2, constants.%tuple.type.2d5 [concrete = constants.%tuple.type.2d5]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %d: %tuple.type.2d5 = wrapper_binding d, %.loc41_44.5
|
||||
// CHECK:STDOUT: %d: %tuple.type.2d5 = wrapper_binding d, <unexpected>.inst{{[0-9A-F]+}}.loc41_44
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %d.patt: %pattern_type.8c1 = value_binding_pattern d [concrete = constants.%d.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -545,7 +542,8 @@ impl i32 as Empty {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @C.F() -> out %return.param: %empty_tuple.type {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %x.ref: %empty_tuple.type = name_ref x, <unexpected>.inst{{[0-9A-F]+}}.loc23_16
|
||||
// CHECK:STDOUT: %x.global_ref: %empty_tuple.type = global_ref <unexpected>.inst{{[0-9A-F]+}}.loc23_16
|
||||
// CHECK:STDOUT: %x.ref: %empty_tuple.type = name_ref x, %x.global_ref
|
||||
// CHECK:STDOUT: %.loc5_25: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_26: init %empty_tuple.type = converted %x.ref, %.loc5_25 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: return %.loc5_26
|
||||
@@ -703,19 +701,19 @@ impl i32 as Empty {
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @I {
|
||||
// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %.loc14_18.1: type = splice_block %.loc14_18.2 [concrete = type] {
|
||||
// CHECK:STDOUT: %.Self.frozen: type = symbolic_binding .Self [symbolic_self = constants.%.Self.frozen]
|
||||
// CHECK:STDOUT: %.loc14_18.2: type = type_literal type [concrete = type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %T: type = wrapper_binding T, %i32
|
||||
// CHECK:STDOUT: %T: type = wrapper_binding T, @__global_init.%i32
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %T.patt: %pattern_type.9a5 = value_binding_pattern T [concrete = constants.%T.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %I.F.decl: %I.F.type = fn_decl @I.F [concrete = constants.%I.F] {
|
||||
// CHECK:STDOUT: %return.patt: <error> = return_slot_pattern <error>, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, @I.%T
|
||||
// CHECK:STDOUT: %T.global_ref: type = global_ref @I.%T
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.global_ref
|
||||
// CHECK:STDOUT: %return: <error> = return_slot <error>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %complete_type: <witness> = complete_type_witness constants.%empty_struct_type [concrete = constants.%complete_type.357]
|
||||
@@ -729,6 +727,12 @@ impl i32 as Empty {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @I.F() -> <error>;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_return_in_package_scope.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
@@ -771,7 +775,8 @@ impl i32 as Empty {
|
||||
// CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {
|
||||
// CHECK:STDOUT: %return.patt: <error> = return_slot_pattern <error>, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, file.%T
|
||||
// CHECK:STDOUT: %T.global_ref: type = global_ref file.%T
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.global_ref
|
||||
// CHECK:STDOUT: %return: <error> = return_slot <error>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
+4
-1
@@ -108,7 +108,10 @@ let a: T = 0;
|
||||
// CHECK:STDOUT: %Implicit.import = import Implicit
|
||||
// CHECK:STDOUT: %default.import = import <none>
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, imports.%Implicit.T
|
||||
// CHECK:STDOUT: %.1: <error> = splice_block <error> [concrete = <error>] {
|
||||
// CHECK:STDOUT: %T.global_ref: type = global_ref imports.%Implicit.T
|
||||
// CHECK:STDOUT: %T.ref: type = name_ref T, %T.global_ref
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %a: <error> = wrapper_binding a, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: <error> = value_binding_pattern a [concrete = <error>]
|
||||
|
||||
+64
-64
@@ -176,99 +176,43 @@ protected protected let i: i32 = 1;
|
||||
// CHECK:STDOUT: .i [protected] = %i
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %impl.elem0.loc22: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc22_24.1: <bound method> = bound_method @__global_init.%int_1.loc22, %impl.elem0.loc22 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn.loc22: <specific function> = specific_function %impl.elem0.loc22, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc22_24.2: <bound method> = bound_method @__global_init.%int_1.loc22, %specific_fn.loc22 [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22: init %i32 = call %bound_method.loc22_24.2(@__global_init.%int_1.loc22) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc22_24.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc22_24.2: %i32 = converted @__global_init.%int_1.loc22, %.loc22_24.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %i32.loc22: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %b: %i32 = wrapper_binding b, %.loc22_24.2
|
||||
// CHECK:STDOUT: %b: %i32 = wrapper_binding b, @__global_init.%.loc22_24.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.d94 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %impl.elem0.loc31: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc31_22.1: <bound method> = bound_method @__global_init.%int_1.loc31, %impl.elem0.loc31 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn.loc31: <specific function> = specific_function %impl.elem0.loc31, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc31_22.2: <bound method> = bound_method @__global_init.%int_1.loc31, %specific_fn.loc31 [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc31: init %i32 = call %bound_method.loc31_22.2(@__global_init.%int_1.loc31) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc31_22.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc31 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc31_22.2: %i32 = converted @__global_init.%int_1.loc31, %.loc31_22.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %i32.loc31: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %c: %i32 = wrapper_binding c, %.loc31_22.2
|
||||
// CHECK:STDOUT: %c: %i32 = wrapper_binding c, @__global_init.%.loc31_22.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %c.patt: %pattern_type.d94 = value_binding_pattern c [concrete = constants.%c.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %impl.elem0.loc40: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc40_20.1: <bound method> = bound_method @__global_init.%int_1.loc40, %impl.elem0.loc40 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn.loc40: <specific function> = specific_function %impl.elem0.loc40, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc40_20.2: <bound method> = bound_method @__global_init.%int_1.loc40, %specific_fn.loc40 [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc40: init %i32 = call %bound_method.loc40_20.2(@__global_init.%int_1.loc40) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc40_20.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc40 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc40_20.2: %i32 = converted @__global_init.%int_1.loc40, %.loc40_20.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %i32.loc40: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %d: %i32 = wrapper_binding d, %.loc40_20.2
|
||||
// CHECK:STDOUT: %d: %i32 = wrapper_binding d, @__global_init.%.loc40_20.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %d.patt: %pattern_type.d94 = value_binding_pattern d [concrete = constants.%d.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %impl.elem0.loc49: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc49_22.1: <bound method> = bound_method @__global_init.%int_1.loc49, %impl.elem0.loc49 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn.loc49: <specific function> = specific_function %impl.elem0.loc49, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc49_22.2: <bound method> = bound_method @__global_init.%int_1.loc49, %specific_fn.loc49 [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc49: init %i32 = call %bound_method.loc49_22.2(@__global_init.%int_1.loc49) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc49_22.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc49 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc49_22.2: %i32 = converted @__global_init.%int_1.loc49, %.loc49_22.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %i32.loc49: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %e: %i32 = wrapper_binding e, %.loc49_22.2
|
||||
// CHECK:STDOUT: %e: %i32 = wrapper_binding e, @__global_init.%.loc49_22.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %e.patt: %pattern_type.d94 = value_binding_pattern e [concrete = constants.%e.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %impl.elem0.loc66: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc66_28.1: <bound method> = bound_method @__global_init.%int_1.loc66, %impl.elem0.loc66 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn.loc66: <specific function> = specific_function %impl.elem0.loc66, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc66_28.2: <bound method> = bound_method @__global_init.%int_1.loc66, %specific_fn.loc66 [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc66: init %i32 = call %bound_method.loc66_28.2(@__global_init.%int_1.loc66) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc66_28.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc66 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc66_28.2: %i32 = converted @__global_init.%int_1.loc66, %.loc66_28.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %i32.loc66: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %f: %i32 = wrapper_binding f, %.loc66_28.2
|
||||
// CHECK:STDOUT: %f: %i32 = wrapper_binding f, @__global_init.%.loc66_28.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %f.patt: %pattern_type.d94 = value_binding_pattern f [concrete = constants.%f.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %impl.elem0.loc82: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc82_30.1: <bound method> = bound_method @__global_init.%int_1.loc82, %impl.elem0.loc82 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn.loc82: <specific function> = specific_function %impl.elem0.loc82, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc82_30.2: <bound method> = bound_method @__global_init.%int_1.loc82, %specific_fn.loc82 [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc82: init %i32 = call %bound_method.loc82_30.2(@__global_init.%int_1.loc82) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc82_30.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc82 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc82_30.2: %i32 = converted @__global_init.%int_1.loc82, %.loc82_30.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %i32.loc82: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %g: %i32 = wrapper_binding g, %.loc82_30.2
|
||||
// CHECK:STDOUT: %g: %i32 = wrapper_binding g, @__global_init.%.loc82_30.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %g.patt: %pattern_type.d94 = value_binding_pattern g [concrete = constants.%g.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %impl.elem0.loc99: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc99_32.1: <bound method> = bound_method @__global_init.%int_1.loc99, %impl.elem0.loc99 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn.loc99: <specific function> = specific_function %impl.elem0.loc99, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc99_32.2: <bound method> = bound_method @__global_init.%int_1.loc99, %specific_fn.loc99 [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc99: init %i32 = call %bound_method.loc99_32.2(@__global_init.%int_1.loc99) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc99_32.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc99 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc99_32.2: %i32 = converted @__global_init.%int_1.loc99, %.loc99_32.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %i32.loc99: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %h: %i32 = wrapper_binding h, %.loc99_32.2
|
||||
// CHECK:STDOUT: %h: %i32 = wrapper_binding h, @__global_init.%.loc99_32.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %h.patt: %pattern_type.d94 = value_binding_pattern h [concrete = constants.%h.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %impl.elem0.loc115: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc115_34.1: <bound method> = bound_method @__global_init.%int_1.loc115, %impl.elem0.loc115 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn.loc115: <specific function> = specific_function %impl.elem0.loc115, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc115_34.2: <bound method> = bound_method @__global_init.%int_1.loc115, %specific_fn.loc115 [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc115: init %i32 = call %bound_method.loc115_34.2(@__global_init.%int_1.loc115) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc115_34.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc115 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc115_34.2: %i32 = converted @__global_init.%int_1.loc115, %.loc115_34.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %i32.loc115: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %i: %i32 = wrapper_binding i, %.loc115_34.2
|
||||
// CHECK:STDOUT: %i: %i32 = wrapper_binding i, @__global_init.%.loc115_34.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %i.patt: %pattern_type.d94 = value_binding_pattern i [concrete = constants.%i.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -277,13 +221,69 @@ protected protected let i: i32 = 1;
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %int_1.loc22: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %impl.elem0.loc22: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc22_24.1: <bound method> = bound_method %int_1.loc22, %impl.elem0.loc22 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn.loc22: <specific function> = specific_function %impl.elem0.loc22, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc22_24.2: <bound method> = bound_method %int_1.loc22, %specific_fn.loc22 [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22: init %i32 = call %bound_method.loc22_24.2(%int_1.loc22) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc22_24.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc22 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc22_24.2: %i32 = converted %int_1.loc22, %.loc22_24.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %int_1.loc31: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %impl.elem0.loc31: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc31_22.1: <bound method> = bound_method %int_1.loc31, %impl.elem0.loc31 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn.loc31: <specific function> = specific_function %impl.elem0.loc31, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc31_22.2: <bound method> = bound_method %int_1.loc31, %specific_fn.loc31 [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc31: init %i32 = call %bound_method.loc31_22.2(%int_1.loc31) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc31_22.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc31 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc31_22.2: %i32 = converted %int_1.loc31, %.loc31_22.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %int_1.loc40: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %impl.elem0.loc40: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc40_20.1: <bound method> = bound_method %int_1.loc40, %impl.elem0.loc40 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn.loc40: <specific function> = specific_function %impl.elem0.loc40, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc40_20.2: <bound method> = bound_method %int_1.loc40, %specific_fn.loc40 [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc40: init %i32 = call %bound_method.loc40_20.2(%int_1.loc40) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc40_20.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc40 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc40_20.2: %i32 = converted %int_1.loc40, %.loc40_20.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %int_1.loc49: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %impl.elem0.loc49: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc49_22.1: <bound method> = bound_method %int_1.loc49, %impl.elem0.loc49 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn.loc49: <specific function> = specific_function %impl.elem0.loc49, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc49_22.2: <bound method> = bound_method %int_1.loc49, %specific_fn.loc49 [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc49: init %i32 = call %bound_method.loc49_22.2(%int_1.loc49) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc49_22.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc49 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc49_22.2: %i32 = converted %int_1.loc49, %.loc49_22.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %int_1.loc66: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %impl.elem0.loc66: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc66_28.1: <bound method> = bound_method %int_1.loc66, %impl.elem0.loc66 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn.loc66: <specific function> = specific_function %impl.elem0.loc66, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc66_28.2: <bound method> = bound_method %int_1.loc66, %specific_fn.loc66 [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc66: init %i32 = call %bound_method.loc66_28.2(%int_1.loc66) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc66_28.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc66 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc66_28.2: %i32 = converted %int_1.loc66, %.loc66_28.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %int_1.loc82: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %impl.elem0.loc82: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc82_30.1: <bound method> = bound_method %int_1.loc82, %impl.elem0.loc82 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn.loc82: <specific function> = specific_function %impl.elem0.loc82, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc82_30.2: <bound method> = bound_method %int_1.loc82, %specific_fn.loc82 [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc82: init %i32 = call %bound_method.loc82_30.2(%int_1.loc82) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc82_30.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc82 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc82_30.2: %i32 = converted %int_1.loc82, %.loc82_30.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %int_1.loc99: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %impl.elem0.loc99: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc99_32.1: <bound method> = bound_method %int_1.loc99, %impl.elem0.loc99 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn.loc99: <specific function> = specific_function %impl.elem0.loc99, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc99_32.2: <bound method> = bound_method %int_1.loc99, %specific_fn.loc99 [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc99: init %i32 = call %bound_method.loc99_32.2(%int_1.loc99) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc99_32.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc99 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc99_32.2: %i32 = converted %int_1.loc99, %.loc99_32.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %int_1.loc115: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %impl.elem0.loc115: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc115_34.1: <bound method> = bound_method %int_1.loc115, %impl.elem0.loc115 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn.loc115: <specific function> = specific_function %impl.elem0.loc115, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc115_34.2: <bound method> = bound_method %int_1.loc115, %specific_fn.loc115 [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc115: init %i32 = call %bound_method.loc115_34.2(%int_1.loc115) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc115_34.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc115 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc115_34.2: %i32 = converted %int_1.loc115, %.loc115_34.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
+6
-2
@@ -116,7 +116,8 @@ var b: T = *a;
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %a.var: ref <error> = var_storage %a.var_patt [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc10: type = splice_block %ptr [concrete = <error>] {
|
||||
// CHECK:STDOUT: %T.ref.loc10: type = name_ref T, imports.%Implicit.T
|
||||
// CHECK:STDOUT: %T.global_ref.loc10: type = global_ref imports.%Implicit.T
|
||||
// CHECK:STDOUT: %T.ref.loc10: type = name_ref T, %T.global_ref.loc10
|
||||
// CHECK:STDOUT: %ptr: type = ptr_type <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %a: <error> = wrapper_binding a, <error> [concrete = <error>]
|
||||
@@ -125,7 +126,10 @@ var b: T = *a;
|
||||
// CHECK:STDOUT: %a.var_patt: <error> = var_pattern %a.patt [concrete = <error>]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %b.var: ref <error> = var_storage %b.var_patt [concrete = <error>]
|
||||
// CHECK:STDOUT: %T.ref.loc17: type = name_ref T, imports.%Implicit.T
|
||||
// CHECK:STDOUT: %.1: <error> = splice_block <error> [concrete = <error>] {
|
||||
// CHECK:STDOUT: %T.global_ref.loc17: type = global_ref imports.%Implicit.T
|
||||
// CHECK:STDOUT: %T.ref.loc17: type = name_ref T, %T.global_ref.loc17
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %b: <error> = wrapper_binding b, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: <error> = ref_binding_pattern b [concrete = <error>]
|
||||
|
||||
+10
-9
@@ -85,15 +85,8 @@ fn F() -> i32 { return n; }
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %impl.elem0: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc15_14.1: <bound method> = bound_method @__global_init.%int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc15_14.2: <bound method> = bound_method @__global_init.%int_1, %specific_fn [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc15_14.2(@__global_init.%int_1) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc15_14.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc15_14.2: %i32 = converted @__global_init.%int_1, %.loc15_14.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %n: %i32 = wrapper_binding n, %.loc15_14.2
|
||||
// CHECK:STDOUT: %n: %i32 = wrapper_binding n, @__global_init.%.loc15_14.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %n.patt: %pattern_type.d94 = value_binding_pattern n [concrete = constants.%n.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -110,7 +103,8 @@ fn F() -> i32 { return n; }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @F() -> out %return.param: %i32 {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %n.ref: %i32 = name_ref n, file.%n
|
||||
// CHECK:STDOUT: %n.global_ref: %i32 = global_ref file.%n
|
||||
// CHECK:STDOUT: %n.ref: %i32 = name_ref n, %n.global_ref
|
||||
// CHECK:STDOUT: %impl.elem0: %.2b9 = impl_witness_access constants.%Copy.impl_witness.8af, element0 [concrete = constants.%Int.as.Copy.impl.Op.cae]
|
||||
// CHECK:STDOUT: %bound_method.loc17_24.1: <bound method> = bound_method %n.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]
|
||||
@@ -122,6 +116,13 @@ fn F() -> i32 { return n; }
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %impl.elem0: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc15_14.1: <bound method> = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc15_14.2: <bound method> = bound_method %int_1, %specific_fn [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc15_14.2(%int_1) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc15_14.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc15_14.2: %i32 = converted %int_1, %.loc15_14.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
+16
-14
@@ -50,13 +50,11 @@ let b: () = Other.a;
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
||||
// CHECK:STDOUT: .a = %a
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_14: %empty_tuple.type = converted @__global_init.%.loc4, %empty_tuple [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_9.1: type = splice_block %.loc4_9.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc4_9.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_9.3: type = converted %.loc4_9.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %a: %empty_tuple.type = wrapper_binding a, %.loc4_14
|
||||
// CHECK:STDOUT: %a: %empty_tuple.type = wrapper_binding a, @__global_init.%.loc4_14.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type = value_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -64,7 +62,9 @@ let b: () = Other.a;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc4: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_14.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_14.2: %empty_tuple.type = converted %.loc4_14.1, %empty_tuple [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -85,7 +85,7 @@ let b: () = Other.a;
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
||||
// CHECK:STDOUT: .a = imports.%Implicit.a
|
||||
// CHECK:STDOUT: .b = %b
|
||||
// CHECK:STDOUT: .b = @__global_init.%b
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Implicit.import = import Implicit
|
||||
// CHECK:STDOUT: %default.import = import <none>
|
||||
@@ -93,7 +93,6 @@ let b: () = Other.a;
|
||||
// CHECK:STDOUT: %.loc4_9.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_9.3: type = converted %.loc4_9.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %b: %empty_tuple.type = wrapper_binding b, @__global_init.%a.ref
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -101,7 +100,9 @@ let b: () = Other.a;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %a.ref: %empty_tuple.type = name_ref a, imports.%Implicit.a
|
||||
// CHECK:STDOUT: %a.global_ref: %empty_tuple.type = global_ref imports.%Implicit.a
|
||||
// CHECK:STDOUT: %a.ref: %empty_tuple.type = name_ref a, %a.global_ref
|
||||
// CHECK:STDOUT: %b: %empty_tuple.type = wrapper_binding b, %a.ref
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -119,13 +120,11 @@ let b: () = Other.a;
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
||||
// CHECK:STDOUT: .a = %a
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_14: %empty_tuple.type = converted @__global_init.%.loc4, %empty_tuple [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_9.1: type = splice_block %.loc4_9.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc4_9.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_9.3: type = converted %.loc4_9.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %a: %empty_tuple.type = wrapper_binding a, %.loc4_14
|
||||
// CHECK:STDOUT: %a: %empty_tuple.type = wrapper_binding a, @__global_init.%.loc4_14.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type = value_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -133,7 +132,9 @@ let b: () = Other.a;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc4: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_14.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_14.2: %empty_tuple.type = converted %.loc4_14.1, %empty_tuple [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -158,14 +159,13 @@ let b: () = Other.a;
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
||||
// CHECK:STDOUT: .Other = imports.%Other
|
||||
// CHECK:STDOUT: .b = %b
|
||||
// CHECK:STDOUT: .b = @__global_init.%b
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Other.import = import Other
|
||||
// CHECK:STDOUT: %.loc4_9.1: type = splice_block %.loc4_9.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc4_9.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_9.3: type = converted %.loc4_9.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %b: %empty_tuple.type = wrapper_binding b, @__global_init.%a.ref
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -174,7 +174,9 @@ let b: () = Other.a;
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %Other.ref: <namespace> = name_ref Other, imports.%Other [concrete = imports.%Other]
|
||||
// CHECK:STDOUT: %a.ref: %empty_tuple.type = name_ref a, imports.%Other.a
|
||||
// CHECK:STDOUT: %a.global_ref: %empty_tuple.type = global_ref imports.%Other.a
|
||||
// CHECK:STDOUT: %a.ref: %empty_tuple.type = name_ref a, %a.global_ref
|
||||
// CHECK:STDOUT: %b: %empty_tuple.type = wrapper_binding b, %a.ref
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
+8
-7
@@ -75,13 +75,11 @@ let v2: () = Test.v;
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
||||
// CHECK:STDOUT: .v [private] = %v
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_22: %empty_tuple.type = converted @__global_init.%.loc4, %empty_tuple [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_17.1: type = splice_block %.loc4_17.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc4_17.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_17.3: type = converted %.loc4_17.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %v: %empty_tuple.type = wrapper_binding v, %.loc4_22
|
||||
// CHECK:STDOUT: %v: %empty_tuple.type = wrapper_binding v, @__global_init.%.loc4_22.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %v.patt: %pattern_type = value_binding_pattern v [concrete = constants.%v.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -89,7 +87,9 @@ let v2: () = Test.v;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc4: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_22.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_22.2: %empty_tuple.type = converted %.loc4_22.1, %empty_tuple [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -110,7 +110,7 @@ let v2: () = Test.v;
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
||||
// CHECK:STDOUT: .v [private] = imports.%Test.v
|
||||
// CHECK:STDOUT: .v2 = %v2
|
||||
// CHECK:STDOUT: .v2 = @__global_init.%v2
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Test.import = import Test
|
||||
// CHECK:STDOUT: %default.import = import <none>
|
||||
@@ -118,7 +118,6 @@ let v2: () = Test.v;
|
||||
// CHECK:STDOUT: %.loc4_10.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_10.3: type = converted %.loc4_10.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %v2: %empty_tuple.type = wrapper_binding v2, @__global_init.%v.ref
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %v2.patt: %pattern_type = value_binding_pattern v2 [concrete = constants.%v2.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -126,7 +125,9 @@ let v2: () = Test.v;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %v.ref: %empty_tuple.type = name_ref v, imports.%Test.v
|
||||
// CHECK:STDOUT: %v.global_ref: %empty_tuple.type = global_ref imports.%Test.v
|
||||
// CHECK:STDOUT: %v.ref: %empty_tuple.type = name_ref v, %v.global_ref
|
||||
// CHECK:STDOUT: %v2: %empty_tuple.type = wrapper_binding v2, %v.ref
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -171,7 +171,7 @@ let x: i32 = c[0];
|
||||
// CHECK:STDOUT: .SubscriptType = %SubscriptType.decl
|
||||
// CHECK:STDOUT: .s = %s
|
||||
// CHECK:STDOUT: .c = %c
|
||||
// CHECK:STDOUT: .x = %x
|
||||
// CHECK:STDOUT: .x = @__global_init.%x
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
|
||||
@@ -201,30 +201,17 @@ let x: i32 = c[0];
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc8: <witness> = impl_self_witness @C.as.IndexWith.impl.%C.ref, @IndexWith, @IndexWith(constants.%SubscriptType.f8f) [concrete = constants.%.7ae]
|
||||
// CHECK:STDOUT: %.loc14_25.1: ref %SubscriptType.f8f = temporary_storage
|
||||
// CHECK:STDOUT: %.loc14_25.2: init %SubscriptType.f8f to %.loc14_25.1 = class_init () [concrete = constants.%SubscriptType.val]
|
||||
// CHECK:STDOUT: %.loc14_25.3: init %SubscriptType.f8f = converted @__global_init.%.loc14, %.loc14_25.2 [concrete = constants.%SubscriptType.val]
|
||||
// CHECK:STDOUT: %.loc14_25.4: ref %SubscriptType.f8f = temporary %.loc14_25.1, %.loc14_25.3 [concrete = constants.%.b1d]
|
||||
// CHECK:STDOUT: %.loc14_25.5: %SubscriptType.f8f = acquire_value %.loc14_25.4 [concrete = constants.%SubscriptType.val]
|
||||
// CHECK:STDOUT: %SubscriptType.ref: type = name_ref SubscriptType, %SubscriptType.decl [concrete = constants.%SubscriptType.f8f]
|
||||
// CHECK:STDOUT: %s: %SubscriptType.f8f = wrapper_binding s, %.loc14_25.5
|
||||
// CHECK:STDOUT: %s: %SubscriptType.f8f = wrapper_binding s, @__global_init.%.loc14_25.6
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %s.patt: %pattern_type.ea5 = value_binding_pattern s [concrete = constants.%s.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc15_13.1: ref %C = temporary_storage
|
||||
// CHECK:STDOUT: %.loc15_13.2: init %C to %.loc15_13.1 = class_init () [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %.loc15_13.3: init %C = converted @__global_init.%.loc15, %.loc15_13.2 [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %.loc15_13.4: ref %C = temporary %.loc15_13.1, %.loc15_13.3 [concrete = constants.%.115]
|
||||
// CHECK:STDOUT: %.loc15_13.5: %C = acquire_value %.loc15_13.4 [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [concrete = constants.%C]
|
||||
// CHECK:STDOUT: %c: %C = wrapper_binding c, %.loc15_13.5
|
||||
// CHECK:STDOUT: %c: %C = wrapper_binding c, @__global_init.%.loc15_13.6
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %c.patt: %pattern_type.98b = value_binding_pattern c [concrete = constants.%c.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc16_25.1: ref %ElementType = temporary @__global_init.%.loc16, @__global_init.%C.as.IndexWith.impl.At.call
|
||||
// CHECK:STDOUT: %.loc16_25.2: %ElementType = acquire_value %.loc16_25.1
|
||||
// CHECK:STDOUT: %ElementType.ref: type = name_ref ElementType, %ElementType.decl [concrete = constants.%ElementType]
|
||||
// CHECK:STDOUT: %x: %ElementType = wrapper_binding x, %.loc16_25.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type.67c = value_binding_pattern x [concrete = constants.%x.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -299,14 +286,29 @@ let x: i32 = c[0];
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc14: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc15: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %c.ref: %C = name_ref c, file.%c
|
||||
// CHECK:STDOUT: %s.ref: %SubscriptType.f8f = name_ref s, file.%s
|
||||
// CHECK:STDOUT: %.loc14_25.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc14_25.2: ref %SubscriptType.f8f = temporary_storage
|
||||
// CHECK:STDOUT: %.loc14_25.3: init %SubscriptType.f8f to %.loc14_25.2 = class_init () [concrete = constants.%SubscriptType.val]
|
||||
// CHECK:STDOUT: %.loc14_25.4: init %SubscriptType.f8f = converted %.loc14_25.1, %.loc14_25.3 [concrete = constants.%SubscriptType.val]
|
||||
// CHECK:STDOUT: %.loc14_25.5: ref %SubscriptType.f8f = temporary %.loc14_25.2, %.loc14_25.4 [concrete = constants.%.b1d]
|
||||
// CHECK:STDOUT: %.loc14_25.6: %SubscriptType.f8f = acquire_value %.loc14_25.5 [concrete = constants.%SubscriptType.val]
|
||||
// CHECK:STDOUT: %.loc15_13.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc15_13.2: ref %C = temporary_storage
|
||||
// CHECK:STDOUT: %.loc15_13.3: init %C to %.loc15_13.2 = class_init () [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %.loc15_13.4: init %C = converted %.loc15_13.1, %.loc15_13.3 [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %.loc15_13.5: ref %C = temporary %.loc15_13.2, %.loc15_13.4 [concrete = constants.%.115]
|
||||
// CHECK:STDOUT: %.loc15_13.6: %C = acquire_value %.loc15_13.5 [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %c.global_ref: %C = global_ref file.%c
|
||||
// CHECK:STDOUT: %c.ref: %C = name_ref c, %c.global_ref
|
||||
// CHECK:STDOUT: %s.global_ref: %SubscriptType.f8f = global_ref file.%s
|
||||
// CHECK:STDOUT: %s.ref: %SubscriptType.f8f = name_ref s, %s.global_ref
|
||||
// CHECK:STDOUT: %impl.elem1: %.1f5 = impl_witness_access constants.%IndexWith.impl_witness.ae9, element1 [concrete = constants.%C.as.IndexWith.impl.At]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %c.ref, %impl.elem1
|
||||
// CHECK:STDOUT: %.loc16: ref %ElementType = temporary_storage
|
||||
// CHECK:STDOUT: %C.as.IndexWith.impl.At.call: init %ElementType to %.loc16 = call %bound_method(%c.ref, %s.ref)
|
||||
// CHECK:STDOUT: %.loc16_25.1: ref %ElementType = temporary_storage
|
||||
// CHECK:STDOUT: %C.as.IndexWith.impl.At.call: init %ElementType to %.loc16_25.1 = call %bound_method(%c.ref, %s.ref)
|
||||
// CHECK:STDOUT: %.loc16_25.2: ref %ElementType = temporary %.loc16_25.1, %C.as.IndexWith.impl.At.call
|
||||
// CHECK:STDOUT: %.loc16_25.3: %ElementType = acquire_value %.loc16_25.2
|
||||
// CHECK:STDOUT: %x: %ElementType = wrapper_binding x, %.loc16_25.3
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -417,26 +419,18 @@ let x: i32 = c[0];
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc8: <witness> = impl_self_witness @tuple.type.as.IndexWith.impl.%.loc8_11.2, @IndexWith, @IndexWith(Core.IntLiteral) [concrete = constants.%.a1a]
|
||||
// CHECK:STDOUT: %tuple: %tuple.type.748 = tuple_value (@__global_init.%.loc14_21.2, @__global_init.%.loc14_30.2) [concrete = constants.%tuple.adf]
|
||||
// CHECK:STDOUT: %.loc14_34: %tuple.type.748 = converted @__global_init.%.loc14_34, %tuple [concrete = constants.%tuple.adf]
|
||||
// CHECK:STDOUT: %.loc14_13.1: type = splice_block %.loc14_13.3 [concrete = constants.%tuple.type.748] {
|
||||
// CHECK:STDOUT: %C.ref.loc14_9: type = name_ref C, %C.decl [concrete = constants.%C]
|
||||
// CHECK:STDOUT: %C.ref.loc14_12: type = name_ref C, %C.decl [concrete = constants.%C]
|
||||
// CHECK:STDOUT: %.loc14_13.2: %tuple.type.693 = tuple_literal (%C.ref.loc14_9, %C.ref.loc14_12) [concrete = constants.%tuple.391]
|
||||
// CHECK:STDOUT: %.loc14_13.3: type = converted %.loc14_13.2, constants.%tuple.type.748 [concrete = constants.%tuple.type.748]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %s: %tuple.type.748 = wrapper_binding s, %.loc14_34
|
||||
// CHECK:STDOUT: %s: %tuple.type.748 = wrapper_binding s, @__global_init.%.loc14_34.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %s.patt: %pattern_type.8b4 = value_binding_pattern s [concrete = constants.%s.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc15_15.1: init %empty_tuple.type = as_compatible @__global_init.%tuple.type.as.IndexWith.impl.At.call
|
||||
// CHECK:STDOUT: %.loc15_15.2: ref %empty_tuple.type = temporary_storage
|
||||
// CHECK:STDOUT: %.loc15_15.3: ref %empty_tuple.type = temporary %.loc15_15.2, %.loc15_15.1
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple.af4]
|
||||
// CHECK:STDOUT: %.loc15_15.4: %C = as_compatible %empty_tuple [concrete = constants.%empty_tuple.4db]
|
||||
// CHECK:STDOUT: %.loc15_15.5: %C = converted @__global_init.%tuple.type.as.IndexWith.impl.At.call, %.loc15_15.4 [concrete = constants.%empty_tuple.4db]
|
||||
// CHECK:STDOUT: %C.ref.loc15: type = name_ref C, %C.decl [concrete = constants.%C]
|
||||
// CHECK:STDOUT: %e: %C = wrapper_binding e, %.loc15_15.5
|
||||
// CHECK:STDOUT: %e: %C = wrapper_binding e, @__global_init.%.loc15_15.5
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %e.patt: %pattern_type.98b = value_binding_pattern e [concrete = constants.%e.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -511,12 +505,21 @@ let x: i32 = c[0];
|
||||
// CHECK:STDOUT: %empty_tuple.loc14_28: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple.af4]
|
||||
// CHECK:STDOUT: %.loc14_30.1: %C = as_compatible %empty_tuple.loc14_28 [concrete = constants.%empty_tuple.4db]
|
||||
// CHECK:STDOUT: %.loc14_30.2: %C = converted %.loc14_28, %.loc14_30.1 [concrete = constants.%empty_tuple.4db]
|
||||
// CHECK:STDOUT: %.loc14_34: %tuple.type.748 = tuple_literal (%.loc14_21.2, %.loc14_30.2) [concrete = constants.%tuple.adf]
|
||||
// CHECK:STDOUT: %s.ref: %tuple.type.748 = name_ref s, file.%s
|
||||
// CHECK:STDOUT: %.loc14_34.1: %tuple.type.748 = tuple_literal (%.loc14_21.2, %.loc14_30.2) [concrete = constants.%tuple.adf]
|
||||
// CHECK:STDOUT: %tuple: %tuple.type.748 = tuple_value (%.loc14_21.2, %.loc14_30.2) [concrete = constants.%tuple.adf]
|
||||
// CHECK:STDOUT: %.loc14_34.2: %tuple.type.748 = converted %.loc14_34.1, %tuple [concrete = constants.%tuple.adf]
|
||||
// CHECK:STDOUT: %s.global_ref: %tuple.type.748 = global_ref file.%s
|
||||
// CHECK:STDOUT: %s.ref: %tuple.type.748 = name_ref s, %s.global_ref
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
|
||||
// CHECK:STDOUT: %impl.elem1: %.12a = impl_witness_access constants.%IndexWith.impl_witness.b92, element1 [concrete = constants.%tuple.type.as.IndexWith.impl.At]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %s.ref, %impl.elem1
|
||||
// CHECK:STDOUT: %tuple.type.as.IndexWith.impl.At.call: init %C = call %bound_method(%s.ref, %int_0)
|
||||
// CHECK:STDOUT: %.loc15_15.1: init %empty_tuple.type = as_compatible %tuple.type.as.IndexWith.impl.At.call
|
||||
// CHECK:STDOUT: %.loc15_15.2: ref %empty_tuple.type = temporary_storage
|
||||
// CHECK:STDOUT: %.loc15_15.3: ref %empty_tuple.type = temporary %.loc15_15.2, %.loc15_15.1
|
||||
// CHECK:STDOUT: %empty_tuple.loc15: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple.af4]
|
||||
// CHECK:STDOUT: %.loc15_15.4: %C = as_compatible %empty_tuple.loc15 [concrete = constants.%empty_tuple.4db]
|
||||
// CHECK:STDOUT: %.loc15_15.5: %C = converted %tuple.type.as.IndexWith.impl.At.call, %.loc15_15.4 [concrete = constants.%empty_tuple.4db]
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -623,13 +626,8 @@ let x: i32 = c[0];
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc8: <witness> = impl_self_witness @C.as.IndexWith.impl.%C.ref, @IndexWith, @IndexWith(constants.%SubscriptType.f8f) [concrete = constants.%.7ae]
|
||||
// CHECK:STDOUT: %.loc14_13.1: ref %C = temporary_storage
|
||||
// CHECK:STDOUT: %.loc14_13.2: init %C to %.loc14_13.1 = class_init () [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %.loc14_13.3: init %C = converted @__global_init.%.loc14, %.loc14_13.2 [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %.loc14_13.4: ref %C = temporary %.loc14_13.1, %.loc14_13.3 [concrete = constants.%.115]
|
||||
// CHECK:STDOUT: %.loc14_13.5: %C = acquire_value %.loc14_13.4 [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [concrete = constants.%C]
|
||||
// CHECK:STDOUT: %c: %C = wrapper_binding c, %.loc14_13.5
|
||||
// CHECK:STDOUT: %c: %C = wrapper_binding c, @__global_init.%.loc14_13.6
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %c.patt: %pattern_type.98b = value_binding_pattern c [concrete = constants.%c.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -709,8 +707,14 @@ let x: i32 = c[0];
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc14: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %c.ref: %C = name_ref c, file.%c
|
||||
// CHECK:STDOUT: %.loc14_13.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc14_13.2: ref %C = temporary_storage
|
||||
// CHECK:STDOUT: %.loc14_13.3: init %C to %.loc14_13.2 = class_init () [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %.loc14_13.4: init %C = converted %.loc14_13.1, %.loc14_13.3 [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %.loc14_13.5: ref %C = temporary %.loc14_13.2, %.loc14_13.4 [concrete = constants.%.115]
|
||||
// CHECK:STDOUT: %.loc14_13.6: %C = acquire_value %.loc14_13.5 [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %c.global_ref: %C = global_ref file.%c
|
||||
// CHECK:STDOUT: %c.ref: %C = name_ref c, %c.global_ref
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
@@ -762,13 +766,8 @@ let x: i32 = c[0];
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %C.decl: type = class_decl @C [concrete = constants.%C] {} {}
|
||||
// CHECK:STDOUT: %.loc6_13.1: ref %C = temporary_storage
|
||||
// CHECK:STDOUT: %.loc6_13.2: init %C to %.loc6_13.1 = class_init () [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %.loc6_13.3: init %C = converted @__global_init.%.loc6, %.loc6_13.2 [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %.loc6_13.4: ref %C = temporary %.loc6_13.1, %.loc6_13.3 [concrete = constants.%.115]
|
||||
// CHECK:STDOUT: %.loc6_13.5: %C = acquire_value %.loc6_13.4 [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %C.ref: type = name_ref C, %C.decl [concrete = constants.%C]
|
||||
// CHECK:STDOUT: %c: %C = wrapper_binding c, %.loc6_13.5
|
||||
// CHECK:STDOUT: %c: %C = wrapper_binding c, @__global_init.%.loc6_13.6
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %c.patt: %pattern_type.98b = value_binding_pattern c [concrete = constants.%c.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -789,8 +788,14 @@ let x: i32 = c[0];
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc6: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %c.ref: %C = name_ref c, file.%c
|
||||
// CHECK:STDOUT: %.loc6_13.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc6_13.2: ref %C = temporary_storage
|
||||
// CHECK:STDOUT: %.loc6_13.3: init %C to %.loc6_13.2 = class_init () [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %.loc6_13.4: init %C = converted %.loc6_13.1, %.loc6_13.3 [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %.loc6_13.5: ref %C = temporary %.loc6_13.2, %.loc6_13.4 [concrete = constants.%.115]
|
||||
// CHECK:STDOUT: %.loc6_13.6: %C = acquire_value %.loc6_13.5 [concrete = constants.%C.val]
|
||||
// CHECK:STDOUT: %c.global_ref: %C = global_ref file.%c
|
||||
// CHECK:STDOUT: %c.ref: %C = name_ref c, %c.global_ref
|
||||
// CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
+10
-10
@@ -506,8 +506,7 @@ let n: type = i32;
|
||||
// CHECK:STDOUT: .n = %n
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %.loc29_17: %X = converted @__global_init.%.loc29_17.3, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc29_12: type = splice_block %X.ref [concrete = constants.%X] {
|
||||
// CHECK:STDOUT: %.loc29: type = splice_block %X.ref [concrete = constants.%X] {
|
||||
// CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core [concrete = imports.%Core]
|
||||
// CHECK:STDOUT: %X.ref: type = name_ref X, imports.%Core.X [concrete = constants.%X]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -577,6 +576,7 @@ let n: type = i32;
|
||||
// CHECK:STDOUT: %Int.call: init %X to %.loc29_17.1 = call %Int.specific_fn()
|
||||
// CHECK:STDOUT: %.loc29_17.2: type = converted %Int.call, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc29_17.3: type = type_literal <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc29_17.4: %X = converted %.loc29_17.3, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -706,13 +706,8 @@ let n: type = i32;
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %N.loc6_28.2: @Int.%T.loc6_12.1 (%T) = symbolic_binding N, 1 [symbolic = %N.loc6_28.1 (constants.%N)]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc8_15.1: ref %Int.3c6 = temporary_storage
|
||||
// CHECK:STDOUT: %.loc8_15.2: init %Int.3c6 to %.loc8_15.1 = class_init () [concrete = constants.%Int.val]
|
||||
// CHECK:STDOUT: %.loc8_15.3: init %Int.3c6 = converted @__global_init.%.loc8, %.loc8_15.2 [concrete = constants.%Int.val]
|
||||
// CHECK:STDOUT: %.loc8_15.4: ref %Int.3c6 = temporary %.loc8_15.1, %.loc8_15.3 [concrete = constants.%.10c]
|
||||
// CHECK:STDOUT: %.loc8_15.5: %Int.3c6 = acquire_value %.loc8_15.4 [concrete = constants.%Int.val]
|
||||
// CHECK:STDOUT: %.loc8_8: type = type_literal constants.%Int.3c6 [concrete = constants.%Int.3c6]
|
||||
// CHECK:STDOUT: %n: %Int.3c6 = wrapper_binding n, %.loc8_15.5
|
||||
// CHECK:STDOUT: %.loc8: type = type_literal constants.%Int.3c6 [concrete = constants.%Int.3c6]
|
||||
// CHECK:STDOUT: %n: %Int.3c6 = wrapper_binding n, @__global_init.%.loc8_15.6
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %n.patt: %pattern_type.27f = value_binding_pattern n [concrete = constants.%n.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -738,7 +733,12 @@ let n: type = i32;
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc8: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc8_15.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc8_15.2: ref %Int.3c6 = temporary_storage
|
||||
// CHECK:STDOUT: %.loc8_15.3: init %Int.3c6 to %.loc8_15.2 = class_init () [concrete = constants.%Int.val]
|
||||
// CHECK:STDOUT: %.loc8_15.4: init %Int.3c6 = converted %.loc8_15.1, %.loc8_15.3 [concrete = constants.%Int.val]
|
||||
// CHECK:STDOUT: %.loc8_15.5: ref %Int.3c6 = temporary %.loc8_15.2, %.loc8_15.4 [concrete = constants.%.10c]
|
||||
// CHECK:STDOUT: %.loc8_15.6: %Int.3c6 = acquire_value %.loc8_15.5 [concrete = constants.%Int.val]
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+275
-199
@@ -254,34 +254,35 @@ let {.a = b: (), a: ()} = {.a = ()};
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
//@dump-sem-ir-begin
|
||||
class C{
|
||||
// CHECK:STDERR: ╭─┤ fail_in_class_var.carbon:[[@LINE+7]]:9
|
||||
// CHECK:STDERR: -> │ var {.a = x: ()};
|
||||
// CHECK:STDERR: · ━━━━━━┳━━━━━
|
||||
// CHECK:STDERR: · ┗━━┫ error: found struct pattern in class member var declaration
|
||||
// CHECK:STDERR: · ┃ [FieldWithStructPattern]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
var {.a = x: ()};
|
||||
class C {
|
||||
// CHECK:STDERR: ╭─┤ fail_in_class_var.carbon:[[@LINE+7]]:7
|
||||
// CHECK:STDERR: -> │ var {.a = x: ()};
|
||||
// CHECK:STDERR: · ━━━━━━┳━━━━━
|
||||
// CHECK:STDERR: · ┗━━┫ error: struct pattern in field declaration
|
||||
// CHECK:STDERR: · ┃ [FieldWithStructPattern]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
var {.a = x: ()};
|
||||
}
|
||||
//@dump-sem-ir-end
|
||||
|
||||
// --- fail_in_class_let.carbon
|
||||
// --- in_static_class_var.carbon
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
//@dump-sem-ir-begin
|
||||
class C{
|
||||
// CHECK:STDERR: ╭─┤ fail_in_class_let.carbon:[[@LINE+7]]:9
|
||||
// CHECK:STDERR: -> │ let {.a = x: ()} = {.a = ()};
|
||||
// CHECK:STDERR: · ━━━━━━┳━━━━━
|
||||
// CHECK:STDERR: · ┗━━┫ error: found struct pattern in class member let declaration
|
||||
// CHECK:STDERR: · ┃ [FieldWithStructPattern]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
let {.a = x: ()} = {.a = ()};
|
||||
|
||||
class C {
|
||||
//@dump-sem-ir-begin
|
||||
static var {.a = x: ()};
|
||||
//@dump-sem-ir-end
|
||||
}
|
||||
|
||||
// --- in_class_let.carbon
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
class C {
|
||||
//@dump-sem-ir-begin
|
||||
let {.a = x: ()} = {.a = ()};
|
||||
//@dump-sem-ir-end
|
||||
}
|
||||
//@dump-sem-ir-end
|
||||
|
||||
// --- fail_incorrect_field_type.carbon
|
||||
|
||||
@@ -330,16 +331,16 @@ let {.a = x: ()} = ((), ());
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc5_6.1: %empty_struct_type = converted @__global_init.%.loc5, %empty_struct [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %.loc5_6.2: %pattern_type = struct_pattern () [concrete = constants.%.931]
|
||||
// CHECK:STDOUT: %.loc5: %pattern_type = struct_pattern () [concrete = constants.%.931]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc5: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc5_11: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc5_6: %empty_struct_type = converted %.loc5_11, %empty_struct [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -358,26 +359,26 @@ let {.a = x: ()} = ((), ());
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_28: %empty_tuple.type = converted @__global_init.%.loc5_27, %empty_tuple [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %struct: %struct_type.a = struct_value (%.loc5_28) [concrete = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc5_16.1: %struct_type.a = converted @__global_init.%.loc5_28, %struct [concrete = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc5_16.2: %empty_tuple.type = struct_access %.loc5_16.1, element0 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_15.1: type = splice_block %.loc5_15.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc5_15.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_15.3: type = converted %.loc5_15.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %b: %empty_tuple.type = wrapper_binding b, %.loc5_16.2
|
||||
// CHECK:STDOUT: %b: %empty_tuple.type = wrapper_binding b, @__global_init.%.loc5_16.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.cb1 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: %.loc5_16.3: %pattern_type.e85 = struct_pattern (%b.patt) [concrete = constants.%.140]
|
||||
// CHECK:STDOUT: %.loc5_16: %pattern_type.e85 = struct_pattern (%b.patt) [concrete = constants.%.140]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc5_27: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_28: %struct_type.a = struct_literal (%.loc5_27) [concrete = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc5_28.1: %struct_type.a = struct_literal (%.loc5_27) [concrete = constants.%struct]
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_28.2: %empty_tuple.type = converted %.loc5_27, %empty_tuple [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %struct: %struct_type.a = struct_value (%.loc5_28.2) [concrete = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc5_16.1: %struct_type.a = converted %.loc5_28.1, %struct [concrete = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc5_16.2: %empty_tuple.type = struct_access %.loc5_16.1, element0 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -421,25 +422,14 @@ let {.a = x: ()} = ((), ());
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %impl.elem0: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc5_53.1: <bound method> = bound_method @__global_init.%int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc5_53.2: <bound method> = bound_method @__global_init.%int_1, %specific_fn [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc5_53.2(@__global_init.%int_1) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_53.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_53.2: %i32 = converted @__global_init.%int_1, %.loc5_53.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %struct: %struct_type.a.c.11f = struct_value (%.loc5_53.2, @__global_init.%true) [concrete = constants.%struct.78d]
|
||||
// CHECK:STDOUT: %.loc5_31.1: %struct_type.a.c.11f = converted @__global_init.%.loc5, %struct [concrete = constants.%struct.78d]
|
||||
// CHECK:STDOUT: %.loc5_31.2: %i32 = struct_access %.loc5_31.1, element0 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_31.3: bool = struct_access %.loc5_31.1, element1 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %b: %i32 = wrapper_binding b, %.loc5_31.2
|
||||
// CHECK:STDOUT: %b: %i32 = wrapper_binding b, @__global_init.%.loc5_31.2
|
||||
// CHECK:STDOUT: %.loc5_27: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %d: bool = wrapper_binding d, %.loc5_31.3
|
||||
// CHECK:STDOUT: %d: bool = wrapper_binding d, @__global_init.%.loc5_31.3
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.d94 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: %d.patt: %pattern_type.831 = value_binding_pattern d [concrete = constants.%d.patt]
|
||||
// CHECK:STDOUT: %.loc5_31.4: %pattern_type.e6b = struct_pattern (%b.patt, %d.patt) [concrete = constants.%.d0e]
|
||||
// CHECK:STDOUT: %.loc5_31: %pattern_type.e6b = struct_pattern (%b.patt, %d.patt) [concrete = constants.%.d0e]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -447,7 +437,18 @@ let {.a = x: ()} = ((), ());
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc5: %struct_type.a.c.bbc = struct_literal (%int_1, %true) [concrete = constants.%struct.7e6]
|
||||
// CHECK:STDOUT: %.loc5_53.1: %struct_type.a.c.bbc = struct_literal (%int_1, %true) [concrete = constants.%struct.7e6]
|
||||
// CHECK:STDOUT: %impl.elem0: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc5_53.1: <bound method> = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc5_53.2: <bound method> = bound_method %int_1, %specific_fn [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc5_53.2(%int_1) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_53.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_53.3: %i32 = converted %int_1, %.loc5_53.2 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %struct: %struct_type.a.c.11f = struct_value (%.loc5_53.3, %true) [concrete = constants.%struct.78d]
|
||||
// CHECK:STDOUT: %.loc5_31.1: %struct_type.a.c.11f = converted %.loc5_53.1, %struct [concrete = constants.%struct.78d]
|
||||
// CHECK:STDOUT: %.loc5_31.2: %i32 = struct_access %.loc5_31.1, element0 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_31.3: bool = struct_access %.loc5_31.1, element1 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -466,26 +467,26 @@ let {.a = x: ()} = ((), ());
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_23: %empty_tuple.type = converted @__global_init.%.loc5_22, %empty_tuple [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %struct: %struct_type.a = struct_value (%.loc5_23) [concrete = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc5_11.1: %struct_type.a = converted @__global_init.%.loc5_23, %struct [concrete = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc5_11.2: %empty_tuple.type = struct_access %.loc5_11.1, element0 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_10.1: type = splice_block %.loc5_10.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc5_10.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_10.3: type = converted %.loc5_10.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %a: %empty_tuple.type = wrapper_binding a, %.loc5_11.2
|
||||
// CHECK:STDOUT: %a: %empty_tuple.type = wrapper_binding a, @__global_init.%.loc5_11.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.cb1 = value_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: %.loc5_11.3: %pattern_type.e85 = struct_pattern (%a.patt) [concrete = constants.%.e73]
|
||||
// CHECK:STDOUT: %.loc5_11: %pattern_type.e85 = struct_pattern (%a.patt) [concrete = constants.%.e73]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc5_22: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_23: %struct_type.a = struct_literal (%.loc5_22) [concrete = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc5_23.1: %struct_type.a = struct_literal (%.loc5_22) [concrete = constants.%struct]
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_23.2: %empty_tuple.type = converted %.loc5_22, %empty_tuple [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %struct: %struct_type.a = struct_value (%.loc5_23.2) [concrete = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc5_11.1: %struct_type.a = converted %.loc5_23.1, %struct [concrete = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc5_11.2: %empty_tuple.type = struct_access %.loc5_11.1, element0 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -529,25 +530,14 @@ let {.a = x: ()} = ((), ());
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %impl.elem0: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc5_43.1: <bound method> = bound_method @__global_init.%int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc5_43.2: <bound method> = bound_method @__global_init.%int_1, %specific_fn [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc5_43.2(@__global_init.%int_1) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_43.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_43.2: %i32 = converted @__global_init.%int_1, %.loc5_43.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %struct: %struct_type.a.b.214 = struct_value (%.loc5_43.2, @__global_init.%true) [concrete = constants.%struct.75c]
|
||||
// CHECK:STDOUT: %.loc5_21.1: %struct_type.a.b.214 = converted @__global_init.%.loc5, %struct [concrete = constants.%struct.75c]
|
||||
// CHECK:STDOUT: %.loc5_21.2: %i32 = struct_access %.loc5_21.1, element0 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_21.3: bool = struct_access %.loc5_21.1, element1 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %a: %i32 = wrapper_binding a, %.loc5_21.2
|
||||
// CHECK:STDOUT: %a: %i32 = wrapper_binding a, @__global_init.%.loc5_21.2
|
||||
// CHECK:STDOUT: %.loc5_17: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %b: bool = wrapper_binding b, %.loc5_21.3
|
||||
// CHECK:STDOUT: %b: bool = wrapper_binding b, @__global_init.%.loc5_21.3
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.d94 = value_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.831 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: %.loc5_21.4: %pattern_type.269 = struct_pattern (%a.patt, %b.patt) [concrete = constants.%.4eb]
|
||||
// CHECK:STDOUT: %.loc5_21: %pattern_type.269 = struct_pattern (%a.patt, %b.patt) [concrete = constants.%.4eb]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -555,7 +545,18 @@ let {.a = x: ()} = ((), ());
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc5: %struct_type.a.b.f6e = struct_literal (%int_1, %true) [concrete = constants.%struct.1e1]
|
||||
// CHECK:STDOUT: %.loc5_43.1: %struct_type.a.b.f6e = struct_literal (%int_1, %true) [concrete = constants.%struct.1e1]
|
||||
// CHECK:STDOUT: %impl.elem0: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc5_43.1: <bound method> = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc5_43.2: <bound method> = bound_method %int_1, %specific_fn [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc5_43.2(%int_1) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_43.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_43.3: %i32 = converted %int_1, %.loc5_43.2 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %struct: %struct_type.a.b.214 = struct_value (%.loc5_43.3, %true) [concrete = constants.%struct.75c]
|
||||
// CHECK:STDOUT: %.loc5_21.1: %struct_type.a.b.214 = converted %.loc5_43.1, %struct [concrete = constants.%struct.75c]
|
||||
// CHECK:STDOUT: %.loc5_21.2: %i32 = struct_access %.loc5_21.1, element0 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_21.3: bool = struct_access %.loc5_21.1, element1 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -575,28 +576,20 @@ let {.a = x: ()} = ((), ());
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %empty_tuple.loc5_34: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_44.1: %empty_tuple.type = converted @__global_init.%.loc5_34, %empty_tuple.loc5_34 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %empty_tuple.loc5_43: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_44.2: %empty_tuple.type = converted @__global_init.%.loc5_43, %empty_tuple.loc5_43 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %struct: %struct_type.a.c = struct_value (%.loc5_44.1, %.loc5_44.2) [concrete = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc5_23.1: %struct_type.a.c = converted @__global_init.%.loc5_44, %struct [concrete = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc5_23.2: %empty_tuple.type = struct_access %.loc5_23.1, element0 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_23.3: %empty_tuple.type = struct_access %.loc5_23.1, element1 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_15.1: type = splice_block %.loc5_15.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc5_15.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_15.3: type = converted %.loc5_15.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %b: %empty_tuple.type = wrapper_binding b, %.loc5_23.2
|
||||
// CHECK:STDOUT: %b: %empty_tuple.type = wrapper_binding b, @__global_init.%.loc5_23.2
|
||||
// CHECK:STDOUT: %.loc5_22.1: type = splice_block %.loc5_22.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc5_22.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_22.3: type = converted %.loc5_22.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %c: %empty_tuple.type = wrapper_binding c, %.loc5_23.3
|
||||
// CHECK:STDOUT: %c: %empty_tuple.type = wrapper_binding c, @__global_init.%.loc5_23.3
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.cb1 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: %c.patt: %pattern_type.cb1 = value_binding_pattern c [concrete = constants.%c.patt]
|
||||
// CHECK:STDOUT: %.loc5_23.4: %pattern_type.f10 = struct_pattern (%b.patt, %c.patt) [concrete = constants.%.fcd]
|
||||
// CHECK:STDOUT: %.loc5_23: %pattern_type.f10 = struct_pattern (%b.patt, %c.patt) [concrete = constants.%.fcd]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -604,7 +597,15 @@ let {.a = x: ()} = ((), ());
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc5_34: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_43: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_44: %struct_type.a.c = struct_literal (%.loc5_34, %.loc5_43) [concrete = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc5_44.1: %struct_type.a.c = struct_literal (%.loc5_34, %.loc5_43) [concrete = constants.%struct]
|
||||
// CHECK:STDOUT: %empty_tuple.loc5_34: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_44.2: %empty_tuple.type = converted %.loc5_34, %empty_tuple.loc5_34 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %empty_tuple.loc5_43: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_44.3: %empty_tuple.type = converted %.loc5_43, %empty_tuple.loc5_43 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %struct: %struct_type.a.c = struct_value (%.loc5_44.2, %.loc5_44.3) [concrete = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc5_23.1: %struct_type.a.c = converted %.loc5_44.1, %struct [concrete = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc5_23.2: %empty_tuple.type = struct_access %.loc5_23.1, element0 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_23.3: %empty_tuple.type = struct_access %.loc5_23.1, element1 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -673,40 +674,18 @@ let {.a = x: ()} = ((), ());
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %impl.elem0.loc5_90: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc5_90.1: <bound method> = bound_method @__global_init.%int_1, %impl.elem0.loc5_90 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn.loc5_90: <specific function> = specific_function %impl.elem0.loc5_90, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc5_90.2: <bound method> = bound_method @__global_init.%int_1, %specific_fn.loc5_90 [concrete = constants.%bound_method.3bd]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc5_90.2(@__global_init.%int_1) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_90.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_90.2: %i32 = converted @__global_init.%int_1, %.loc5_90.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %impl.elem0.loc5_89: %.f72 = impl_witness_access constants.%ImplicitAs.impl_witness.409, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b]
|
||||
// CHECK:STDOUT: %bound_method.loc5_89.1: <bound method> = bound_method @__global_init.%float, %impl.elem0.loc5_89 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn.loc5_89: <specific function> = specific_function %impl.elem0.loc5_89, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc5_89.2: <bound method> = bound_method @__global_init.%float, %specific_fn.loc5_89 [concrete = constants.%bound_method.6df]
|
||||
// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.3bc = call %bound_method.loc5_89.2(@__global_init.%float) [concrete = constants.%float.b6c]
|
||||
// CHECK:STDOUT: %.loc5_89.1: %f32.3bc = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.b6c]
|
||||
// CHECK:STDOUT: %.loc5_89.2: %f32.3bc = converted @__global_init.%float, %.loc5_89.1 [concrete = constants.%float.b6c]
|
||||
// CHECK:STDOUT: %struct.loc5_89: %struct_type.i.j.e5d = struct_value (%.loc5_89.2, @__global_init.%true) [concrete = constants.%struct.3be]
|
||||
// CHECK:STDOUT: %.loc5_90.3: %struct_type.i.j.e5d = converted @__global_init.%.loc5_89, %struct.loc5_89 [concrete = constants.%struct.3be]
|
||||
// CHECK:STDOUT: %struct.loc5_90: %struct_type.a.b.5f4 = struct_value (%.loc5_90.2, %.loc5_90.3) [concrete = constants.%struct.431]
|
||||
// CHECK:STDOUT: %.loc5_51.1: %struct_type.a.b.5f4 = converted @__global_init.%.loc5_90, %struct.loc5_90 [concrete = constants.%struct.431]
|
||||
// CHECK:STDOUT: %.loc5_51.2: %i32 = struct_access %.loc5_51.1, element0 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_51.3: %struct_type.i.j.e5d = struct_access %.loc5_51.1, element1 [concrete = constants.%struct.3be]
|
||||
// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %x: %i32 = wrapper_binding x, %.loc5_51.2
|
||||
// CHECK:STDOUT: %.loc5_51.4: %f32.3bc = struct_access %.loc5_51.3, element0 [concrete = constants.%float.b6c]
|
||||
// CHECK:STDOUT: %.loc5_51.5: bool = struct_access %.loc5_51.3, element1 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %x: %i32 = wrapper_binding x, @__global_init.%.loc5_51.2
|
||||
// CHECK:STDOUT: %f32: type = type_literal constants.%f32.3bc [concrete = constants.%f32.3bc]
|
||||
// CHECK:STDOUT: %m: %f32.3bc = wrapper_binding m, %.loc5_51.4
|
||||
// CHECK:STDOUT: %m: %f32.3bc = wrapper_binding m, @__global_init.%.loc5_51.4
|
||||
// CHECK:STDOUT: %.loc5_46: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %n: bool = wrapper_binding n, %.loc5_51.5
|
||||
// CHECK:STDOUT: %n: bool = wrapper_binding n, @__global_init.%.loc5_51.5
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type.d94 = value_binding_pattern x [concrete = constants.%x.patt]
|
||||
// CHECK:STDOUT: %m.patt: %pattern_type.239 = value_binding_pattern m [concrete = constants.%m.patt]
|
||||
// CHECK:STDOUT: %n.patt: %pattern_type.831 = value_binding_pattern n [concrete = constants.%n.patt]
|
||||
// CHECK:STDOUT: %.loc5_50: %pattern_type.0af = struct_pattern (%m.patt, %n.patt) [concrete = constants.%.5ed]
|
||||
// CHECK:STDOUT: %.loc5_51.6: %pattern_type.04b = struct_pattern (%x.patt, %.loc5_50) [concrete = constants.%.cc7]
|
||||
// CHECK:STDOUT: %.loc5_51: %pattern_type.04b = struct_pattern (%x.patt, %.loc5_50) [concrete = constants.%.cc7]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -715,8 +694,30 @@ let {.a = x: ()} = ((), ());
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %float: Core.FloatLiteral = float_literal_value 20e-1 [concrete = constants.%float.cce]
|
||||
// CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %.loc5_89: %struct_type.i.j.e80 = struct_literal (%float, %true) [concrete = constants.%struct.050]
|
||||
// CHECK:STDOUT: %.loc5_90: %struct_type.a.b.1a6 = struct_literal (%int_1, %.loc5_89) [concrete = constants.%struct.293]
|
||||
// CHECK:STDOUT: %.loc5_89.1: %struct_type.i.j.e80 = struct_literal (%float, %true) [concrete = constants.%struct.050]
|
||||
// CHECK:STDOUT: %.loc5_90.1: %struct_type.a.b.1a6 = struct_literal (%int_1, %.loc5_89.1) [concrete = constants.%struct.293]
|
||||
// CHECK:STDOUT: %impl.elem0.loc5_90: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc5_90.1: <bound method> = bound_method %int_1, %impl.elem0.loc5_90 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn.loc5_90: <specific function> = specific_function %impl.elem0.loc5_90, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc5_90.2: <bound method> = bound_method %int_1, %specific_fn.loc5_90 [concrete = constants.%bound_method.3bd]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc5_90.2(%int_1) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_90.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_90.3: %i32 = converted %int_1, %.loc5_90.2 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %impl.elem0.loc5_89: %.f72 = impl_witness_access constants.%ImplicitAs.impl_witness.409, element0 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.d9b]
|
||||
// CHECK:STDOUT: %bound_method.loc5_89.1: <bound method> = bound_method %float, %impl.elem0.loc5_89 [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn.loc5_89: <specific function> = specific_function %impl.elem0.loc5_89, @Core.FloatLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.FloatLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc5_89.2: <bound method> = bound_method %float, %specific_fn.loc5_89 [concrete = constants.%bound_method.6df]
|
||||
// CHECK:STDOUT: %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call: init %f32.3bc = call %bound_method.loc5_89.2(%float) [concrete = constants.%float.b6c]
|
||||
// CHECK:STDOUT: %.loc5_89.2: %f32.3bc = value_of_initializer %Core.FloatLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%float.b6c]
|
||||
// CHECK:STDOUT: %.loc5_89.3: %f32.3bc = converted %float, %.loc5_89.2 [concrete = constants.%float.b6c]
|
||||
// CHECK:STDOUT: %struct.loc5_89: %struct_type.i.j.e5d = struct_value (%.loc5_89.3, %true) [concrete = constants.%struct.3be]
|
||||
// CHECK:STDOUT: %.loc5_90.4: %struct_type.i.j.e5d = converted %.loc5_89.1, %struct.loc5_89 [concrete = constants.%struct.3be]
|
||||
// CHECK:STDOUT: %struct.loc5_90: %struct_type.a.b.5f4 = struct_value (%.loc5_90.3, %.loc5_90.4) [concrete = constants.%struct.431]
|
||||
// CHECK:STDOUT: %.loc5_51.1: %struct_type.a.b.5f4 = converted %.loc5_90.1, %struct.loc5_90 [concrete = constants.%struct.431]
|
||||
// CHECK:STDOUT: %.loc5_51.2: %i32 = struct_access %.loc5_51.1, element0 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_51.3: %struct_type.i.j.e5d = struct_access %.loc5_51.1, element1 [concrete = constants.%struct.3be]
|
||||
// CHECK:STDOUT: %.loc5_51.4: %f32.3bc = struct_access %.loc5_51.3, element0 [concrete = constants.%float.b6c]
|
||||
// CHECK:STDOUT: %.loc5_51.5: bool = struct_access %.loc5_51.3, element1 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -738,15 +739,8 @@ let {.a = x: ()} = ((), ());
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc7_37.1: ref %struct_type.a.b = temporary @__global_init.%.loc7, @__global_init.%F.call
|
||||
// CHECK:STDOUT: %.loc7_37.2: ref %i32 = struct_access %.loc7_37.1, element0
|
||||
// CHECK:STDOUT: %.loc7_37.3: ref bool = struct_access %.loc7_37.1, element1
|
||||
// CHECK:STDOUT: %.loc7_37.4: %i32 = acquire_value %.loc7_37.2
|
||||
// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %x: %i32 = wrapper_binding x, %.loc7_37.4
|
||||
// CHECK:STDOUT: %.loc7_37.5: bool = acquire_value %.loc7_37.3
|
||||
// CHECK:STDOUT: %.loc7_27: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %y: bool = wrapper_binding y, %.loc7_37.5
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type.d94 = value_binding_pattern x [concrete = constants.%x.patt]
|
||||
// CHECK:STDOUT: %y.patt: %pattern_type.831 = value_binding_pattern y [concrete = constants.%y.patt]
|
||||
@@ -757,8 +751,15 @@ let {.a = x: ()} = ((), ());
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F]
|
||||
// CHECK:STDOUT: %.loc7: ref %struct_type.a.b = temporary_storage
|
||||
// CHECK:STDOUT: %F.call: init %struct_type.a.b to %.loc7 = call %F.ref()
|
||||
// CHECK:STDOUT: %.loc7_37.1: ref %struct_type.a.b = temporary_storage
|
||||
// CHECK:STDOUT: %F.call: init %struct_type.a.b to %.loc7_37.1 = call %F.ref()
|
||||
// CHECK:STDOUT: %.loc7_37.2: ref %struct_type.a.b = temporary %.loc7_37.1, %F.call
|
||||
// CHECK:STDOUT: %.loc7_37.3: ref %i32 = struct_access %.loc7_37.2, element0
|
||||
// CHECK:STDOUT: %.loc7_37.4: ref bool = struct_access %.loc7_37.2, element1
|
||||
// CHECK:STDOUT: %.loc7_37.5: %i32 = acquire_value %.loc7_37.3
|
||||
// CHECK:STDOUT: %x: %i32 = wrapper_binding x, %.loc7_37.5
|
||||
// CHECK:STDOUT: %.loc7_37.6: bool = acquire_value %.loc7_37.4
|
||||
// CHECK:STDOUT: %y: bool = wrapper_binding y, %.loc7_37.6
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -780,15 +781,8 @@ let {.a = x: ()} = ((), ());
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc7_27.1: ref %struct_type.a.b = temporary @__global_init.%.loc7, @__global_init.%F.call
|
||||
// CHECK:STDOUT: %.loc7_27.2: ref %i32 = struct_access %.loc7_27.1, element0
|
||||
// CHECK:STDOUT: %.loc7_27.3: ref bool = struct_access %.loc7_27.1, element1
|
||||
// CHECK:STDOUT: %.loc7_27.4: %i32 = acquire_value %.loc7_27.2
|
||||
// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %a: %i32 = wrapper_binding a, %.loc7_27.4
|
||||
// CHECK:STDOUT: %.loc7_27.5: bool = acquire_value %.loc7_27.3
|
||||
// CHECK:STDOUT: %.loc7_17: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %b: bool = wrapper_binding b, %.loc7_27.5
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.d94 = value_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.831 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
@@ -799,8 +793,15 @@ let {.a = x: ()} = ((), ());
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F]
|
||||
// CHECK:STDOUT: %.loc7: ref %struct_type.a.b = temporary_storage
|
||||
// CHECK:STDOUT: %F.call: init %struct_type.a.b to %.loc7 = call %F.ref()
|
||||
// CHECK:STDOUT: %.loc7_27.1: ref %struct_type.a.b = temporary_storage
|
||||
// CHECK:STDOUT: %F.call: init %struct_type.a.b to %.loc7_27.1 = call %F.ref()
|
||||
// CHECK:STDOUT: %.loc7_27.2: ref %struct_type.a.b = temporary %.loc7_27.1, %F.call
|
||||
// CHECK:STDOUT: %.loc7_27.3: ref %i32 = struct_access %.loc7_27.2, element0
|
||||
// CHECK:STDOUT: %.loc7_27.4: ref bool = struct_access %.loc7_27.2, element1
|
||||
// CHECK:STDOUT: %.loc7_27.5: %i32 = acquire_value %.loc7_27.3
|
||||
// CHECK:STDOUT: %a: %i32 = wrapper_binding a, %.loc7_27.5
|
||||
// CHECK:STDOUT: %.loc7_27.6: bool = acquire_value %.loc7_27.4
|
||||
// CHECK:STDOUT: %b: bool = wrapper_binding b, %.loc7_27.6
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -822,14 +823,8 @@ let {.a = x: ()} = ((), ());
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc7_35.1: ref %i32 = struct_access @__global_init.%s.ref, element0 [concrete = constants.%.872]
|
||||
// CHECK:STDOUT: %.loc7_35.2: ref bool = struct_access @__global_init.%s.ref, element1 [concrete = constants.%.d8b]
|
||||
// CHECK:STDOUT: %.loc7_35.3: %i32 = acquire_value %.loc7_35.1
|
||||
// CHECK:STDOUT: %i32.loc7: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %x: %i32 = wrapper_binding x, %.loc7_35.3
|
||||
// CHECK:STDOUT: %.loc7_35.4: bool = acquire_value %.loc7_35.2
|
||||
// CHECK:STDOUT: %.loc7_27: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %y: bool = wrapper_binding y, %.loc7_35.4
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type.d94 = value_binding_pattern x [concrete = constants.%x.patt]
|
||||
// CHECK:STDOUT: %y.patt: %pattern_type.831 = value_binding_pattern y [concrete = constants.%y.patt]
|
||||
@@ -841,6 +836,12 @@ let {.a = x: ()} = ((), ());
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %s.ref: ref %struct_type.a.b.214 = name_ref s, file.%s [concrete = file.%s.var]
|
||||
// CHECK:STDOUT: %.loc7_35.1: ref %i32 = struct_access %s.ref, element0 [concrete = constants.%.872]
|
||||
// CHECK:STDOUT: %.loc7_35.2: ref bool = struct_access %s.ref, element1 [concrete = constants.%.d8b]
|
||||
// CHECK:STDOUT: %.loc7_35.3: %i32 = acquire_value %.loc7_35.1
|
||||
// CHECK:STDOUT: %x: %i32 = wrapper_binding x, %.loc7_35.3
|
||||
// CHECK:STDOUT: %.loc7_35.4: bool = acquire_value %.loc7_35.2
|
||||
// CHECK:STDOUT: %y: bool = wrapper_binding y, %.loc7_35.4
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -862,14 +863,8 @@ let {.a = x: ()} = ((), ());
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc7_25.1: ref %i32 = struct_access @__global_init.%s.ref, element0 [concrete = constants.%.872]
|
||||
// CHECK:STDOUT: %.loc7_25.2: ref bool = struct_access @__global_init.%s.ref, element1 [concrete = constants.%.d8b]
|
||||
// CHECK:STDOUT: %.loc7_25.3: %i32 = acquire_value %.loc7_25.1
|
||||
// CHECK:STDOUT: %i32.loc7: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %a: %i32 = wrapper_binding a, %.loc7_25.3
|
||||
// CHECK:STDOUT: %.loc7_25.4: bool = acquire_value %.loc7_25.2
|
||||
// CHECK:STDOUT: %.loc7_17: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %b: bool = wrapper_binding b, %.loc7_25.4
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.d94 = value_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.831 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
@@ -881,6 +876,12 @@ let {.a = x: ()} = ((), ());
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %s.ref: ref %struct_type.a.b.214 = name_ref s, file.%s [concrete = file.%s.var]
|
||||
// CHECK:STDOUT: %.loc7_25.1: ref %i32 = struct_access %s.ref, element0 [concrete = constants.%.872]
|
||||
// CHECK:STDOUT: %.loc7_25.2: ref bool = struct_access %s.ref, element1 [concrete = constants.%.d8b]
|
||||
// CHECK:STDOUT: %.loc7_25.3: %i32 = acquire_value %.loc7_25.1
|
||||
// CHECK:STDOUT: %a: %i32 = wrapper_binding a, %.loc7_25.3
|
||||
// CHECK:STDOUT: %.loc7_25.4: bool = acquire_value %.loc7_25.2
|
||||
// CHECK:STDOUT: %b: bool = wrapper_binding b, %.loc7_25.4
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -924,25 +925,14 @@ let {.a = x: ()} = ((), ());
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %impl.elem0: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc5_53.1: <bound method> = bound_method @__global_init.%int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc5_53.2: <bound method> = bound_method @__global_init.%int_1, %specific_fn [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc5_53.2(@__global_init.%int_1) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_53.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_53.2: %i32 = converted @__global_init.%int_1, %.loc5_53.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %struct: %struct_type.a.c = struct_value (%.loc5_53.2, @__global_init.%true) [concrete = constants.%struct.78d]
|
||||
// CHECK:STDOUT: %.loc5_31.1: %struct_type.a.c = converted @__global_init.%.loc5, %struct [concrete = constants.%struct.78d]
|
||||
// CHECK:STDOUT: %.loc5_31.2: %i32 = struct_access %.loc5_31.1, element0 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_31.3: bool = struct_access %.loc5_31.1, element1 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %b: %i32 = wrapper_binding b, %.loc5_31.2
|
||||
// CHECK:STDOUT: %b: %i32 = wrapper_binding b, @__global_init.%.loc5_31.2
|
||||
// CHECK:STDOUT: %.loc5_27: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %d: bool = wrapper_binding d, %.loc5_31.3
|
||||
// CHECK:STDOUT: %d: bool = wrapper_binding d, @__global_init.%.loc5_31.3
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.d94 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: %d.patt: %pattern_type.831 = value_binding_pattern d [concrete = constants.%d.patt]
|
||||
// CHECK:STDOUT: %.loc5_31.4: %pattern_type.e6b = struct_pattern (%b.patt, %d.patt) [concrete = constants.%.d0e]
|
||||
// CHECK:STDOUT: %.loc5_31: %pattern_type.e6b = struct_pattern (%b.patt, %d.patt) [concrete = constants.%.d0e]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -950,7 +940,18 @@ let {.a = x: ()} = ((), ());
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %.loc5: %struct_type.c.a = struct_literal (%true, %int_1) [concrete = constants.%struct.da6]
|
||||
// CHECK:STDOUT: %.loc5_53.1: %struct_type.c.a = struct_literal (%true, %int_1) [concrete = constants.%struct.da6]
|
||||
// CHECK:STDOUT: %impl.elem0: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc5_53.1: <bound method> = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc5_53.2: <bound method> = bound_method %int_1, %specific_fn [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc5_53.2(%int_1) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_53.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_53.3: %i32 = converted %int_1, %.loc5_53.2 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %struct: %struct_type.a.c = struct_value (%.loc5_53.3, %true) [concrete = constants.%struct.78d]
|
||||
// CHECK:STDOUT: %.loc5_31.1: %struct_type.a.c = converted %.loc5_53.1, %struct [concrete = constants.%struct.78d]
|
||||
// CHECK:STDOUT: %.loc5_31.2: %i32 = struct_access %.loc5_31.1, element0 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_31.3: bool = struct_access %.loc5_31.1, element1 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -994,25 +995,14 @@ let {.a = x: ()} = ((), ());
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %impl.elem0: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc5_43.1: <bound method> = bound_method @__global_init.%int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc5_43.2: <bound method> = bound_method @__global_init.%int_1, %specific_fn [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc5_43.2(@__global_init.%int_1) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_43.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_43.2: %i32 = converted @__global_init.%int_1, %.loc5_43.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %struct: %struct_type.a.b = struct_value (%.loc5_43.2, @__global_init.%true) [concrete = constants.%struct.75c]
|
||||
// CHECK:STDOUT: %.loc5_21.1: %struct_type.a.b = converted @__global_init.%.loc5, %struct [concrete = constants.%struct.75c]
|
||||
// CHECK:STDOUT: %.loc5_21.2: %i32 = struct_access %.loc5_21.1, element0 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_21.3: bool = struct_access %.loc5_21.1, element1 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %a: %i32 = wrapper_binding a, %.loc5_21.2
|
||||
// CHECK:STDOUT: %a: %i32 = wrapper_binding a, @__global_init.%.loc5_21.2
|
||||
// CHECK:STDOUT: %.loc5_17: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %b: bool = wrapper_binding b, %.loc5_21.3
|
||||
// CHECK:STDOUT: %b: bool = wrapper_binding b, @__global_init.%.loc5_21.3
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.d94 = value_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.831 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: %.loc5_21.4: %pattern_type.269 = struct_pattern (%a.patt, %b.patt) [concrete = constants.%.4eb]
|
||||
// CHECK:STDOUT: %.loc5_21: %pattern_type.269 = struct_pattern (%a.patt, %b.patt) [concrete = constants.%.4eb]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -1020,7 +1010,18 @@ let {.a = x: ()} = ((), ());
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %.loc5: %struct_type.b.a = struct_literal (%true, %int_1) [concrete = constants.%struct.a63]
|
||||
// CHECK:STDOUT: %.loc5_43.1: %struct_type.b.a = struct_literal (%true, %int_1) [concrete = constants.%struct.a63]
|
||||
// CHECK:STDOUT: %impl.elem0: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc5_43.1: <bound method> = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc5_43.2: <bound method> = bound_method %int_1, %specific_fn [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc5_43.2(%int_1) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_43.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_43.3: %i32 = converted %int_1, %.loc5_43.2 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %struct: %struct_type.a.b = struct_value (%.loc5_43.3, %true) [concrete = constants.%struct.75c]
|
||||
// CHECK:STDOUT: %.loc5_21.1: %struct_type.a.b = converted %.loc5_43.1, %struct [concrete = constants.%struct.75c]
|
||||
// CHECK:STDOUT: %.loc5_21.2: %i32 = struct_access %.loc5_21.1, element0 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_21.3: bool = struct_access %.loc5_21.1, element1 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -1064,25 +1065,14 @@ let {.a = x: ()} = ((), ());
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %impl.elem0: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc5_48.1: <bound method> = bound_method @__global_init.%int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc5_48.2: <bound method> = bound_method @__global_init.%int_1, %specific_fn [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc5_48.2(@__global_init.%int_1) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_48.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_48.2: %i32 = converted @__global_init.%int_1, %.loc5_48.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %struct: %struct_type.a.b = struct_value (%.loc5_48.2, @__global_init.%true) [concrete = constants.%struct.75c]
|
||||
// CHECK:STDOUT: %.loc5_26.1: %struct_type.a.b = converted @__global_init.%.loc5, %struct [concrete = constants.%struct.75c]
|
||||
// CHECK:STDOUT: %.loc5_26.2: %i32 = struct_access %.loc5_26.1, element0 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_26.3: bool = struct_access %.loc5_26.1, element1 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %i32: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %a: %i32 = wrapper_binding a, %.loc5_26.2
|
||||
// CHECK:STDOUT: %a: %i32 = wrapper_binding a, @__global_init.%.loc5_26.2
|
||||
// CHECK:STDOUT: %.loc5_22: type = type_literal bool [concrete = bool]
|
||||
// CHECK:STDOUT: %c: bool = wrapper_binding c, %.loc5_26.3
|
||||
// CHECK:STDOUT: %c: bool = wrapper_binding c, @__global_init.%.loc5_26.3
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.d94 = value_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: %c.patt: %pattern_type.831 = value_binding_pattern c [concrete = constants.%c.patt]
|
||||
// CHECK:STDOUT: %.loc5_26.4: %pattern_type.269 = struct_pattern (%a.patt, %c.patt) [concrete = constants.%.3b7]
|
||||
// CHECK:STDOUT: %.loc5_26: %pattern_type.269 = struct_pattern (%a.patt, %c.patt) [concrete = constants.%.3b7]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -1090,7 +1080,18 @@ let {.a = x: ()} = ((), ());
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %true: bool = bool_literal true [concrete = constants.%true]
|
||||
// CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %.loc5: %struct_type.b.a = struct_literal (%true, %int_1) [concrete = constants.%struct.a63]
|
||||
// CHECK:STDOUT: %.loc5_48.1: %struct_type.b.a = struct_literal (%true, %int_1) [concrete = constants.%struct.a63]
|
||||
// CHECK:STDOUT: %impl.elem0: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc5_48.1: <bound method> = bound_method %int_1, %impl.elem0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %specific_fn: <specific function> = specific_function %impl.elem0, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc5_48.2: <bound method> = bound_method %int_1, %specific_fn [concrete = constants.%bound_method]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call: init %i32 = call %bound_method.loc5_48.2(%int_1) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_48.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_48.3: %i32 = converted %int_1, %.loc5_48.2 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %struct: %struct_type.a.b = struct_value (%.loc5_48.3, %true) [concrete = constants.%struct.75c]
|
||||
// CHECK:STDOUT: %.loc5_26.1: %struct_type.a.b = converted %.loc5_48.1, %struct [concrete = constants.%struct.75c]
|
||||
// CHECK:STDOUT: %.loc5_26.2: %i32 = struct_access %.loc5_26.1, element0 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc5_26.3: bool = struct_access %.loc5_26.1, element1 [concrete = constants.%true]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -1263,34 +1264,109 @@ let {.a = x: ()} = ((), ());
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_in_class_var.carbon
|
||||
// CHECK:STDOUT: --- in_static_class_var.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
// CHECK:STDOUT: %C: type = class_type @C [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete]
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type.cb1 = ref_binding_pattern x [concrete]
|
||||
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_tuple.type} [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.e85: type = pattern_type %struct_type.a [concrete]
|
||||
// CHECK:STDOUT: %.f83: %pattern_type.e85 = struct_pattern (%x.patt) [concrete]
|
||||
// CHECK:STDOUT: %.var_patt: %pattern_type.e85 = var_pattern %.f83 [concrete]
|
||||
// CHECK:STDOUT: %DefaultOrUnformed.type: type = facet_type <@DefaultOrUnformed> [concrete]
|
||||
// CHECK:STDOUT: %T.67d: type = symbolic_binding T, 0 [symbolic]
|
||||
// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.type.5f6: type = fn_type @T.as.DefaultOrUnformed.impl.Op, @T.as.DefaultOrUnformed.impl(%T.67d) [symbolic]
|
||||
// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.5c0: %T.as.DefaultOrUnformed.impl.Op.type.5f6 = struct_value () [symbolic]
|
||||
// CHECK:STDOUT: %DefaultOrUnformed.impl_witness.037: <witness> = impl_witness imports.%DefaultOrUnformed.impl_witness_table.856, @T.as.DefaultOrUnformed.impl(%struct_type.a) [concrete]
|
||||
// CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value %struct_type.a, (%DefaultOrUnformed.impl_witness.037) [concrete]
|
||||
// CHECK:STDOUT: %.616: ref %empty_tuple.type = struct_access @C.%.var, element0 [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: imports {
|
||||
// CHECK:STDOUT: %Core.import_ref.002: @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op.type (%T.as.DefaultOrUnformed.impl.Op.type.5f6) = import_ref Core//prelude/parts/default, loc{{\d+_\d+}}, loaded [symbolic = @T.as.DefaultOrUnformed.impl.%T.as.DefaultOrUnformed.impl.Op (constants.%T.as.DefaultOrUnformed.impl.Op.5c0)]
|
||||
// CHECK:STDOUT: %DefaultOrUnformed.impl_witness_table.856 = impl_witness_table (%Core.import_ref.002), @T.as.DefaultOrUnformed.impl [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @C {
|
||||
// CHECK:STDOUT: complete_type_witness = invalid
|
||||
// CHECK:STDOUT: %.var: ref %struct_type.a = var_storage %.var_patt [concrete]
|
||||
// CHECK:STDOUT: %.loc6_24.1: type = splice_block %.loc6_24.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc6_24.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_24.3: type = converted %.loc6_24.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %x: ref %empty_tuple.type = wrapper_binding x, @__global_init.%.loc6_10 [concrete = constants.%.616]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type.cb1 = ref_binding_pattern x [concrete = constants.%x.patt]
|
||||
// CHECK:STDOUT: %.loc6_25: %pattern_type.e85 = struct_pattern (%x.patt) [concrete = constants.%.f83]
|
||||
// CHECK:STDOUT: %.var_patt: %pattern_type.e85 = var_pattern %.loc6_25 [concrete = constants.%.var_patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: complete_type_witness = %complete_type
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%C
|
||||
// CHECK:STDOUT: .x = <unexpected>.inst{{[0-9A-F]+}}.loc13_16
|
||||
// CHECK:STDOUT: .x = %x
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_in_class_let.carbon
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %DefaultOrUnformed.facet: %DefaultOrUnformed.type = facet_value constants.%struct_type.a, (constants.%DefaultOrUnformed.impl_witness.037) [concrete = constants.%DefaultOrUnformed.facet]
|
||||
// CHECK:STDOUT: %.loc6_26.1: %DefaultOrUnformed.type = converted constants.%struct_type.a, %DefaultOrUnformed.facet [concrete = constants.%DefaultOrUnformed.facet]
|
||||
// CHECK:STDOUT: %as_type: type = facet_access_type %.loc6_26.1 [concrete = constants.%struct_type.a]
|
||||
// CHECK:STDOUT: %.loc6_26.2: type = converted %.loc6_26.1, %as_type [concrete = constants.%struct_type.a]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %T.as.DefaultOrUnformed.impl.Op.call: init %struct_type.a = call %T.as.DefaultOrUnformed.impl.Op.specific_fn()
|
||||
// CHECK:STDOUT: assign @C.%.var, %T.as.DefaultOrUnformed.impl.Op.call
|
||||
// CHECK:STDOUT: %.loc6_10: ref %empty_tuple.type = struct_access @C.%.var, element0 [concrete = constants.%.616]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- in_class_let.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
// CHECK:STDOUT: %C: type = class_type @C [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete]
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type.cb1 = value_binding_pattern x [concrete]
|
||||
// CHECK:STDOUT: %struct_type.a: type = struct_type {.a: %empty_tuple.type} [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.e85: type = pattern_type %struct_type.a [concrete]
|
||||
// CHECK:STDOUT: %.972: %pattern_type.e85 = struct_pattern (%x.patt) [concrete]
|
||||
// CHECK:STDOUT: %struct: %struct_type.a = struct_value (%empty_tuple) [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @C {
|
||||
// CHECK:STDOUT: complete_type_witness = invalid
|
||||
// CHECK:STDOUT: %.loc5_17.1: type = splice_block %.loc5_17.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc5_17.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_17.3: type = converted %.loc5_17.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %x: %empty_tuple.type = wrapper_binding x, @__global_init.%.loc5_18.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type.cb1 = value_binding_pattern x [concrete = constants.%x.patt]
|
||||
// CHECK:STDOUT: %.loc5_18: %pattern_type.e85 = struct_pattern (%x.patt) [concrete = constants.%.972]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: complete_type_witness = %complete_type
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%C
|
||||
// CHECK:STDOUT: .x = <unexpected>.inst{{[0-9A-F]+}}.loc12_16
|
||||
// CHECK:STDOUT: .x = %x
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc5_29: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_30.1: %struct_type.a = struct_literal (%.loc5_29) [concrete = constants.%struct]
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_30.2: %empty_tuple.type = converted %.loc5_29, %empty_tuple [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %struct: %struct_type.a = struct_value (%.loc5_30.2) [concrete = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc5_18.1: %struct_type.a = converted %.loc5_30.1, %struct [concrete = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc5_18.2: %empty_tuple.type = struct_access %.loc5_18.1, element0 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_incorrect_field_type.carbon
|
||||
@@ -1310,17 +1386,17 @@ let {.a = x: ()} = ((), ());
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc15_28: %empty_tuple.type = converted @__global_init.%.loc15_27, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type.cb1 = value_binding_pattern x [concrete = constants.%x.patt]
|
||||
// CHECK:STDOUT: %.loc15_16: %pattern_type.e85 = struct_pattern (%x.patt) [concrete = constants.%.298]
|
||||
// CHECK:STDOUT: %.loc15: %pattern_type.e85 = struct_pattern (%x.patt) [concrete = constants.%.298]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc15_27: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc15_28: %struct_type.a.225 = struct_literal (%.loc15_27) [concrete = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc15_28.1: %struct_type.a.225 = struct_literal (%.loc15_27) [concrete = constants.%struct]
|
||||
// CHECK:STDOUT: %.loc15_28.2: %empty_tuple.type = converted %.loc15_27, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -1340,10 +1416,9 @@ let {.a = x: ()} = ((), ());
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc15_16.1: %struct_type.a = converted @__global_init.%.loc15_27, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type.cb1 = value_binding_pattern x [concrete = constants.%x.patt]
|
||||
// CHECK:STDOUT: %.loc15_16.2: %pattern_type.e85 = struct_pattern (%x.patt) [concrete = constants.%.298]
|
||||
// CHECK:STDOUT: %.loc15: %pattern_type.e85 = struct_pattern (%x.patt) [concrete = constants.%.298]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -1352,6 +1427,7 @@ let {.a = x: ()} = ((), ());
|
||||
// CHECK:STDOUT: %.loc15_22: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc15_26: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc15_27: %tuple.type = tuple_literal (%.loc15_22, %.loc15_26) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc15_16: %struct_type.a = converted %.loc15_27, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
+300
-46
@@ -58,6 +58,69 @@ let (a: (),) = ((),);
|
||||
let (((b: ()),)) = ((),);
|
||||
//@dump-sem-ir-end
|
||||
|
||||
// --- fail_in_class_var.carbon
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
class C {
|
||||
//@dump-sem-ir-begin
|
||||
// CHECK:STDERR: ╭─┤ fail_in_class_var.carbon:[[@LINE+7]]:7
|
||||
// CHECK:STDERR: -> │ var (a: (), b: ());
|
||||
// CHECK:STDERR: · ━━━━━━━┳━━━━━━
|
||||
// CHECK:STDERR: · ┗━━┫ error: tuple pattern in field declaration
|
||||
// CHECK:STDERR: · ┃ [FieldWithTuplePattern]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
var (a: (), b: ());
|
||||
//@dump-sem-ir-end
|
||||
}
|
||||
|
||||
// --- fail_empty_in_class_var.carbon
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
class C {
|
||||
//@dump-sem-ir-begin
|
||||
// CHECK:STDERR: ╭─┤ fail_empty_in_class_var.carbon:[[@LINE+6]]:7
|
||||
// CHECK:STDERR: -> │ var ();
|
||||
// CHECK:STDERR: · ━┳
|
||||
// CHECK:STDERR: · ┗━━┫ error: tuple pattern in field declaration [FieldWithTuplePattern]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
var ();
|
||||
//@dump-sem-ir-end
|
||||
}
|
||||
|
||||
// --- in_static_class_var.carbon
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
class C {
|
||||
//@dump-sem-ir-begin
|
||||
static var (a: (), b: ()) = ((), ());
|
||||
//@dump-sem-ir-end
|
||||
}
|
||||
|
||||
// --- in_class_let.carbon
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
class C {
|
||||
//@dump-sem-ir-begin
|
||||
let (a: (), b: ()) = ((), ());
|
||||
//@dump-sem-ir-end
|
||||
}
|
||||
|
||||
// --- empty_in_class_let.carbon
|
||||
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
class C {
|
||||
//@dump-sem-ir-begin
|
||||
let () = ();
|
||||
//@dump-sem-ir-end
|
||||
}
|
||||
|
||||
// CHECK:STDOUT: --- literal.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
@@ -74,20 +137,16 @@ let (((b: ()),)) = ((),);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %empty_tuple.loc5_24: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_24: %empty_tuple.type = converted @__global_init.%.loc5_24, %empty_tuple.loc5_24 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_10.1: type = splice_block %.loc5_10.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc5_10.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_10.3: type = converted %.loc5_10.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %a: %empty_tuple.type = wrapper_binding a, %.loc5_24
|
||||
// CHECK:STDOUT: %empty_tuple.loc5_28: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_28: %empty_tuple.type = converted @__global_init.%.loc5_28, %empty_tuple.loc5_28 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %a: %empty_tuple.type = wrapper_binding a, @__global_init.%.loc5_24.2
|
||||
// CHECK:STDOUT: %.loc5_17.1: type = splice_block %.loc5_17.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc5_17.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_17.3: type = converted %.loc5_17.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %b: %empty_tuple.type = wrapper_binding b, %.loc5_28
|
||||
// CHECK:STDOUT: %b: %empty_tuple.type = wrapper_binding b, @__global_init.%.loc5_28.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.cb1 = value_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.cb1 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
@@ -97,9 +156,13 @@ let (((b: ()),)) = ((),);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc5_24: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_28: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_29: %tuple.type = tuple_literal (%.loc5_24, %.loc5_28) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc5_24.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_28.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_29: %tuple.type = tuple_literal (%.loc5_24.1, %.loc5_28.1) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %empty_tuple.loc5_24: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_24.2: %empty_tuple.type = converted %.loc5_24.1, %empty_tuple.loc5_24 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %empty_tuple.loc5_28: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_28.2: %empty_tuple.type = converted %.loc5_28.1, %empty_tuple.loc5_28 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -120,23 +183,16 @@ let (((b: ()),)) = ((),);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %.loc7_24.1: ref %tuple.type = temporary @__global_init.%.loc7, @__global_init.%F.call
|
||||
// CHECK:STDOUT: %tuple.elem0: ref %empty_tuple.type = tuple_access %.loc7_24.1, element0
|
||||
// CHECK:STDOUT: %tuple.elem1: ref %empty_tuple.type = tuple_access %.loc7_24.1, element1
|
||||
// CHECK:STDOUT: %empty_tuple.loc7_24.1: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc7_24.2: %empty_tuple.type = converted %tuple.elem0, %empty_tuple.loc7_24.1 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc7_10.1: type = splice_block %.loc7_10.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc7_10.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc7_10.3: type = converted %.loc7_10.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %a: %empty_tuple.type = wrapper_binding a, %.loc7_24.2
|
||||
// CHECK:STDOUT: %empty_tuple.loc7_24.2: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc7_24.3: %empty_tuple.type = converted %tuple.elem1, %empty_tuple.loc7_24.2 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %a: %empty_tuple.type = wrapper_binding a, @__global_init.%.loc7_24.3
|
||||
// CHECK:STDOUT: %.loc7_17.1: type = splice_block %.loc7_17.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc7_17.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc7_17.3: type = converted %.loc7_17.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %b: %empty_tuple.type = wrapper_binding b, %.loc7_24.3
|
||||
// CHECK:STDOUT: %b: %empty_tuple.type = wrapper_binding b, @__global_init.%.loc7_24.4
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.cb1 = value_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.cb1 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
@@ -147,8 +203,15 @@ let (((b: ()),)) = ((),);
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F]
|
||||
// CHECK:STDOUT: %.loc7: ref %tuple.type = temporary_storage
|
||||
// CHECK:STDOUT: %F.call: init %tuple.type to %.loc7 = call %F.ref()
|
||||
// CHECK:STDOUT: %.loc7_24.1: ref %tuple.type = temporary_storage
|
||||
// CHECK:STDOUT: %F.call: init %tuple.type to %.loc7_24.1 = call %F.ref()
|
||||
// CHECK:STDOUT: %.loc7_24.2: ref %tuple.type = temporary %.loc7_24.1, %F.call
|
||||
// CHECK:STDOUT: %tuple.elem0: ref %empty_tuple.type = tuple_access %.loc7_24.2, element0
|
||||
// CHECK:STDOUT: %tuple.elem1: ref %empty_tuple.type = tuple_access %.loc7_24.2, element1
|
||||
// CHECK:STDOUT: %empty_tuple.loc7_24.1: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc7_24.3: %empty_tuple.type = converted %tuple.elem0, %empty_tuple.loc7_24.1 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %empty_tuple.loc7_24.2: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc7_24.4: %empty_tuple.type = converted %tuple.elem1, %empty_tuple.loc7_24.2 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -169,22 +232,16 @@ let (((b: ()),)) = ((),);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %tuple.elem0: ref %empty_tuple.type = tuple_access @__global_init.%t.ref, element0 [concrete = constants.%tuple.elem0]
|
||||
// CHECK:STDOUT: %tuple.elem1: ref %empty_tuple.type = tuple_access @__global_init.%t.ref, element1 [concrete = constants.%tuple.elem1]
|
||||
// CHECK:STDOUT: %empty_tuple.loc6_22.1: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_22.1: %empty_tuple.type = converted %tuple.elem0, %empty_tuple.loc6_22.1 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_10.1: type = splice_block %.loc6_10.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc6_10.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_10.3: type = converted %.loc6_10.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %a: %empty_tuple.type = wrapper_binding a, %.loc6_22.1
|
||||
// CHECK:STDOUT: %empty_tuple.loc6_22.2: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_22.2: %empty_tuple.type = converted %tuple.elem1, %empty_tuple.loc6_22.2 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %a: %empty_tuple.type = wrapper_binding a, @__global_init.%.loc6_22.1
|
||||
// CHECK:STDOUT: %.loc6_17.1: type = splice_block %.loc6_17.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc6_17.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_17.3: type = converted %.loc6_17.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %b: %empty_tuple.type = wrapper_binding b, %.loc6_22.2
|
||||
// CHECK:STDOUT: %b: %empty_tuple.type = wrapper_binding b, @__global_init.%.loc6_22.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.cb1 = value_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.cb1 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
@@ -196,6 +253,12 @@ let (((b: ()),)) = ((),);
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: %t.ref: ref %tuple.type = name_ref t, file.%t [concrete = file.%t.var]
|
||||
// CHECK:STDOUT: %tuple.elem0.loc6: ref %empty_tuple.type = tuple_access %t.ref, element0 [concrete = constants.%tuple.elem0]
|
||||
// CHECK:STDOUT: %tuple.elem1.loc6: ref %empty_tuple.type = tuple_access %t.ref, element1 [concrete = constants.%tuple.elem1]
|
||||
// CHECK:STDOUT: %empty_tuple.loc6_22.1: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_22.1: %empty_tuple.type = converted %tuple.elem0.loc6, %empty_tuple.loc6_22.1 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %empty_tuple.loc6_22.2: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_22.2: %empty_tuple.type = converted %tuple.elem1.loc6, %empty_tuple.loc6_22.2 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -211,23 +274,19 @@ let (((b: ()),)) = ((),);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %empty_tuple.loc5: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_16: %empty_tuple.type = converted @__global_init.%.loc5, %empty_tuple.loc5 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_10.1: type = splice_block %.loc5_10.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc5_10.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_10.3: type = converted %.loc5_10.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %a: %empty_tuple.type = wrapper_binding a, %.loc5_16
|
||||
// CHECK:STDOUT: %a: %empty_tuple.type = wrapper_binding a, @__global_init.%.loc5_16.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type = value_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %empty_tuple.loc6: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_20: %empty_tuple.type = converted @__global_init.%.loc6, %empty_tuple.loc6 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_12.1: type = splice_block %.loc6_12.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc6_12.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_12.3: type = converted %.loc6_12.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %b: %empty_tuple.type = wrapper_binding b, %.loc6_20
|
||||
// CHECK:STDOUT: %b: %empty_tuple.type = wrapper_binding b, @__global_init.%.loc6_20.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -235,8 +294,12 @@ let (((b: ()),)) = ((),);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc5: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_16.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %empty_tuple.loc5: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_16.2: %empty_tuple.type = converted %.loc5_16.1, %empty_tuple.loc5 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_20.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %empty_tuple.loc6: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_20.2: %empty_tuple.type = converted %.loc6_20.1, %empty_tuple.loc6 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -257,24 +320,20 @@ let (((b: ()),)) = ((),);
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %empty_tuple.loc5: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_18: %empty_tuple.type = converted @__global_init.%.loc5_18, %empty_tuple.loc5 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_10.1: type = splice_block %.loc5_10.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc5_10.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_10.3: type = converted %.loc5_10.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %a: %empty_tuple.type = wrapper_binding a, %.loc5_18
|
||||
// CHECK:STDOUT: %a: %empty_tuple.type = wrapper_binding a, @__global_init.%.loc5_18.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.cb1 = value_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: %.loc5_12: %pattern_type.559 = tuple_pattern (%a.patt) [concrete = constants.%.62f]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %empty_tuple.loc6: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_22: %empty_tuple.type = converted @__global_init.%.loc6_22, %empty_tuple.loc6 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_12.1: type = splice_block %.loc6_12.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc6_12.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_12.3: type = converted %.loc6_12.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %b: %empty_tuple.type = wrapper_binding b, %.loc6_22
|
||||
// CHECK:STDOUT: %b: %empty_tuple.type = wrapper_binding b, @__global_init.%.loc6_22.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.cb1 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: %.loc6_15: %pattern_type.559 = tuple_pattern (%b.patt) [concrete = constants.%.00b]
|
||||
@@ -283,10 +342,205 @@ let (((b: ()),)) = ((),);
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc5_18: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_20: %tuple.type = tuple_literal (%.loc5_18) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc6_22: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_24: %tuple.type = tuple_literal (%.loc6_22) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc5_18.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_20: %tuple.type = tuple_literal (%.loc5_18.1) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %empty_tuple.loc5: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc5_18.2: %empty_tuple.type = converted %.loc5_18.1, %empty_tuple.loc5 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_22.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_24: %tuple.type = tuple_literal (%.loc6_22.1) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %empty_tuple.loc6: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_22.2: %empty_tuple.type = converted %.loc6_22.1, %empty_tuple.loc6 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_in_class_var.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
// CHECK:STDOUT: %C: type = class_type @C [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
|
||||
// CHECK:STDOUT: %C.elem: type = unbound_element_type %C, %empty_tuple.type [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @C {
|
||||
// CHECK:STDOUT: %field_decl.loc13_9: %C.elem = field_decl a, element0, %.loc13_12.2 in [concrete] {
|
||||
// CHECK:STDOUT: %.loc13_12.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc13_12.2: type = converted %.loc13_12.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %field_decl.loc13_16: %C.elem = field_decl b, element1, %.loc13_19.2 in [concrete] {
|
||||
// CHECK:STDOUT: %.loc13_19.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc13_19.2: type = converted %.loc13_19.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: complete_type_witness = %complete_type
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%C
|
||||
// CHECK:STDOUT: .a = %field_decl.loc13_9
|
||||
// CHECK:STDOUT: .b = %field_decl.loc13_16
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- fail_empty_in_class_var.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
// CHECK:STDOUT: %C: type = class_type @C [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @C {
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: complete_type_witness = %complete_type
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%C
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- in_static_class_var.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
// CHECK:STDOUT: %C: type = class_type @C [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete]
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.cb1 = ref_binding_pattern a [concrete]
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.cb1 = ref_binding_pattern b [concrete]
|
||||
// CHECK:STDOUT: %tuple.type: type = tuple_type (%empty_tuple.type, %empty_tuple.type) [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.5b8: type = pattern_type %tuple.type [concrete]
|
||||
// CHECK:STDOUT: %.009: %pattern_type.5b8 = tuple_pattern (%a.patt, %b.patt) [concrete]
|
||||
// CHECK:STDOUT: %.var_patt: %pattern_type.5b8 = var_pattern %.009 [concrete]
|
||||
// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%empty_tuple, %empty_tuple) [concrete]
|
||||
// CHECK:STDOUT: %tuple.elem0: ref %empty_tuple.type = tuple_access @C.%.var, element0 [concrete]
|
||||
// CHECK:STDOUT: %tuple.elem1: ref %empty_tuple.type = tuple_access @C.%.var, element1 [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @C {
|
||||
// CHECK:STDOUT: %.var: ref %tuple.type = var_storage %.var_patt [concrete]
|
||||
// CHECK:STDOUT: %.loc6_19.1: type = splice_block %.loc6_19.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc6_19.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_19.3: type = converted %.loc6_19.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %a: ref %empty_tuple.type = wrapper_binding a, @__global_init.%tuple.elem0.loc6_10 [concrete = constants.%tuple.elem0]
|
||||
// CHECK:STDOUT: %.loc6_26.1: type = splice_block %.loc6_26.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc6_26.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_26.3: type = converted %.loc6_26.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %b: ref %empty_tuple.type = wrapper_binding b, @__global_init.%tuple.elem1.loc6_10 [concrete = constants.%tuple.elem1]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.cb1 = ref_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.cb1 = ref_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: %.loc6_27: %pattern_type.5b8 = tuple_pattern (%a.patt, %b.patt) [concrete = constants.%.009]
|
||||
// CHECK:STDOUT: %.var_patt: %pattern_type.5b8 = var_pattern %.loc6_27 [concrete = constants.%.var_patt]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: complete_type_witness = %complete_type
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%C
|
||||
// CHECK:STDOUT: .a = %a
|
||||
// CHECK:STDOUT: .b = %b
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc6_33.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_37.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_38.1: %tuple.type = tuple_literal (%.loc6_33.1, %.loc6_37.1) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %tuple.elem0.loc6_38: ref %empty_tuple.type = tuple_access @C.%.var, element0 [concrete = constants.%tuple.elem0]
|
||||
// CHECK:STDOUT: %.loc6_33.2: init %empty_tuple.type to %tuple.elem0.loc6_38 = tuple_init () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_38.2: init %empty_tuple.type = converted %.loc6_33.1, %.loc6_33.2 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_38.3: init %empty_tuple.type to %tuple.elem0.loc6_38 = in_place_init %.loc6_38.2 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %tuple.elem1.loc6_38: ref %empty_tuple.type = tuple_access @C.%.var, element1 [concrete = constants.%tuple.elem1]
|
||||
// CHECK:STDOUT: %.loc6_37.2: init %empty_tuple.type to %tuple.elem1.loc6_38 = tuple_init () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_38.4: init %empty_tuple.type = converted %.loc6_37.1, %.loc6_37.2 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_38.5: init %empty_tuple.type to %tuple.elem1.loc6_38 = in_place_init %.loc6_38.4 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_38.6: init %tuple.type to @C.%.var = tuple_init (%.loc6_38.3, %.loc6_38.5) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc6_10: init %tuple.type = converted %.loc6_38.1, %.loc6_38.6 [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: assign @C.%.var, %.loc6_10
|
||||
// CHECK:STDOUT: %tuple.elem0.loc6_10: ref %empty_tuple.type = tuple_access @C.%.var, element0 [concrete = constants.%tuple.elem0]
|
||||
// CHECK:STDOUT: %tuple.elem1.loc6_10: ref %empty_tuple.type = tuple_access @C.%.var, element1 [concrete = constants.%tuple.elem1]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- in_class_let.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
// CHECK:STDOUT: %C: type = class_type @C [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.cb1: type = pattern_type %empty_tuple.type [concrete]
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.cb1 = value_binding_pattern a [concrete]
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.cb1 = value_binding_pattern b [concrete]
|
||||
// CHECK:STDOUT: %tuple.type: type = tuple_type (%empty_tuple.type, %empty_tuple.type) [concrete]
|
||||
// CHECK:STDOUT: %pattern_type.5b8: type = pattern_type %tuple.type [concrete]
|
||||
// CHECK:STDOUT: %.737: %pattern_type.5b8 = tuple_pattern (%a.patt, %b.patt) [concrete]
|
||||
// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%empty_tuple, %empty_tuple) [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @C {
|
||||
// CHECK:STDOUT: %.loc6_12.1: type = splice_block %.loc6_12.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc6_12.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_12.3: type = converted %.loc6_12.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %a: %empty_tuple.type = wrapper_binding a, @__global_init.%.loc6_26.2
|
||||
// CHECK:STDOUT: %.loc6_19.1: type = splice_block %.loc6_19.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc6_19.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_19.3: type = converted %.loc6_19.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %b: %empty_tuple.type = wrapper_binding b, @__global_init.%.loc6_30.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %a.patt: %pattern_type.cb1 = value_binding_pattern a [concrete = constants.%a.patt]
|
||||
// CHECK:STDOUT: %b.patt: %pattern_type.cb1 = value_binding_pattern b [concrete = constants.%b.patt]
|
||||
// CHECK:STDOUT: %.loc6_20: %pattern_type.5b8 = tuple_pattern (%a.patt, %b.patt) [concrete = constants.%.737]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: complete_type_witness = %complete_type
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%C
|
||||
// CHECK:STDOUT: .a = %a
|
||||
// CHECK:STDOUT: .b = %b
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc6_26.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_30.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_31: %tuple.type = tuple_literal (%.loc6_26.1, %.loc6_30.1) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %empty_tuple.loc6_26: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_26.2: %empty_tuple.type = converted %.loc6_26.1, %empty_tuple.loc6_26 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %empty_tuple.loc6_30: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc6_30.2: %empty_tuple.type = converted %.loc6_30.1, %empty_tuple.loc6_30 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: --- empty_in_class_let.carbon
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: constants {
|
||||
// CHECK:STDOUT: type: type = facet_type <type> [concrete]
|
||||
// CHECK:STDOUT: %C: type = class_type @C [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
|
||||
// CHECK:STDOUT: %pattern_type: type = pattern_type %empty_tuple.type [concrete]
|
||||
// CHECK:STDOUT: %.e84: %pattern_type = tuple_pattern () [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: class @C {
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %.loc6: %pattern_type = tuple_pattern () [concrete = constants.%.e84]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: complete_type_witness = %complete_type
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !members:
|
||||
// CHECK:STDOUT: .Self = constants.%C
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc6: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
+5
-5
@@ -170,13 +170,11 @@ fn F() -> {} {
|
||||
// CHECK:STDOUT: .F = %F.decl
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc4_14: %empty_struct_type = converted @__global_init.%.loc4, %empty_struct [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc4_9.1: type = splice_block %.loc4_9.3 [concrete = constants.%empty_struct_type] {
|
||||
// CHECK:STDOUT: %.loc4_9.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc4_9.3: type = converted %.loc4_9.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %_.loc4: %empty_struct_type = wrapper_binding _, %.loc4_14
|
||||
// CHECK:STDOUT: %_: %empty_struct_type = wrapper_binding _, @__global_init.%.loc4_14.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %_.patt.loc4: %pattern_type.a96 = value_binding_pattern _ [concrete = constants.%_.patt.bc3]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -185,7 +183,6 @@ fn F() -> {} {
|
||||
// CHECK:STDOUT: %.loc5_9.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc5_9.3: type = converted %.loc5_9.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %_.loc5: ref %empty_struct_type = wrapper_binding _, %_.var
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %_.patt.loc5: %pattern_type.a96 = ref_binding_pattern _ [concrete = constants.%_.patt.7e8]
|
||||
// CHECK:STDOUT: %_.var_patt: %pattern_type.a96 = var_pattern %_.patt.loc5 [concrete = constants.%_.var_patt.d5b]
|
||||
@@ -233,11 +230,14 @@ fn F() -> {} {
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc4: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc4_14.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %empty_struct: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc4_14.2: %empty_struct_type = converted %.loc4_14.1, %empty_struct [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc5_14.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc5_14.2: init %empty_struct_type = struct_init () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc5_1: init %empty_struct_type = converted %.loc5_14.1, %.loc5_14.2 [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: assign file.%_.var, %.loc5_1
|
||||
// CHECK:STDOUT: %_: ref %empty_struct_type = wrapper_binding _, file.%_.var
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
@@ -764,13 +764,8 @@ var test_str: str = ();
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %impl.elem0: %.929 = impl_witness_access constants.%ImplicitAs.impl_witness, element0 [concrete = constants.%Core.CharLiteral.as.ImplicitAs.impl.Convert]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method @__global_init.%.loc5, %impl.elem0 [concrete = constants.%Core.CharLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %Core.CharLiteral.as.ImplicitAs.impl.Convert.call: init %char = call %bound_method(@__global_init.%.loc5) [concrete = constants.%int_99]
|
||||
// CHECK:STDOUT: %.loc5_23.1: %char = value_of_initializer %Core.CharLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_99]
|
||||
// CHECK:STDOUT: %.loc5_23.2: %char = converted @__global_init.%.loc5, %.loc5_23.1 [concrete = constants.%int_99]
|
||||
// CHECK:STDOUT: %char: type = type_literal constants.%char [concrete = constants.%char]
|
||||
// CHECK:STDOUT: %test_char: %char = wrapper_binding test_char, %.loc5_23.2
|
||||
// CHECK:STDOUT: %test_char: %char = wrapper_binding test_char, @__global_init.%.loc5_23.3
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %test_char.patt: %pattern_type.2ff = value_binding_pattern test_char [concrete = constants.%test_char.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -778,7 +773,12 @@ var test_str: str = ();
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc5: Core.CharLiteral = char_value U+0063 [concrete = constants.%.b9b]
|
||||
// CHECK:STDOUT: %.loc5_23.1: Core.CharLiteral = char_value U+0063 [concrete = constants.%.b9b]
|
||||
// CHECK:STDOUT: %impl.elem0: %.929 = impl_witness_access constants.%ImplicitAs.impl_witness, element0 [concrete = constants.%Core.CharLiteral.as.ImplicitAs.impl.Convert]
|
||||
// CHECK:STDOUT: %bound_method: <bound method> = bound_method %.loc5_23.1, %impl.elem0 [concrete = constants.%Core.CharLiteral.as.ImplicitAs.impl.Convert.bound]
|
||||
// CHECK:STDOUT: %Core.CharLiteral.as.ImplicitAs.impl.Convert.call: init %char = call %bound_method(%.loc5_23.1) [concrete = constants.%int_99]
|
||||
// CHECK:STDOUT: %.loc5_23.2: %char = value_of_initializer %Core.CharLiteral.as.ImplicitAs.impl.Convert.call [concrete = constants.%int_99]
|
||||
// CHECK:STDOUT: %.loc5_23.3: %char = converted %.loc5_23.1, %.loc5_23.2 [concrete = constants.%int_99]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
|
||||
+6
-3
@@ -111,7 +111,8 @@ fn FirstPerfectNumber() -> z { return 6; }
|
||||
// CHECK:STDOUT: %Six.decl: %Six.type = fn_decl @Six [concrete = constants.%Six] {
|
||||
// CHECK:STDOUT: %return.patt: <error> = return_slot_pattern <error>, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %x.ref: type = name_ref x, file.%x
|
||||
// CHECK:STDOUT: %x.global_ref: type = global_ref file.%x
|
||||
// CHECK:STDOUT: %x.ref: type = name_ref x, %x.global_ref
|
||||
// CHECK:STDOUT: %return: <error> = return_slot <error>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc35_16.1: type = splice_block %.loc35_16.2 [concrete = type] {
|
||||
@@ -125,7 +126,8 @@ fn FirstPerfectNumber() -> z { return 6; }
|
||||
// CHECK:STDOUT: %HalfDozen.decl: %HalfDozen.type = fn_decl @HalfDozen [concrete = constants.%HalfDozen] {
|
||||
// CHECK:STDOUT: %return.patt: <error> = return_slot_pattern <error>, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %y.ref: type = name_ref y, file.%y
|
||||
// CHECK:STDOUT: %y.global_ref: type = global_ref file.%y
|
||||
// CHECK:STDOUT: %y.ref: type = name_ref y, %y.global_ref
|
||||
// CHECK:STDOUT: %return: <error> = return_slot <error>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.loc54_17.1: type = splice_block %.loc54_17.2 [concrete = type] {
|
||||
@@ -139,7 +141,8 @@ fn FirstPerfectNumber() -> z { return 6; }
|
||||
// CHECK:STDOUT: %FirstPerfectNumber.decl: %FirstPerfectNumber.type = fn_decl @FirstPerfectNumber [concrete = constants.%FirstPerfectNumber] {
|
||||
// CHECK:STDOUT: %return.patt: <error> = return_slot_pattern <error>, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: } {
|
||||
// CHECK:STDOUT: %z.ref: type = name_ref z, file.%z
|
||||
// CHECK:STDOUT: %z.global_ref: type = global_ref file.%z
|
||||
// CHECK:STDOUT: %z.ref: type = name_ref z, %z.global_ref
|
||||
// CHECK:STDOUT: %return: <error> = return_slot <error>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
+23
-22
@@ -96,33 +96,17 @@ var y: {.a: i32, .b: i32} = x;
|
||||
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
|
||||
// CHECK:STDOUT: .Core = imports.%Core
|
||||
// CHECK:STDOUT: .v = %v
|
||||
// CHECK:STDOUT: .w = %w
|
||||
// CHECK:STDOUT: .w = @__global_init.%w
|
||||
// CHECK:STDOUT: .x = %x
|
||||
// CHECK:STDOUT: .y = %y
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.import = import Core
|
||||
// CHECK:STDOUT: %impl.elem0.loc15_44.1: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc15_44.1: <bound method> = bound_method @__global_init.%int_1.loc15, %impl.elem0.loc15_44.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.282]
|
||||
// CHECK:STDOUT: %specific_fn.loc15_44.1: <specific function> = specific_function %impl.elem0.loc15_44.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc15_44.2: <bound method> = bound_method @__global_init.%int_1.loc15, %specific_fn.loc15_44.1 [concrete = constants.%bound_method.3bd]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc15_44.1: init %i32 = call %bound_method.loc15_44.2(@__global_init.%int_1.loc15) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc15_44.1: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc15_44.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc15_44.2: %i32 = converted @__global_init.%int_1.loc15, %.loc15_44.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %impl.elem0.loc15_44.2: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc15_44.3: <bound method> = bound_method @__global_init.%int_2.loc15, %impl.elem0.loc15_44.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a6]
|
||||
// CHECK:STDOUT: %specific_fn.loc15_44.2: <specific function> = specific_function %impl.elem0.loc15_44.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc15_44.4: <bound method> = bound_method @__global_init.%int_2.loc15, %specific_fn.loc15_44.2 [concrete = constants.%bound_method.a55]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc15_44.2: init %i32 = call %bound_method.loc15_44.4(@__global_init.%int_2.loc15) [concrete = constants.%int_2.2e0]
|
||||
// CHECK:STDOUT: %.loc15_44.3: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc15_44.2 [concrete = constants.%int_2.2e0]
|
||||
// CHECK:STDOUT: %.loc15_44.4: %i32 = converted @__global_init.%int_2.loc15, %.loc15_44.3 [concrete = constants.%int_2.2e0]
|
||||
// CHECK:STDOUT: %struct: %struct_type.a.b.250 = struct_value (%.loc15_44.2, %.loc15_44.4) [concrete = constants.%struct.940]
|
||||
// CHECK:STDOUT: %.loc15_44.5: %struct_type.a.b.250 = converted @__global_init.%.loc15, %struct [concrete = constants.%struct.940]
|
||||
// CHECK:STDOUT: %.loc15_25: type = splice_block %struct_type.a.b.loc15 [concrete = constants.%struct_type.a.b.250] {
|
||||
// CHECK:STDOUT: %.loc15: type = splice_block %struct_type.a.b.loc15 [concrete = constants.%struct_type.a.b.250] {
|
||||
// CHECK:STDOUT: %i32.loc15_13: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %i32.loc15_22: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %struct_type.a.b.loc15: type = struct_type {.a: %i32, .b: %i32} [concrete = constants.%struct_type.a.b.250]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %v: %struct_type.a.b.250 = wrapper_binding v, %.loc15_44.5
|
||||
// CHECK:STDOUT: %v: %struct_type.a.b.250 = wrapper_binding v, @__global_init.%.loc15_44.6
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %v.patt: %pattern_type.290 = value_binding_pattern v [concrete = constants.%v.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -131,7 +115,6 @@ var y: {.a: i32, .b: i32} = x;
|
||||
// CHECK:STDOUT: %i32.loc16_22: type = type_literal constants.%i32 [concrete = constants.%i32]
|
||||
// CHECK:STDOUT: %struct_type.a.b.loc16: type = struct_type {.a: %i32, .b: %i32} [concrete = constants.%struct_type.a.b.250]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %w: %struct_type.a.b.250 = wrapper_binding w, @__global_init.%v.ref
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %w.patt: %pattern_type.290 = value_binding_pattern w [concrete = constants.%w.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -163,8 +146,26 @@ var y: {.a: i32, .b: i32} = x;
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %int_1.loc15: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %int_2.loc15: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
|
||||
// CHECK:STDOUT: %.loc15: %struct_type.a.b.cfd = struct_literal (%int_1.loc15, %int_2.loc15) [concrete = constants.%struct.4aa]
|
||||
// CHECK:STDOUT: %v.ref: %struct_type.a.b.250 = name_ref v, file.%v
|
||||
// CHECK:STDOUT: %.loc15_44.1: %struct_type.a.b.cfd = struct_literal (%int_1.loc15, %int_2.loc15) [concrete = constants.%struct.4aa]
|
||||
// CHECK:STDOUT: %impl.elem0.loc15_44.1: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc15_44.1: <bound method> = bound_method %int_1.loc15, %impl.elem0.loc15_44.1 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.282]
|
||||
// CHECK:STDOUT: %specific_fn.loc15_44.1: <specific function> = specific_function %impl.elem0.loc15_44.1, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc15_44.2: <bound method> = bound_method %int_1.loc15, %specific_fn.loc15_44.1 [concrete = constants.%bound_method.3bd]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc15_44.1: init %i32 = call %bound_method.loc15_44.2(%int_1.loc15) [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc15_44.2: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc15_44.1 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %.loc15_44.3: %i32 = converted %int_1.loc15, %.loc15_44.2 [concrete = constants.%int_1.68a]
|
||||
// CHECK:STDOUT: %impl.elem0.loc15_44.2: %.33a = impl_witness_access constants.%ImplicitAs.impl_witness.d73, element0 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.f60]
|
||||
// CHECK:STDOUT: %bound_method.loc15_44.3: <bound method> = bound_method %int_2.loc15, %impl.elem0.loc15_44.2 [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.bound.8a6]
|
||||
// CHECK:STDOUT: %specific_fn.loc15_44.2: <specific function> = specific_function %impl.elem0.loc15_44.2, @Core.IntLiteral.as.ImplicitAs.impl.Convert(constants.%int_32) [concrete = constants.%Core.IntLiteral.as.ImplicitAs.impl.Convert.specific_fn]
|
||||
// CHECK:STDOUT: %bound_method.loc15_44.4: <bound method> = bound_method %int_2.loc15, %specific_fn.loc15_44.2 [concrete = constants.%bound_method.a55]
|
||||
// CHECK:STDOUT: %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc15_44.2: init %i32 = call %bound_method.loc15_44.4(%int_2.loc15) [concrete = constants.%int_2.2e0]
|
||||
// CHECK:STDOUT: %.loc15_44.4: %i32 = value_of_initializer %Core.IntLiteral.as.ImplicitAs.impl.Convert.call.loc15_44.2 [concrete = constants.%int_2.2e0]
|
||||
// CHECK:STDOUT: %.loc15_44.5: %i32 = converted %int_2.loc15, %.loc15_44.4 [concrete = constants.%int_2.2e0]
|
||||
// CHECK:STDOUT: %struct: %struct_type.a.b.250 = struct_value (%.loc15_44.3, %.loc15_44.5) [concrete = constants.%struct.940]
|
||||
// CHECK:STDOUT: %.loc15_44.6: %struct_type.a.b.250 = converted %.loc15_44.1, %struct [concrete = constants.%struct.940]
|
||||
// CHECK:STDOUT: %v.global_ref: %struct_type.a.b.250 = global_ref file.%v
|
||||
// CHECK:STDOUT: %v.ref: %struct_type.a.b.250 = name_ref v, %v.global_ref
|
||||
// CHECK:STDOUT: %w: %struct_type.a.b.250 = wrapper_binding w, %v.ref
|
||||
// CHECK:STDOUT: %int_1.loc18: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
|
||||
// CHECK:STDOUT: %int_2.loc18: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
|
||||
// CHECK:STDOUT: %.loc18_44.1: %struct_type.a.b.cfd = struct_literal (%int_1.loc18, %int_2.loc18) [concrete = constants.%struct.4aa]
|
||||
|
||||
+11
-10
@@ -252,12 +252,6 @@ var y: ((), ()) = x;
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %empty_tuple.loc4_21: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_26.1: %empty_tuple.type = converted @__global_init.%.loc4_21, %empty_tuple.loc4_21 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %empty_tuple.loc4_25: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_26.2: %empty_tuple.type = converted @__global_init.%.loc4_25, %empty_tuple.loc4_25 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%.loc4_26.1, %.loc4_26.2) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc4_26.3: %tuple.type = converted @__global_init.%.loc4_26, %tuple [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc4_15.1: type = splice_block %.loc4_15.5 [concrete = constants.%tuple.type] {
|
||||
// CHECK:STDOUT: %.loc4_10: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_14: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
@@ -266,7 +260,7 @@ var y: ((), ()) = x;
|
||||
// CHECK:STDOUT: %.loc4_15.4: type = converted constants.%empty_tuple, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: %.loc4_15.5: type = converted %.loc4_15.2, constants.%tuple.type [concrete = constants.%tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %v: %tuple.type = wrapper_binding v, %.loc4_26.3
|
||||
// CHECK:STDOUT: %v: %tuple.type = wrapper_binding v, @__global_init.%.loc4_26.4
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %v.patt: %pattern_type = value_binding_pattern v [concrete = constants.%v.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -278,7 +272,6 @@ var y: ((), ()) = x;
|
||||
// CHECK:STDOUT: %.loc5_15.4: type = converted constants.%empty_tuple, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: %.loc5_15.5: type = converted %.loc5_15.2, constants.%tuple.type [concrete = constants.%tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %w: %tuple.type = wrapper_binding w, @__global_init.%v.ref
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %w.patt: %pattern_type = value_binding_pattern w [concrete = constants.%w.patt]
|
||||
// CHECK:STDOUT: }
|
||||
@@ -316,8 +309,16 @@ var y: ((), ()) = x;
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc4_21: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_25: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_26: %tuple.type = tuple_literal (%.loc4_21, %.loc4_25) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %v.ref: %tuple.type = name_ref v, file.%v
|
||||
// CHECK:STDOUT: %.loc4_26.1: %tuple.type = tuple_literal (%.loc4_21, %.loc4_25) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %empty_tuple.loc4_21: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_26.2: %empty_tuple.type = converted %.loc4_21, %empty_tuple.loc4_21 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %empty_tuple.loc4_25: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_26.3: %empty_tuple.type = converted %.loc4_25, %empty_tuple.loc4_25 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %tuple: %tuple.type = tuple_value (%.loc4_26.2, %.loc4_26.3) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc4_26.4: %tuple.type = converted %.loc4_26.1, %tuple [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %v.global_ref: %tuple.type = global_ref file.%v
|
||||
// CHECK:STDOUT: %v.ref: %tuple.type = name_ref v, %v.global_ref
|
||||
// CHECK:STDOUT: %w: %tuple.type = wrapper_binding w, %v.ref
|
||||
// CHECK:STDOUT: %.loc7_21.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc7_25.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc7_26.1: %tuple.type = tuple_literal (%.loc7_21.1, %.loc7_25.1) [concrete = constants.%tuple]
|
||||
|
||||
+13
-13
@@ -72,11 +72,11 @@ let (x: {}, y: {}) = ({}, {});
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
class C {
|
||||
// CHECK:STDERR: ╭─┤ fail_in_class.carbon:[[@LINE+7]]:20
|
||||
// CHECK:STDERR: ╭─┤ fail_in_class.carbon:[[@LINE+7]]:7
|
||||
// CHECK:STDERR: -> │ var (x: {}, y: {});
|
||||
// CHECK:STDERR: · ┳
|
||||
// CHECK:STDERR: · ┗━━┫ error: found tuple pattern in class `var` decl
|
||||
// CHECK:STDERR: · ┃ [FieldWithTuplePattern]
|
||||
// CHECK:STDERR: · ━━━━━━━┳━━━━━━
|
||||
// CHECK:STDERR: · ┗━━┫ error: tuple pattern in field declaration
|
||||
// CHECK:STDERR: · ┃ [FieldWithTuplePattern]
|
||||
// CHECK:STDERR: ╰────
|
||||
// CHECK:STDERR:
|
||||
var (x: {}, y: {});
|
||||
@@ -608,20 +608,16 @@ let (a: {}, b: {}) = ({}, {}, {});
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
// CHECK:STDOUT: %empty_struct.loc5_24: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc5_24: %empty_struct_type = converted @__global_init.%.loc5_24, %empty_struct.loc5_24 [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc5_10.1: type = splice_block %.loc5_10.3 [concrete = constants.%empty_struct_type] {
|
||||
// CHECK:STDOUT: %.loc5_10.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc5_10.3: type = converted %.loc5_10.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %x: %empty_struct_type = wrapper_binding x, %.loc5_24
|
||||
// CHECK:STDOUT: %empty_struct.loc5_28: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc5_28: %empty_struct_type = converted @__global_init.%.loc5_28, %empty_struct.loc5_28 [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %x: %empty_struct_type = wrapper_binding x, @__global_init.%.loc5_24.2
|
||||
// CHECK:STDOUT: %.loc5_17.1: type = splice_block %.loc5_17.3 [concrete = constants.%empty_struct_type] {
|
||||
// CHECK:STDOUT: %.loc5_17.2: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc5_17.3: type = converted %.loc5_17.2, constants.%empty_struct_type [concrete = constants.%empty_struct_type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %y: %empty_struct_type = wrapper_binding y, %.loc5_28
|
||||
// CHECK:STDOUT: %y: %empty_struct_type = wrapper_binding y, @__global_init.%.loc5_28.2
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type.a96 = value_binding_pattern x [concrete = constants.%x.patt]
|
||||
// CHECK:STDOUT: %y.patt: %pattern_type.a96 = value_binding_pattern y [concrete = constants.%y.patt]
|
||||
@@ -631,9 +627,13 @@ let (a: {}, b: {}) = ({}, {}, {});
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc5_24: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc5_28: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc5_29: %tuple.type = tuple_literal (%.loc5_24, %.loc5_28) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc5_24.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc5_28.1: %empty_struct_type = struct_literal () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc5_29: %tuple.type = tuple_literal (%.loc5_24.1, %.loc5_28.1) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %empty_struct.loc5_24: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc5_24.2: %empty_struct_type = converted %.loc5_24.1, %empty_struct.loc5_24 [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %empty_struct.loc5_28: %empty_struct_type = struct_value () [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: %.loc5_28.2: %empty_struct_type = converted %.loc5_28.1, %empty_struct.loc5_28 [concrete = constants.%empty_struct]
|
||||
// CHECK:STDOUT: <elided>
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
+15
-15
@@ -96,13 +96,11 @@ var (x: (), y: ()) = ((), ());
|
||||
// CHECK:STDOUT: .y = %y
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %y.var: ref %empty_tuple.type = var_storage %y.var_patt [concrete]
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_28: %empty_tuple.type = converted @__global_init.%.loc4_28, %empty_tuple [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_10.1: type = splice_block %.loc4_10.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc4_10.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_10.3: type = converted %.loc4_10.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %x: %empty_tuple.type = wrapper_binding x, %.loc4_28
|
||||
// CHECK:STDOUT: %x: %empty_tuple.type = wrapper_binding x, @__global_init.%.loc4_28.2
|
||||
// CHECK:STDOUT: %.loc4_21.1: type = splice_block %.loc4_21.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc4_21.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_21.3: type = converted %.loc4_21.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
@@ -118,9 +116,11 @@ var (x: (), y: ()) = ((), ());
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: fn @__global_init() {
|
||||
// CHECK:STDOUT: !entry:
|
||||
// CHECK:STDOUT: %.loc4_28: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_28.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_32.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_33: %tuple.type = tuple_literal (%.loc4_28, %.loc4_32.1) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc4_33: %tuple.type = tuple_literal (%.loc4_28.1, %.loc4_32.1) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_28.2: %empty_tuple.type = converted %.loc4_28.1, %empty_tuple [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_32.2: init %empty_tuple.type = tuple_init () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_13: init %empty_tuple.type = converted %.loc4_32.1, %.loc4_32.2 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: assign file.%y.var, %.loc4_13
|
||||
@@ -151,18 +151,16 @@ var (x: (), y: ()) = ((), ());
|
||||
// CHECK:STDOUT: .y = %y
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %.var: ref %tuple.type = var_storage %.var_patt [concrete]
|
||||
// CHECK:STDOUT: %tuple.elem0: ref %empty_tuple.type = tuple_access %.var, element0 [concrete = constants.%tuple.elem0]
|
||||
// CHECK:STDOUT: %tuple.elem1: ref %empty_tuple.type = tuple_access %.var, element1 [concrete = constants.%tuple.elem1]
|
||||
// CHECK:STDOUT: %.loc4_10.1: type = splice_block %.loc4_10.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc4_10.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_10.3: type = converted %.loc4_10.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %x: ref %empty_tuple.type = wrapper_binding x, %tuple.elem0 [concrete = constants.%tuple.elem0]
|
||||
// CHECK:STDOUT: %x: ref %empty_tuple.type = wrapper_binding x, @__global_init.%tuple.elem0.loc4_1 [concrete = constants.%tuple.elem0]
|
||||
// CHECK:STDOUT: %.loc4_17.1: type = splice_block %.loc4_17.3 [concrete = constants.%empty_tuple.type] {
|
||||
// CHECK:STDOUT: %.loc4_17.2: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_17.3: type = converted %.loc4_17.2, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %y: ref %empty_tuple.type = wrapper_binding y, %tuple.elem1 [concrete = constants.%tuple.elem1]
|
||||
// CHECK:STDOUT: %y: ref %empty_tuple.type = wrapper_binding y, @__global_init.%tuple.elem1.loc4_1 [concrete = constants.%tuple.elem1]
|
||||
// CHECK:STDOUT: name_binding_decl {
|
||||
// CHECK:STDOUT: %x.patt: %pattern_type.cb1 = ref_binding_pattern x [concrete = constants.%x.patt]
|
||||
// CHECK:STDOUT: %y.patt: %pattern_type.cb1 = ref_binding_pattern y [concrete = constants.%y.patt]
|
||||
@@ -176,17 +174,19 @@ var (x: (), y: ()) = ((), ());
|
||||
// CHECK:STDOUT: %.loc4_24.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_28.1: %empty_tuple.type = tuple_literal () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_29.1: %tuple.type = tuple_literal (%.loc4_24.1, %.loc4_28.1) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %tuple.elem0: ref %empty_tuple.type = tuple_access file.%.var, element0 [concrete = constants.%tuple.elem0]
|
||||
// CHECK:STDOUT: %.loc4_24.2: init %empty_tuple.type to %tuple.elem0 = tuple_init () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %tuple.elem0.loc4_29: ref %empty_tuple.type = tuple_access file.%.var, element0 [concrete = constants.%tuple.elem0]
|
||||
// CHECK:STDOUT: %.loc4_24.2: init %empty_tuple.type to %tuple.elem0.loc4_29 = tuple_init () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_29.2: init %empty_tuple.type = converted %.loc4_24.1, %.loc4_24.2 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_29.3: init %empty_tuple.type to %tuple.elem0 = in_place_init %.loc4_29.2 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %tuple.elem1: ref %empty_tuple.type = tuple_access file.%.var, element1 [concrete = constants.%tuple.elem1]
|
||||
// CHECK:STDOUT: %.loc4_28.2: init %empty_tuple.type to %tuple.elem1 = tuple_init () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_29.3: init %empty_tuple.type to %tuple.elem0.loc4_29 = in_place_init %.loc4_29.2 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %tuple.elem1.loc4_29: ref %empty_tuple.type = tuple_access file.%.var, element1 [concrete = constants.%tuple.elem1]
|
||||
// CHECK:STDOUT: %.loc4_28.2: init %empty_tuple.type to %tuple.elem1.loc4_29 = tuple_init () [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_29.4: init %empty_tuple.type = converted %.loc4_28.1, %.loc4_28.2 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_29.5: init %empty_tuple.type to %tuple.elem1 = in_place_init %.loc4_29.4 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_29.5: init %empty_tuple.type to %tuple.elem1.loc4_29 = in_place_init %.loc4_29.4 [concrete = constants.%empty_tuple]
|
||||
// CHECK:STDOUT: %.loc4_29.6: init %tuple.type to file.%.var = tuple_init (%.loc4_29.3, %.loc4_29.5) [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: %.loc4_1: init %tuple.type = converted %.loc4_29.1, %.loc4_29.6 [concrete = constants.%tuple]
|
||||
// CHECK:STDOUT: assign file.%.var, %.loc4_1
|
||||
// CHECK:STDOUT: %tuple.elem0.loc4_1: ref %empty_tuple.type = tuple_access file.%.var, element0 [concrete = constants.%tuple.elem0]
|
||||
// CHECK:STDOUT: %tuple.elem1.loc4_1: ref %empty_tuple.type = tuple_access file.%.var, element1 [concrete = constants.%tuple.elem1]
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
@@ -424,6 +424,7 @@ CARBON_DIAGNOSTIC_KIND(EvalRequiresConstantValue)
|
||||
CARBON_DIAGNOSTIC_KIND(FormExprEvaluationFailure)
|
||||
CARBON_DIAGNOSTIC_KIND(NameDeclDuplicate)
|
||||
CARBON_DIAGNOSTIC_KIND(NameUseBeforeDecl)
|
||||
CARBON_DIAGNOSTIC_KIND(UncapturedLocal)
|
||||
CARBON_DIAGNOSTIC_KIND(RepeatedConst)
|
||||
CARBON_DIAGNOSTIC_KIND(CharTooLargeForType)
|
||||
CARBON_DIAGNOSTIC_KIND(InvalidCharLiteralValue)
|
||||
|
||||
@@ -295,8 +295,7 @@ auto FileContext::GetOrCreateFunctionInfo(
|
||||
auto FileContext::LowerGlobalVariables(SemIR::InstBlockId inst_block_id)
|
||||
-> void {
|
||||
for (auto inst_id : sem_ir().inst_blocks().Get(inst_block_id)) {
|
||||
// Only `VarStorage` indicates a global variable declaration in the
|
||||
// top instruction block.
|
||||
// `VarStorage` indicates a global variable declaration.
|
||||
if (auto var = sem_ir().insts().TryGetAs<SemIR::VarStorage>(inst_id)) {
|
||||
// Get the global variable declaration. We created this when lowering the
|
||||
// constant unless the variable is unnamed, in which case we need to
|
||||
@@ -315,6 +314,40 @@ auto FileContext::LowerGlobalVariables(SemIR::InstBlockId inst_block_id)
|
||||
global_variables_.Insert(inst_id, llvm_var);
|
||||
llvm_var->setInitializer(
|
||||
llvm::Constant::getNullValue(llvm_var->getValueType()));
|
||||
continue;
|
||||
}
|
||||
|
||||
// A non-constant global `let` binding is placed outside `__global_init`
|
||||
// only if its initializer is constant. In that case, statically initialize
|
||||
// its global storage rather than initializing it in `__global_init`.
|
||||
if (auto binding =
|
||||
sem_ir().insts().TryGetAs<SemIR::WrapperBinding>(inst_id)) {
|
||||
const auto& entity_name =
|
||||
sem_ir().entity_names().Get(binding->entity_name_id);
|
||||
if (entity_name.name_id == SemIR::NameId::Underscore ||
|
||||
sem_ir().constant_values().Get(inst_id).is_constant()) {
|
||||
continue;
|
||||
}
|
||||
auto value_const_id = sem_ir().constant_values().Get(binding->value_id);
|
||||
if (!value_const_id.is_concrete()) {
|
||||
// TODO: Support non-constant `let` bindings in generic classes.
|
||||
continue;
|
||||
}
|
||||
auto* llvm_var = GetOrCreateGlobalBinding(inst_id);
|
||||
if (!llvm_var) {
|
||||
// The absence of a variable indicates that no storage is required for
|
||||
// this value -- that is, it has an empty value representation.
|
||||
continue;
|
||||
}
|
||||
// For a type with a pointer value representation, the lowered constant
|
||||
// is the object representation, which is what the global holds.
|
||||
auto* init =
|
||||
constants_.Get(sem_ir().constant_values().GetInstId(value_const_id));
|
||||
CARBON_CHECK(init->getType() == llvm_var->getValueType(),
|
||||
"Constant initializer type mismatch for {0}", *binding);
|
||||
llvm_var->setInitializer(init);
|
||||
// A value binding is immutable.
|
||||
llvm_var->setConstant(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -858,6 +891,58 @@ auto FileContext::BuildNonCppGlobalVariableDecl(SemIR::VarStorage var_storage)
|
||||
/*Initializer=*/nullptr, mangled_name);
|
||||
}
|
||||
|
||||
auto FileContext::GetOrCreateGlobalBinding(SemIR::InstId binding_inst_id)
|
||||
-> llvm::GlobalVariable* {
|
||||
if (auto result = global_bindings_.Lookup(binding_inst_id)) {
|
||||
return result.value();
|
||||
}
|
||||
|
||||
auto binding = sem_ir().insts().GetAs<SemIR::WrapperBinding>(binding_inst_id);
|
||||
llvm::Type* type = nullptr;
|
||||
if (SemIR::IsRefCategory(SemIR::GetExprCategory(sem_ir(), binding_inst_id))) {
|
||||
type = llvm::PointerType::get(llvm_context(), /*AddressSpace=*/0);
|
||||
} else {
|
||||
auto value_rep = SemIR::ValueRepr::ForType(sem_ir(), binding.type_id);
|
||||
switch (value_rep.kind) {
|
||||
case SemIR::ValueRepr::Unknown:
|
||||
case SemIR::ValueRepr::Dependent:
|
||||
CARBON_FATAL("Unexpected incomplete or dependent global binding: {0}",
|
||||
binding);
|
||||
case SemIR::ValueRepr::None:
|
||||
global_bindings_.Insert(binding_inst_id, nullptr);
|
||||
return nullptr;
|
||||
case SemIR::ValueRepr::Copy:
|
||||
type = GetType(value_rep.type_id);
|
||||
break;
|
||||
case SemIR::ValueRepr::Pointer:
|
||||
type = GetType(sem_ir().GetPointeeType(value_rep.type_id));
|
||||
break;
|
||||
case SemIR::ValueRepr::Custom:
|
||||
CARBON_FATAL("TODO: Support global binding with custom value repr");
|
||||
}
|
||||
}
|
||||
|
||||
auto mangled_name =
|
||||
mangler_.MangleGlobalBinding(binding.entity_name_id, binding_inst_id);
|
||||
auto linkage = llvm::GlobalVariable::ExternalLinkage;
|
||||
if (mangled_name.empty()) {
|
||||
// If the variable doesn't have an externally-visible name, demote it to
|
||||
// internal linkage and invent a plausible name that shouldn't collide with
|
||||
// any of our real manglings.
|
||||
linkage = llvm::GlobalVariable::InternalLinkage;
|
||||
if (inst_namer_) {
|
||||
mangled_name =
|
||||
("let.anon" + inst_namer_->GetUnscopedNameFor(binding_inst_id)).str();
|
||||
}
|
||||
}
|
||||
|
||||
auto* global_var = new llvm::GlobalVariable(
|
||||
llvm_module(), type, /*isConstant=*/false, linkage,
|
||||
/*Initializer=*/nullptr, mangled_name);
|
||||
global_bindings_.Insert(binding_inst_id, global_var);
|
||||
return global_var;
|
||||
}
|
||||
|
||||
auto FileContext::GetLocForDI(SemIR::InstId inst_id) -> Context::LocForDI {
|
||||
auto abs_node_ref = GetAbsoluteNodeRef(sem_ir_, SemIR::LocId(inst_id)).back();
|
||||
return context().GetLocForDI(abs_node_ref);
|
||||
|
||||
@@ -194,6 +194,12 @@ class FileContext {
|
||||
auto BuildNonCppGlobalVariableDecl(SemIR::VarStorage var_storage)
|
||||
-> llvm::GlobalVariable*;
|
||||
|
||||
// Returns or creates the global storage for a non-constant global or static
|
||||
// `let` binding (`WrapperBinding`), or `nullptr` if its value representation
|
||||
// is empty.
|
||||
auto GetOrCreateGlobalBinding(SemIR::InstId binding_inst_id)
|
||||
-> llvm::GlobalVariable*;
|
||||
|
||||
// Builds the definition for the given function. If the function is only a
|
||||
// declaration with no definition, does nothing. If this is a generic it'll
|
||||
// only be lowered if the specific_id is specified. During this lowering of
|
||||
@@ -310,6 +316,10 @@ class FileContext {
|
||||
// Maps global variables to their lowered variant.
|
||||
Map<SemIR::InstId, llvm::GlobalVariable*> global_variables_;
|
||||
|
||||
// Maps non-constant global/static `let` bindings (`WrapperBinding`) to their
|
||||
// lowered global storage.
|
||||
Map<SemIR::InstId, llvm::GlobalVariable*> global_bindings_;
|
||||
|
||||
// For a generic function, keep track of the specifics for which LLVM
|
||||
// function declarations were created. Those can be retrieved then from
|
||||
// `specific_functions_`.
|
||||
|
||||
@@ -410,18 +410,23 @@ auto FunctionContext::CopyValue(TypeInFile type, SemIR::InstId source_id,
|
||||
}
|
||||
}
|
||||
|
||||
auto FunctionContext::CopyObject(TypeInFile type, SemIR::InstId source_id,
|
||||
SemIR::InstId dest_id) -> void {
|
||||
auto FunctionContext::CopyObject(TypeInFile type, llvm::Value* source,
|
||||
llvm::Value* dest) -> void {
|
||||
const auto& layout = llvm_module().getDataLayout();
|
||||
auto* llvm_type = GetType(type);
|
||||
auto align = GetAlignment(type);
|
||||
|
||||
// TODO: Attach !tbaa.struct metadata indicating which portions of the
|
||||
// type we actually need to copy and which are padding.
|
||||
builder().CreateMemCpy(GetValue(dest_id), align, GetValue(source_id), align,
|
||||
builder().CreateMemCpy(dest, align, source, align,
|
||||
layout.getTypeAllocSize(llvm_type));
|
||||
}
|
||||
|
||||
auto FunctionContext::CopyObject(TypeInFile type, SemIR::InstId source_id,
|
||||
SemIR::InstId dest_id) -> void {
|
||||
CopyObject(type, GetValue(source_id), GetValue(dest_id));
|
||||
}
|
||||
|
||||
auto FunctionContext::Inserter::InsertHelper(
|
||||
llvm::Instruction* inst, const llvm::Twine& name,
|
||||
llvm::BasicBlock::iterator insert_pt) const -> void {
|
||||
|
||||
@@ -200,6 +200,11 @@ class FunctionContext {
|
||||
auto StoreObject(TypeInFile type, llvm::Value* value, llvm::Value* addr)
|
||||
-> void;
|
||||
|
||||
// Emits an object representation copy for type `type` from `source` to
|
||||
// `dest`, which must be pointers to `type` objects.
|
||||
auto CopyObject(TypeInFile type, llvm::Value* source, llvm::Value* dest)
|
||||
-> void;
|
||||
|
||||
// Emits the instructions necessary to initialize the storage at `dest_id`
|
||||
// from the repr-initializing expression `source_id`. This assumes the
|
||||
// instructions for `source_id` have already been emitted, so it's a no-op if
|
||||
@@ -236,6 +241,9 @@ class FunctionContext {
|
||||
// instruction.
|
||||
auto AddInstToCurrentFingerprint(SemIR::InstId inst_id) -> void;
|
||||
|
||||
// When fingerprinting for a specific, adds the global.
|
||||
auto AddGlobalToCurrentFingerprint(llvm::Value* global) -> void;
|
||||
|
||||
// Emits the final function fingerprints. Only called when function lowering
|
||||
// is complete.
|
||||
auto EmitFinalFingerprint() -> void;
|
||||
@@ -327,9 +335,6 @@ class FunctionContext {
|
||||
auto CopyObject(TypeInFile type, SemIR::InstId source_id,
|
||||
SemIR::InstId dest_id) -> void;
|
||||
|
||||
// When fingerprinting for a specific, adds the global.
|
||||
auto AddGlobalToCurrentFingerprint(llvm::Value* global) -> void;
|
||||
|
||||
// Context for lowering in the file that contains this function's
|
||||
// instructions.
|
||||
FileContext* file_context_;
|
||||
|
||||
+94
-14
@@ -15,6 +15,7 @@
|
||||
#include "toolchain/sem_ir/builtin_function_kind.h"
|
||||
#include "toolchain/sem_ir/expr_info.h"
|
||||
#include "toolchain/sem_ir/function.h"
|
||||
#include "toolchain/sem_ir/import_ir.h"
|
||||
#include "toolchain/sem_ir/inst.h"
|
||||
#include "toolchain/sem_ir/typed_insts.h"
|
||||
|
||||
@@ -117,7 +118,98 @@ auto HandleInst(FunctionContext& context, SemIR::InstId inst_id,
|
||||
|
||||
auto HandleInst(FunctionContext& context, SemIR::InstId inst_id,
|
||||
SemIR::WrapperBinding inst) -> void {
|
||||
context.SetLocal(inst_id, context.GetValue(inst.value_id));
|
||||
auto* value = context.GetValue(inst.value_id);
|
||||
context.SetLocal(inst_id, value);
|
||||
|
||||
const auto& entity_name =
|
||||
context.sem_ir().entity_names().Get(inst.entity_name_id);
|
||||
if (!entity_name.parent_scope_id.has_value() ||
|
||||
entity_name.name_id == SemIR::NameId::Underscore ||
|
||||
context.sem_ir().constant_values().Get(inst_id).is_constant()) {
|
||||
return;
|
||||
}
|
||||
|
||||
auto& file_context = context.GetFileContext(&context.sem_ir());
|
||||
auto* global_var = file_context.GetOrCreateGlobalBinding(inst_id);
|
||||
if (!global_var) {
|
||||
return;
|
||||
}
|
||||
global_var->setInitializer(
|
||||
llvm::Constant::getNullValue(global_var->getValueType()));
|
||||
|
||||
if (SemIR::IsRefCategory(SemIR::GetExprCategory(context.sem_ir(), inst_id))) {
|
||||
auto* store = context.builder().CreateStore(value, global_var);
|
||||
store->setAlignment(
|
||||
context.llvm_module().getDataLayout().getPointerABIAlignment(0));
|
||||
return;
|
||||
}
|
||||
|
||||
auto value_rep = SemIR::ValueRepr::ForType(context.sem_ir(), inst.type_id);
|
||||
switch (value_rep.kind) {
|
||||
case SemIR::ValueRepr::Copy:
|
||||
context.StoreObject(
|
||||
{.file = &context.sem_ir(), .type_id = value_rep.type_id}, value,
|
||||
global_var);
|
||||
break;
|
||||
case SemIR::ValueRepr::Pointer: {
|
||||
auto pointee_type_id = context.sem_ir().GetPointeeType(value_rep.type_id);
|
||||
context.CopyObject(
|
||||
{.file = &context.sem_ir(), .type_id = pointee_type_id}, value,
|
||||
global_var);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
CARBON_FATAL("Unexpected value repr for global binding: {0}", inst);
|
||||
}
|
||||
}
|
||||
|
||||
auto HandleInst(FunctionContext& context, SemIR::InstId inst_id,
|
||||
SemIR::GlobalRef inst) -> void {
|
||||
auto [canonical_ir, canonical_inst_id] =
|
||||
SemIR::GetCanonicalFileAndInstId(&context.sem_ir(), inst.inst_id);
|
||||
auto& target_file_context = context.GetFileContext(canonical_ir);
|
||||
auto* global_var =
|
||||
target_file_context.GetOrCreateGlobalBinding(canonical_inst_id);
|
||||
context.AddGlobalToCurrentFingerprint(global_var);
|
||||
|
||||
if (SemIR::IsRefCategory(
|
||||
SemIR::GetExprCategory(*canonical_ir, canonical_inst_id))) {
|
||||
auto* ptr_type = llvm::PointerType::get(context.llvm_context(),
|
||||
/*AddressSpace=*/0);
|
||||
auto* load = context.builder().CreateLoad(ptr_type, global_var);
|
||||
load->setAlignment(
|
||||
context.llvm_module().getDataLayout().getPointerABIAlignment(0));
|
||||
context.SetLocal(inst_id, load);
|
||||
return;
|
||||
}
|
||||
|
||||
auto canonical_binding =
|
||||
canonical_ir->insts().GetAs<SemIR::WrapperBinding>(canonical_inst_id);
|
||||
auto value_rep =
|
||||
SemIR::ValueRepr::ForType(*canonical_ir, canonical_binding.type_id);
|
||||
switch (value_rep.kind) {
|
||||
case SemIR::ValueRepr::Unknown:
|
||||
case SemIR::ValueRepr::Dependent:
|
||||
CARBON_FATAL("Unexpected incomplete or dependent global binding: {0}",
|
||||
canonical_binding);
|
||||
case SemIR::ValueRepr::None:
|
||||
context.SetLocal(
|
||||
inst_id,
|
||||
llvm::PoisonValue::get(context.GetType(
|
||||
{.file = canonical_ir, .type_id = canonical_binding.type_id})));
|
||||
break;
|
||||
case SemIR::ValueRepr::Copy:
|
||||
context.SetLocal(inst_id,
|
||||
context.LoadObject(
|
||||
{.file = canonical_ir, .type_id = value_rep.type_id},
|
||||
global_var));
|
||||
break;
|
||||
case SemIR::ValueRepr::Pointer:
|
||||
context.SetLocal(inst_id, global_var);
|
||||
break;
|
||||
case SemIR::ValueRepr::Custom:
|
||||
CARBON_FATAL("TODO: Support global binding with custom value repr");
|
||||
}
|
||||
}
|
||||
|
||||
auto HandleInst(FunctionContext& context, SemIR::InstId inst_id,
|
||||
@@ -215,19 +307,7 @@ auto HandleInst(FunctionContext& context, SemIR::InstId inst_id,
|
||||
return;
|
||||
}
|
||||
|
||||
auto inner_inst_id = inst.value_id;
|
||||
|
||||
// `GetValue` will fail on package-scope value bindings because they aren't
|
||||
// constants, and they aren't global variables, so as a workaround we
|
||||
// peek through bindings here to directly access the bound value.
|
||||
// TODO: Find a way of dealing with this that still works if the bound
|
||||
// value isn't a global variable or constant either.
|
||||
if (auto bind_name =
|
||||
context.sem_ir().insts().TryGetAs<SemIR::AnyBinding>(inner_inst_id)) {
|
||||
inner_inst_id = bind_name->value_id;
|
||||
}
|
||||
|
||||
context.SetLocal(inst_id, context.GetValue(inner_inst_id));
|
||||
context.SetLocal(inst_id, context.GetValue(inst.value_id));
|
||||
}
|
||||
|
||||
auto HandleInst(FunctionContext& /*context*/, SemIR::InstId /*inst_id*/,
|
||||
|
||||
+8
-8
@@ -29,20 +29,20 @@ fn F() {
|
||||
// CHECK:STDOUT: @VehicleType.val.c4d = internal constant { i2 } zeroinitializer
|
||||
// CHECK:STDOUT: @VehicleType.val.df0 = internal constant { i2 } { i2 1 }
|
||||
// CHECK:STDOUT: @VehicleType.val.8cc = internal constant { i2 } { i2 -2 }
|
||||
// CHECK:STDOUT: @VehicleType.val.df0.loc15_6.10 = internal constant { i2 } { i2 1 }
|
||||
// CHECK:STDOUT: @VehicleType.val.c4d.loc14_7.10 = internal constant { i2 } zeroinitializer
|
||||
// CHECK:STDOUT: @_Cglobal_vehicle.Main = constant { i2 } zeroinitializer
|
||||
// CHECK:STDOUT: @VehicleType.val.df0.Car.ref = internal constant { i2 } { i2 1 }
|
||||
// CHECK:STDOUT: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 0, ptr @_C__global_init.Main, ptr null }]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !25 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !29
|
||||
// CHECK:STDOUT: ret void, !dbg !28
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define internal void @_C__global_init.Main() #0 !dbg !30 {
|
||||
// CHECK:STDOUT: define internal void @_C__global_init.Main() #0 !dbg !29 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !32
|
||||
// CHECK:STDOUT: ret void, !dbg !30
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: attributes #0 = { nounwind }
|
||||
@@ -57,7 +57,7 @@ fn F() {
|
||||
// CHECK:STDOUT: !23 = !{null}
|
||||
// CHECK:STDOUT: !24 = !DISubroutineType(types: !23)
|
||||
// CHECK:STDOUT: !25 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !20, line: 21, type: !24, spFlags: DISPFlagDefinition, unit: !21)
|
||||
// CHECK:STDOUT: !29 = !DILocation(line: 21, column: 1, scope: !25)
|
||||
// CHECK:STDOUT: !30 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !20, type: !24, spFlags: DISPFlagDefinition, unit: !21)
|
||||
// CHECK:STDOUT: !32 = !DILocation(line: 0, scope: !30)
|
||||
// CHECK:STDOUT: !28 = !DILocation(line: 21, column: 1, scope: !25)
|
||||
// CHECK:STDOUT: !29 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !20, type: !24, spFlags: DISPFlagDefinition, unit: !21)
|
||||
// CHECK:STDOUT: !30 = !DILocation(line: 0, scope: !29)
|
||||
// CHECK:STDOUT:
|
||||
+692
-11
@@ -2,7 +2,7 @@
|
||||
// Exceptions. See /LICENSE for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon
|
||||
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/full.carbon
|
||||
//
|
||||
// AUTOUPDATE
|
||||
// TIP: To test this file alone, run:
|
||||
@@ -10,6 +10,9 @@
|
||||
// TIP: To dump output, run:
|
||||
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/lower/testdata/let/global.carbon
|
||||
|
||||
// --- empty_class.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
class C {}
|
||||
|
||||
let c: C = {};
|
||||
@@ -20,12 +23,76 @@ fn F() {
|
||||
Sink(c);
|
||||
}
|
||||
|
||||
// --- copy_and_runtime_init.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
fn MakeInt() -> i32;
|
||||
|
||||
let a: i32 = 0;
|
||||
let b: i32 = MakeInt();
|
||||
|
||||
fn ReadA() -> i32 { return a; }
|
||||
fn ReadPackageA() -> i32 { return package.a; }
|
||||
fn ReadB() -> i32 { return b; }
|
||||
|
||||
// --- pointer_and_empty_repr.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
class Pair {
|
||||
var x: i32;
|
||||
var y: i32;
|
||||
}
|
||||
|
||||
fn MakePair() -> Pair;
|
||||
|
||||
let p: Pair = MakePair();
|
||||
let u: () = ();
|
||||
|
||||
fn ReadPairX() -> i32 { return p.x; }
|
||||
fn ReadUnit() -> () { return u; }
|
||||
|
||||
// --- ref_and_class_scope.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
var backing: i32 = 10;
|
||||
fn GetPtr() -> i32*;
|
||||
|
||||
let ref r_const: i32 = backing;
|
||||
let ref r_runtime: i32 = *GetPtr();
|
||||
|
||||
class Holder {
|
||||
let k: i32 = 42;
|
||||
fn Inside() -> i32 { return k; }
|
||||
}
|
||||
|
||||
fn ReadRefs() -> i32 {
|
||||
let _: i32 = r_const;
|
||||
return r_runtime;
|
||||
}
|
||||
|
||||
fn ReadHolderOutside() -> i32 {
|
||||
return Holder.k;
|
||||
}
|
||||
|
||||
// --- for_in_local_fn.carbon
|
||||
library "[[@TEST_NAME]]";
|
||||
|
||||
let n: i32 = fn () -> i32 {
|
||||
var a: array(i32, 3) = (1, 2, 3);
|
||||
var j: i32 = 0;
|
||||
// `i` is not a global `let`.
|
||||
for (i: i32 in a) {
|
||||
j += i;
|
||||
}
|
||||
return j;
|
||||
}();
|
||||
|
||||
// CHECK:STDOUT: ; ---
|
||||
// CHECK:STDOUT: ; ModuleID = 'global.carbon'
|
||||
// CHECK:STDOUT: source_filename = "global.carbon"
|
||||
// CHECK:STDOUT: ; ModuleID = 'empty_class.carbon'
|
||||
// CHECK:STDOUT: source_filename = "empty_class.carbon"
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: @C.val = internal constant {} zeroinitializer
|
||||
// CHECK:STDOUT: @C.val.loc15_13.5 = internal constant {} zeroinitializer
|
||||
// CHECK:STDOUT: @_Cc.Main = constant {} zeroinitializer
|
||||
// CHECK:STDOUT: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 0, ptr @_C__global_init.Main, ptr null }]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: declare void @_CSink.Main(ptr)
|
||||
@@ -33,30 +100,644 @@ fn F() {
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define void @_CF.Main() #0 !dbg !11 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: call void @_CSink.Main(ptr @C.val.loc15_13.5), !dbg !13
|
||||
// CHECK:STDOUT: call void @_CSink.Main(ptr @_Cc.Main), !dbg !13
|
||||
// CHECK:STDOUT: ret void, !dbg !14
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define internal void @_C__global_init.Main() #0 !dbg !15 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !16
|
||||
// CHECK:STDOUT: %.loc5_13.2.temp = alloca {}, align 1, !dbg !16
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc5_13.2.temp), !dbg !16
|
||||
// CHECK:STDOUT: ret void, !dbg !17
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
|
||||
// CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: attributes #0 = { nounwind }
|
||||
// CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !llvm.dbg.cu = !{!5}
|
||||
// CHECK:STDOUT: !llvm.module.flags = !{!2, !3}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5}
|
||||
// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3}
|
||||
// CHECK:STDOUT: !4 = !DIFile(filename: "global.carbon", directory: "")
|
||||
// CHECK:STDOUT: !4 = !DIFile(filename: "empty_class.carbon", directory: "")
|
||||
// CHECK:STDOUT: !5 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !4, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
|
||||
// CHECK:STDOUT: !9 = !{null}
|
||||
// CHECK:STDOUT: !10 = !DISubroutineType(types: !9)
|
||||
// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !4, line: 19, type: !10, spFlags: DISPFlagDefinition, unit: !5)
|
||||
// CHECK:STDOUT: !13 = !DILocation(line: 20, column: 3, scope: !11)
|
||||
// CHECK:STDOUT: !14 = !DILocation(line: 19, column: 1, scope: !11)
|
||||
// CHECK:STDOUT: !11 = distinct !DISubprogram(name: "F", linkageName: "_CF.Main", scope: null, file: !4, line: 9, type: !10, spFlags: DISPFlagDefinition, unit: !5)
|
||||
// CHECK:STDOUT: !13 = !DILocation(line: 10, column: 3, scope: !11)
|
||||
// CHECK:STDOUT: !14 = !DILocation(line: 9, column: 1, scope: !11)
|
||||
// CHECK:STDOUT: !15 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !4, type: !10, spFlags: DISPFlagDefinition, unit: !5)
|
||||
// CHECK:STDOUT: !16 = !DILocation(line: 0, scope: !15)
|
||||
// CHECK:STDOUT: !16 = !DILocation(line: 5, column: 12, scope: !15)
|
||||
// CHECK:STDOUT: !17 = !DILocation(line: 0, scope: !15)
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; ---
|
||||
// CHECK:STDOUT: ; ModuleID = 'copy_and_runtime_init.carbon'
|
||||
// CHECK:STDOUT: source_filename = "copy_and_runtime_init.carbon"
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: @_Ca.Main = constant i32 0
|
||||
// CHECK:STDOUT: @_Cb.Main = global i32 0
|
||||
// CHECK:STDOUT: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 0, ptr @_C__global_init.Main, ptr null }]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: declare i32 @_CMakeInt.Main()
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define i32 @_CReadA.Main() #0 !dbg !23 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %a.global_ref = load i32, ptr @_Ca.Main, align 4, !dbg !26
|
||||
// CHECK:STDOUT: ret i32 %a.global_ref, !dbg !27
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define i32 @_CReadPackageA.Main() #0 !dbg !28 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %a.global_ref = load i32, ptr @_Ca.Main, align 4, !dbg !31
|
||||
// CHECK:STDOUT: ret i32 %a.global_ref, !dbg !32
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define i32 @_CReadB.Main() #0 !dbg !33 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %b.global_ref = load i32, ptr @_Cb.Main, align 4, !dbg !36
|
||||
// CHECK:STDOUT: ret i32 %b.global_ref, !dbg !37
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define internal void @_C__global_init.Main() #0 !dbg !38 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %MakeInt.call = call i32 @_CMakeInt.Main(), !dbg !39
|
||||
// CHECK:STDOUT: store i32 %MakeInt.call, ptr @_Cb.Main, align 4, !dbg !40
|
||||
// CHECK:STDOUT: ret void, !dbg !41
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: attributes #0 = { nounwind }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !llvm.dbg.cu = !{!19}
|
||||
// CHECK:STDOUT: !llvm.module.flags = !{!2, !3}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5}
|
||||
// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3}
|
||||
// CHECK:STDOUT: !9 = !{null}
|
||||
// CHECK:STDOUT: !10 = !DISubroutineType(types: !9)
|
||||
// CHECK:STDOUT: !18 = !DIFile(filename: "copy_and_runtime_init.carbon", directory: "")
|
||||
// CHECK:STDOUT: !19 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !18, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
|
||||
// CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
||||
// CHECK:STDOUT: !21 = !{!20}
|
||||
// CHECK:STDOUT: !22 = !DISubroutineType(types: !21)
|
||||
// CHECK:STDOUT: !23 = distinct !DISubprogram(name: "ReadA", linkageName: "_CReadA.Main", scope: null, file: !18, line: 8, type: !22, spFlags: DISPFlagDefinition, unit: !19)
|
||||
// CHECK:STDOUT: !26 = !DILocation(line: 8, column: 28, scope: !23)
|
||||
// CHECK:STDOUT: !27 = !DILocation(line: 8, column: 21, scope: !23)
|
||||
// CHECK:STDOUT: !28 = distinct !DISubprogram(name: "ReadPackageA", linkageName: "_CReadPackageA.Main", scope: null, file: !18, line: 9, type: !22, spFlags: DISPFlagDefinition, unit: !19)
|
||||
// CHECK:STDOUT: !31 = !DILocation(line: 9, column: 35, scope: !28)
|
||||
// CHECK:STDOUT: !32 = !DILocation(line: 9, column: 28, scope: !28)
|
||||
// CHECK:STDOUT: !33 = distinct !DISubprogram(name: "ReadB", linkageName: "_CReadB.Main", scope: null, file: !18, line: 10, type: !22, spFlags: DISPFlagDefinition, unit: !19)
|
||||
// CHECK:STDOUT: !36 = !DILocation(line: 10, column: 28, scope: !33)
|
||||
// CHECK:STDOUT: !37 = !DILocation(line: 10, column: 21, scope: !33)
|
||||
// CHECK:STDOUT: !38 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !18, type: !10, spFlags: DISPFlagDefinition, unit: !19)
|
||||
// CHECK:STDOUT: !39 = !DILocation(line: 6, column: 14, scope: !38)
|
||||
// CHECK:STDOUT: !40 = !DILocation(line: 6, column: 5, scope: !38)
|
||||
// CHECK:STDOUT: !41 = !DILocation(line: 0, scope: !38)
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; ---
|
||||
// CHECK:STDOUT: ; ModuleID = 'pointer_and_empty_repr.carbon'
|
||||
// CHECK:STDOUT: source_filename = "pointer_and_empty_repr.carbon"
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: @_Cp.Main = global { i32, i32 } zeroinitializer
|
||||
// CHECK:STDOUT: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 0, ptr @_C__global_init.Main, ptr null }]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: declare void @_CMakePair.Main(ptr sret({ i32, i32 }))
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define i32 @_CReadPairX.Main() #0 !dbg !46 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %.loc13_33.2 = load i32, ptr @_Cp.Main, align 4, !dbg !49
|
||||
// CHECK:STDOUT: ret i32 %.loc13_33.2, !dbg !50
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define void @_CReadUnit.Main() #0 !dbg !51 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !55
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define internal void @_C__global_init.Main() #0 !dbg !56 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %.loc10_24.1.temp = alloca { i32, i32 }, align 4, !dbg !57
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc10_24.1.temp), !dbg !57
|
||||
// CHECK:STDOUT: call void @_CMakePair.Main(ptr %.loc10_24.1.temp), !dbg !57
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 @_Cp.Main, ptr align 4 %.loc10_24.1.temp, i64 8, i1 false), !dbg !58
|
||||
// CHECK:STDOUT: ret void, !dbg !59
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
|
||||
// CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
|
||||
// CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #1
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: attributes #0 = { nounwind }
|
||||
// CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !llvm.dbg.cu = !{!43}
|
||||
// CHECK:STDOUT: !llvm.module.flags = !{!2, !3}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5}
|
||||
// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3}
|
||||
// CHECK:STDOUT: !9 = !{null}
|
||||
// CHECK:STDOUT: !10 = !DISubroutineType(types: !9)
|
||||
// CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
||||
// CHECK:STDOUT: !21 = !{!20}
|
||||
// CHECK:STDOUT: !22 = !DISubroutineType(types: !21)
|
||||
// CHECK:STDOUT: !42 = !DIFile(filename: "pointer_and_empty_repr.carbon", directory: "")
|
||||
// CHECK:STDOUT: !43 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !42, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
|
||||
// CHECK:STDOUT: !46 = distinct !DISubprogram(name: "ReadPairX", linkageName: "_CReadPairX.Main", scope: null, file: !42, line: 13, type: !22, spFlags: DISPFlagDefinition, unit: !43)
|
||||
// CHECK:STDOUT: !49 = !DILocation(line: 13, column: 32, scope: !46)
|
||||
// CHECK:STDOUT: !50 = !DILocation(line: 13, column: 25, scope: !46)
|
||||
// CHECK:STDOUT: !51 = distinct !DISubprogram(name: "ReadUnit", linkageName: "_CReadUnit.Main", scope: null, file: !42, line: 14, type: !10, spFlags: DISPFlagDefinition, unit: !43)
|
||||
// CHECK:STDOUT: !55 = !DILocation(line: 14, column: 23, scope: !51)
|
||||
// CHECK:STDOUT: !56 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !42, type: !10, spFlags: DISPFlagDefinition, unit: !43)
|
||||
// CHECK:STDOUT: !57 = !DILocation(line: 10, column: 15, scope: !56)
|
||||
// CHECK:STDOUT: !58 = !DILocation(line: 10, column: 5, scope: !56)
|
||||
// CHECK:STDOUT: !59 = !DILocation(line: 0, scope: !56)
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; ---
|
||||
// CHECK:STDOUT: ; ModuleID = 'ref_and_class_scope.carbon'
|
||||
// CHECK:STDOUT: source_filename = "ref_and_class_scope.carbon"
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: @_Cbacking.Main = global i32 0
|
||||
// CHECK:STDOUT: @_Ck.Holder.Main = constant i32 42
|
||||
// CHECK:STDOUT: @_Cr_runtime.Main = global ptr null
|
||||
// CHECK:STDOUT: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 0, ptr @_C__global_init.Main, ptr null }]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: declare ptr @_CGetPtr.Main()
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define i32 @_CInside.Holder.Main() #0 !dbg !62 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %k.global_ref = load i32, ptr @_Ck.Holder.Main, align 4, !dbg !65
|
||||
// CHECK:STDOUT: ret i32 %k.global_ref, !dbg !66
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define i32 @_CReadRefs.Main() #0 !dbg !67 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %.loc15 = load i32, ptr @_Cbacking.Main, align 4, !dbg !70
|
||||
// CHECK:STDOUT: %r_runtime.global_ref = load ptr, ptr @_Cr_runtime.Main, align 8, !dbg !73
|
||||
// CHECK:STDOUT: %.loc16 = load i32, ptr %r_runtime.global_ref, align 4, !dbg !73
|
||||
// CHECK:STDOUT: ret i32 %.loc16, !dbg !74
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define i32 @_CReadHolderOutside.Main() #0 !dbg !75 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %k.global_ref = load i32, ptr @_Ck.Holder.Main, align 4, !dbg !78
|
||||
// CHECK:STDOUT: ret i32 %k.global_ref, !dbg !79
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define internal void @_C__global_init.Main() #0 !dbg !80 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: store i32 10, ptr @_Cbacking.Main, align 4, !dbg !81
|
||||
// CHECK:STDOUT: %GetPtr.call = call ptr @_CGetPtr.Main(), !dbg !82
|
||||
// CHECK:STDOUT: store ptr %GetPtr.call, ptr @_Cr_runtime.Main, align 8, !dbg !84
|
||||
// CHECK:STDOUT: ret void, !dbg !85
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: attributes #0 = { nounwind }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !llvm.dbg.cu = !{!61}
|
||||
// CHECK:STDOUT: !llvm.module.flags = !{!2, !3}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5}
|
||||
// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3}
|
||||
// CHECK:STDOUT: !9 = !{null}
|
||||
// CHECK:STDOUT: !10 = !DISubroutineType(types: !9)
|
||||
// CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
||||
// CHECK:STDOUT: !21 = !{!20}
|
||||
// CHECK:STDOUT: !22 = !DISubroutineType(types: !21)
|
||||
// CHECK:STDOUT: !60 = !DIFile(filename: "ref_and_class_scope.carbon", directory: "")
|
||||
// CHECK:STDOUT: !61 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !60, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
|
||||
// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "Inside", linkageName: "_CInside.Holder.Main", scope: null, file: !60, line: 11, type: !22, spFlags: DISPFlagDefinition, unit: !61)
|
||||
// CHECK:STDOUT: !65 = !DILocation(line: 11, column: 31, scope: !62)
|
||||
// CHECK:STDOUT: !66 = !DILocation(line: 11, column: 24, scope: !62)
|
||||
// CHECK:STDOUT: !67 = distinct !DISubprogram(name: "ReadRefs", linkageName: "_CReadRefs.Main", scope: null, file: !60, line: 14, type: !22, spFlags: DISPFlagDefinition, unit: !61)
|
||||
// CHECK:STDOUT: !70 = !DILocation(line: 15, column: 16, scope: !67)
|
||||
// CHECK:STDOUT: !73 = !DILocation(line: 16, column: 10, scope: !67)
|
||||
// CHECK:STDOUT: !74 = !DILocation(line: 16, column: 3, scope: !67)
|
||||
// CHECK:STDOUT: !75 = distinct !DISubprogram(name: "ReadHolderOutside", linkageName: "_CReadHolderOutside.Main", scope: null, file: !60, line: 19, type: !22, spFlags: DISPFlagDefinition, unit: !61)
|
||||
// CHECK:STDOUT: !78 = !DILocation(line: 20, column: 10, scope: !75)
|
||||
// CHECK:STDOUT: !79 = !DILocation(line: 20, column: 3, scope: !75)
|
||||
// CHECK:STDOUT: !80 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !60, type: !10, spFlags: DISPFlagDefinition, unit: !61)
|
||||
// CHECK:STDOUT: !81 = !DILocation(line: 3, column: 1, scope: !80)
|
||||
// CHECK:STDOUT: !82 = !DILocation(line: 7, column: 27, scope: !80)
|
||||
// CHECK:STDOUT: !84 = !DILocation(line: 7, column: 5, scope: !80)
|
||||
// CHECK:STDOUT: !85 = !DILocation(line: 0, scope: !80)
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; ---
|
||||
// CHECK:STDOUT: ; ModuleID = 'for_in_local_fn.carbon'
|
||||
// CHECK:STDOUT: source_filename = "for_in_local_fn.carbon"
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: @array.loc4_3.1 = internal constant [3 x i32] [i32 1, i32 2, i32 3]
|
||||
// CHECK:STDOUT: @_Cn.Main = global i32 0
|
||||
// CHECK:STDOUT: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 0, ptr @_C__global_init.Main, ptr null }]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define i32 @"_Cfn:enclosed.b0cc8ae043738921"() #0 !dbg !88 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %a.var = alloca [3 x i32], align 4, !dbg !91
|
||||
// CHECK:STDOUT: %j.var = alloca i32, align 4, !dbg !94
|
||||
// CHECK:STDOUT: %var = alloca i32, align 4, !dbg !98
|
||||
// CHECK:STDOUT: %.loc7_19.5.temp = alloca <{ i32, i1 }>, align 4, !dbg !98
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %a.var), !dbg !91
|
||||
// CHECK:STDOUT: %.loc4_34.3.array.index = getelementptr inbounds [3 x i32], ptr %a.var, i32 0, i64 0, !dbg !92
|
||||
// CHECK:STDOUT: %.loc4_34.6.array.index = getelementptr inbounds [3 x i32], ptr %a.var, i32 0, i64 1, !dbg !92
|
||||
// CHECK:STDOUT: %.loc4_34.9.array.index = getelementptr inbounds [3 x i32], ptr %a.var, i32 0, i64 2, !dbg !92
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %a.var, ptr align 4 @array.loc4_3.1, i64 12, i1 false), !dbg !91
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %j.var), !dbg !94
|
||||
// CHECK:STDOUT: store i32 0, ptr %j.var, align 4, !dbg !94
|
||||
// CHECK:STDOUT: %Array.as.Iterate.impl.NewCursor.call = call i32 @"_CNewCursor.Array.ef119564f44a13e5.Core:Iterate.Core.979acf9988e393af"(ptr %a.var), !dbg !98
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %var), !dbg !98
|
||||
// CHECK:STDOUT: store i32 %Array.as.Iterate.impl.NewCursor.call, ptr %var, align 4, !dbg !98
|
||||
// CHECK:STDOUT: br label %for.next, !dbg !98
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: for.next: ; preds = %for.body, %entry
|
||||
// CHECK:STDOUT: call void @llvm.lifetime.start.p0(ptr %.loc7_19.5.temp), !dbg !98
|
||||
// CHECK:STDOUT: call void @"_CNext.Array.ef119564f44a13e5.Core:Iterate.Core.979acf9988e393af"(ptr %.loc7_19.5.temp, ptr %a.var, ptr %var), !dbg !98
|
||||
// CHECK:STDOUT: %Optional.HasValue.call = call i1 @_CHasValue.Optional.Core.29b2425ca9ad75a4(ptr %.loc7_19.5.temp), !dbg !98
|
||||
// CHECK:STDOUT: br i1 %Optional.HasValue.call, label %for.body, label %for.done, !dbg !98
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: for.body: ; preds = %for.next
|
||||
// CHECK:STDOUT: %Optional.Get.call = call i32 @_CGet.Optional.Core.29b2425ca9ad75a4(ptr %.loc7_19.5.temp), !dbg !98
|
||||
// CHECK:STDOUT: %Int.as.AddAssignWith.impl.Op.call = load i32, ptr %j.var, align 4, !dbg !105
|
||||
// CHECK:STDOUT: %Int.as.AddAssignWith.impl.Op.call1 = add i32 %Int.as.AddAssignWith.impl.Op.call, %Optional.Get.call, !dbg !105
|
||||
// CHECK:STDOUT: store i32 %Int.as.AddAssignWith.impl.Op.call1, ptr %j.var, align 4, !dbg !105
|
||||
// CHECK:STDOUT: call void @_CSelfDestruct.Core.c6daab0befde28a8(ptr %.loc7_19.5.temp), !dbg !98
|
||||
// CHECK:STDOUT: br label %for.next, !dbg !107
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: for.done: ; preds = %for.next
|
||||
// CHECK:STDOUT: call void @_CSelfDestruct.Core.c6daab0befde28a8(ptr %.loc7_19.5.temp), !dbg !98
|
||||
// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %var), !dbg !98
|
||||
// CHECK:STDOUT: %.loc10 = load i32, ptr %j.var, align 4, !dbg !110
|
||||
// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %j.var), !dbg !94
|
||||
// CHECK:STDOUT: call void @_CSelfDestruct.Core.c1f9a57dcd9034c0(ptr %a.var), !dbg !91
|
||||
// CHECK:STDOUT: ret i32 %.loc10, !dbg !111
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_COp.b3126fe3b97d1b85:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !112 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: ret void, !dbg !114
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_COp.6f1424a1f3fc4182:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !116 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %.loc7_19.1.has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 1, !dbg !118
|
||||
// CHECK:STDOUT: call void @_CSelfDestruct.Core.8242e48f93ef210e(ptr %.loc7_19.1.has_value), !dbg !118
|
||||
// CHECK:STDOUT: %.loc7_19.4.value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 0, !dbg !118
|
||||
// CHECK:STDOUT: call void @_CSelfDestruct.Core.38552a897eb918eb(ptr %.loc7_19.4.value), !dbg !118
|
||||
// CHECK:STDOUT: ret void, !dbg !118
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_COp.e60156a973847ad6:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !120 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %.loc7_19.1.has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 1, !dbg !122
|
||||
// CHECK:STDOUT: call void @_CSelfDestruct.Core.8242e48f93ef210e(ptr %.loc7_19.1.has_value), !dbg !122
|
||||
// CHECK:STDOUT: %.loc7_19.4.value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %self, i32 0, i32 0, !dbg !122
|
||||
// CHECK:STDOUT: call void @_CSelfDestruct.Core.38552a897eb918eb(ptr %.loc7_19.4.value), !dbg !122
|
||||
// CHECK:STDOUT: ret void, !dbg !122
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define weak_odr void @"_COp.95c1f38708147abd:core.SubobjectDestroy.Core"(ptr %self) #0 !dbg !124 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %.loc4_3.1.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 2, !dbg !126
|
||||
// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %.loc4_3.1.array.index), !dbg !126
|
||||
// CHECK:STDOUT: %.loc4_3.4.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 1, !dbg !126
|
||||
// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %.loc4_3.4.array.index), !dbg !126
|
||||
// CHECK:STDOUT: %.loc4_3.7.array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i64 0, !dbg !126
|
||||
// CHECK:STDOUT: call void @_CSelfDestruct.Core.9a03059f269926ed(ptr %.loc4_3.7.array.index), !dbg !126
|
||||
// CHECK:STDOUT: ret void, !dbg !126
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
|
||||
// CHECK:STDOUT: declare void @llvm.lifetime.start.p0(ptr captures(none)) #1
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
|
||||
// CHECK:STDOUT: declare void @llvm.memcpy.p0.p0.i64(ptr noalias writeonly captures(none), ptr noalias readonly captures(none), i64, i1 immarg) #1
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define linkonce_odr i32 @"_CNewCursor.Array.ef119564f44a13e5.Core:Iterate.Core.979acf9988e393af"(ptr %self) #0 !dbg !133 {
|
||||
// CHECK:STDOUT: ret i32 0, !dbg !138
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define linkonce_odr void @"_CNext.Array.ef119564f44a13e5.Core:Iterate.Core.979acf9988e393af"(ptr sret(<{ i32, i1 }>) %return, ptr %self, ptr %cursor) #0 !dbg !140 {
|
||||
// CHECK:STDOUT: %1 = load i32, ptr %cursor, align 4, !dbg !147
|
||||
// CHECK:STDOUT: %2 = icmp slt i32 %1, 3, !dbg !147
|
||||
// CHECK:STDOUT: br i1 %2, label %3, label %7, !dbg !148
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: 3: ; preds = %0
|
||||
// CHECK:STDOUT: call void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %cursor), !dbg !150
|
||||
// CHECK:STDOUT: %4 = load i32, ptr %cursor, align 4, !dbg !152
|
||||
// CHECK:STDOUT: %5 = sub i32 %4, 1, !dbg !152
|
||||
// CHECK:STDOUT: %array.index = getelementptr inbounds [3 x i32], ptr %self, i32 0, i32 %5, !dbg !151
|
||||
// CHECK:STDOUT: %6 = load i32, ptr %array.index, align 4, !dbg !151
|
||||
// CHECK:STDOUT: call void @_CSome.Optional.Core.29b2425ca9ad75a4(ptr %return, i32 %6), !dbg !153
|
||||
// CHECK:STDOUT: ret void, !dbg !156
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: 7: ; preds = %0
|
||||
// CHECK:STDOUT: call void @_CNone.Optional.Core.29b2425ca9ad75a4(ptr %return), !dbg !157
|
||||
// CHECK:STDOUT: ret void, !dbg !158
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define linkonce_odr i1 @_CHasValue.Optional.Core.29b2425ca9ad75a4(ptr %self) #0 !dbg !161 {
|
||||
// CHECK:STDOUT: %1 = call i1 @"_CHas.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr %self), !dbg !167
|
||||
// CHECK:STDOUT: ret i1 %1, !dbg !168
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define linkonce_odr i32 @_CGet.Optional.Core.29b2425ca9ad75a4(ptr %self) #0 !dbg !170 {
|
||||
// CHECK:STDOUT: %1 = call i32 @"_CGet.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr %self), !dbg !176
|
||||
// CHECK:STDOUT: ret i32 %1, !dbg !177
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.c6daab0befde28a8(ptr %t) #0 !dbg !180 {
|
||||
// CHECK:STDOUT: ret void, !dbg !185
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.9a03059f269926ed(ptr %t) #0 !dbg !187 {
|
||||
// CHECK:STDOUT: ret void, !dbg !192
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.c1f9a57dcd9034c0(ptr %t) #0 !dbg !194 {
|
||||
// CHECK:STDOUT: call void @"_COp.95c1f38708147abd:core.SubobjectDestroy.Core"(ptr %t), !dbg !198
|
||||
// CHECK:STDOUT: ret void, !dbg !199
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.8242e48f93ef210e(ptr %t) #0 !dbg !201 {
|
||||
// CHECK:STDOUT: ret void, !dbg !206
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define linkonce_odr void @_CSelfDestruct.Core.38552a897eb918eb(ptr %t) #0 !dbg !208 {
|
||||
// CHECK:STDOUT: ret void, !dbg !213
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define internal void @_C__global_init.Main() #0 !dbg !128 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %fn.call = call i32 @"_Cfn:enclosed.b0cc8ae043738921"(), !dbg !129
|
||||
// CHECK:STDOUT: store i32 %fn.call, ptr @_Cn.Main, align 4, !dbg !130
|
||||
// CHECK:STDOUT: ret void, !dbg !131
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define linkonce_odr void @"_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8"(ptr %self) #0 !dbg !216 {
|
||||
// CHECK:STDOUT: call void @"_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26"(ptr %self, i32 1), !dbg !219
|
||||
// CHECK:STDOUT: ret void, !dbg !222
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define linkonce_odr void @_CSome.Optional.Core.29b2425ca9ad75a4(ptr sret(<{ i32, i1 }>) %return, i32 %value) #0 !dbg !224 {
|
||||
// CHECK:STDOUT: call void @"_CSome.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr %return, i32 %value), !dbg !229
|
||||
// CHECK:STDOUT: ret void, !dbg !230
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define linkonce_odr void @_CNone.Optional.Core.29b2425ca9ad75a4(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !232 {
|
||||
// CHECK:STDOUT: call void @"_CNone.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr %return), !dbg !235
|
||||
// CHECK:STDOUT: ret void, !dbg !236
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define linkonce_odr i1 @"_CHas.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr %value) #0 !dbg !237 {
|
||||
// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %value, i32 0, i32 1, !dbg !242
|
||||
// CHECK:STDOUT: %1 = load i8, ptr %has_value, align 1, !dbg !242
|
||||
// CHECK:STDOUT: %2 = trunc i8 %1 to i1, !dbg !242
|
||||
// CHECK:STDOUT: ret i1 %2, !dbg !243
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define linkonce_odr i32 @"_CGet.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr %value) #0 !dbg !245 {
|
||||
// CHECK:STDOUT: %value1 = getelementptr inbounds nuw <{ i32, i1 }>, ptr %value, i32 0, i32 0, !dbg !250
|
||||
// CHECK:STDOUT: %1 = load i32, ptr %value1, align 4, !dbg !250
|
||||
// CHECK:STDOUT: ret i32 %1, !dbg !251
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: alwaysinline nounwind
|
||||
// CHECK:STDOUT: define linkonce_odr void @"_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26"(ptr %self, i32 %other) #2 !dbg !253 {
|
||||
// CHECK:STDOUT: %1 = call i32 @"_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701"(i32 %other), !dbg !257
|
||||
// CHECK:STDOUT: %2 = load i32, ptr %self, align 4, !dbg !257
|
||||
// CHECK:STDOUT: %3 = add i32 %2, %1, !dbg !257
|
||||
// CHECK:STDOUT: store i32 %3, ptr %self, align 4, !dbg !257
|
||||
// CHECK:STDOUT: ret void, !dbg !257
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define linkonce_odr void @"_CSome.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr sret(<{ i32, i1 }>) %return, i32 %self) #0 !dbg !261 {
|
||||
// CHECK:STDOUT: %value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 0, !dbg !270
|
||||
// CHECK:STDOUT: store i32 %self, ptr %value, align 4, !dbg !270
|
||||
// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !272
|
||||
// CHECK:STDOUT: store i8 1, ptr %has_value, align 1, !dbg !272
|
||||
// CHECK:STDOUT: ret void, !dbg !273
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define linkonce_odr void @"_CNone.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5"(ptr sret(<{ i32, i1 }>) %return) #0 !dbg !275 {
|
||||
// CHECK:STDOUT: %has_value = getelementptr inbounds nuw <{ i32, i1 }>, ptr %return, i32 0, i32 1, !dbg !282
|
||||
// CHECK:STDOUT: store i8 0, ptr %has_value, align 1, !dbg !282
|
||||
// CHECK:STDOUT: ret void, !dbg !283
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define linkonce_odr i32 @"_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701"(i32 %self) #0 !dbg !284 {
|
||||
// CHECK:STDOUT: %1 = call i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self), !dbg !289
|
||||
// CHECK:STDOUT: ret i32 %1, !dbg !291
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define linkonce_odr i32 @"_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8"(i32 %self) #0 !dbg !293 {
|
||||
// CHECK:STDOUT: ret i32 %self, !dbg !299
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; uselistorder directives
|
||||
// CHECK:STDOUT: uselistorder ptr @llvm.lifetime.start.p0, { 3, 2, 1, 0 }
|
||||
// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.c6daab0befde28a8, { 1, 0 }
|
||||
// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.9a03059f269926ed, { 4, 3, 2, 1, 0 }
|
||||
// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.8242e48f93ef210e, { 1, 0 }
|
||||
// CHECK:STDOUT: uselistorder ptr @_CSelfDestruct.Core.38552a897eb918eb, { 1, 0 }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: attributes #0 = { nounwind }
|
||||
// CHECK:STDOUT: attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
|
||||
// CHECK:STDOUT: attributes #2 = { alwaysinline nounwind }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !llvm.dbg.cu = !{!87}
|
||||
// CHECK:STDOUT: !llvm.module.flags = !{!2, !3}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5}
|
||||
// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3}
|
||||
// CHECK:STDOUT: !6 = !DIDerivedType(tag: DW_TAG_pointer_type, baseType: null, size: 64)
|
||||
// CHECK:STDOUT: !7 = !{null, !6}
|
||||
// CHECK:STDOUT: !8 = !DISubroutineType(types: !7)
|
||||
// CHECK:STDOUT: !9 = !{null}
|
||||
// CHECK:STDOUT: !10 = !DISubroutineType(types: !9)
|
||||
// CHECK:STDOUT: !20 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed)
|
||||
// CHECK:STDOUT: !21 = !{!20}
|
||||
// CHECK:STDOUT: !22 = !DISubroutineType(types: !21)
|
||||
// CHECK:STDOUT: !44 = !{!6}
|
||||
// CHECK:STDOUT: !45 = !DISubroutineType(types: !44)
|
||||
// CHECK:STDOUT: !86 = !DIFile(filename: "for_in_local_fn.carbon", directory: "")
|
||||
// CHECK:STDOUT: !87 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !86, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
|
||||
// CHECK:STDOUT: !88 = distinct !DISubprogram(linkageName: "_Cfn:enclosed.b0cc8ae043738921", scope: null, file: !86, line: 3, type: !22, spFlags: DISPFlagDefinition, unit: !87)
|
||||
// CHECK:STDOUT: !91 = !DILocation(line: 4, column: 3, scope: !88)
|
||||
// CHECK:STDOUT: !92 = !DILocation(line: 4, column: 26, scope: !88)
|
||||
// CHECK:STDOUT: !94 = !DILocation(line: 5, column: 3, scope: !88)
|
||||
// CHECK:STDOUT: !98 = !DILocation(line: 7, column: 7, scope: !88)
|
||||
// CHECK:STDOUT: !99 = !{!20, !6}
|
||||
// CHECK:STDOUT: !100 = !DISubroutineType(types: !99)
|
||||
// CHECK:STDOUT: !101 = !{!6, !6, !20}
|
||||
// CHECK:STDOUT: !102 = !DISubroutineType(types: !101)
|
||||
// CHECK:STDOUT: !103 = !{!6, !6}
|
||||
// CHECK:STDOUT: !104 = !DISubroutineType(types: !103)
|
||||
// CHECK:STDOUT: !105 = !DILocation(line: 8, column: 5, scope: !88)
|
||||
// CHECK:STDOUT: !107 = !DILocation(line: 7, column: 3, scope: !88)
|
||||
// CHECK:STDOUT: !108 = !{null, !20}
|
||||
// CHECK:STDOUT: !109 = !DISubroutineType(types: !108)
|
||||
// CHECK:STDOUT: !110 = !DILocation(line: 10, column: 10, scope: !88)
|
||||
// CHECK:STDOUT: !111 = !DILocation(line: 10, column: 3, scope: !88)
|
||||
// CHECK:STDOUT: !112 = distinct !DISubprogram(name: "Op", linkageName: "_COp.b3126fe3b97d1b85:core.SubobjectDestroy.Core", scope: null, file: !86, line: 7, type: !8, spFlags: DISPFlagDefinition, unit: !87, retainedNodes: !115)
|
||||
// CHECK:STDOUT: !113 = !DILocalVariable(arg: 1, scope: !112, type: !6)
|
||||
// CHECK:STDOUT: !114 = !DILocation(line: 7, column: 7, scope: !112)
|
||||
// CHECK:STDOUT: !115 = !{!113}
|
||||
// CHECK:STDOUT: !116 = distinct !DISubprogram(name: "Op", linkageName: "_COp.6f1424a1f3fc4182:core.SubobjectDestroy.Core", scope: null, file: !86, line: 7, type: !8, spFlags: DISPFlagDefinition, unit: !87, retainedNodes: !119)
|
||||
// CHECK:STDOUT: !117 = !DILocalVariable(arg: 1, scope: !116, type: !6)
|
||||
// CHECK:STDOUT: !118 = !DILocation(line: 7, column: 7, scope: !116)
|
||||
// CHECK:STDOUT: !119 = !{!117}
|
||||
// CHECK:STDOUT: !120 = distinct !DISubprogram(name: "Op", linkageName: "_COp.e60156a973847ad6:core.SubobjectDestroy.Core", scope: null, file: !86, line: 7, type: !8, spFlags: DISPFlagDefinition, unit: !87, retainedNodes: !123)
|
||||
// CHECK:STDOUT: !121 = !DILocalVariable(arg: 1, scope: !120, type: !6)
|
||||
// CHECK:STDOUT: !122 = !DILocation(line: 7, column: 7, scope: !120)
|
||||
// CHECK:STDOUT: !123 = !{!121}
|
||||
// CHECK:STDOUT: !124 = distinct !DISubprogram(name: "Op", linkageName: "_COp.95c1f38708147abd:core.SubobjectDestroy.Core", scope: null, file: !86, line: 4, type: !8, spFlags: DISPFlagDefinition, unit: !87, retainedNodes: !127)
|
||||
// CHECK:STDOUT: !125 = !DILocalVariable(arg: 1, scope: !124, type: !6)
|
||||
// CHECK:STDOUT: !126 = !DILocation(line: 4, column: 3, scope: !124)
|
||||
// CHECK:STDOUT: !127 = !{!125}
|
||||
// CHECK:STDOUT: !128 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !86, type: !10, spFlags: DISPFlagDefinition, unit: !87)
|
||||
// CHECK:STDOUT: !129 = !DILocation(line: 3, column: 14, scope: !128)
|
||||
// CHECK:STDOUT: !130 = !DILocation(line: 3, column: 5, scope: !128)
|
||||
// CHECK:STDOUT: !131 = !DILocation(line: 0, scope: !128)
|
||||
// CHECK:STDOUT: !132 = !DIFile(filename: "{{.*}}/prelude/iterate.carbon", directory: "")
|
||||
// CHECK:STDOUT: !133 = distinct !DISubprogram(name: "NewCursor", linkageName: "_CNewCursor.Array.ef119564f44a13e5.Core:Iterate.Core.979acf9988e393af", scope: null, file: !132, line: 23, type: !100, spFlags: DISPFlagDefinition, unit: !87, retainedNodes: !139)
|
||||
// CHECK:STDOUT: !134 = !DILocalVariable(arg: 1, scope: !133, type: !6)
|
||||
// CHECK:STDOUT: !138 = !DILocation(line: 23, column: 38, scope: !133)
|
||||
// CHECK:STDOUT: !139 = !{!134}
|
||||
// CHECK:STDOUT: !140 = distinct !DISubprogram(name: "Next", linkageName: "_CNext.Array.ef119564f44a13e5.Core:Iterate.Core.979acf9988e393af", scope: null, file: !132, line: 24, type: !102, spFlags: DISPFlagDefinition, unit: !87, retainedNodes: !159)
|
||||
// CHECK:STDOUT: !141 = !DILocalVariable(arg: 1, scope: !140, type: !6)
|
||||
// CHECK:STDOUT: !142 = !DILocalVariable(arg: 2, scope: !140, type: !20)
|
||||
// CHECK:STDOUT: !147 = !DILocation(line: 25, column: 9, scope: !140)
|
||||
// CHECK:STDOUT: !148 = !DILocation(line: 25, column: 8, scope: !140)
|
||||
// CHECK:STDOUT: !150 = !DILocation(line: 26, column: 7, scope: !140)
|
||||
// CHECK:STDOUT: !151 = !DILocation(line: 27, column: 31, scope: !140)
|
||||
// CHECK:STDOUT: !152 = !DILocation(line: 27, column: 36, scope: !140)
|
||||
// CHECK:STDOUT: !153 = !DILocation(line: 27, column: 14, scope: !140)
|
||||
// CHECK:STDOUT: !154 = !{!6, !20}
|
||||
// CHECK:STDOUT: !155 = !DISubroutineType(types: !154)
|
||||
// CHECK:STDOUT: !156 = !DILocation(line: 27, column: 7, scope: !140)
|
||||
// CHECK:STDOUT: !157 = !DILocation(line: 29, column: 14, scope: !140)
|
||||
// CHECK:STDOUT: !158 = !DILocation(line: 29, column: 7, scope: !140)
|
||||
// CHECK:STDOUT: !159 = !{!141, !142}
|
||||
// CHECK:STDOUT: !160 = !DIFile(filename: "{{.*}}/prelude/types/optional.carbon", directory: "")
|
||||
// CHECK:STDOUT: !161 = distinct !DISubprogram(name: "HasValue", linkageName: "_CHasValue.Optional.Core.29b2425ca9ad75a4", scope: null, file: !160, line: 36, type: !104, spFlags: DISPFlagDefinition, unit: !87, retainedNodes: !169)
|
||||
// CHECK:STDOUT: !162 = !DILocalVariable(arg: 1, scope: !161, type: !6)
|
||||
// CHECK:STDOUT: !167 = !DILocation(line: 37, column: 12, scope: !161)
|
||||
// CHECK:STDOUT: !168 = !DILocation(line: 37, column: 5, scope: !161)
|
||||
// CHECK:STDOUT: !169 = !{!162}
|
||||
// CHECK:STDOUT: !170 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.Optional.Core.29b2425ca9ad75a4", scope: null, file: !160, line: 39, type: !100, spFlags: DISPFlagDefinition, unit: !87, retainedNodes: !178)
|
||||
// CHECK:STDOUT: !171 = !DILocalVariable(arg: 1, scope: !170, type: !6)
|
||||
// CHECK:STDOUT: !176 = !DILocation(line: 40, column: 12, scope: !170)
|
||||
// CHECK:STDOUT: !177 = !DILocation(line: 40, column: 5, scope: !170)
|
||||
// CHECK:STDOUT: !178 = !{!171}
|
||||
// CHECK:STDOUT: !179 = !DIFile(filename: "{{.*}}/prelude/destroy.carbon", directory: "")
|
||||
// CHECK:STDOUT: !180 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.c6daab0befde28a8", scope: null, file: !179, line: 36, type: !8, spFlags: DISPFlagDefinition, unit: !87, retainedNodes: !186)
|
||||
// CHECK:STDOUT: !181 = !DILocalVariable(arg: 1, scope: !180, type: !6)
|
||||
// CHECK:STDOUT: !185 = !DILocation(line: 36, column: 1, scope: !180)
|
||||
// CHECK:STDOUT: !186 = !{!181}
|
||||
// CHECK:STDOUT: !187 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.9a03059f269926ed", scope: null, file: !179, line: 36, type: !109, spFlags: DISPFlagDefinition, unit: !87, retainedNodes: !193)
|
||||
// CHECK:STDOUT: !188 = !DILocalVariable(arg: 1, scope: !187, type: !20)
|
||||
// CHECK:STDOUT: !192 = !DILocation(line: 36, column: 1, scope: !187)
|
||||
// CHECK:STDOUT: !193 = !{!188}
|
||||
// CHECK:STDOUT: !194 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.c1f9a57dcd9034c0", scope: null, file: !179, line: 36, type: !8, spFlags: DISPFlagDefinition, unit: !87, retainedNodes: !200)
|
||||
// CHECK:STDOUT: !195 = !DILocalVariable(arg: 1, scope: !194, type: !6)
|
||||
// CHECK:STDOUT: !198 = !DILocation(line: 38, column: 5, scope: !194)
|
||||
// CHECK:STDOUT: !199 = !DILocation(line: 36, column: 1, scope: !194)
|
||||
// CHECK:STDOUT: !200 = !{!195}
|
||||
// CHECK:STDOUT: !201 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.8242e48f93ef210e", scope: null, file: !179, line: 36, type: !8, spFlags: DISPFlagDefinition, unit: !87, retainedNodes: !207)
|
||||
// CHECK:STDOUT: !202 = !DILocalVariable(arg: 1, scope: !201, type: !6)
|
||||
// CHECK:STDOUT: !206 = !DILocation(line: 36, column: 1, scope: !201)
|
||||
// CHECK:STDOUT: !207 = !{!202}
|
||||
// CHECK:STDOUT: !208 = distinct !DISubprogram(name: "SelfDestruct", linkageName: "_CSelfDestruct.Core.38552a897eb918eb", scope: null, file: !179, line: 36, type: !109, spFlags: DISPFlagDefinition, unit: !87, retainedNodes: !214)
|
||||
// CHECK:STDOUT: !209 = !DILocalVariable(arg: 1, scope: !208, type: !20)
|
||||
// CHECK:STDOUT: !213 = !DILocation(line: 36, column: 1, scope: !208)
|
||||
// CHECK:STDOUT: !214 = !{!209}
|
||||
// CHECK:STDOUT: !215 = !DIFile(filename: "{{.*}}/prelude/types/int.carbon", directory: "")
|
||||
// CHECK:STDOUT: !216 = distinct !DISubprogram(name: "Op", linkageName: "_COp.Int.9452f4c51951679b.Core:Inc.Core.be1e879c1ad406d8", scope: null, file: !215, line: 396, type: !109, spFlags: DISPFlagDefinition, unit: !87, retainedNodes: !223)
|
||||
// CHECK:STDOUT: !217 = !DILocalVariable(arg: 1, scope: !216, type: !20)
|
||||
// CHECK:STDOUT: !219 = !DILocation(line: 398, column: 5, scope: !216)
|
||||
// CHECK:STDOUT: !220 = !{null, !20, !20}
|
||||
// CHECK:STDOUT: !221 = !DISubroutineType(types: !220)
|
||||
// CHECK:STDOUT: !222 = !DILocation(line: 396, column: 3, scope: !216)
|
||||
// CHECK:STDOUT: !223 = !{!217}
|
||||
// CHECK:STDOUT: !224 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.Optional.Core.29b2425ca9ad75a4", scope: null, file: !160, line: 33, type: !155, spFlags: DISPFlagDefinition, unit: !87, retainedNodes: !231)
|
||||
// CHECK:STDOUT: !225 = !DILocalVariable(arg: 1, scope: !224, type: !20)
|
||||
// CHECK:STDOUT: !229 = !DILocation(line: 34, column: 12, scope: !224)
|
||||
// CHECK:STDOUT: !230 = !DILocation(line: 34, column: 5, scope: !224)
|
||||
// CHECK:STDOUT: !231 = !{!225}
|
||||
// CHECK:STDOUT: !232 = distinct !DISubprogram(name: "None", linkageName: "_CNone.Optional.Core.29b2425ca9ad75a4", scope: null, file: !160, line: 30, type: !45, spFlags: DISPFlagDefinition, unit: !87)
|
||||
// CHECK:STDOUT: !235 = !DILocation(line: 31, column: 12, scope: !232)
|
||||
// CHECK:STDOUT: !236 = !DILocation(line: 31, column: 5, scope: !232)
|
||||
// CHECK:STDOUT: !237 = distinct !DISubprogram(name: "Has", linkageName: "_CHas.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5", scope: null, file: !160, line: 141, type: !104, spFlags: DISPFlagDefinition, unit: !87, retainedNodes: !244)
|
||||
// CHECK:STDOUT: !238 = !DILocalVariable(arg: 1, scope: !237, type: !6)
|
||||
// CHECK:STDOUT: !242 = !DILocation(line: 142, column: 12, scope: !237)
|
||||
// CHECK:STDOUT: !243 = !DILocation(line: 142, column: 5, scope: !237)
|
||||
// CHECK:STDOUT: !244 = !{!238}
|
||||
// CHECK:STDOUT: !245 = distinct !DISubprogram(name: "Get", linkageName: "_CGet.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5", scope: null, file: !160, line: 144, type: !100, spFlags: DISPFlagDefinition, unit: !87, retainedNodes: !252)
|
||||
// CHECK:STDOUT: !246 = !DILocalVariable(arg: 1, scope: !245, type: !6)
|
||||
// CHECK:STDOUT: !250 = !DILocation(line: 145, column: 12, scope: !245)
|
||||
// CHECK:STDOUT: !251 = !DILocation(line: 145, column: 5, scope: !245)
|
||||
// CHECK:STDOUT: !252 = !{!246}
|
||||
// CHECK:STDOUT: !253 = distinct !DISubprogram(name: "Op", linkageName: "_COp:thunk:AddAssignWith.b59e374b0649c9ad.Core:Int.9452f4c51951679b.Core:AddAssignWith.ab03190a9e911cb4.Core.306167be98c24f26", scope: null, file: !215, line: 331, type: !221, spFlags: DISPFlagDefinition, unit: !87, retainedNodes: !260)
|
||||
// CHECK:STDOUT: !254 = !DILocalVariable(arg: 1, scope: !253, type: !20)
|
||||
// CHECK:STDOUT: !255 = !DILocalVariable(arg: 2, scope: !253, type: !20)
|
||||
// CHECK:STDOUT: !257 = !DILocation(line: 331, column: 3, scope: !253)
|
||||
// CHECK:STDOUT: !258 = !{!20, !20}
|
||||
// CHECK:STDOUT: !259 = !DISubroutineType(types: !258)
|
||||
// CHECK:STDOUT: !260 = !{!254, !255}
|
||||
// CHECK:STDOUT: !261 = distinct !DISubprogram(name: "Some", linkageName: "_CSome.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5", scope: null, file: !160, line: 131, type: !155, spFlags: DISPFlagDefinition, unit: !87, retainedNodes: !274)
|
||||
// CHECK:STDOUT: !262 = !DILocalVariable(arg: 1, scope: !261, type: !20)
|
||||
// CHECK:STDOUT: !270 = !DILocation(line: 137, column: 5, scope: !261)
|
||||
// CHECK:STDOUT: !272 = !DILocation(line: 138, column: 5, scope: !261)
|
||||
// CHECK:STDOUT: !273 = !DILocation(line: 139, column: 5, scope: !261)
|
||||
// CHECK:STDOUT: !274 = !{!262}
|
||||
// CHECK:STDOUT: !275 = distinct !DISubprogram(name: "None", linkageName: "_CNone.c1cc3e41344c17ec:OptionalStorage.Core.b21e3f34d194eaf5", scope: null, file: !160, line: 125, type: !45, spFlags: DISPFlagDefinition, unit: !87)
|
||||
// CHECK:STDOUT: !282 = !DILocation(line: 128, column: 5, scope: !275)
|
||||
// CHECK:STDOUT: !283 = !DILocation(line: 129, column: 5, scope: !275)
|
||||
// CHECK:STDOUT: !284 = distinct !DISubprogram(name: "Convert", linkageName: "_CConvert.df8c28cb3df17b7d:ImplicitAs.c95da57eee1d2d0f.Core.25ef994321ea0701", scope: null, file: !215, line: 64, type: !259, spFlags: DISPFlagDefinition, unit: !87, retainedNodes: !292)
|
||||
// CHECK:STDOUT: !285 = !DILocalVariable(arg: 1, scope: !284, type: !20)
|
||||
// CHECK:STDOUT: !289 = !DILocation(line: 66, column: 17, scope: !284)
|
||||
// CHECK:STDOUT: !291 = !DILocation(line: 66, column: 5, scope: !284)
|
||||
// CHECK:STDOUT: !292 = !{!285}
|
||||
// CHECK:STDOUT: !293 = distinct !DISubprogram(name: "AsInt", linkageName: "_CAsInt.Int.9452f4c51951679b.Core:AnyInt.Core.be1e879c1ad406d8", scope: null, file: !215, line: 59, type: !259, spFlags: DISPFlagDefinition, unit: !87, retainedNodes: !300)
|
||||
// CHECK:STDOUT: !294 = !DILocalVariable(arg: 1, scope: !293, type: !20)
|
||||
// CHECK:STDOUT: !299 = !DILocation(line: 59, column: 28, scope: !293)
|
||||
// CHECK:STDOUT: !300 = !{!294}
|
||||
// CHECK:STDOUT:
|
||||
+11
-11
@@ -212,7 +212,7 @@ var a: i32 = 1;
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 @_Cx.Main, ptr align 4 @tuple.380.loc4_1, i64 8, i1 false), !dbg !63
|
||||
// CHECK:STDOUT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 @var.anon.var_patt.loc5, ptr align 4 @tuple.859.loc5_1, i64 8, i1 false), !dbg !65
|
||||
// CHECK:STDOUT: ret void, !dbg !66
|
||||
// CHECK:STDOUT: ret void, !dbg !68
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
|
||||
@@ -236,7 +236,7 @@ var a: i32 = 1;
|
||||
// CHECK:STDOUT: !62 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Main", scope: null, file: !60, type: !29, spFlags: DISPFlagDefinition, unit: !61)
|
||||
// CHECK:STDOUT: !63 = !DILocation(line: 4, column: 1, scope: !62)
|
||||
// CHECK:STDOUT: !65 = !DILocation(line: 5, column: 1, scope: !62)
|
||||
// CHECK:STDOUT: !66 = !DILocation(line: 0, scope: !62)
|
||||
// CHECK:STDOUT: !68 = !DILocation(line: 0, scope: !62)
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; ---
|
||||
// CHECK:STDOUT: ; ModuleID = 'not_main_package.carbon'
|
||||
@@ -246,24 +246,24 @@ var a: i32 = 1;
|
||||
// CHECK:STDOUT: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 0, ptr @_C__global_init.Other, ptr null }]
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define internal void @_C__global_init.Other() #0 !dbg !69 {
|
||||
// CHECK:STDOUT: define internal void @_C__global_init.Other() #0 !dbg !71 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: store i32 1, ptr @_Ca.Other, align 4, !dbg !70
|
||||
// CHECK:STDOUT: ret void, !dbg !71
|
||||
// CHECK:STDOUT: store i32 1, ptr @_Ca.Other, align 4, !dbg !72
|
||||
// CHECK:STDOUT: ret void, !dbg !73
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: attributes #0 = { nounwind }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !llvm.dbg.cu = !{!68}
|
||||
// CHECK:STDOUT: !llvm.dbg.cu = !{!70}
|
||||
// CHECK:STDOUT: !llvm.module.flags = !{!2, !3}
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: !2 = !{i32 7, !"Dwarf Version", i32 5}
|
||||
// CHECK:STDOUT: !3 = !{i32 2, !"Debug Info Version", i32 3}
|
||||
// CHECK:STDOUT: !28 = !{null}
|
||||
// CHECK:STDOUT: !29 = !DISubroutineType(types: !28)
|
||||
// CHECK:STDOUT: !67 = !DIFile(filename: "not_main_package.carbon", directory: "")
|
||||
// CHECK:STDOUT: !68 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !67, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
|
||||
// CHECK:STDOUT: !69 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Other", scope: null, file: !67, type: !29, spFlags: DISPFlagDefinition, unit: !68)
|
||||
// CHECK:STDOUT: !70 = !DILocation(line: 4, column: 1, scope: !69)
|
||||
// CHECK:STDOUT: !71 = !DILocation(line: 0, scope: !69)
|
||||
// CHECK:STDOUT: !69 = !DIFile(filename: "not_main_package.carbon", directory: "")
|
||||
// CHECK:STDOUT: !70 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !69, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
|
||||
// CHECK:STDOUT: !71 = distinct !DISubprogram(name: "__global_init", linkageName: "_C__global_init.Other", scope: null, file: !69, type: !29, spFlags: DISPFlagDefinition, unit: !70)
|
||||
// CHECK:STDOUT: !72 = !DILocation(line: 4, column: 1, scope: !71)
|
||||
// CHECK:STDOUT: !73 = !DILocation(line: 0, scope: !71)
|
||||
// CHECK:STDOUT:
|
||||
+28
-13
@@ -44,7 +44,7 @@ import library "tuple_pattern";
|
||||
|
||||
fn V() -> i32 { return v; }
|
||||
fn W() -> i32 { return w; }
|
||||
// TODO: Also test `x`. Right now, lowering a reference to an imported `let` asserts.
|
||||
fn X() -> i32 { return x; }
|
||||
fn Y() -> i32 { return y; }
|
||||
fn Z() -> i32 { return z; }
|
||||
|
||||
@@ -113,6 +113,7 @@ fn Z() -> i32 { return z; }
|
||||
// CHECK:STDOUT: @_Cv.Main = global { i32, i32 } zeroinitializer
|
||||
// CHECK:STDOUT: @_Cy.Main = global i32 0
|
||||
// CHECK:STDOUT: @_Cz.Main = global { i32, i32 } zeroinitializer
|
||||
// CHECK:STDOUT: @_Cx.Main = constant i32 3
|
||||
// CHECK:STDOUT: @tuple.380.loc4_1 = internal constant { i32, i32 } { i32 1, i32 2 }
|
||||
// CHECK:STDOUT: @tuple.da0.loc8_1 = internal constant { i32, i32 } { i32 5, i32 6 }
|
||||
// CHECK:STDOUT: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 0, ptr @_C__global_init.Main, ptr null }]
|
||||
@@ -157,6 +158,10 @@ fn Z() -> i32 { return z; }
|
||||
// CHECK:STDOUT: @_Cv.Main = external global { i32, i32 }
|
||||
// CHECK:STDOUT: @_Cy.Main = external global i32
|
||||
// CHECK:STDOUT: @_Cz.Main = external global { i32, i32 }
|
||||
// CHECK:STDOUT: @_Cv.Main.1 = external global { i32, i32 }
|
||||
// CHECK:STDOUT: @_Cy.Main.2 = external global i32
|
||||
// CHECK:STDOUT: @_Cz.Main.3 = external global { i32, i32 }
|
||||
// CHECK:STDOUT: @_Cx.Main = external global i32
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define i32 @_CV.Main() #0 !dbg !44 {
|
||||
@@ -173,17 +178,24 @@ fn Z() -> i32 { return z; }
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define i32 @_CY.Main() #0 !dbg !54 {
|
||||
// CHECK:STDOUT: define i32 @_CX.Main() #0 !dbg !54 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %.loc9_24 = load i32, ptr @_Cy.Main, align 4, !dbg !57
|
||||
// CHECK:STDOUT: ret i32 %.loc9_24, !dbg !58
|
||||
// CHECK:STDOUT: %x.global_ref = load i32, ptr @_Cx.Main, align 4, !dbg !57
|
||||
// CHECK:STDOUT: ret i32 %x.global_ref, !dbg !58
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define i32 @_CZ.Main() #0 !dbg !59 {
|
||||
// CHECK:STDOUT: define i32 @_CY.Main() #0 !dbg !59 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %.loc10_24 = load i32, ptr getelementptr inbounds nuw (i8, ptr @_Cz.Main, i64 4), align 4, !dbg !62
|
||||
// CHECK:STDOUT: ret i32 %.loc10_24, !dbg !63
|
||||
// CHECK:STDOUT: %.loc9_24 = load i32, ptr @_Cy.Main, align 4, !dbg !62
|
||||
// CHECK:STDOUT: ret i32 %.loc9_24, !dbg !63
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; Function Attrs: nounwind
|
||||
// CHECK:STDOUT: define i32 @_CZ.Main() #0 !dbg !64 {
|
||||
// CHECK:STDOUT: entry:
|
||||
// CHECK:STDOUT: %.loc10_24 = load i32, ptr getelementptr inbounds nuw (i8, ptr @_Cz.Main, i64 4), align 4, !dbg !67
|
||||
// CHECK:STDOUT: ret i32 %.loc10_24, !dbg !68
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: ; uselistorder directives
|
||||
@@ -207,10 +219,13 @@ fn Z() -> i32 { return z; }
|
||||
// CHECK:STDOUT: !49 = distinct !DISubprogram(name: "W", linkageName: "_CW.Main", scope: null, file: !42, line: 7, type: !29, spFlags: DISPFlagDefinition, unit: !43)
|
||||
// CHECK:STDOUT: !52 = !DILocation(line: 7, column: 24, scope: !49)
|
||||
// CHECK:STDOUT: !53 = !DILocation(line: 7, column: 17, scope: !49)
|
||||
// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "Y", linkageName: "_CY.Main", scope: null, file: !42, line: 9, type: !29, spFlags: DISPFlagDefinition, unit: !43)
|
||||
// CHECK:STDOUT: !57 = !DILocation(line: 9, column: 24, scope: !54)
|
||||
// CHECK:STDOUT: !58 = !DILocation(line: 9, column: 17, scope: !54)
|
||||
// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "Z", linkageName: "_CZ.Main", scope: null, file: !42, line: 10, type: !29, spFlags: DISPFlagDefinition, unit: !43)
|
||||
// CHECK:STDOUT: !62 = !DILocation(line: 10, column: 24, scope: !59)
|
||||
// CHECK:STDOUT: !63 = !DILocation(line: 10, column: 17, scope: !59)
|
||||
// CHECK:STDOUT: !54 = distinct !DISubprogram(name: "X", linkageName: "_CX.Main", scope: null, file: !42, line: 8, type: !29, spFlags: DISPFlagDefinition, unit: !43)
|
||||
// CHECK:STDOUT: !57 = !DILocation(line: 8, column: 24, scope: !54)
|
||||
// CHECK:STDOUT: !58 = !DILocation(line: 8, column: 17, scope: !54)
|
||||
// CHECK:STDOUT: !59 = distinct !DISubprogram(name: "Y", linkageName: "_CY.Main", scope: null, file: !42, line: 9, type: !29, spFlags: DISPFlagDefinition, unit: !43)
|
||||
// CHECK:STDOUT: !62 = !DILocation(line: 9, column: 24, scope: !59)
|
||||
// CHECK:STDOUT: !63 = !DILocation(line: 9, column: 17, scope: !59)
|
||||
// CHECK:STDOUT: !64 = distinct !DISubprogram(name: "Z", linkageName: "_CZ.Main", scope: null, file: !42, line: 10, type: !29, spFlags: DISPFlagDefinition, unit: !43)
|
||||
// CHECK:STDOUT: !67 = !DILocation(line: 10, column: 24, scope: !64)
|
||||
// CHECK:STDOUT: !68 = !DILocation(line: 10, column: 17, scope: !64)
|
||||
// CHECK:STDOUT:
|
||||
@@ -87,6 +87,7 @@ CARBON_SEM_IR_INST_KIND(FunctionType)
|
||||
CARBON_SEM_IR_INST_KIND(FunctionTypeWithSelfType)
|
||||
CARBON_SEM_IR_INST_KIND(GenericInterfaceType)
|
||||
CARBON_SEM_IR_INST_KIND(GenericNamedConstraintType)
|
||||
CARBON_SEM_IR_INST_KIND(GlobalRef)
|
||||
CARBON_SEM_IR_INST_KIND(IdentifiedWitness)
|
||||
CARBON_SEM_IR_INST_KIND(ImplDecl)
|
||||
CARBON_SEM_IR_INST_KIND(ImplSelfWitness)
|
||||
|
||||
@@ -1186,6 +1186,28 @@ auto InstNamer::NamingContext::NameInst() -> void {
|
||||
AddEntityNameAndMaybePush(inst.named_constraint_id, ".type");
|
||||
return;
|
||||
}
|
||||
case CARBON_KIND(GlobalRef inst): {
|
||||
EntityNameId entity_name_id = EntityNameId::None;
|
||||
CARBON_KIND_SWITCH(sem_ir().insts().Get(inst.inst_id)) {
|
||||
case CARBON_KIND_ANY(AnyBinding, binding):
|
||||
entity_name_id = binding.entity_name_id;
|
||||
break;
|
||||
case CARBON_KIND_ANY(AnyImportRef, import_ref):
|
||||
entity_name_id = import_ref.entity_name_id;
|
||||
break;
|
||||
case CARBON_KIND(ExportDecl export_decl):
|
||||
entity_name_id = export_decl.entity_name_id;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (entity_name_id.has_value()) {
|
||||
AddInstEntityNameId(entity_name_id, ".global_ref");
|
||||
} else {
|
||||
AddInstName("global_ref");
|
||||
}
|
||||
return;
|
||||
}
|
||||
case CARBON_KIND(ImplDecl inst): {
|
||||
// `impl` declarations aren't named because they aren't added to any
|
||||
// namespace, and so aren't referenced directly.
|
||||
|
||||
@@ -328,28 +328,40 @@ auto Mangler::MangleSpecificId(llvm::raw_ostream& os,
|
||||
}
|
||||
|
||||
auto Mangler::MangleGlobalVariable(SemIR::InstId pattern_id) -> std::string {
|
||||
if (const auto* clang_decl = sem_ir().clang_decls().Lookup(pattern_id)) {
|
||||
CARBON_CHECK(!clang_decl->is_imported, "Mangling a C++ variable");
|
||||
}
|
||||
|
||||
// Use the name of the first binding in the variable as its mangled name.
|
||||
auto var_name_id =
|
||||
SemIR::GetFirstBindingNameFromPatternId(sem_ir(), pattern_id);
|
||||
if (!var_name_id.has_value()) {
|
||||
return MangleGlobalBinding(var_name_id, pattern_id);
|
||||
}
|
||||
|
||||
auto Mangler::MangleGlobalBinding(SemIR::EntityNameId entity_name_id,
|
||||
SemIR::InstId fingerprint_inst_id)
|
||||
-> std::string {
|
||||
if (!entity_name_id.has_value()) {
|
||||
return std::string();
|
||||
}
|
||||
|
||||
if (const auto* clang_decl = sem_ir().clang_decls().Lookup(pattern_id)) {
|
||||
CARBON_CHECK(!clang_decl->is_imported, "Mangling a C++ variable");
|
||||
const auto& entity_name = sem_ir().entity_names().Get(entity_name_id);
|
||||
if (!entity_name.name_id.has_value() ||
|
||||
entity_name.name_id == SemIR::NameId::Underscore ||
|
||||
!entity_name.parent_scope_id.has_value()) {
|
||||
return std::string();
|
||||
}
|
||||
|
||||
RawStringOstream os;
|
||||
os << "_C";
|
||||
|
||||
auto var_name = sem_ir().entity_names().Get(var_name_id);
|
||||
MangleNameId(os, var_name.name_id);
|
||||
MangleInverseQualifiedNameScope(os, var_name.parent_scope_id);
|
||||
MangleNameId(os, entity_name.name_id);
|
||||
MangleInverseQualifiedNameScope(os, entity_name.parent_scope_id);
|
||||
|
||||
if (sem_ir().name_scopes().IsPrivateToLibrary(var_name.name_id,
|
||||
var_name.parent_scope_id)) {
|
||||
if (sem_ir().name_scopes().IsPrivateToLibrary(entity_name.name_id,
|
||||
entity_name.parent_scope_id)) {
|
||||
os << ".";
|
||||
MangleFingerprint(os, &sem_ir(), pattern_id);
|
||||
MangleFingerprint(os, &sem_ir(), fingerprint_inst_id);
|
||||
}
|
||||
return os.TakeStr();
|
||||
}
|
||||
|
||||
@@ -44,6 +44,13 @@ class Mangler {
|
||||
// given internal linkage.
|
||||
auto MangleGlobalVariable(SemIR::InstId pattern_id) -> std::string;
|
||||
|
||||
// Produce a deterministically unique mangled name for the given global or
|
||||
// static binding, or an empty string if the binding doesn't have an
|
||||
// externally referenceable name, in which case it should be given internal
|
||||
// linkage.
|
||||
auto MangleGlobalBinding(SemIR::EntityNameId entity_name_id,
|
||||
SemIR::InstId fingerprint_inst_id) -> std::string;
|
||||
|
||||
// Produce a deterministically unique mangled name for the specified class's
|
||||
// vtable.
|
||||
auto MangleVTable(const SemIR::Class& class_info,
|
||||
|
||||
@@ -877,6 +877,10 @@ class Stringifier {
|
||||
sem_ir_->ints().Get(inst.int_id).print(*out_, /*isSigned=*/true);
|
||||
}
|
||||
|
||||
auto StringifyInst(InstId /*inst_id*/, GlobalRef inst) -> void {
|
||||
step_stack_->PushInstId(inst.inst_id);
|
||||
}
|
||||
|
||||
auto StringifyInst(InstId /*inst_id*/, IdentifiedWitness inst) -> void {
|
||||
step_stack_->Push(
|
||||
inst.query_self_inst_id, " as ",
|
||||
|
||||
@@ -132,6 +132,10 @@ auto SugaredTypeFinder::FindSpelledType(InstId inst_id) -> TypeInstId {
|
||||
|
||||
// The following instructions have the same type as one of their operands,
|
||||
// so look through them to that operand.
|
||||
case CARBON_KIND(GlobalRef global_ref): {
|
||||
inst_id = LookThrough(inst.type_id(), global_ref.inst_id);
|
||||
continue;
|
||||
}
|
||||
case CARBON_KIND(NameRef name_ref): {
|
||||
inst_id = LookThrough(inst.type_id(), name_ref.value_id);
|
||||
continue;
|
||||
|
||||
@@ -1049,6 +1049,21 @@ struct GenericNamedConstraintType {
|
||||
SpecificId enclosing_specific_id;
|
||||
};
|
||||
|
||||
// References a non-constant global or static binding (such as a package- or
|
||||
// class-scope `let`), accessing its dynamically initialized global value.
|
||||
struct GlobalRef {
|
||||
static constexpr auto Kind = InstKind::GlobalRef.Define<Parse::NodeId>(
|
||||
{.ir_name = "global_ref",
|
||||
.expr_category = ComputedExprCategory::SameAsFirstOperand,
|
||||
.constant_kind = InstConstantKind::Never});
|
||||
|
||||
TypeId type_id;
|
||||
// This is an indirect reference to this global instruction -- we use its
|
||||
// identity rather than its value as an operand -- so is represented as an
|
||||
// AbsoluteInstId.
|
||||
AbsoluteInstId inst_id;
|
||||
};
|
||||
|
||||
// An `impl` declaration.
|
||||
struct ImplDecl {
|
||||
static constexpr auto Kind = InstKind::ImplDecl.Define<Parse::AnyImplDeclId>(
|
||||
|
||||
Reference in new issue
Block a user