Просмотр исходного кода

Rename some classes to match the design better (#1287)

* `FieldAccessExpression` -> `SimpleMemberAccessExpression`
    * Member `aggregate` -> `object`
    * Member `field` -> `member`
* `CompoundFieldAccessExpression` -> `CompoundMemberAccessExpression`
* `GetField` -> `GetMember`

As discussed in #1233.
Richard Smith 3 лет назад
Родитель
Сommit
4cf7ed4f12
45 измененных файлов с 632 добавлено и 626 удалено
  1. 6 6
      common/fuzzing/carbon.proto
  2. 9 9
      common/fuzzing/proto_to_carbon.cpp
  3. 2 2
      explorer/ast/ast_rtti.txt
  4. 8 8
      explorer/ast/expression.cpp
  5. 25 25
      explorer/ast/expression.h
  6. 5 4
      explorer/ast/pattern.cpp
  7. 7 7
      explorer/ast/pattern.h
  8. 18 16
      explorer/fuzzing/ast_to_proto.cpp
  9. 8 8
      explorer/fuzzing/fuzzer_corpus/2ea7343e45493dfdf9eb1e3d8c4095915c8ab0fa.textproto
  10. 26 26
      explorer/fuzzing/fuzzer_corpus/3dc8675eb42820ac93e26afbc4af62d157382861.textproto
  11. 12 12
      explorer/fuzzing/fuzzer_corpus/53c90be68e61d528ae738d538007572079edecfb.textproto
  12. 20 20
      explorer/fuzzing/fuzzer_corpus/5ae7e1ab2593f54e01e0f1f2b9cacc06701c17a8.textproto
  13. 20 20
      explorer/fuzzing/fuzzer_corpus/605b1f6a1f0b6806f5da052014a56403a3691024.textproto
  14. 3 3
      explorer/fuzzing/fuzzer_corpus/61074429b7c420d6021c2e22019df74bcf0349a7.textproto
  15. 2 2
      explorer/fuzzing/fuzzer_corpus/67f5eba036e94be0f60df4fb137d81e1dded6b7b.textproto
  16. 26 26
      explorer/fuzzing/fuzzer_corpus/6d89c0f37960217a1aed0d102cb41057306ba2ad.textproto
  17. 2 2
      explorer/fuzzing/fuzzer_corpus/734b6731213e032e95e872997648fbdaf8369838.textproto
  18. 18 18
      explorer/fuzzing/fuzzer_corpus/79551d0f40545d4aa5e988baa9ec1e946f91e601.textproto
  19. 26 26
      explorer/fuzzing/fuzzer_corpus/854bb3af6f9f1f6a0e31a7103720864316abf3bc.textproto
  20. 24 24
      explorer/fuzzing/fuzzer_corpus/886a1cbc0a58fed099ca0dc0d9da01ff9c0d0a75.textproto
  21. 20 20
      explorer/fuzzing/fuzzer_corpus/93dcb9eeaeeff3b36f8201ae4f1ad5893bb39aa8.textproto
  22. 14 14
      explorer/fuzzing/fuzzer_corpus/a8047c2f828519a1384aade7624c73d912acd0a0.textproto
  23. 16 16
      explorer/fuzzing/fuzzer_corpus/bade121153d00cc778f13538192f224f6d215d55.textproto
  24. 20 20
      explorer/fuzzing/fuzzer_corpus/cc5f0c26bf337000aa697c93880d18f0d9668b13.textproto
  25. 18 18
      explorer/fuzzing/fuzzer_corpus/d27c6d16e838d3a2fb3e829f92718ea93271d45a.textproto
  26. 20 20
      explorer/fuzzing/fuzzer_corpus/d6f13d6e870f2cde1ac1985bd386bbb22ec19f1a.textproto
  27. 18 18
      explorer/fuzzing/fuzzer_corpus/d76dbdfb3092a4e7d4368223e4b4d7208a4d2805.textproto
  28. 14 14
      explorer/fuzzing/fuzzer_corpus/da3113c74912fae50b4d30bf6351ad30985b4695.textproto
  29. 18 18
      explorer/fuzzing/fuzzer_corpus/dba92dce40512177d3bf143b088da7eccc8fa214.textproto
  30. 6 6
      explorer/fuzzing/fuzzer_corpus/dc02f2222475e43c33fb8d9713ade9cc67f52edc.textproto
  31. 20 20
      explorer/fuzzing/fuzzer_corpus/defec684307f53851236f5f0cd91353e44b522e8.textproto
  32. 6 6
      explorer/fuzzing/fuzzer_corpus/e4cdfa4f32f0adc18ed39f6a9a483835db596ee5.textproto
  33. 6 6
      explorer/fuzzing/fuzzer_corpus/ea5f89368e963868e6ff283238f3d2811e828b2f.textproto
  34. 20 20
      explorer/fuzzing/fuzzer_corpus/f0791c1c35ad07c87e3b12ad58bdfd3757fa7397.textproto
  35. 34 34
      explorer/fuzzing/fuzzer_corpus/f0c1f0eaa05127e95e5d9b167051b84b2fa54359.textproto
  36. 20 20
      explorer/fuzzing/fuzzer_corpus/f2f794705121fc76bfb94de7a7507becbc6ad10a.textproto
  37. 2 2
      explorer/interpreter/heap.cpp
  38. 24 24
      explorer/interpreter/interpreter.cpp
  39. 5 5
      explorer/interpreter/resolve_names.cpp
  40. 48 49
      explorer/interpreter/type_checker.cpp
  41. 4 3
      explorer/interpreter/value.cpp
  42. 2 2
      explorer/interpreter/value.h
  43. 6 3
      explorer/syntax/parser.ypp
  44. 3 3
      explorer/testdata/generic_class/fail_field_access_on_generic.carbon
  45. 1 1
      explorer/testdata/interface/fail_interface_missing_member.carbon

+ 6 - 6
common/fuzzing/carbon.proto

@@ -23,18 +23,18 @@ message FunctionTypeLiteral {
   optional Expression return_type = 2;
 }
 
-message FieldAccessExpression {
+message SimpleMemberAccessExpression {
   optional string field = 1;
-  optional Expression aggregate = 2;
+  optional Expression object = 2;
 }
 
-message CompoundFieldAccessExpression {
+message CompoundMemberAccessExpression {
   optional Expression object = 1;
   optional Expression path = 2;
 }
 
 message IndexExpression {
-  optional Expression aggregate = 1;
+  optional Expression object = 1;
   optional Expression offset = 2;
 }
 
@@ -124,7 +124,7 @@ message Expression {
   oneof kind {
     CallExpression call = 1;
     FunctionTypeLiteral function_type = 2;
-    FieldAccessExpression field_access = 3;
+    SimpleMemberAccessExpression simple_member_access = 3;
     IndexExpression index = 4;
     PrimitiveOperatorExpression primitive_operator = 5;
     TupleLiteralExpression tuple_literal = 6;
@@ -143,7 +143,7 @@ message Expression {
     TypeTypeLiteral type_type_literal = 19;
     UnimplementedExpression unimplemented_expression = 20;
     ArrayTypeLiteral array_type_literal = 21;
-    CompoundFieldAccessExpression compound_field_access = 22;
+    CompoundMemberAccessExpression compound_member_access = 22;
   }
 }
 

+ 9 - 9
common/fuzzing/proto_to_carbon.cpp

@@ -206,26 +206,26 @@ static auto ExpressionToCarbon(const Fuzzing::Expression& expression,
       break;
     }
 
-    case Fuzzing::Expression::kFieldAccess: {
-      const auto& field_access = expression.field_access();
-      ExpressionToCarbon(field_access.aggregate(), out);
+    case Fuzzing::Expression::kSimpleMemberAccess: {
+      const auto& simple_member_access = expression.simple_member_access();
+      ExpressionToCarbon(simple_member_access.object(), out);
       out << ".";
-      IdentifierToCarbon(field_access.field(), out);
+      IdentifierToCarbon(simple_member_access.field(), out);
       break;
     }
 
-    case Fuzzing::Expression::kCompoundFieldAccess: {
-      const auto& field_access = expression.compound_field_access();
-      ExpressionToCarbon(field_access.object(), out);
+    case Fuzzing::Expression::kCompoundMemberAccess: {
+      const auto& simple_member_access = expression.compound_member_access();
+      ExpressionToCarbon(simple_member_access.object(), out);
       out << ".(";
-      ExpressionToCarbon(field_access.path(), out);
+      ExpressionToCarbon(simple_member_access.path(), out);
       out << ")";
       break;
     }
 
     case Fuzzing::Expression::kIndex: {
       const auto& index = expression.index();
-      ExpressionToCarbon(index.aggregate(), out);
+      ExpressionToCarbon(index.object(), out);
       out << "[";
       ExpressionToCarbon(index.offset(), out);
       out << "]";

+ 2 - 2
explorer/ast/ast_rtti.txt

@@ -41,8 +41,8 @@ abstract class Expression : AstNode;
   class BoolLiteral : Expression;
   class CallExpression : Expression;
   class FunctionTypeLiteral : Expression;
-  class FieldAccessExpression : Expression;
-  class CompoundFieldAccessExpression : Expression;
+  class SimpleMemberAccessExpression : Expression;
+  class CompoundMemberAccessExpression : Expression;
   class IndexExpression : Expression;
   class IntTypeLiteral : Expression;
   class ContinuationTypeLiteral : Expression;

+ 8 - 8
explorer/ast/expression.cpp

@@ -87,16 +87,16 @@ void Expression::Print(llvm::raw_ostream& out) const {
   switch (kind()) {
     case ExpressionKind::IndexExpression: {
       const auto& index = cast<IndexExpression>(*this);
-      out << index.aggregate() << "[" << index.offset() << "]";
+      out << index.object() << "[" << index.offset() << "]";
       break;
     }
-    case ExpressionKind::FieldAccessExpression: {
-      const auto& access = cast<FieldAccessExpression>(*this);
-      out << access.aggregate() << "." << access.field();
+    case ExpressionKind::SimpleMemberAccessExpression: {
+      const auto& access = cast<SimpleMemberAccessExpression>(*this);
+      out << access.object() << "." << access.member();
       break;
     }
-    case ExpressionKind::CompoundFieldAccessExpression: {
-      const auto& access = cast<CompoundFieldAccessExpression>(*this);
+    case ExpressionKind::CompoundMemberAccessExpression: {
+      const auto& access = cast<CompoundMemberAccessExpression>(*this);
       out << access.object() << ".(" << access.path() << ")";
       break;
     }
@@ -242,8 +242,8 @@ void Expression::PrintID(llvm::raw_ostream& out) const {
       out << "ValueLiteral";
       break;
     case ExpressionKind::IndexExpression:
-    case ExpressionKind::FieldAccessExpression:
-    case ExpressionKind::CompoundFieldAccessExpression:
+    case ExpressionKind::SimpleMemberAccessExpression:
+    case ExpressionKind::CompoundMemberAccessExpression:
     case ExpressionKind::IfExpression:
     case ExpressionKind::TupleLiteral:
     case ExpressionKind::StructLiteral:

+ 25 - 25
explorer/ast/expression.h

@@ -152,24 +152,24 @@ class IdentifierExpression : public Expression {
   std::optional<ValueNodeView> value_node_;
 };
 
-class FieldAccessExpression : public Expression {
+class SimpleMemberAccessExpression : public Expression {
  public:
-  explicit FieldAccessExpression(SourceLocation source_loc,
-                                 Nonnull<Expression*> aggregate,
-                                 std::string field)
-      : Expression(AstNodeKind::FieldAccessExpression, source_loc),
-        aggregate_(aggregate),
-        field_(std::move(field)) {}
+  explicit SimpleMemberAccessExpression(SourceLocation source_loc,
+                                        Nonnull<Expression*> object,
+                                        std::string member)
+      : Expression(AstNodeKind::SimpleMemberAccessExpression, source_loc),
+        object_(object),
+        member_(std::move(member)) {}
 
   static auto classof(const AstNode* node) -> bool {
-    return InheritsFromFieldAccessExpression(node->kind());
+    return InheritsFromSimpleMemberAccessExpression(node->kind());
   }
 
-  auto aggregate() const -> const Expression& { return *aggregate_; }
-  auto aggregate() -> Expression& { return *aggregate_; }
-  auto field() const -> const std::string& { return field_; }
+  auto object() const -> const Expression& { return *object_; }
+  auto object() -> Expression& { return *object_; }
+  auto member() const -> const std::string& { return member_; }
 
-  // If `aggregate` has a generic type, returns the `ImplBinding` that
+  // If `object` has a generic type, returns the `ImplBinding` that
   // identifies its witness table. Otherwise, returns `std::nullopt`. Should not
   // be called before typechecking.
   auto impl() const -> std::optional<Nonnull<const ImplBinding*>> {
@@ -183,8 +183,8 @@ class FieldAccessExpression : public Expression {
   }
 
  private:
-  Nonnull<Expression*> aggregate_;
-  std::string field_;
+  Nonnull<Expression*> object_;
+  std::string member_;
   std::optional<Nonnull<const ImplBinding*>> impl_;
 };
 
@@ -201,17 +201,17 @@ class FieldAccessExpression : public Expression {
 //
 // Note that the `path` is evaluated during type-checking, not at runtime, so
 // the corresponding `member` is determined statically.
-class CompoundFieldAccessExpression : public Expression {
+class CompoundMemberAccessExpression : public Expression {
  public:
-  explicit CompoundFieldAccessExpression(SourceLocation source_loc,
-                                         Nonnull<Expression*> object,
-                                         Nonnull<Expression*> path)
-      : Expression(AstNodeKind::CompoundFieldAccessExpression, source_loc),
+  explicit CompoundMemberAccessExpression(SourceLocation source_loc,
+                                          Nonnull<Expression*> object,
+                                          Nonnull<Expression*> path)
+      : Expression(AstNodeKind::CompoundMemberAccessExpression, source_loc),
         object_(object),
         path_(path) {}
 
   static auto classof(const AstNode* node) -> bool {
-    return InheritsFromCompoundFieldAccessExpression(node->kind());
+    return InheritsFromCompoundMemberAccessExpression(node->kind());
   }
 
   auto object() const -> const Expression& { return *object_; }
@@ -257,23 +257,23 @@ class CompoundFieldAccessExpression : public Expression {
 class IndexExpression : public Expression {
  public:
   explicit IndexExpression(SourceLocation source_loc,
-                           Nonnull<Expression*> aggregate,
+                           Nonnull<Expression*> object,
                            Nonnull<Expression*> offset)
       : Expression(AstNodeKind::IndexExpression, source_loc),
-        aggregate_(aggregate),
+        object_(object),
         offset_(offset) {}
 
   static auto classof(const AstNode* node) -> bool {
     return InheritsFromIndexExpression(node->kind());
   }
 
-  auto aggregate() const -> const Expression& { return *aggregate_; }
-  auto aggregate() -> Expression& { return *aggregate_; }
+  auto object() const -> const Expression& { return *object_; }
+  auto object() -> Expression& { return *object_; }
   auto offset() const -> const Expression& { return *offset_; }
   auto offset() -> Expression& { return *offset_; }
 
  private:
-  Nonnull<Expression*> aggregate_;
+  Nonnull<Expression*> object_;
   Nonnull<Expression*> offset_;
 };
 

+ 5 - 4
explorer/ast/pattern.cpp

@@ -141,13 +141,14 @@ auto TuplePatternFromParenContents(Nonnull<Arena*> arena,
 // Used by AlternativePattern for constructor initialization. Produces a helpful
 // error for incorrect expressions, rather than letting a default cast error
 // apply.
-auto AlternativePattern::RequireFieldAccess(Nonnull<Expression*> alternative)
-    -> ErrorOr<Nonnull<FieldAccessExpression*>> {
-  if (alternative->kind() != ExpressionKind::FieldAccessExpression) {
+auto AlternativePattern::RequireSimpleMemberAccess(
+    Nonnull<Expression*> alternative)
+    -> ErrorOr<Nonnull<SimpleMemberAccessExpression*>> {
+  if (alternative->kind() != ExpressionKind::SimpleMemberAccessExpression) {
     return ProgramError(alternative->source_loc())
            << "Alternative pattern must have the form of a field access.";
   }
-  return &cast<FieldAccessExpression>(*alternative);
+  return &cast<SimpleMemberAccessExpression>(*alternative);
 }
 
 auto ParenExpressionToParenPattern(Nonnull<Arena*> arena,

+ 7 - 7
explorer/ast/pattern.h

@@ -285,11 +285,11 @@ class AlternativePattern : public Pattern {
                      Nonnull<Expression*> alternative,
                      Nonnull<TuplePattern*> arguments)
       -> ErrorOr<Nonnull<AlternativePattern*>> {
-    CARBON_ASSIGN_OR_RETURN(Nonnull<FieldAccessExpression*> field_access,
-                            RequireFieldAccess(alternative));
-    return arena->New<AlternativePattern>(source_loc,
-                                          &field_access->aggregate(),
-                                          field_access->field(), arguments);
+    CARBON_ASSIGN_OR_RETURN(
+        Nonnull<SimpleMemberAccessExpression*> member_access,
+        RequireSimpleMemberAccess(alternative));
+    return arena->New<AlternativePattern>(source_loc, &member_access->object(),
+                                          member_access->member(), arguments);
   }
 
   // Constructs an AlternativePattern that matches a value of the type
@@ -317,8 +317,8 @@ class AlternativePattern : public Pattern {
   auto arguments() -> TuplePattern& { return *arguments_; }
 
  private:
-  static auto RequireFieldAccess(Nonnull<Expression*> alternative)
-      -> ErrorOr<Nonnull<FieldAccessExpression*>>;
+  static auto RequireSimpleMemberAccess(Nonnull<Expression*> alternative)
+      -> ErrorOr<Nonnull<SimpleMemberAccessExpression*>>;
 
   Nonnull<Expression*> choice_type_;
   std::string alternative_name_;

+ 18 - 16
explorer/fuzzing/ast_to_proto.cpp

@@ -103,31 +103,33 @@ static auto ExpressionToProto(const Expression& expression)
       break;
     }
 
-    case ExpressionKind::FieldAccessExpression: {
-      const auto& field_access = cast<FieldAccessExpression>(expression);
-      auto* field_access_proto = expression_proto.mutable_field_access();
-      field_access_proto->set_field(field_access.field());
-      *field_access_proto->mutable_aggregate() =
-          ExpressionToProto(field_access.aggregate());
+    case ExpressionKind::SimpleMemberAccessExpression: {
+      const auto& simple_member_access =
+          cast<SimpleMemberAccessExpression>(expression);
+      auto* simple_member_access_proto =
+          expression_proto.mutable_simple_member_access();
+      simple_member_access_proto->set_field(simple_member_access.member());
+      *simple_member_access_proto->mutable_object() =
+          ExpressionToProto(simple_member_access.object());
       break;
     }
 
-    case ExpressionKind::CompoundFieldAccessExpression: {
-      const auto& field_access =
-          cast<CompoundFieldAccessExpression>(expression);
-      auto* field_access_proto =
-          expression_proto.mutable_compound_field_access();
-      *field_access_proto->mutable_object() =
-          ExpressionToProto(field_access.object());
-      *field_access_proto->mutable_path() =
-          ExpressionToProto(field_access.path());
+    case ExpressionKind::CompoundMemberAccessExpression: {
+      const auto& simple_member_access =
+          cast<CompoundMemberAccessExpression>(expression);
+      auto* simple_member_access_proto =
+          expression_proto.mutable_compound_member_access();
+      *simple_member_access_proto->mutable_object() =
+          ExpressionToProto(simple_member_access.object());
+      *simple_member_access_proto->mutable_path() =
+          ExpressionToProto(simple_member_access.path());
       break;
     }
 
     case ExpressionKind::IndexExpression: {
       const auto& index = cast<IndexExpression>(expression);
       auto* index_proto = expression_proto.mutable_index();
-      *index_proto->mutable_aggregate() = ExpressionToProto(index.aggregate());
+      *index_proto->mutable_object() = ExpressionToProto(index.object());
       *index_proto->mutable_offset() = ExpressionToProto(index.offset());
       break;
     }

+ 8 - 8
explorer/fuzzing/fuzzer_corpus/28a2369341442b82638b49da26c63af7dc4a87a3.textproto → explorer/fuzzing/fuzzer_corpus/2ea7343e45493dfdf9eb1e3d8c4095915c8ab0fa.textproto

@@ -68,9 +68,9 @@ compilation_unit {
             init {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "None"
-                    aggregate {
+                    object {
                       identifier {
                         name: "Ints"
                       }
@@ -99,9 +99,9 @@ compilation_unit {
             init {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "One"
-                    aggregate {
+                    object {
                       identifier {
                         name: "Ints"
                       }
@@ -150,9 +150,9 @@ compilation_unit {
               pattern {
                 expression_pattern {
                   expression {
-                    field_access {
+                    simple_member_access {
                       field: "None"
-                      aggregate {
+                      object {
                         identifier {
                           name: "Ints"
                         }
@@ -351,9 +351,9 @@ compilation_unit {
                   expression {
                     call {
                       function {
-                        field_access {
+                        simple_member_access {
                           field: "None"
-                          aggregate {
+                          object {
                             identifier {
                               name: "Ints"
                             }

+ 26 - 26
explorer/fuzzing/fuzzer_corpus/789bdcd9bd46dba4009d8ff3675626e31aa6ddfb.textproto → explorer/fuzzing/fuzzer_corpus/3dc8675eb42820ac93e26afbc4af62d157382861.textproto

@@ -267,9 +267,9 @@ compilation_unit {
                       expression {
                         call {
                           function {
-                            field_access {
+                            simple_member_access {
                               field: "Zero"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "U"
                                 }
@@ -288,9 +288,9 @@ compilation_unit {
                       expression {
                         call {
                           function {
-                            field_access {
+                            simple_member_access {
                               field: "Zero"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "U"
                                 }
@@ -360,12 +360,12 @@ compilation_unit {
                       expression {
                         call {
                           function {
-                            field_access {
+                            simple_member_access {
                               field: "Add"
-                              aggregate {
-                                field_access {
+                              object {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -377,9 +377,9 @@ compilation_unit {
                           argument {
                             tuple_literal {
                               fields {
-                                field_access {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "other"
                                     }
@@ -396,12 +396,12 @@ compilation_unit {
                       expression {
                         call {
                           function {
-                            field_access {
+                            simple_member_access {
                               field: "Add"
-                              aggregate {
-                                field_access {
+                              object {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -413,9 +413,9 @@ compilation_unit {
                           argument {
                             tuple_literal {
                               fields {
-                                field_access {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "other"
                                     }
@@ -505,9 +505,9 @@ compilation_unit {
             init {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "Zero"
-                    aggregate {
+                    object {
                       identifier {
                         name: "E"
                       }
@@ -532,9 +532,9 @@ compilation_unit {
             rhs {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "Add"
-                    aggregate {
+                    object {
                       identifier {
                         name: "total"
                       }
@@ -564,9 +564,9 @@ compilation_unit {
             rhs {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "Add"
-                    aggregate {
+                    object {
                       identifier {
                         name: "total"
                       }
@@ -770,9 +770,9 @@ compilation_unit {
               primitive_operator {
                 op: Sub
                 arguments {
-                  field_access {
+                  simple_member_access {
                     field: "x"
-                    aggregate {
+                    object {
                       identifier {
                         name: "r"
                       }
@@ -780,9 +780,9 @@ compilation_unit {
                   }
                 }
                 arguments {
-                  field_access {
+                  simple_member_access {
                     field: "y"
-                    aggregate {
+                    object {
                       identifier {
                         name: "r"
                       }

+ 12 - 12
explorer/fuzzing/fuzzer_corpus/9627133891194d30a116e7e183d4a9e40eff236c.textproto → explorer/fuzzing/fuzzer_corpus/53c90be68e61d528ae738d538007572079edecfb.textproto

@@ -110,9 +110,9 @@ compilation_unit {
                       expression {
                         call {
                           function {
-                            field_access {
+                            simple_member_access {
                               field: "Zero"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "T"
                                 }
@@ -131,9 +131,9 @@ compilation_unit {
                       expression {
                         call {
                           function {
-                            field_access {
+                            simple_member_access {
                               field: "Zero"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "T"
                                 }
@@ -352,17 +352,17 @@ compilation_unit {
             expression {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "Add"
-                    aggregate {
-                      field_access {
+                    object {
+                      simple_member_access {
                         field: "x"
-                        aggregate {
+                        object {
                           call {
                             function {
-                              field_access {
+                              simple_member_access {
                                 field: "Origin"
-                                aggregate {
+                                object {
                                   identifier {
                                     name: "p"
                                   }
@@ -382,9 +382,9 @@ compilation_unit {
                 argument {
                   tuple_literal {
                     fields {
-                      field_access {
+                      simple_member_access {
                         field: "y"
-                        aggregate {
+                        object {
                           identifier {
                             name: "p"
                           }

+ 20 - 20
explorer/fuzzing/fuzzer_corpus/50f4f5f704edc5df5c52f6c61da5b8d0831833c9.textproto → explorer/fuzzing/fuzzer_corpus/5ae7e1ab2593f54e01e0f1f2b9cacc06701c17a8.textproto

@@ -261,9 +261,9 @@ compilation_unit {
                             primitive_operator {
                               op: Add
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -271,9 +271,9 @@ compilation_unit {
                                 }
                               }
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "b"
                                     }
@@ -289,9 +289,9 @@ compilation_unit {
                             primitive_operator {
                               op: Add
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -299,9 +299,9 @@ compilation_unit {
                                 }
                               }
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "b"
                                     }
@@ -367,9 +367,9 @@ compilation_unit {
                             primitive_operator {
                               op: Mul
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -390,9 +390,9 @@ compilation_unit {
                             primitive_operator {
                               op: Mul
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -493,14 +493,14 @@ compilation_unit {
             expression {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "Scale"
-                    aggregate {
+                    object {
                       call {
                         function {
-                          field_access {
+                          simple_member_access {
                             field: "Add"
-                            aggregate {
+                            object {
                               identifier {
                                 name: "a"
                               }
@@ -512,9 +512,9 @@ compilation_unit {
                             fields {
                               call {
                                 function {
-                                  field_access {
+                                  simple_member_access {
                                     field: "Zero"
-                                    aggregate {
+                                    object {
                                       identifier {
                                         name: "U"
                                       }
@@ -647,9 +647,9 @@ compilation_unit {
               primitive_operator {
                 op: Sub
                 arguments {
-                  field_access {
+                  simple_member_access {
                     field: "x"
-                    aggregate {
+                    object {
                       identifier {
                         name: "p"
                       }

+ 20 - 20
explorer/fuzzing/fuzzer_corpus/3529941f593ea85e31a53c15774d54bc728ef54c.textproto → explorer/fuzzing/fuzzer_corpus/605b1f6a1f0b6806f5da052014a56403a3691024.textproto

@@ -192,9 +192,9 @@ compilation_unit {
                             primitive_operator {
                               op: Add
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -202,9 +202,9 @@ compilation_unit {
                                 }
                               }
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "b"
                                     }
@@ -220,9 +220,9 @@ compilation_unit {
                             primitive_operator {
                               op: Add
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -230,9 +230,9 @@ compilation_unit {
                                 }
                               }
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "b"
                                     }
@@ -298,9 +298,9 @@ compilation_unit {
                             primitive_operator {
                               op: Mul
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -321,9 +321,9 @@ compilation_unit {
                             primitive_operator {
                               op: Mul
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -419,11 +419,11 @@ compilation_unit {
               }
             }
             init {
-              field_access {
+              simple_member_access {
                 field: "Add"
-                aggregate {
+                object {
                   index {
-                    aggregate {
+                    object {
                       identifier {
                         name: "t"
                       }
@@ -451,9 +451,9 @@ compilation_unit {
               }
             }
             init {
-              field_access {
+              simple_member_access {
                 field: "Scale"
-                aggregate {
+                object {
                   call {
                     function {
                       identifier {
@@ -464,7 +464,7 @@ compilation_unit {
                       tuple_literal {
                         fields {
                           index {
-                            aggregate {
+                            object {
                               identifier {
                                 name: "t"
                               }
@@ -654,9 +654,9 @@ compilation_unit {
               primitive_operator {
                 op: Sub
                 arguments {
-                  field_access {
+                  simple_member_access {
                     field: "x"
-                    aggregate {
+                    object {
                       identifier {
                         name: "p"
                       }

+ 3 - 3
explorer/fuzzing/fuzzer_corpus/cc5dd89a2ca0db94774b36ee1a9eb31156e6b6af.textproto → explorer/fuzzing/fuzzer_corpus/61074429b7c420d6021c2e22019df74bcf0349a7.textproto

@@ -96,7 +96,7 @@ compilation_unit {
                       tuple_literal {
                         fields {
                           index {
-                            aggregate {
+                            object {
                               identifier {
                                 name: "tuple"
                               }
@@ -123,7 +123,7 @@ compilation_unit {
                       tuple_literal {
                         fields {
                           index {
-                            aggregate {
+                            object {
                               identifier {
                                 name: "tuple"
                               }
@@ -211,7 +211,7 @@ compilation_unit {
           return_statement {
             expression {
               index {
-                aggregate {
+                object {
                   call {
                     function {
                       identifier {

+ 2 - 2
explorer/fuzzing/fuzzer_corpus/1a947afd765d1dff390e125d1420e20c19328b8e.textproto → explorer/fuzzing/fuzzer_corpus/67f5eba036e94be0f60df4fb137d81e1dded6b7b.textproto

@@ -132,7 +132,7 @@ compilation_unit {
                               }
                               arguments {
                                 index {
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "c"
                                     }
@@ -148,7 +148,7 @@ compilation_unit {
                           }
                           arguments {
                             index {
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "c"
                                 }

+ 26 - 26
explorer/fuzzing/fuzzer_corpus/6b5ba4e640c19e8d032e662194f8c5bbfd7ff4b7.textproto → explorer/fuzzing/fuzzer_corpus/6d89c0f37960217a1aed0d102cb41057306ba2ad.textproto

@@ -280,9 +280,9 @@ compilation_unit {
                       expression {
                         call {
                           function {
-                            field_access {
+                            simple_member_access {
                               field: "Zero"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "U"
                                 }
@@ -301,9 +301,9 @@ compilation_unit {
                       expression {
                         call {
                           function {
-                            field_access {
+                            simple_member_access {
                               field: "Zero"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "U"
                                 }
@@ -412,12 +412,12 @@ compilation_unit {
                       expression {
                         call {
                           function {
-                            field_access {
+                            simple_member_access {
                               field: "Add"
-                              aggregate {
-                                field_access {
+                              object {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -429,9 +429,9 @@ compilation_unit {
                           argument {
                             tuple_literal {
                               fields {
-                                field_access {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "other"
                                     }
@@ -448,12 +448,12 @@ compilation_unit {
                       expression {
                         call {
                           function {
-                            field_access {
+                            simple_member_access {
                               field: "Add"
-                              aggregate {
-                                field_access {
+                              object {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -465,9 +465,9 @@ compilation_unit {
                           argument {
                             tuple_literal {
                               fields {
-                                field_access {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "other"
                                     }
@@ -557,9 +557,9 @@ compilation_unit {
             init {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "Zero"
-                    aggregate {
+                    object {
                       identifier {
                         name: "E"
                       }
@@ -584,9 +584,9 @@ compilation_unit {
             rhs {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "Add"
-                    aggregate {
+                    object {
                       identifier {
                         name: "total"
                       }
@@ -616,9 +616,9 @@ compilation_unit {
             rhs {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "Add"
-                    aggregate {
+                    object {
                       identifier {
                         name: "total"
                       }
@@ -941,9 +941,9 @@ compilation_unit {
               primitive_operator {
                 op: Sub
                 arguments {
-                  field_access {
+                  simple_member_access {
                     field: "x"
-                    aggregate {
+                    object {
                       identifier {
                         name: "r"
                       }
@@ -951,9 +951,9 @@ compilation_unit {
                   }
                 }
                 arguments {
-                  field_access {
+                  simple_member_access {
                     field: "y"
-                    aggregate {
+                    object {
                       identifier {
                         name: "r"
                       }

+ 2 - 2
explorer/fuzzing/fuzzer_corpus/2325b93a7572c5e6da46c25c8653153b7058a58a.textproto → explorer/fuzzing/fuzzer_corpus/734b6731213e032e95e872997648fbdaf8369838.textproto

@@ -159,9 +159,9 @@ compilation_unit {
                 fields {
                   call {
                     function {
-                      field_access {
+                      simple_member_access {
                         field: "Two"
-                        aggregate {
+                        object {
                           identifier {
                             name: "Ints"
                           }

+ 18 - 18
explorer/fuzzing/fuzzer_corpus/c120e8bd92006d2aae26bbb3086a990327e50cd6.textproto → explorer/fuzzing/fuzzer_corpus/79551d0f40545d4aa5e988baa9ec1e946f91e601.textproto

@@ -194,9 +194,9 @@ compilation_unit {
                         primitive_operator {
                           op: Add
                           arguments {
-                            field_access {
+                            simple_member_access {
                               field: "x"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "me"
                                 }
@@ -204,9 +204,9 @@ compilation_unit {
                             }
                           }
                           arguments {
-                            field_access {
+                            simple_member_access {
                               field: "x"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "b"
                                 }
@@ -222,9 +222,9 @@ compilation_unit {
                         primitive_operator {
                           op: Add
                           arguments {
-                            field_access {
+                            simple_member_access {
                               field: "y"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "me"
                                 }
@@ -232,9 +232,9 @@ compilation_unit {
                             }
                           }
                           arguments {
-                            field_access {
+                            simple_member_access {
                               field: "y"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "b"
                                 }
@@ -300,9 +300,9 @@ compilation_unit {
                         primitive_operator {
                           op: Mul
                           arguments {
-                            field_access {
+                            simple_member_access {
                               field: "x"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "me"
                                 }
@@ -323,9 +323,9 @@ compilation_unit {
                         primitive_operator {
                           op: Mul
                           arguments {
-                            field_access {
+                            simple_member_access {
                               field: "y"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "me"
                                 }
@@ -424,9 +424,9 @@ compilation_unit {
               }
             }
             init {
-              field_access {
+              simple_member_access {
                 field: "Add"
-                aggregate {
+                object {
                   identifier {
                     name: "a"
                   }
@@ -447,9 +447,9 @@ compilation_unit {
               }
             }
             init {
-              field_access {
+              simple_member_access {
                 field: "Scale"
-                aggregate {
+                object {
                   call {
                     function {
                       identifier {
@@ -637,9 +637,9 @@ compilation_unit {
               primitive_operator {
                 op: Sub
                 arguments {
-                  field_access {
+                  simple_member_access {
                     field: "x"
-                    aggregate {
+                    object {
                       identifier {
                         name: "p"
                       }

+ 26 - 26
explorer/fuzzing/fuzzer_corpus/f798f9cb9e39bf2178f86cf24d17c4cc5583fd81.textproto → explorer/fuzzing/fuzzer_corpus/854bb3af6f9f1f6a0e31a7103720864316abf3bc.textproto

@@ -280,9 +280,9 @@ compilation_unit {
                       expression {
                         call {
                           function {
-                            field_access {
+                            simple_member_access {
                               field: "Zero"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "U"
                                 }
@@ -301,9 +301,9 @@ compilation_unit {
                       expression {
                         call {
                           function {
-                            field_access {
+                            simple_member_access {
                               field: "Zero"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "U"
                                 }
@@ -412,12 +412,12 @@ compilation_unit {
                       expression {
                         call {
                           function {
-                            field_access {
+                            simple_member_access {
                               field: "Add"
-                              aggregate {
-                                field_access {
+                              object {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -429,9 +429,9 @@ compilation_unit {
                           argument {
                             tuple_literal {
                               fields {
-                                field_access {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "other"
                                     }
@@ -448,12 +448,12 @@ compilation_unit {
                       expression {
                         call {
                           function {
-                            field_access {
+                            simple_member_access {
                               field: "Add"
-                              aggregate {
-                                field_access {
+                              object {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -465,9 +465,9 @@ compilation_unit {
                           argument {
                             tuple_literal {
                               fields {
-                                field_access {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "other"
                                     }
@@ -557,9 +557,9 @@ compilation_unit {
             init {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "Zero"
-                    aggregate {
+                    object {
                       identifier {
                         name: "E"
                       }
@@ -584,9 +584,9 @@ compilation_unit {
             rhs {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "Add"
-                    aggregate {
+                    object {
                       identifier {
                         name: "total"
                       }
@@ -616,9 +616,9 @@ compilation_unit {
             rhs {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "Add"
-                    aggregate {
+                    object {
                       identifier {
                         name: "total"
                       }
@@ -822,9 +822,9 @@ compilation_unit {
               primitive_operator {
                 op: Sub
                 arguments {
-                  field_access {
+                  simple_member_access {
                     field: "x"
-                    aggregate {
+                    object {
                       identifier {
                         name: "r"
                       }
@@ -832,9 +832,9 @@ compilation_unit {
                   }
                 }
                 arguments {
-                  field_access {
+                  simple_member_access {
                     field: "y"
-                    aggregate {
+                    object {
                       identifier {
                         name: "r"
                       }

+ 24 - 24
explorer/fuzzing/fuzzer_corpus/005b7719430b22589b085fb4317c31640e6a0a8d.textproto → explorer/fuzzing/fuzzer_corpus/886a1cbc0a58fed099ca0dc0d9da01ff9c0d0a75.textproto

@@ -574,9 +574,9 @@ compilation_unit {
                             primitive_operator {
                               op: Add
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -584,9 +584,9 @@ compilation_unit {
                                 }
                               }
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "b"
                                     }
@@ -602,9 +602,9 @@ compilation_unit {
                             primitive_operator {
                               op: Add
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -612,9 +612,9 @@ compilation_unit {
                                 }
                               }
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "b"
                                     }
@@ -680,9 +680,9 @@ compilation_unit {
                             primitive_operator {
                               op: Mul
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -703,9 +703,9 @@ compilation_unit {
                             primitive_operator {
                               op: Mul
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -877,14 +877,14 @@ compilation_unit {
             expression {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "Scale"
-                    aggregate {
+                    object {
                       call {
                         function {
-                          field_access {
+                          simple_member_access {
                             field: "Add"
-                            aggregate {
+                            object {
                               identifier {
                                 name: "a"
                               }
@@ -896,9 +896,9 @@ compilation_unit {
                             fields {
                               call {
                                 function {
-                                  field_access {
+                                  simple_member_access {
                                     field: "Zero"
-                                    aggregate {
+                                    object {
                                       identifier {
                                         name: "U"
                                       }
@@ -920,14 +920,14 @@ compilation_unit {
                 argument {
                   tuple_literal {
                     fields {
-                      field_access {
+                      simple_member_access {
                         field: "v"
-                        aggregate {
+                        object {
                           call {
                             function {
-                              field_access {
+                              simple_member_access {
                                 field: "Hold"
-                                aggregate {
+                                object {
                                   identifier {
                                     name: "a"
                                   }
@@ -1054,9 +1054,9 @@ compilation_unit {
               primitive_operator {
                 op: Sub
                 arguments {
-                  field_access {
+                  simple_member_access {
                     field: "x"
-                    aggregate {
+                    object {
                       identifier {
                         name: "p"
                       }

+ 20 - 20
explorer/fuzzing/fuzzer_corpus/94de30bf12fefffb83c6912020ccd79db9b75824.textproto → explorer/fuzzing/fuzzer_corpus/93dcb9eeaeeff3b36f8201ae4f1ad5893bb39aa8.textproto

@@ -323,9 +323,9 @@ compilation_unit {
                         primitive_operator {
                           op: Add
                           arguments {
-                            field_access {
+                            simple_member_access {
                               field: "x"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "me"
                                 }
@@ -333,9 +333,9 @@ compilation_unit {
                             }
                           }
                           arguments {
-                            field_access {
+                            simple_member_access {
                               field: "x"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "b"
                                 }
@@ -351,9 +351,9 @@ compilation_unit {
                         primitive_operator {
                           op: Add
                           arguments {
-                            field_access {
+                            simple_member_access {
                               field: "y"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "me"
                                 }
@@ -361,9 +361,9 @@ compilation_unit {
                             }
                           }
                           arguments {
-                            field_access {
+                            simple_member_access {
                               field: "y"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "b"
                                 }
@@ -453,9 +453,9 @@ compilation_unit {
                         primitive_operator {
                           op: Mul
                           arguments {
-                            field_access {
+                            simple_member_access {
                               field: "x"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "me"
                                 }
@@ -476,9 +476,9 @@ compilation_unit {
                         primitive_operator {
                           op: Mul
                           arguments {
-                            field_access {
+                            simple_member_access {
                               field: "y"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "me"
                                 }
@@ -556,14 +556,14 @@ compilation_unit {
             expression {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "Scale"
-                    aggregate {
+                    object {
                       call {
                         function {
-                          field_access {
+                          simple_member_access {
                             field: "Add"
-                            aggregate {
+                            object {
                               identifier {
                                 name: "a"
                               }
@@ -575,9 +575,9 @@ compilation_unit {
                             fields {
                               call {
                                 function {
-                                  field_access {
+                                  simple_member_access {
                                     field: "Zero"
-                                    aggregate {
+                                    object {
                                       identifier {
                                         name: "T"
                                       }
@@ -734,9 +734,9 @@ compilation_unit {
               primitive_operator {
                 op: Sub
                 arguments {
-                  field_access {
+                  simple_member_access {
                     field: "x"
-                    aggregate {
+                    object {
                       identifier {
                         name: "p"
                       }

+ 14 - 14
explorer/fuzzing/fuzzer_corpus/8036c3a3216c2ed984cf5bbb86aa44df2dcad83c.textproto → explorer/fuzzing/fuzzer_corpus/a8047c2f828519a1384aade7624c73d912acd0a0.textproto

@@ -167,9 +167,9 @@ compilation_unit {
                         primitive_operator {
                           op: Add
                           arguments {
-                            field_access {
+                            simple_member_access {
                               field: "x"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "me"
                                 }
@@ -177,9 +177,9 @@ compilation_unit {
                             }
                           }
                           arguments {
-                            field_access {
+                            simple_member_access {
                               field: "x"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "b"
                                 }
@@ -195,9 +195,9 @@ compilation_unit {
                         primitive_operator {
                           op: Add
                           arguments {
-                            field_access {
+                            simple_member_access {
                               field: "y"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "me"
                                 }
@@ -205,9 +205,9 @@ compilation_unit {
                             }
                           }
                           arguments {
-                            field_access {
+                            simple_member_access {
                               field: "y"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "b"
                                 }
@@ -301,9 +301,9 @@ compilation_unit {
             expression {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "Op"
-                    aggregate {
+                    object {
                       identifier {
                         name: "a"
                       }
@@ -465,9 +465,9 @@ compilation_unit {
                   primitive_operator {
                     op: Sub
                     arguments {
-                      field_access {
+                      simple_member_access {
                         field: "x"
-                        aggregate {
+                        object {
                           identifier {
                             name: "p"
                           }
@@ -475,9 +475,9 @@ compilation_unit {
                       }
                     }
                     arguments {
-                      field_access {
+                      simple_member_access {
                         field: "y"
-                        aggregate {
+                        object {
                           identifier {
                             name: "p"
                           }

+ 16 - 16
explorer/fuzzing/fuzzer_corpus/01e7317e461b70aea94c6cb2922236d87ddb03a5.textproto → explorer/fuzzing/fuzzer_corpus/bade121153d00cc778f13538192f224f6d215d55.textproto

@@ -110,9 +110,9 @@ compilation_unit {
                       expression {
                         call {
                           function {
-                            field_access {
+                            simple_member_access {
                               field: "Zero"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "T"
                                 }
@@ -131,9 +131,9 @@ compilation_unit {
                       expression {
                         call {
                           function {
-                            field_access {
+                            simple_member_access {
                               field: "Zero"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "T"
                                 }
@@ -200,12 +200,12 @@ compilation_unit {
                 expression {
                   call {
                     function {
-                      field_access {
+                      simple_member_access {
                         field: "Add"
-                        aggregate {
-                          field_access {
+                        object {
+                          simple_member_access {
                             field: "x"
-                            aggregate {
+                            object {
                               identifier {
                                 name: "p"
                               }
@@ -217,9 +217,9 @@ compilation_unit {
                     argument {
                       tuple_literal {
                         fields {
-                          field_access {
+                          simple_member_access {
                             field: "y"
-                            aggregate {
+                            object {
                               identifier {
                                 name: "p"
                               }
@@ -276,9 +276,9 @@ compilation_unit {
             statements {
               return_statement {
                 expression {
-                  field_access {
+                  simple_member_access {
                     field: "SumXY"
-                    aggregate {
+                    object {
                       call {
                         function {
                           identifier {
@@ -491,9 +491,9 @@ compilation_unit {
             init {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "Origin"
-                    aggregate {
+                    object {
                       call {
                         function {
                           identifier {
@@ -527,9 +527,9 @@ compilation_unit {
                 function {
                   call {
                     function {
-                      field_access {
+                      simple_member_access {
                         field: "SumFn"
-                        aggregate {
+                        object {
                           identifier {
                             name: "p"
                           }

+ 20 - 20
explorer/fuzzing/fuzzer_corpus/b3b34df9065050aedbd5cd3f87aa5270f8562778.textproto → explorer/fuzzing/fuzzer_corpus/cc5f0c26bf337000aa697c93880d18f0d9668b13.textproto

@@ -110,9 +110,9 @@ compilation_unit {
                       expression {
                         call {
                           function {
-                            field_access {
+                            simple_member_access {
                               field: "Zero"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "T"
                                 }
@@ -131,9 +131,9 @@ compilation_unit {
                       expression {
                         call {
                           function {
-                            field_access {
+                            simple_member_access {
                               field: "Zero"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "T"
                                 }
@@ -213,9 +213,9 @@ compilation_unit {
                     fields {
                       name: "x"
                       expression {
-                        field_access {
+                        simple_member_access {
                           field: "x"
-                          aggregate {
+                          object {
                             identifier {
                               name: "me"
                             }
@@ -226,9 +226,9 @@ compilation_unit {
                     fields {
                       name: "y"
                       expression {
-                        field_access {
+                        simple_member_access {
                           field: "y"
-                          aggregate {
+                          object {
                             identifier {
                               name: "me"
                             }
@@ -287,12 +287,12 @@ compilation_unit {
                 expression {
                   call {
                     function {
-                      field_access {
+                      simple_member_access {
                         field: "Add"
-                        aggregate {
-                          field_access {
+                        object {
+                          simple_member_access {
                             field: "x"
-                            aggregate {
+                            object {
                               identifier {
                                 name: "me"
                               }
@@ -304,9 +304,9 @@ compilation_unit {
                     argument {
                       tuple_literal {
                         fields {
-                          field_access {
+                          simple_member_access {
                             field: "y"
-                            aggregate {
+                            object {
                               identifier {
                                 name: "me"
                               }
@@ -510,9 +510,9 @@ compilation_unit {
             init {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "Origin"
-                    aggregate {
+                    object {
                       call {
                         function {
                           identifier {
@@ -544,14 +544,14 @@ compilation_unit {
             expression {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "SumXY"
-                    aggregate {
+                    object {
                       call {
                         function {
-                          field_access {
+                          simple_member_access {
                             field: "Clone"
-                            aggregate {
+                            object {
                               identifier {
                                 name: "p"
                               }

+ 18 - 18
explorer/fuzzing/fuzzer_corpus/3045a5c32cd76b94b2ef6664be2a640b92cf68fb.textproto → explorer/fuzzing/fuzzer_corpus/d27c6d16e838d3a2fb3e829f92718ea93271d45a.textproto

@@ -192,9 +192,9 @@ compilation_unit {
                             primitive_operator {
                               op: Add
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -202,9 +202,9 @@ compilation_unit {
                                 }
                               }
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "b"
                                     }
@@ -220,9 +220,9 @@ compilation_unit {
                             primitive_operator {
                               op: Add
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -230,9 +230,9 @@ compilation_unit {
                                 }
                               }
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "b"
                                     }
@@ -298,9 +298,9 @@ compilation_unit {
                             primitive_operator {
                               op: Mul
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -321,9 +321,9 @@ compilation_unit {
                             primitive_operator {
                               op: Mul
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -440,9 +440,9 @@ compilation_unit {
               }
             }
             init {
-              field_access {
+              simple_member_access {
                 field: "Add"
-                aggregate {
+                object {
                   identifier {
                     name: "a"
                   }
@@ -478,9 +478,9 @@ compilation_unit {
               }
             }
             init {
-              field_access {
+              simple_member_access {
                 field: "Scale"
-                aggregate {
+                object {
                   call {
                     function {
                       identifier {
@@ -668,9 +668,9 @@ compilation_unit {
               primitive_operator {
                 op: Sub
                 arguments {
-                  field_access {
+                  simple_member_access {
                     field: "x"
-                    aggregate {
+                    object {
                       identifier {
                         name: "p"
                       }

+ 20 - 20
explorer/fuzzing/fuzzer_corpus/33efe22bddf410c088efa3abe4eb511e1f1f2507.textproto → explorer/fuzzing/fuzzer_corpus/d6f13d6e870f2cde1ac1985bd386bbb22ec19f1a.textproto

@@ -248,9 +248,9 @@ compilation_unit {
                             primitive_operator {
                               op: Add
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -258,9 +258,9 @@ compilation_unit {
                                 }
                               }
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "b"
                                     }
@@ -276,9 +276,9 @@ compilation_unit {
                             primitive_operator {
                               op: Add
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -286,9 +286,9 @@ compilation_unit {
                                 }
                               }
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "b"
                                     }
@@ -354,9 +354,9 @@ compilation_unit {
                             primitive_operator {
                               op: Mul
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -377,9 +377,9 @@ compilation_unit {
                             primitive_operator {
                               op: Mul
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -459,14 +459,14 @@ compilation_unit {
             expression {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "Scale"
-                    aggregate {
+                    object {
                       call {
                         function {
-                          field_access {
+                          simple_member_access {
                             field: "Add"
-                            aggregate {
+                            object {
                               identifier {
                                 name: "a"
                               }
@@ -478,9 +478,9 @@ compilation_unit {
                             fields {
                               call {
                                 function {
-                                  field_access {
+                                  simple_member_access {
                                     field: "Zero"
-                                    aggregate {
+                                    object {
                                       identifier {
                                         name: "T"
                                       }
@@ -613,9 +613,9 @@ compilation_unit {
               primitive_operator {
                 op: Sub
                 arguments {
-                  field_access {
+                  simple_member_access {
                     field: "x"
-                    aggregate {
+                    object {
                       identifier {
                         name: "p"
                       }

+ 18 - 18
explorer/fuzzing/fuzzer_corpus/97a085b3b3c6067c5ea0429ba5d2557a11945696.textproto → explorer/fuzzing/fuzzer_corpus/d76dbdfb3092a4e7d4368223e4b4d7208a4d2805.textproto

@@ -194,9 +194,9 @@ compilation_unit {
                         primitive_operator {
                           op: Add
                           arguments {
-                            field_access {
+                            simple_member_access {
                               field: "x"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "me"
                                 }
@@ -204,9 +204,9 @@ compilation_unit {
                             }
                           }
                           arguments {
-                            field_access {
+                            simple_member_access {
                               field: "x"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "b"
                                 }
@@ -222,9 +222,9 @@ compilation_unit {
                         primitive_operator {
                           op: Add
                           arguments {
-                            field_access {
+                            simple_member_access {
                               field: "y"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "me"
                                 }
@@ -232,9 +232,9 @@ compilation_unit {
                             }
                           }
                           arguments {
-                            field_access {
+                            simple_member_access {
                               field: "y"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "b"
                                 }
@@ -300,9 +300,9 @@ compilation_unit {
                         primitive_operator {
                           op: Mul
                           arguments {
-                            field_access {
+                            simple_member_access {
                               field: "x"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "me"
                                 }
@@ -323,9 +323,9 @@ compilation_unit {
                         primitive_operator {
                           op: Mul
                           arguments {
-                            field_access {
+                            simple_member_access {
                               field: "y"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "me"
                                 }
@@ -424,9 +424,9 @@ compilation_unit {
               }
             }
             init {
-              field_access {
+              simple_member_access {
                 field: "Add"
-                aggregate {
+                object {
                   identifier {
                     name: "a"
                   }
@@ -447,9 +447,9 @@ compilation_unit {
               }
             }
             init {
-              field_access {
+              simple_member_access {
                 field: "Scale"
-                aggregate {
+                object {
                   call {
                     function {
                       identifier {
@@ -637,9 +637,9 @@ compilation_unit {
               primitive_operator {
                 op: Sub
                 arguments {
-                  field_access {
+                  simple_member_access {
                     field: "x"
-                    aggregate {
+                    object {
                       identifier {
                         name: "p"
                       }

+ 14 - 14
explorer/fuzzing/fuzzer_corpus/e36d2a76c57c42b04e5addbfddcad903420cf01e.textproto → explorer/fuzzing/fuzzer_corpus/da3113c74912fae50b4d30bf6351ad30985b4695.textproto

@@ -178,9 +178,9 @@ compilation_unit {
                   expression {
                     call {
                       function {
-                        field_access {
+                        simple_member_access {
                           field: "Zero"
-                          aggregate {
+                          object {
                             identifier {
                               name: "U"
                             }
@@ -199,9 +199,9 @@ compilation_unit {
                   expression {
                     call {
                       function {
-                        field_access {
+                        simple_member_access {
                           field: "Zero"
-                          aggregate {
+                          object {
                             identifier {
                               name: "U"
                             }
@@ -291,9 +291,9 @@ compilation_unit {
                 fields {
                   name: "x"
                   expression {
-                    field_access {
+                    simple_member_access {
                       field: "x"
-                      aggregate {
+                      object {
                         identifier {
                           name: "other"
                         }
@@ -304,9 +304,9 @@ compilation_unit {
                 fields {
                   name: "y"
                   expression {
-                    field_access {
+                    simple_member_access {
                       field: "y"
-                      aggregate {
+                      object {
                         identifier {
                           name: "other"
                         }
@@ -375,12 +375,12 @@ compilation_unit {
             expression {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "Add"
-                    aggregate {
-                      field_access {
+                    object {
+                      simple_member_access {
                         field: "x"
-                        aggregate {
+                        object {
                           identifier {
                             name: "other"
                           }
@@ -392,9 +392,9 @@ compilation_unit {
                 argument {
                   tuple_literal {
                     fields {
-                      field_access {
+                      simple_member_access {
                         field: "y"
-                        aggregate {
+                        object {
                           identifier {
                             name: "other"
                           }

+ 18 - 18
explorer/fuzzing/fuzzer_corpus/e91903b4cd4a6d12e588185107239bb278cc8bfd.textproto → explorer/fuzzing/fuzzer_corpus/dba92dce40512177d3bf143b088da7eccc8fa214.textproto

@@ -192,9 +192,9 @@ compilation_unit {
                             primitive_operator {
                               op: Add
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -202,9 +202,9 @@ compilation_unit {
                                 }
                               }
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "b"
                                     }
@@ -220,9 +220,9 @@ compilation_unit {
                             primitive_operator {
                               op: Add
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -230,9 +230,9 @@ compilation_unit {
                                 }
                               }
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "b"
                                     }
@@ -298,9 +298,9 @@ compilation_unit {
                             primitive_operator {
                               op: Mul
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -321,9 +321,9 @@ compilation_unit {
                             primitive_operator {
                               op: Mul
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -403,9 +403,9 @@ compilation_unit {
             expression {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "Scale"
-                    aggregate {
+                    object {
                       identifier {
                         name: "c"
                       }
@@ -505,9 +505,9 @@ compilation_unit {
                     fields {
                       call {
                         function {
-                          field_access {
+                          simple_member_access {
                             field: "Add"
-                            aggregate {
+                            object {
                               identifier {
                                 name: "a"
                               }
@@ -680,9 +680,9 @@ compilation_unit {
               primitive_operator {
                 op: Sub
                 arguments {
-                  field_access {
+                  simple_member_access {
                     field: "x"
-                    aggregate {
+                    object {
                       identifier {
                         name: "p"
                       }

+ 6 - 6
explorer/fuzzing/fuzzer_corpus/e2abc580234fe84070585fa7f5a82679f2960ae1.textproto → explorer/fuzzing/fuzzer_corpus/dc02f2222475e43c33fb8d9713ade9cc67f52edc.textproto

@@ -75,9 +75,9 @@ compilation_unit {
             statements {
               return_statement {
                 expression {
-                  field_access {
+                  simple_member_access {
                     field: "x"
-                    aggregate {
+                    object {
                       identifier {
                         name: "me"
                       }
@@ -153,9 +153,9 @@ compilation_unit {
             init {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "Origin"
-                    aggregate {
+                    object {
                       identifier {
                         name: "Point"
                       }
@@ -175,9 +175,9 @@ compilation_unit {
             expression {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "GetX"
-                    aggregate {
+                    object {
                       identifier {
                         name: "p"
                       }

+ 20 - 20
explorer/fuzzing/fuzzer_corpus/68e19dcc4cfb876cb2501c6d9617e9bc24d72428.textproto → explorer/fuzzing/fuzzer_corpus/defec684307f53851236f5f0cd91353e44b522e8.textproto

@@ -275,9 +275,9 @@ compilation_unit {
                         primitive_operator {
                           op: Add
                           arguments {
-                            field_access {
+                            simple_member_access {
                               field: "x"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "me"
                                 }
@@ -285,9 +285,9 @@ compilation_unit {
                             }
                           }
                           arguments {
-                            field_access {
+                            simple_member_access {
                               field: "x"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "b"
                                 }
@@ -303,9 +303,9 @@ compilation_unit {
                         primitive_operator {
                           op: Add
                           arguments {
-                            field_access {
+                            simple_member_access {
                               field: "y"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "me"
                                 }
@@ -313,9 +313,9 @@ compilation_unit {
                             }
                           }
                           arguments {
-                            field_access {
+                            simple_member_access {
                               field: "y"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "b"
                                 }
@@ -381,9 +381,9 @@ compilation_unit {
                         primitive_operator {
                           op: Mul
                           arguments {
-                            field_access {
+                            simple_member_access {
                               field: "x"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "me"
                                 }
@@ -404,9 +404,9 @@ compilation_unit {
                         primitive_operator {
                           op: Mul
                           arguments {
-                            field_access {
+                            simple_member_access {
                               field: "y"
-                              aggregate {
+                              object {
                                 identifier {
                                   name: "me"
                                 }
@@ -484,14 +484,14 @@ compilation_unit {
             expression {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "Scale"
-                    aggregate {
+                    object {
                       call {
                         function {
-                          field_access {
+                          simple_member_access {
                             field: "Add"
-                            aggregate {
+                            object {
                               identifier {
                                 name: "a"
                               }
@@ -503,9 +503,9 @@ compilation_unit {
                             fields {
                               call {
                                 function {
-                                  field_access {
+                                  simple_member_access {
                                     field: "Zero"
-                                    aggregate {
+                                    object {
                                       identifier {
                                         name: "T"
                                       }
@@ -662,9 +662,9 @@ compilation_unit {
               primitive_operator {
                 op: Sub
                 arguments {
-                  field_access {
+                  simple_member_access {
                     field: "x"
-                    aggregate {
+                    object {
                       identifier {
                         name: "p"
                       }

+ 6 - 6
explorer/fuzzing/fuzzer_corpus/b457071ed35b662d1c8bff74a3396e5718b370f6.textproto → explorer/fuzzing/fuzzer_corpus/e4cdfa4f32f0adc18ed39f6a9a483835db596ee5.textproto

@@ -90,9 +90,9 @@ compilation_unit {
             statements {
               return_statement {
                 expression {
-                  field_access {
+                  simple_member_access {
                     field: "x"
-                    aggregate {
+                    object {
                       identifier {
                         name: "me"
                       }
@@ -193,9 +193,9 @@ compilation_unit {
             init {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "Origin"
-                    aggregate {
+                    object {
                       call {
                         function {
                           identifier {
@@ -232,9 +232,9 @@ compilation_unit {
             expression {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "GetX"
-                    aggregate {
+                    object {
                       identifier {
                         name: "p"
                       }

+ 6 - 6
explorer/fuzzing/fuzzer_corpus/a9e58d564dc49ae2b671e69157f8deb371ed05aa.textproto → explorer/fuzzing/fuzzer_corpus/ea5f89368e963868e6ff283238f3d2811e828b2f.textproto

@@ -116,9 +116,9 @@ compilation_unit {
             statements {
               return_statement {
                 expression {
-                  field_access {
+                  simple_member_access {
                     field: "x"
-                    aggregate {
+                    object {
                       identifier {
                         name: "me"
                       }
@@ -219,9 +219,9 @@ compilation_unit {
             init {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "Origin"
-                    aggregate {
+                    object {
                       call {
                         function {
                           identifier {
@@ -258,9 +258,9 @@ compilation_unit {
             expression {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "GetX"
-                    aggregate {
+                    object {
                       identifier {
                         name: "p"
                       }

+ 20 - 20
explorer/fuzzing/fuzzer_corpus/7b0d42569dbd71ab4f75c8d3560989b048214a58.textproto → explorer/fuzzing/fuzzer_corpus/f0791c1c35ad07c87e3b12ad58bdfd3757fa7397.textproto

@@ -248,9 +248,9 @@ compilation_unit {
                             primitive_operator {
                               op: Add
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -258,9 +258,9 @@ compilation_unit {
                                 }
                               }
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "b"
                                     }
@@ -276,9 +276,9 @@ compilation_unit {
                             primitive_operator {
                               op: Add
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -286,9 +286,9 @@ compilation_unit {
                                 }
                               }
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "b"
                                     }
@@ -354,9 +354,9 @@ compilation_unit {
                             primitive_operator {
                               op: Mul
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -377,9 +377,9 @@ compilation_unit {
                             primitive_operator {
                               op: Mul
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -459,14 +459,14 @@ compilation_unit {
             expression {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "Scale"
-                    aggregate {
+                    object {
                       call {
                         function {
-                          field_access {
+                          simple_member_access {
                             field: "Add"
-                            aggregate {
+                            object {
                               identifier {
                                 name: "a"
                               }
@@ -478,9 +478,9 @@ compilation_unit {
                             fields {
                               call {
                                 function {
-                                  field_access {
+                                  simple_member_access {
                                     field: "Zero"
-                                    aggregate {
+                                    object {
                                       identifier {
                                         name: "T"
                                       }
@@ -613,9 +613,9 @@ compilation_unit {
               primitive_operator {
                 op: Sub
                 arguments {
-                  field_access {
+                  simple_member_access {
                     field: "x"
-                    aggregate {
+                    object {
                       identifier {
                         name: "p"
                       }

+ 34 - 34
explorer/fuzzing/fuzzer_corpus/8279eb58886beb40eb19996ea7bec6d3610d64ea.textproto → explorer/fuzzing/fuzzer_corpus/f0c1f0eaa05127e95e5d9b167051b84b2fa54359.textproto

@@ -192,9 +192,9 @@ compilation_unit {
                             primitive_operator {
                               op: Add
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -202,9 +202,9 @@ compilation_unit {
                                 }
                               }
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "b"
                                     }
@@ -220,9 +220,9 @@ compilation_unit {
                             primitive_operator {
                               op: Add
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -230,9 +230,9 @@ compilation_unit {
                                 }
                               }
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "b"
                                     }
@@ -298,9 +298,9 @@ compilation_unit {
                             primitive_operator {
                               op: Mul
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -321,9 +321,9 @@ compilation_unit {
                             primitive_operator {
                               op: Mul
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -448,9 +448,9 @@ compilation_unit {
                                 primitive_operator {
                                   op: Add
                                   arguments {
-                                    field_access {
+                                    simple_member_access {
                                       field: "x"
-                                      aggregate {
+                                      object {
                                         identifier {
                                           name: "me"
                                         }
@@ -458,9 +458,9 @@ compilation_unit {
                                     }
                                   }
                                   arguments {
-                                    field_access {
+                                    simple_member_access {
                                       field: "x"
-                                      aggregate {
+                                      object {
                                         identifier {
                                           name: "b"
                                         }
@@ -486,9 +486,9 @@ compilation_unit {
                                 primitive_operator {
                                   op: Add
                                   arguments {
-                                    field_access {
+                                    simple_member_access {
                                       field: "y"
-                                      aggregate {
+                                      object {
                                         identifier {
                                           name: "me"
                                         }
@@ -496,9 +496,9 @@ compilation_unit {
                                     }
                                   }
                                   arguments {
-                                    field_access {
+                                    simple_member_access {
                                       field: "y"
-                                      aggregate {
+                                      object {
                                         identifier {
                                           name: "b"
                                         }
@@ -574,9 +574,9 @@ compilation_unit {
                                 primitive_operator {
                                   op: Mul
                                   arguments {
-                                    field_access {
+                                    simple_member_access {
                                       field: "x"
-                                      aggregate {
+                                      object {
                                         identifier {
                                           name: "me"
                                         }
@@ -607,9 +607,9 @@ compilation_unit {
                                 primitive_operator {
                                   op: Mul
                                   arguments {
-                                    field_access {
+                                    simple_member_access {
                                       field: "y"
-                                      aggregate {
+                                      object {
                                         identifier {
                                           name: "me"
                                         }
@@ -696,9 +696,9 @@ compilation_unit {
             expression {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "Scale"
-                    aggregate {
+                    object {
                       identifier {
                         name: "c"
                       }
@@ -817,9 +817,9 @@ compilation_unit {
                         fields {
                           call {
                             function {
-                              field_access {
+                              simple_member_access {
                                 field: "Add"
-                                aggregate {
+                                object {
                                   identifier {
                                     name: "a"
                                   }
@@ -858,9 +858,9 @@ compilation_unit {
                         fields {
                           call {
                             function {
-                              field_access {
+                              simple_member_access {
                                 field: "Add"
-                                aggregate {
+                                object {
                                   identifier {
                                     name: "b"
                                   }
@@ -1056,9 +1056,9 @@ compilation_unit {
                   primitive_operator {
                     op: Sub
                     arguments {
-                      field_access {
+                      simple_member_access {
                         field: "x"
-                        aggregate {
+                        object {
                           identifier {
                             name: "q"
                           }
@@ -1066,9 +1066,9 @@ compilation_unit {
                       }
                     }
                     arguments {
-                      field_access {
+                      simple_member_access {
                         field: "x"
-                        aggregate {
+                        object {
                           identifier {
                             name: "p"
                           }

+ 20 - 20
explorer/fuzzing/fuzzer_corpus/d662ef1928345fc77bfd7993cc86eaf4e0ac1f07.textproto → explorer/fuzzing/fuzzer_corpus/f2f794705121fc76bfb94de7a7507becbc6ad10a.textproto

@@ -248,9 +248,9 @@ compilation_unit {
                             primitive_operator {
                               op: Add
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -258,9 +258,9 @@ compilation_unit {
                                 }
                               }
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "b"
                                     }
@@ -276,9 +276,9 @@ compilation_unit {
                             primitive_operator {
                               op: Add
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -286,9 +286,9 @@ compilation_unit {
                                 }
                               }
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "b"
                                     }
@@ -354,9 +354,9 @@ compilation_unit {
                             primitive_operator {
                               op: Mul
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "x"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -377,9 +377,9 @@ compilation_unit {
                             primitive_operator {
                               op: Mul
                               arguments {
-                                field_access {
+                                simple_member_access {
                                   field: "y"
-                                  aggregate {
+                                  object {
                                     identifier {
                                       name: "me"
                                     }
@@ -459,14 +459,14 @@ compilation_unit {
             expression {
               call {
                 function {
-                  field_access {
+                  simple_member_access {
                     field: "Scale"
-                    aggregate {
+                    object {
                       call {
                         function {
-                          field_access {
+                          simple_member_access {
                             field: "Add"
-                            aggregate {
+                            object {
                               identifier {
                                 name: "a"
                               }
@@ -478,9 +478,9 @@ compilation_unit {
                             fields {
                               call {
                                 function {
-                                  field_access {
+                                  simple_member_access {
                                     field: "Zero"
-                                    aggregate {
+                                    object {
                                       identifier {
                                         name: "T"
                                       }
@@ -613,9 +613,9 @@ compilation_unit {
               primitive_operator {
                 op: Sub
                 arguments {
-                  field_access {
+                  simple_member_access {
                     field: "x"
-                    aggregate {
+                    object {
                       identifier {
                         name: "p"
                       }

+ 2 - 2
explorer/interpreter/heap.cpp

@@ -24,8 +24,8 @@ auto Heap::AllocateValue(Nonnull<const Value*> v) -> AllocationId {
 auto Heap::Read(const Address& a, SourceLocation source_loc) const
     -> ErrorOr<Nonnull<const Value*>> {
   CARBON_RETURN_IF_ERROR(this->CheckAlive(a.allocation_, source_loc));
-  return values_[a.allocation_.index_]->GetField(arena_, a.field_path_,
-                                                 source_loc);
+  return values_[a.allocation_.index_]->GetMember(arena_, a.field_path_,
+                                                  source_loc);
 }
 
 auto Heap::Write(const Address& a, Nonnull<const Value*> v,

+ 24 - 24
explorer/interpreter/interpreter.cpp

@@ -322,23 +322,23 @@ auto Interpreter::StepLvalue() -> ErrorOr<Success> {
       CARBON_CHECK(isa<LValue>(value)) << *value;
       return todo_.FinishAction(value);
     }
-    case ExpressionKind::FieldAccessExpression: {
+    case ExpressionKind::SimpleMemberAccessExpression: {
       if (act.pos() == 0) {
         //    { {e.f :: C, E, F} :: S, H}
         // -> { e :: [].f :: C, E, F} :: S, H}
         return todo_.Spawn(std::make_unique<LValAction>(
-            &cast<FieldAccessExpression>(exp).aggregate()));
+            &cast<SimpleMemberAccessExpression>(exp).object()));
       } else {
         //    { v :: [].f :: C, E, F} :: S, H}
         // -> { { &v.f :: C, E, F} :: S, H }
-        Address aggregate = cast<LValue>(*act.results()[0]).address();
-        Address field = aggregate.SubobjectAddress(
-            cast<FieldAccessExpression>(exp).field());
-        return todo_.FinishAction(arena_->New<LValue>(field));
+        Address object = cast<LValue>(*act.results()[0]).address();
+        Address member = object.SubobjectAddress(
+            cast<SimpleMemberAccessExpression>(exp).member());
+        return todo_.FinishAction(arena_->New<LValue>(member));
       }
     }
-    case ExpressionKind::CompoundFieldAccessExpression: {
-      const auto& access = cast<CompoundFieldAccessExpression>(exp);
+    case ExpressionKind::CompoundMemberAccessExpression: {
+      const auto& access = cast<CompoundMemberAccessExpression>(exp);
       if (act.pos() == 0) {
         return todo_.Spawn(std::make_unique<LValAction>(&access.object()));
       } else {
@@ -357,8 +357,8 @@ auto Interpreter::StepLvalue() -> ErrorOr<Success> {
       if (act.pos() == 0) {
         //    { {e[i] :: C, E, F} :: S, H}
         // -> { e :: [][i] :: C, E, F} :: S, H}
-        return todo_.Spawn(std::make_unique<LValAction>(
-            &cast<IndexExpression>(exp).aggregate()));
+        return todo_.Spawn(
+            std::make_unique<LValAction>(&cast<IndexExpression>(exp).object()));
 
       } else if (act.pos() == 1) {
         return todo_.Spawn(std::make_unique<ExpressionAction>(
@@ -366,10 +366,10 @@ auto Interpreter::StepLvalue() -> ErrorOr<Success> {
       } else {
         //    { v :: [][i] :: C, E, F} :: S, H}
         // -> { { &v[i] :: C, E, F} :: S, H }
-        Address aggregate = cast<LValue>(*act.results()[0]).address();
+        Address object = cast<LValue>(*act.results()[0]).address();
         std::string f =
             std::to_string(cast<IntValue>(*act.results()[1]).value());
-        Address field = aggregate.SubobjectAddress(f);
+        Address field = object.SubobjectAddress(f);
         return todo_.FinishAction(arena_->New<LValue>(field));
       }
     }
@@ -749,7 +749,7 @@ auto Interpreter::StepExp() -> ErrorOr<Success> {
         //    { { e[i] :: C, E, F} :: S, H}
         // -> { { e :: [][i] :: C, E, F} :: S, H}
         return todo_.Spawn(std::make_unique<ExpressionAction>(
-            &cast<IndexExpression>(exp).aggregate()));
+            &cast<IndexExpression>(exp).object()));
       } else if (act.pos() == 1) {
         return todo_.Spawn(std::make_unique<ExpressionAction>(
             &cast<IndexExpression>(exp).offset()));
@@ -801,11 +801,11 @@ auto Interpreter::StepExp() -> ErrorOr<Success> {
         return todo_.FinishAction(arena_->New<StructType>(std::move(fields)));
       }
     }
-    case ExpressionKind::FieldAccessExpression: {
-      const auto& access = cast<FieldAccessExpression>(exp);
+    case ExpressionKind::SimpleMemberAccessExpression: {
+      const auto& access = cast<SimpleMemberAccessExpression>(exp);
       if (act.pos() == 0) {
         return todo_.Spawn(
-            std::make_unique<ExpressionAction>(&access.aggregate()));
+            std::make_unique<ExpressionAction>(&access.object()));
       } else {
         if (const auto* member_name_type =
                 dyn_cast<TypeOfMemberName>(&access.static_type())) {
@@ -841,17 +841,17 @@ auto Interpreter::StepExp() -> ErrorOr<Success> {
                            access.source_loc()));
             witness = cast<Witness>(witness_value);
           }
-          FieldPath::Component field(access.field(), witness);
+          FieldPath::Component member(access.member(), witness);
           CARBON_ASSIGN_OR_RETURN(
-              Nonnull<const Value*> member,
-              act.results()[0]->GetField(arena_, FieldPath(field),
-                                         exp.source_loc()));
-          return todo_.FinishAction(member);
+              Nonnull<const Value*> member_value,
+              act.results()[0]->GetMember(arena_, FieldPath(member),
+                                          exp.source_loc()));
+          return todo_.FinishAction(member_value);
         }
       }
     }
-    case ExpressionKind::CompoundFieldAccessExpression: {
-      const auto& access = cast<CompoundFieldAccessExpression>(exp);
+    case ExpressionKind::CompoundMemberAccessExpression: {
+      const auto& access = cast<CompoundMemberAccessExpression>(exp);
       bool forming_member_name = isa<TypeOfMemberName>(&access.static_type());
       if (act.pos() == 0) {
         // First, evaluate the first operand.
@@ -894,7 +894,7 @@ auto Interpreter::StepExp() -> ErrorOr<Success> {
           FieldPath::Component field(access.member().name(), witness);
           CARBON_ASSIGN_OR_RETURN(
               Nonnull<const Value*> member,
-              object->GetField(arena_, FieldPath(field), exp.source_loc()));
+              object->GetMember(arena_, FieldPath(field), exp.source_loc()));
           return todo_.FinishAction(member);
         }
       }

+ 5 - 5
explorer/interpreter/resolve_names.cpp

@@ -111,20 +111,20 @@ static auto ResolveNames(Expression& expression,
           ResolveNames(fun_type.return_type(), enclosing_scope));
       break;
     }
-    case ExpressionKind::FieldAccessExpression:
+    case ExpressionKind::SimpleMemberAccessExpression:
       CARBON_RETURN_IF_ERROR(
-          ResolveNames(cast<FieldAccessExpression>(expression).aggregate(),
+          ResolveNames(cast<SimpleMemberAccessExpression>(expression).object(),
                        enclosing_scope));
       break;
-    case ExpressionKind::CompoundFieldAccessExpression: {
-      auto& access = cast<CompoundFieldAccessExpression>(expression);
+    case ExpressionKind::CompoundMemberAccessExpression: {
+      auto& access = cast<CompoundMemberAccessExpression>(expression);
       CARBON_RETURN_IF_ERROR(ResolveNames(access.object(), enclosing_scope));
       CARBON_RETURN_IF_ERROR(ResolveNames(access.path(), enclosing_scope));
       break;
     }
     case ExpressionKind::IndexExpression: {
       auto& index = cast<IndexExpression>(expression);
-      CARBON_RETURN_IF_ERROR(ResolveNames(index.aggregate(), enclosing_scope));
+      CARBON_RETURN_IF_ERROR(ResolveNames(index.object(), enclosing_scope));
       CARBON_RETURN_IF_ERROR(ResolveNames(index.offset(), enclosing_scope));
       break;
     }

+ 48 - 49
explorer/interpreter/type_checker.cpp

@@ -503,11 +503,11 @@ auto TypeChecker::BuildBuiltinMethodCall(const ImplScope& impl_scope,
   Nonnull<Expression*> iface_expr = arena_->New<ValueLiteral>(
       source_loc, iface_type, arena_->New<TypeOfInterfaceType>(iface_type),
       ValueCategory::Let);
-  Nonnull<Expression*> iface_member =
-      arena_->New<FieldAccessExpression>(source_loc, iface_expr, method.name);
+  Nonnull<Expression*> iface_member = arena_->New<SimpleMemberAccessExpression>(
+      source_loc, iface_expr, method.name);
   Nonnull<Expression*> method_access =
-      arena_->New<CompoundFieldAccessExpression>(source_loc, source,
-                                                 iface_member);
+      arena_->New<CompoundMemberAccessExpression>(source_loc, source,
+                                                  iface_member);
   Nonnull<Expression*> call_args =
       arena_->New<TupleLiteral>(source_loc, method.arguments);
   Nonnull<Expression*> call =
@@ -1051,12 +1051,12 @@ auto TypeChecker::TypeCheckExp(Nonnull<Expression*> e,
                      << " generated during type checking";
     case ExpressionKind::IndexExpression: {
       auto& index = cast<IndexExpression>(*e);
-      CARBON_RETURN_IF_ERROR(TypeCheckExp(&index.aggregate(), impl_scope));
+      CARBON_RETURN_IF_ERROR(TypeCheckExp(&index.object(), impl_scope));
       CARBON_RETURN_IF_ERROR(TypeCheckExp(&index.offset(), impl_scope));
-      const Value& aggregate_type = index.aggregate().static_type();
-      switch (aggregate_type.kind()) {
+      const Value& object_type = index.object().static_type();
+      switch (object_type.kind()) {
         case Value::Kind::TupleValue: {
-          const auto& tuple_type = cast<TupleValue>(aggregate_type);
+          const auto& tuple_type = cast<TupleValue>(object_type);
           CARBON_RETURN_IF_ERROR(ExpectExactType(
               index.offset().source_loc(), "tuple index",
               arena_->New<IntType>(), &index.offset().static_type()));
@@ -1070,7 +1070,7 @@ auto TypeChecker::TypeCheckExp(Nonnull<Expression*> e,
                    << tuple_type;
           }
           index.set_static_type(tuple_type.elements()[i]);
-          index.set_value_category(index.aggregate().value_category());
+          index.set_value_category(index.object().value_category());
           return Success();
         }
         case Value::Kind::StaticArrayType: {
@@ -1078,8 +1078,8 @@ auto TypeChecker::TypeCheckExp(Nonnull<Expression*> e,
               index.offset().source_loc(), "array index",
               arena_->New<IntType>(), &index.offset().static_type()));
           index.set_static_type(
-              &cast<StaticArrayType>(aggregate_type).element_type());
-          index.set_value_category(index.aggregate().value_category());
+              &cast<StaticArrayType>(object_type).element_type());
+          index.set_value_category(index.object().value_category());
           return Success();
         }
         default:
@@ -1127,31 +1127,31 @@ auto TypeChecker::TypeCheckExp(Nonnull<Expression*> e,
       e->set_value_category(ValueCategory::Let);
       return Success();
     }
-    case ExpressionKind::FieldAccessExpression: {
-      auto& access = cast<FieldAccessExpression>(*e);
-      CARBON_RETURN_IF_ERROR(TypeCheckExp(&access.aggregate(), impl_scope));
-      const Value& aggregate_type = access.aggregate().static_type();
-      switch (aggregate_type.kind()) {
+    case ExpressionKind::SimpleMemberAccessExpression: {
+      auto& access = cast<SimpleMemberAccessExpression>(*e);
+      CARBON_RETURN_IF_ERROR(TypeCheckExp(&access.object(), impl_scope));
+      const Value& object_type = access.object().static_type();
+      switch (object_type.kind()) {
         case Value::Kind::StructType: {
-          const auto& struct_type = cast<StructType>(aggregate_type);
+          const auto& struct_type = cast<StructType>(object_type);
           for (const auto& [field_name, field_type] : struct_type.fields()) {
-            if (access.field() == field_name) {
+            if (access.member() == field_name) {
               access.set_static_type(field_type);
-              access.set_value_category(access.aggregate().value_category());
+              access.set_value_category(access.object().value_category());
               return Success();
             }
           }
           return CompilationError(access.source_loc())
                  << "struct " << struct_type << " does not have a field named "
-                 << access.field();
+                 << access.member();
         }
         case Value::Kind::TypeType: {
           CARBON_ASSIGN_OR_RETURN(
               Nonnull<const Value*> type,
-              InterpExp(&access.aggregate(), arena_, trace_stream_));
+              InterpExp(&access.object(), arena_, trace_stream_));
           if (const auto* struct_type = dyn_cast<StructType>(type)) {
             for (const auto& field : struct_type->fields()) {
-              if (access.field() == field.name) {
+              if (access.member() == field.name) {
                 access.set_static_type(
                     arena_->New<TypeOfMemberName>(Member(&field)));
                 access.set_value_category(ValueCategory::Let);
@@ -1160,7 +1160,7 @@ auto TypeChecker::TypeCheckExp(Nonnull<Expression*> e,
             }
             return CompilationError(access.source_loc())
                    << "struct " << *struct_type
-                   << " does not have a field named " << access.field();
+                   << " does not have a field named " << access.member();
           }
           // TODO: We should handle all types here, not only structs. For
           // example:
@@ -1175,22 +1175,22 @@ auto TypeChecker::TypeCheckExp(Nonnull<Expression*> e,
                  << "unsupported member access into type " << *type;
         }
         case Value::Kind::NominalClassType: {
-          const auto& t_class = cast<NominalClassType>(aggregate_type);
+          const auto& t_class = cast<NominalClassType>(object_type);
           if (std::optional<Nonnull<const Declaration*>> member =
-                  FindMember(access.field(), t_class.declaration().members());
+                  FindMember(access.member(), t_class.declaration().members());
               member.has_value()) {
             Nonnull<const Value*> field_type =
                 Substitute(t_class.type_args(), &(*member)->static_type());
             access.set_static_type(field_type);
             switch ((*member)->kind()) {
               case DeclarationKind::VariableDeclaration:
-                access.set_value_category(access.aggregate().value_category());
+                access.set_value_category(access.object().value_category());
                 break;
               case DeclarationKind::FunctionDeclaration:
                 access.set_value_category(ValueCategory::Let);
                 break;
               default:
-                CARBON_FATAL() << "member " << access.field()
+                CARBON_FATAL() << "member " << access.member()
                                << " is not a field or method";
                 break;
             }
@@ -1198,18 +1198,18 @@ auto TypeChecker::TypeCheckExp(Nonnull<Expression*> e,
           } else {
             return CompilationError(e->source_loc())
                    << "class " << t_class.declaration().name()
-                   << " does not have a field named " << access.field();
+                   << " does not have a field named " << access.member();
           }
         }
         case Value::Kind::TypeOfChoiceType: {
           const ChoiceType& choice =
-              cast<TypeOfChoiceType>(aggregate_type).choice_type();
+              cast<TypeOfChoiceType>(object_type).choice_type();
           std::optional<Nonnull<const Value*>> parameter_types =
-              choice.FindAlternative(access.field());
+              choice.FindAlternative(access.member());
           if (!parameter_types.has_value()) {
             return CompilationError(e->source_loc())
                    << "choice " << choice.name()
-                   << " does not have a field named " << access.field();
+                   << " does not have an alternative named " << access.member();
           }
           access.set_static_type(arena_->New<FunctionType>(
               *parameter_types, llvm::None, &choice, llvm::None, llvm::None));
@@ -1218,9 +1218,9 @@ auto TypeChecker::TypeCheckExp(Nonnull<Expression*> e,
         }
         case Value::Kind::TypeOfClassType: {
           const NominalClassType& class_type =
-              cast<TypeOfClassType>(aggregate_type).class_type();
+              cast<TypeOfClassType>(object_type).class_type();
           if (std::optional<Nonnull<const Declaration*>> member = FindMember(
-                  access.field(), class_type.declaration().members());
+                  access.member(), class_type.declaration().members());
               member.has_value()) {
             switch ((*member)->kind()) {
               case DeclarationKind::FunctionDeclaration: {
@@ -1244,14 +1244,14 @@ auto TypeChecker::TypeCheckExp(Nonnull<Expression*> e,
           } else {
             return CompilationError(access.source_loc())
                    << class_type << " does not have a member named "
-                   << access.field();
+                   << access.member();
           }
         }
         case Value::Kind::TypeOfInterfaceType: {
           const InterfaceType& iface_type =
-              cast<TypeOfInterfaceType>(aggregate_type).interface_type();
+              cast<TypeOfInterfaceType>(object_type).interface_type();
           if (std::optional<Nonnull<const Declaration*>> member = FindMember(
-                  access.field(), iface_type.declaration().members());
+                  access.member(), iface_type.declaration().members());
               member.has_value()) {
             access.set_static_type(
                 arena_->New<TypeOfMemberName>(Member(*member)));
@@ -1260,7 +1260,7 @@ auto TypeChecker::TypeCheckExp(Nonnull<Expression*> e,
           } else {
             return CompilationError(access.source_loc())
                    << iface_type << " does not have a member named "
-                   << access.field();
+                   << access.member();
           }
         }
         case Value::Kind::VariableType: {
@@ -1268,14 +1268,14 @@ auto TypeChecker::TypeCheckExp(Nonnull<Expression*> e,
           // is a type variable. For example, `x.foo` where the type of
           // `x` is `T` and `foo` and `T` implements an interface that
           // includes `foo`.
-          const VariableType& var_type = cast<VariableType>(aggregate_type);
+          const VariableType& var_type = cast<VariableType>(object_type);
           const Value& typeof_var = var_type.binding().static_type();
           switch (typeof_var.kind()) {
             case Value::Kind::InterfaceType: {
               const auto& iface_type = cast<InterfaceType>(typeof_var);
               const InterfaceDeclaration& iface_decl = iface_type.declaration();
               if (std::optional<Nonnull<const Declaration*>> member =
-                      FindMember(access.field(), iface_decl.members());
+                      FindMember(access.member(), iface_decl.members());
                   member.has_value()) {
                 const Value& member_type = (*member)->static_type();
                 BindingMap binding_map = iface_type.args();
@@ -1288,14 +1288,14 @@ auto TypeChecker::TypeCheckExp(Nonnull<Expression*> e,
                 return Success();
               } else {
                 return CompilationError(e->source_loc())
-                       << "field access, " << access.field() << " not in "
+                       << "member access, " << access.member() << " not in "
                        << iface_decl.name();
               }
               break;
             }
             default:
               return CompilationError(e->source_loc())
-                     << "field access, unexpected " << aggregate_type
+                     << "member access, unexpected " << object_type
                      << " of non-interface type " << typeof_var << " in " << *e;
           }
           break;
@@ -1307,12 +1307,12 @@ auto TypeChecker::TypeCheckExp(Nonnull<Expression*> e,
           // function of `T`.
           CARBON_ASSIGN_OR_RETURN(
               Nonnull<const Value*> var_addr,
-              InterpExp(&access.aggregate(), arena_, trace_stream_));
+              InterpExp(&access.object(), arena_, trace_stream_));
           const VariableType& var_type = cast<VariableType>(*var_addr);
-          const InterfaceType& iface_type = cast<InterfaceType>(aggregate_type);
+          const InterfaceType& iface_type = cast<InterfaceType>(object_type);
           const InterfaceDeclaration& iface_decl = iface_type.declaration();
           if (std::optional<Nonnull<const Declaration*>> member =
-                  FindMember(access.field(), iface_decl.members());
+                  FindMember(access.member(), iface_decl.members());
               member.has_value()) {
             CARBON_CHECK(var_type.binding().impl_binding().has_value());
             access.set_impl(*var_type.binding().impl_binding());
@@ -1344,19 +1344,18 @@ auto TypeChecker::TypeCheckExp(Nonnull<Expression*> e,
             return Success();
           } else {
             return CompilationError(e->source_loc())
-                   << "field access, " << access.field() << " not in "
+                   << "member access, " << access.member() << " not in "
                    << iface_decl.name();
           }
           break;
         }
         default:
           return CompilationError(e->source_loc())
-                 << "field access, unexpected " << aggregate_type << " in "
-                 << *e;
+                 << "member access, unexpected " << object_type << " in " << *e;
       }
     }
-    case ExpressionKind::CompoundFieldAccessExpression: {
-      auto& access = cast<CompoundFieldAccessExpression>(*e);
+    case ExpressionKind::CompoundMemberAccessExpression: {
+      auto& access = cast<CompoundMemberAccessExpression>(*e);
       CARBON_RETURN_IF_ERROR(TypeCheckExp(&access.object(), impl_scope));
       CARBON_RETURN_IF_ERROR(TypeCheckExp(&access.path(), impl_scope));
       if (!isa<TypeOfMemberName>(access.path().static_type())) {

+ 4 - 3
explorer/interpreter/value.cpp

@@ -130,12 +130,13 @@ static auto GetMember(Nonnull<Arena*> arena, Nonnull<const Value*> v,
   }
 }
 
-auto Value::GetField(Nonnull<Arena*> arena, const FieldPath& path,
-                     SourceLocation source_loc) const
+auto Value::GetMember(Nonnull<Arena*> arena, const FieldPath& path,
+                      SourceLocation source_loc) const
     -> ErrorOr<Nonnull<const Value*>> {
   Nonnull<const Value*> value(this);
   for (const FieldPath::Component& field : path.components_) {
-    CARBON_ASSIGN_OR_RETURN(value, GetMember(arena, value, field, source_loc));
+    CARBON_ASSIGN_OR_RETURN(value,
+                            Carbon::GetMember(arena, value, field, source_loc));
   }
   return value;
 }

+ 2 - 2
explorer/interpreter/value.h

@@ -81,8 +81,8 @@ class Value {
 
   // Returns the sub-Value specified by `path`, which must be a valid field
   // path for *this.
-  auto GetField(Nonnull<Arena*> arena, const FieldPath& path,
-                SourceLocation source_loc) const
+  auto GetMember(Nonnull<Arena*> arena, const FieldPath& path,
+                 SourceLocation source_loc) const
       -> ErrorOr<Nonnull<const Value*>>;
 
   // Returns a copy of *this, but with the sub-Value specified by `path`

+ 6 - 3
explorer/syntax/parser.ypp

@@ -327,11 +327,14 @@ primary_expression:
 postfix_expression:
   primary_expression
 | postfix_expression designator
-    { $$ = arena->New<FieldAccessExpression>(context.source_loc(), $1, $2); }
+    {
+      $$ = arena->New<SimpleMemberAccessExpression>(context.source_loc(), $1,
+                                                    $2);
+    }
 | postfix_expression PERIOD LEFT_PARENTHESIS expression RIGHT_PARENTHESIS
     {
-      $$ = arena->New<CompoundFieldAccessExpression>(context.source_loc(), $1,
-                                                     $4);
+      $$ = arena->New<CompoundMemberAccessExpression>(context.source_loc(), $1,
+                                                      $4);
     }
 | postfix_expression LEFT_SQUARE_BRACKET expression RIGHT_SQUARE_BRACKET
     { $$ = arena->New<IndexExpression>(context.source_loc(), $1, $3); }

+ 3 - 3
explorer/testdata/generic_class/fail_field_access_on_generic.carbon

@@ -10,11 +10,11 @@
 
 package ExplorerTest api;
 
-fn BadFieldAccess[T:! Type](a: T) -> T {
-  // CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/generic_class/fail_field_access_on_generic.carbon:[[@LINE+1]]: field access, unexpected T:! Type of non-interface type Type in a.x
+fn BadSimpleMemberAccess[T:! Type](a: T) -> T {
+  // CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/generic_class/fail_field_access_on_generic.carbon:[[@LINE+1]]: member access, unexpected T:! Type of non-interface type Type in a.x
   return a.x;
 }
 
 fn Main() -> i32 {
-  return BadFieldAccess(0);
+  return BadSimpleMemberAccess(0);
 }

+ 1 - 1
explorer/testdata/interface/fail_interface_missing_member.carbon

@@ -15,7 +15,7 @@ interface Vector {
 }
 
 fn ScaleGeneric[T:! Vector](a: T, s: i32) -> T {
-  // CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/interface/fail_interface_missing_member.carbon:[[@LINE+1]]: field access, Scale not in Vector
+  // CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/interface/fail_interface_missing_member.carbon:[[@LINE+1]]: member access, Scale not in Vector
   return a.Scale(s);
 }