aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend
diff options
context:
space:
mode:
authorYizhe <yizhe@pku.edu.cn>2021-02-16 07:42:32 +0000
committerPhilip Herron <herron.philip@googlemail.com>2021-02-19 10:34:59 +0000
commit68a2f3d7eaa60516a40037dadb6761e69b7863f7 (patch)
tree2bcc568d87448ada6d31da37366044f0eb6ec439 /gcc/rust/backend
parent642cc5ed4ffcf0a334cec450e536e5b948819271 (diff)
downloadgcc-68a2f3d7eaa60516a40037dadb6761e69b7863f7.zip
gcc-68a2f3d7eaa60516a40037dadb6761e69b7863f7.tar.gz
gcc-68a2f3d7eaa60516a40037dadb6761e69b7863f7.tar.bz2
Renamed `TyBase` to `BaseType`
Diffstat (limited to 'gcc/rust/backend')
-rw-r--r--gcc/rust/backend/rust-compile-context.h6
-rw-r--r--gcc/rust/backend/rust-compile-expr.h20
-rw-r--r--gcc/rust/backend/rust-compile-implitem.h18
-rw-r--r--gcc/rust/backend/rust-compile-item.h14
-rw-r--r--gcc/rust/backend/rust-compile-stmt.h2
-rw-r--r--gcc/rust/backend/rust-compile-tyty.h2
-rw-r--r--gcc/rust/backend/rust-compile-var-decl.h2
-rw-r--r--gcc/rust/backend/rust-compile.cc2
8 files changed, 33 insertions, 33 deletions
diff --git a/gcc/rust/backend/rust-compile-context.h b/gcc/rust/backend/rust-compile-context.h
index b50e103..c5ae3bb 100644
--- a/gcc/rust/backend/rust-compile-context.h
+++ b/gcc/rust/backend/rust-compile-context.h
@@ -53,7 +53,7 @@ public:
rust_assert (
tyctx->lookup_type_by_node_id ((*it)->get_node_id (), &ref));
- TyTy::TyBase *lookup;
+ TyTy::BaseType *lookup;
rust_assert (tyctx->lookup_type (ref, &lookup));
auto compiled = TyTyCompile::compile (backend, lookup);
@@ -261,7 +261,7 @@ private:
class TyTyResolveCompile : public TyTy::TyVisitor
{
public:
- static ::Btype *compile (Context *ctx, TyTy::TyBase *ty)
+ static ::Btype *compile (Context *ctx, TyTy::BaseType *ty)
{
TyTyResolveCompile compiler (ctx);
ty->accept_vis (compiler);
@@ -355,7 +355,7 @@ public:
std::vector<Backend::Btyped_identifier> fields;
for (size_t i = 0; i < type.num_fields (); i++)
{
- TyTy::TyBase *field = type.get_field (i);
+ TyTy::BaseType *field = type.get_field (i);
Btype *compiled_field_ty
= TyTyCompile::compile (ctx->get_backend (), field);
diff --git a/gcc/rust/backend/rust-compile-expr.h b/gcc/rust/backend/rust-compile-expr.h
index 842804d..00625df 100644
--- a/gcc/rust/backend/rust-compile-expr.h
+++ b/gcc/rust/backend/rust-compile-expr.h
@@ -57,7 +57,7 @@ public:
return;
}
- TyTy::TyBase *tyty = nullptr;
+ TyTy::BaseType *tyty = nullptr;
if (!ctx->get_tyctx ()->lookup_type (expr.get_mappings ().get_hirid (),
&tyty))
{
@@ -177,7 +177,7 @@ public:
return;
}
- TyTy::TyBase *tyty = nullptr;
+ TyTy::BaseType *tyty = nullptr;
if (!ctx->get_tyctx ()->lookup_type (
expr.get_mappings ().get_hirid (), &tyty))
{
@@ -203,7 +203,7 @@ public:
return;
}
- TyTy::TyBase *tyty = nullptr;
+ TyTy::BaseType *tyty = nullptr;
if (!ctx->get_tyctx ()->lookup_type (
expr.get_mappings ().get_hirid (), &tyty))
{
@@ -256,7 +256,7 @@ public:
void visit (HIR::ArrayExpr &expr)
{
- TyTy::TyBase *tyty = nullptr;
+ TyTy::BaseType *tyty = nullptr;
if (!ctx->get_tyctx ()->lookup_type (expr.get_mappings ().get_hirid (),
&tyty))
{
@@ -428,7 +428,7 @@ public:
void visit (HIR::IfExprConseqElse &expr)
{
- TyTy::TyBase *if_type = nullptr;
+ TyTy::BaseType *if_type = nullptr;
if (!ctx->get_tyctx ()->lookup_type (expr.get_mappings ().get_hirid (),
&if_type))
{
@@ -465,7 +465,7 @@ public:
void visit (HIR::IfExprConseqIf &expr)
{
- TyTy::TyBase *if_type = nullptr;
+ TyTy::BaseType *if_type = nullptr;
if (!ctx->get_tyctx ()->lookup_type (expr.get_mappings ().get_hirid (),
&if_type))
{
@@ -502,7 +502,7 @@ public:
void visit (HIR::BlockExpr &expr)
{
- TyTy::TyBase *block_tyty = nullptr;
+ TyTy::BaseType *block_tyty = nullptr;
if (!ctx->get_tyctx ()->lookup_type (expr.get_mappings ().get_hirid (),
&block_tyty))
{
@@ -564,7 +564,7 @@ public:
void visit (HIR::FieldAccessExpr &expr)
{
// resolve the receiver back to ADT type
- TyTy::TyBase *receiver = nullptr;
+ TyTy::BaseType *receiver = nullptr;
if (!ctx->get_tyctx ()->lookup_type (
expr.get_receiver_expr ()->get_mappings ().get_hirid (), &receiver))
{
@@ -593,7 +593,7 @@ public:
void visit (HIR::LoopExpr &expr)
{
- TyTy::TyBase *block_tyty = nullptr;
+ TyTy::BaseType *block_tyty = nullptr;
if (!ctx->get_tyctx ()->lookup_type (expr.get_mappings ().get_hirid (),
&block_tyty))
{
@@ -830,7 +830,7 @@ public:
Bexpression *main_expr
= CompileExpr::Compile (expr.get_expr ().get (), ctx);
- TyTy::TyBase *tyty = nullptr;
+ TyTy::BaseType *tyty = nullptr;
if (!ctx->get_tyctx ()->lookup_type (expr.get_mappings ().get_hirid (),
&tyty))
{
diff --git a/gcc/rust/backend/rust-compile-implitem.h b/gcc/rust/backend/rust-compile-implitem.h
index 6d180c8..3da269a 100644
--- a/gcc/rust/backend/rust-compile-implitem.h
+++ b/gcc/rust/backend/rust-compile-implitem.h
@@ -32,7 +32,7 @@ namespace Compile {
class CompileInherentImplItem : public HIRCompileBase
{
public:
- static void Compile (TyTy::TyBase *self, HIR::InherentImplItem *item,
+ static void Compile (TyTy::BaseType *self, HIR::InherentImplItem *item,
Context *ctx, bool compile_fns)
{
CompileInherentImplItem compiler (self, ctx, compile_fns);
@@ -41,7 +41,7 @@ public:
void visit (HIR::ConstantItem &constant)
{
- TyTy::TyBase *resolved_type = nullptr;
+ TyTy::BaseType *resolved_type = nullptr;
bool ok
= ctx->get_tyctx ()->lookup_type (constant.get_mappings ().get_hirid (),
&resolved_type);
@@ -74,7 +74,7 @@ public:
return;
}
- TyTy::TyBase *fntype_tyty;
+ TyTy::BaseType *fntype_tyty;
if (!ctx->get_tyctx ()->lookup_type (function.get_mappings ().get_hirid (),
&fntype_tyty))
{
@@ -110,7 +110,7 @@ public:
// setup the params
- TyTy::TyBase *tyret = fntype->return_type ();
+ TyTy::BaseType *tyret = fntype->return_type ();
std::vector<Bvariable *> param_vars;
size_t i = 0;
@@ -238,7 +238,7 @@ public:
return;
}
- TyTy::TyBase *fntype_tyty;
+ TyTy::BaseType *fntype_tyty;
if (!ctx->get_tyctx ()->lookup_type (method.get_mappings ().get_hirid (),
&fntype_tyty))
{
@@ -273,11 +273,11 @@ public:
ctx->insert_function_decl (method.get_mappings ().get_hirid (), fndecl);
// setup the params
- TyTy::TyBase *tyret = fntype->return_type ();
+ TyTy::BaseType *tyret = fntype->return_type ();
std::vector<Bvariable *> param_vars;
// insert self
- TyTy::TyBase *self_tyty_lookup = nullptr;
+ TyTy::BaseType *self_tyty_lookup = nullptr;
if (!ctx->get_tyctx ()->lookup_type (
method.get_self_param ().get_mappings ().get_hirid (),
&self_tyty_lookup))
@@ -428,11 +428,11 @@ public:
}
private:
- CompileInherentImplItem (TyTy::TyBase *self, Context *ctx, bool compile_fns)
+ CompileInherentImplItem (TyTy::BaseType *self, Context *ctx, bool compile_fns)
: HIRCompileBase (ctx), self (self), compile_fns (compile_fns)
{}
- TyTy::TyBase *self;
+ TyTy::BaseType *self;
bool compile_fns;
};
diff --git a/gcc/rust/backend/rust-compile-item.h b/gcc/rust/backend/rust-compile-item.h
index 7f93af9f..cfbe969 100644
--- a/gcc/rust/backend/rust-compile-item.h
+++ b/gcc/rust/backend/rust-compile-item.h
@@ -41,7 +41,7 @@ public:
void visit (HIR::TupleStruct &struct_decl)
{
- TyTy::TyBase *resolved = nullptr;
+ TyTy::BaseType *resolved = nullptr;
if (!ctx->get_tyctx ()->lookup_type (
struct_decl.get_mappings ().get_hirid (), &resolved))
{
@@ -55,7 +55,7 @@ public:
void visit (HIR::StructStruct &struct_decl)
{
- TyTy::TyBase *resolved = nullptr;
+ TyTy::BaseType *resolved = nullptr;
if (!ctx->get_tyctx ()->lookup_type (
struct_decl.get_mappings ().get_hirid (), &resolved))
{
@@ -69,7 +69,7 @@ public:
void visit (HIR::StaticItem &var)
{
- TyTy::TyBase *resolved_type = nullptr;
+ TyTy::BaseType *resolved_type = nullptr;
bool ok = ctx->get_tyctx ()->lookup_type (var.get_mappings ().get_hirid (),
&resolved_type);
rust_assert (ok);
@@ -97,7 +97,7 @@ public:
void visit (HIR::ConstantItem &constant)
{
- TyTy::TyBase *resolved_type = nullptr;
+ TyTy::BaseType *resolved_type = nullptr;
bool ok
= ctx->get_tyctx ()->lookup_type (constant.get_mappings ().get_hirid (),
&resolved_type);
@@ -129,7 +129,7 @@ public:
return;
}
- TyTy::TyBase *fntype_tyty;
+ TyTy::BaseType *fntype_tyty;
if (!ctx->get_tyctx ()->lookup_type (function.get_mappings ().get_hirid (),
&fntype_tyty))
{
@@ -169,7 +169,7 @@ public:
// setup the params
- TyTy::TyBase *tyret = fntype->return_type ();
+ TyTy::BaseType *tyret = fntype->return_type ();
std::vector<Bvariable *> param_vars;
size_t i = 0;
@@ -282,7 +282,7 @@ public:
void visit (HIR::InherentImpl &impl_block)
{
- TyTy::TyBase *self_lookup = nullptr;
+ TyTy::BaseType *self_lookup = nullptr;
if (!ctx->get_tyctx ()->lookup_type (
impl_block.get_type ()->get_mappings ().get_hirid (), &self_lookup))
{
diff --git a/gcc/rust/backend/rust-compile-stmt.h b/gcc/rust/backend/rust-compile-stmt.h
index add969a..b99b975 100644
--- a/gcc/rust/backend/rust-compile-stmt.h
+++ b/gcc/rust/backend/rust-compile-stmt.h
@@ -58,7 +58,7 @@ public:
if (!stmt.has_init_expr ())
return;
- TyTy::TyBase *ty = nullptr;
+ TyTy::BaseType *ty = nullptr;
if (!ctx->get_tyctx ()->lookup_type (stmt.get_mappings ().get_hirid (),
&ty))
{
diff --git a/gcc/rust/backend/rust-compile-tyty.h b/gcc/rust/backend/rust-compile-tyty.h
index eb8a961..aed96e3 100644
--- a/gcc/rust/backend/rust-compile-tyty.h
+++ b/gcc/rust/backend/rust-compile-tyty.h
@@ -34,7 +34,7 @@ namespace Compile {
class TyTyCompile : public TyTy::TyVisitor
{
public:
- static ::Btype *compile (::Backend *backend, TyTy::TyBase *ty)
+ static ::Btype *compile (::Backend *backend, TyTy::BaseType *ty)
{
TyTyCompile compiler (backend);
ty->accept_vis (compiler);
diff --git a/gcc/rust/backend/rust-compile-var-decl.h b/gcc/rust/backend/rust-compile-var-decl.h
index e701b15..7069d95 100644
--- a/gcc/rust/backend/rust-compile-var-decl.h
+++ b/gcc/rust/backend/rust-compile-var-decl.h
@@ -41,7 +41,7 @@ public:
void visit (HIR::LetStmt &stmt)
{
locus = stmt.get_locus ();
- TyTy::TyBase *resolved_type = nullptr;
+ TyTy::BaseType *resolved_type = nullptr;
bool ok = ctx->get_tyctx ()->lookup_type (stmt.get_mappings ().get_hirid (),
&resolved_type);
rust_assert (ok);
diff --git a/gcc/rust/backend/rust-compile.cc b/gcc/rust/backend/rust-compile.cc
index dd87d45..61bacf3 100644
--- a/gcc/rust/backend/rust-compile.cc
+++ b/gcc/rust/backend/rust-compile.cc
@@ -125,7 +125,7 @@ CompileExpr::visit (HIR::MethodCallExpr &expr)
return;
}
- TyTy::TyBase *self_type = nullptr;
+ TyTy::BaseType *self_type = nullptr;
if (!ctx->get_tyctx ()->lookup_type (
expr.get_receiver ()->get_mappings ().get_hirid (), &self_type))
{