ast: Rename CallExpression::params() to args()

Arguments are the values passed to a function.
Parameters receive arguments.

Fixed: tint:811
Change-Id: I82fe71aa795b8b365bc78981e84c86b419eb3eb2
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66263
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
diff --git a/src/ast/call_expression.cc b/src/ast/call_expression.cc
index 752af8f..7bf0749 100644
--- a/src/ast/call_expression.cc
+++ b/src/ast/call_expression.cc
@@ -24,13 +24,13 @@
 CallExpression::CallExpression(ProgramID program_id,
                                const Source& source,
                                IdentifierExpression* func,
-                               ExpressionList params)
-    : Base(program_id, source), func_(func), params_(params) {
+                               ExpressionList args)
+    : Base(program_id, source), func_(func), args_(args) {
   TINT_ASSERT(AST, func_);
   TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, func_, program_id);
-  for (auto* param : params_) {
-    TINT_ASSERT(AST, param);
-    TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, param, program_id);
+  for (auto* arg : args_) {
+    TINT_ASSERT(AST, arg);
+    TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(AST, arg, program_id);
   }
 }
 
@@ -42,7 +42,7 @@
   // Clone arguments outside of create() call to have deterministic ordering
   auto src = ctx->Clone(source());
   auto* fn = ctx->Clone(func_);
-  auto p = ctx->Clone(params_);
+  auto p = ctx->Clone(args_);
   return ctx->dst->create<CallExpression>(src, fn, p);
 }
 
@@ -55,8 +55,8 @@
 
   make_indent(out, indent + 2);
   out << "(" << std::endl;
-  for (auto* param : params_)
-    param->to_str(sem, out, indent + 4);
+  for (auto* arg : args_)
+    arg->to_str(sem, out, indent + 4);
 
   make_indent(out, indent + 2);
   out << ")" << std::endl;
diff --git a/src/ast/call_expression.h b/src/ast/call_expression.h
index 54d9711..0a6de98 100644
--- a/src/ast/call_expression.h
+++ b/src/ast/call_expression.h
@@ -30,19 +30,19 @@
   /// @param program_id the identifier of the program that owns this node
   /// @param source the call expression source
   /// @param func the function
-  /// @param params the parameters
+  /// @param args the arguments
   CallExpression(ProgramID program_id,
                  const Source& source,
                  IdentifierExpression* func,
-                 ExpressionList params);
+                 ExpressionList args);
   /// Move constructor
   CallExpression(CallExpression&&);
   ~CallExpression() override;
 
   /// @returns the func
   IdentifierExpression* func() const { return func_; }
-  /// @returns the parameters
-  const ExpressionList& params() const { return params_; }
+  /// @returns the arguments
+  const ExpressionList& args() const { return args_; }
 
   /// Clones this node and all transitive child nodes using the `CloneContext`
   /// `ctx`.
@@ -62,7 +62,7 @@
   CallExpression(const CallExpression&) = delete;
 
   IdentifierExpression* const func_;
-  ExpressionList const params_;
+  ExpressionList const args_;
 };
 
 }  // namespace ast
diff --git a/src/ast/call_expression_test.cc b/src/ast/call_expression_test.cc
index 35299eb..18c50f7 100644
--- a/src/ast/call_expression_test.cc
+++ b/src/ast/call_expression_test.cc
@@ -30,7 +30,7 @@
   auto* stmt = create<CallExpression>(func, params);
   EXPECT_EQ(stmt->func(), func);
 
-  const auto& vec = stmt->params();
+  const auto& vec = stmt->args();
   ASSERT_EQ(vec.size(), 2u);
   EXPECT_EQ(vec[0], params[0]);
   EXPECT_EQ(vec[1], params[1]);
diff --git a/src/inspector/inspector.cc b/src/inspector/inspector.cc
index 196ebac..eddcaa0 100644
--- a/src/inspector/inspector.cc
+++ b/src/inspector/inspector.cc
@@ -842,8 +842,8 @@
       continue;
     }
 
-    auto* t = c->params()[texture_index];
-    auto* s = c->params()[sampler_index];
+    auto* t = c->args()[texture_index];
+    auto* s = c->args()[sampler_index];
 
     GetOriginatingResources(
         std::array<const ast::Expression*, 2>{t, s},
@@ -959,7 +959,7 @@
       // Patch all the parameter expressions with their argument
       for (size_t i = 0; i < N; i++) {
         if (auto* param = parameters[i]) {
-          call_exprs[i] = call_expr->params()[param->Index()];
+          call_exprs[i] = call_expr->args()[param->Index()];
         }
       }
       // Now call GetOriginatingResources() with from the callsite
diff --git a/src/reader/spirv/parser_impl_barrier_test.cc b/src/reader/spirv/parser_impl_barrier_test.cc
index 303f5fe..1e64306 100644
--- a/src/reader/spirv/parser_impl_barrier_test.cc
+++ b/src/reader/spirv/parser_impl_barrier_test.cc
@@ -71,7 +71,7 @@
   ASSERT_GT(helper->body()->size(), 0u);
   auto* call = helper->body()->get(0)->As<ast::CallStatement>();
   ASSERT_NE(call, nullptr);
-  EXPECT_EQ(call->expr()->params().size(), 0u);
+  EXPECT_EQ(call->expr()->args().size(), 0u);
   auto* sem_call = program.Sem().Get(call->expr());
   ASSERT_NE(sem_call, nullptr);
   auto* intrinsic = sem_call->Target()->As<sem::Intrinsic>();
@@ -105,7 +105,7 @@
   ASSERT_GT(helper->body()->size(), 0u);
   auto* call = helper->body()->get(0)->As<ast::CallStatement>();
   ASSERT_NE(call, nullptr);
-  EXPECT_EQ(call->expr()->params().size(), 0u);
+  EXPECT_EQ(call->expr()->args().size(), 0u);
   auto* sem_call = program.Sem().Get(call->expr());
   ASSERT_NE(sem_call, nullptr);
   auto* intrinsic = sem_call->Target()->As<sem::Intrinsic>();
diff --git a/src/reader/wgsl/parser_impl_call_stmt_test.cc b/src/reader/wgsl/parser_impl_call_stmt_test.cc
index 8d4429c..4e9b105 100644
--- a/src/reader/wgsl/parser_impl_call_stmt_test.cc
+++ b/src/reader/wgsl/parser_impl_call_stmt_test.cc
@@ -38,7 +38,7 @@
 
   EXPECT_EQ(c->func()->symbol(), p->builder().Symbols().Get("a"));
 
-  EXPECT_EQ(c->params().size(), 0u);
+  EXPECT_EQ(c->args().size(), 0u);
 }
 
 TEST_F(ParserImplTest, Statement_Call_WithParams) {
@@ -54,10 +54,10 @@
 
   EXPECT_EQ(c->func()->symbol(), p->builder().Symbols().Get("a"));
 
-  EXPECT_EQ(c->params().size(), 3u);
-  EXPECT_TRUE(c->params()[0]->Is<ast::ConstructorExpression>());
-  EXPECT_TRUE(c->params()[1]->Is<ast::IdentifierExpression>());
-  EXPECT_TRUE(c->params()[2]->Is<ast::BinaryExpression>());
+  EXPECT_EQ(c->args().size(), 3u);
+  EXPECT_TRUE(c->args()[0]->Is<ast::ConstructorExpression>());
+  EXPECT_TRUE(c->args()[1]->Is<ast::IdentifierExpression>());
+  EXPECT_TRUE(c->args()[2]->Is<ast::BinaryExpression>());
 }
 
 TEST_F(ParserImplTest, Statement_Call_WithParams_TrailingComma) {
@@ -73,9 +73,9 @@
 
   EXPECT_EQ(c->func()->symbol(), p->builder().Symbols().Get("a"));
 
-  EXPECT_EQ(c->params().size(), 2u);
-  EXPECT_TRUE(c->params()[0]->Is<ast::ConstructorExpression>());
-  EXPECT_TRUE(c->params()[1]->Is<ast::IdentifierExpression>());
+  EXPECT_EQ(c->args().size(), 2u);
+  EXPECT_TRUE(c->args()[0]->Is<ast::ConstructorExpression>());
+  EXPECT_TRUE(c->args()[1]->Is<ast::IdentifierExpression>());
 }
 
 TEST_F(ParserImplTest, Statement_Call_Missing_RightParen) {
diff --git a/src/reader/wgsl/parser_impl_singular_expression_test.cc b/src/reader/wgsl/parser_impl_singular_expression_test.cc
index bcac8ab..36b803d 100644
--- a/src/reader/wgsl/parser_impl_singular_expression_test.cc
+++ b/src/reader/wgsl/parser_impl_singular_expression_test.cc
@@ -102,7 +102,7 @@
 
   EXPECT_EQ(c->func()->symbol(), p->builder().Symbols().Get("a"));
 
-  EXPECT_EQ(c->params().size(), 0u);
+  EXPECT_EQ(c->args().size(), 0u);
 }
 
 TEST_F(ParserImplTest, SingularExpression_Call_WithArgs) {
@@ -118,10 +118,10 @@
 
   EXPECT_EQ(c->func()->symbol(), p->builder().Symbols().Get("test"));
 
-  EXPECT_EQ(c->params().size(), 3u);
-  EXPECT_TRUE(c->params()[0]->Is<ast::ConstructorExpression>());
-  EXPECT_TRUE(c->params()[1]->Is<ast::IdentifierExpression>());
-  EXPECT_TRUE(c->params()[2]->Is<ast::BinaryExpression>());
+  EXPECT_EQ(c->args().size(), 3u);
+  EXPECT_TRUE(c->args()[0]->Is<ast::ConstructorExpression>());
+  EXPECT_TRUE(c->args()[1]->Is<ast::IdentifierExpression>());
+  EXPECT_TRUE(c->args()[2]->Is<ast::BinaryExpression>());
 }
 
 TEST_F(ParserImplTest, SingularExpression_Call_TrailingComma) {
@@ -133,7 +133,7 @@
 
   ASSERT_TRUE(e->Is<ast::CallExpression>());
   auto* c = e->As<ast::CallExpression>();
-  EXPECT_EQ(c->params().size(), 1u);
+  EXPECT_EQ(c->args().size(), 1u);
 }
 
 TEST_F(ParserImplTest, SingularExpression_Call_InvalidArg) {
diff --git a/src/resolver/resolver.cc b/src/resolver/resolver.cc
index dd9904c..9782ae3 100644
--- a/src/resolver/resolver.cc
+++ b/src/resolver/resolver.cc
@@ -2312,7 +2312,7 @@
     } else if (auto* bitcast = expr->As<ast::BitcastExpression>()) {
       add(bitcast->expr());
     } else if (auto* call = expr->As<ast::CallExpression>()) {
-      for (auto* arg : call->params()) {
+      for (auto* arg : call->args()) {
         add(arg);
       }
     } else if (auto* type_ctor = expr->As<ast::TypeConstructorExpression>()) {
@@ -2504,8 +2504,8 @@
 bool Resolver::IntrinsicCall(ast::CallExpression* call,
                              sem::IntrinsicType intrinsic_type) {
   std::vector<const sem::Type*> arg_tys;
-  arg_tys.reserve(call->params().size());
-  for (auto* expr : call->params()) {
+  arg_tys.reserve(call->args().size());
+  for (auto* expr : call->args()) {
     arg_tys.emplace_back(TypeOf(expr));
   }
 
@@ -2545,7 +2545,7 @@
   auto index =
       sem::IndexOf(intrinsic->Parameters(), sem::ParameterUsage::kOffset);
   if (index > -1) {
-    auto* param = ast_call->params()[index];
+    auto* param = ast_call->args()[index];
     if (param->Is<ast::TypeConstructorExpression>()) {
       auto values = ConstantValueOf(param);
       if (!values.IsValid()) {
@@ -2639,19 +2639,19 @@
     return false;
   }
 
-  if (call->params().size() != target->parameters.size()) {
-    bool more = call->params().size() > target->parameters.size();
+  if (call->args().size() != target->parameters.size()) {
+    bool more = call->args().size() > target->parameters.size();
     AddError("too " + (more ? std::string("many") : std::string("few")) +
                  " arguments in call to '" + name + "', expected " +
                  std::to_string(target->parameters.size()) + ", got " +
-                 std::to_string(call->params().size()),
+                 std::to_string(call->args().size()),
              call->source());
     return false;
   }
 
-  for (size_t i = 0; i < call->params().size(); ++i) {
+  for (size_t i = 0; i < call->args().size(); ++i) {
     const VariableInfo* param = target->parameters[i];
-    const ast::Expression* arg_expr = call->params()[i];
+    const ast::Expression* arg_expr = call->args()[i];
     auto* arg_type = TypeOf(arg_expr)->UnwrapRef();
 
     if (param->type != arg_type) {
diff --git a/src/transform/array_length_from_uniform.cc b/src/transform/array_length_from_uniform.cc
index 8a0fa17..0a2f3ec 100644
--- a/src/transform/array_length_from_uniform.cc
+++ b/src/transform/array_length_from_uniform.cc
@@ -106,7 +106,7 @@
     // We assume that the argument to `arrayLength` has the form
     // `&resource.array`, which requires that `InlinePointerLets` and
     // `Simplify` have been run before this transform.
-    auto* param = call_expr->params()[0]->As<ast::UnaryOpExpression>();
+    auto* param = call_expr->args()[0]->As<ast::UnaryOpExpression>();
     if (!param || param->op() != ast::UnaryOp::kAddressOf) {
       TINT_ICE(Transform, ctx.dst->Diagnostics())
           << "expected form of arrayLength argument to be "
diff --git a/src/transform/calculate_array_length.cc b/src/transform/calculate_array_length.cc
index 4571157..b4d1e12 100644
--- a/src/transform/calculate_array_length.cc
+++ b/src/transform/calculate_array_length.cc
@@ -134,7 +134,7 @@
           // We can assume that the arrayLength() call has a single argument of
           // the form: arrayLength(&X.Y) where X is an expression that resolves
           // to the storage buffer structure, and Y is the runtime sized array.
-          auto* arg = call_expr->params()[0];
+          auto* arg = call_expr->args()[0];
           auto* address_of = arg->As<ast::UnaryOpExpression>();
           if (!address_of || address_of->op() != ast::UnaryOp::kAddressOf) {
             TINT_ICE(Transform, ctx.dst->Diagnostics())
diff --git a/src/transform/decompose_memory_access.cc b/src/transform/decompose_memory_access.cc
index 988ecfa..561c29f 100644
--- a/src/transform/decompose_memory_access.cc
+++ b/src/transform/decompose_memory_access.cc
@@ -927,8 +927,8 @@
           // may refer to a structure holding a runtime array, which cannot be
           // loaded. Instead replace X with the underlying storage / uniform
           // buffer variable.
-          if (auto access = state.TakeAccess(call_expr->params()[0])) {
-            ctx.Replace(call_expr->params()[0], [=, &ctx] {
+          if (auto access = state.TakeAccess(call_expr->args()[0])) {
+            ctx.Replace(call_expr->args()[0], [=, &ctx] {
               return ctx.CloneWithoutTransform(access.var->Declaration());
             });
           }
@@ -938,11 +938,11 @@
           // arrayLength(X)
           // Don't convert X into a load, this intrinsic actually requires the
           // real pointer.
-          state.TakeAccess(call_expr->params()[0]);
+          state.TakeAccess(call_expr->args()[0]);
           continue;
         }
         if (intrinsic->IsAtomic()) {
-          if (auto access = state.TakeAccess(call_expr->params()[0])) {
+          if (auto access = state.TakeAccess(call_expr->args()[0])) {
             // atomic___(X)
             ctx.Replace(call_expr, [=, &ctx, &state] {
               auto* buf = access.var->Declaration();
@@ -954,8 +954,8 @@
                                    access.var->As<sem::VariableUser>());
 
               ast::ExpressionList args{ctx.Clone(buf), offset};
-              for (size_t i = 1; i < call_expr->params().size(); i++) {
-                auto* arg = call_expr->params()[i];
+              for (size_t i = 1; i < call_expr->args().size(); i++) {
+                auto* arg = call_expr->args()[i];
                 args.emplace_back(ctx.Clone(arg));
               }
               return ctx.dst->Call(func, args);
diff --git a/src/transform/external_texture_transform.cc b/src/transform/external_texture_transform.cc
index 1ede9b8..da2539a 100644
--- a/src/transform/external_texture_transform.cc
+++ b/src/transform/external_texture_transform.cc
@@ -53,43 +53,43 @@
           // When a textureLoad or textureSampleLevel has been identified, check
           // if the first parameter is an external texture.
           if (auto* var =
-                  sem.Get(call_expr->params()[0])->As<sem::VariableUser>()) {
+                  sem.Get(call_expr->args()[0])->As<sem::VariableUser>()) {
             if (var->Variable()
                     ->Type()
                     ->UnwrapRef()
                     ->Is<sem::ExternalTexture>()) {
               if (intrinsic->Type() == sem::IntrinsicType::kTextureLoad &&
-                  call_expr->params().size() != 2) {
+                  call_expr->args().size() != 2) {
                 TINT_ICE(Transform, ctx.dst->Diagnostics())
                     << "expected textureLoad call with a texture_external to "
                        "have 2 parameters, found "
-                    << call_expr->params().size() << " parameters";
+                    << call_expr->args().size() << " parameters";
               }
 
               if (intrinsic->Type() ==
                       sem::IntrinsicType::kTextureSampleLevel &&
-                  call_expr->params().size() != 3) {
+                  call_expr->args().size() != 3) {
                 TINT_ICE(Transform, ctx.dst->Diagnostics())
                     << "expected textureSampleLevel call with a "
                        "texture_external to have 3 parameters, found "
-                    << call_expr->params().size() << " parameters";
+                    << call_expr->args().size() << " parameters";
               }
 
               // Replace the call with another that has the same parameters in
               // addition to a level parameter (always zero for external
               // textures).
               auto* exp = ctx.Clone(call_expr->func());
-              auto* externalTextureParam = ctx.Clone(call_expr->params()[0]);
+              auto* externalTextureParam = ctx.Clone(call_expr->args()[0]);
 
               ast::ExpressionList params;
               if (intrinsic->Type() == sem::IntrinsicType::kTextureLoad) {
-                auto* coordsParam = ctx.Clone(call_expr->params()[1]);
+                auto* coordsParam = ctx.Clone(call_expr->args()[1]);
                 auto* levelParam = ctx.dst->Expr(0);
                 params = {externalTextureParam, coordsParam, levelParam};
               } else if (intrinsic->Type() ==
                          sem::IntrinsicType::kTextureSampleLevel) {
-                auto* samplerParam = ctx.Clone(call_expr->params()[1]);
-                auto* coordsParam = ctx.Clone(call_expr->params()[2]);
+                auto* samplerParam = ctx.Clone(call_expr->args()[1]);
+                auto* coordsParam = ctx.Clone(call_expr->args()[2]);
                 auto* levelParam = ctx.dst->Expr(0.0f);
                 params = {externalTextureParam, samplerParam, coordsParam,
                           levelParam};
diff --git a/src/transform/module_scope_var_to_entry_point_param.cc b/src/transform/module_scope_var_to_entry_point_param.cc
index 787de98..c70d7fd 100644
--- a/src/transform/module_scope_var_to_entry_point_param.cc
+++ b/src/transform/module_scope_var_to_entry_point_param.cc
@@ -305,7 +305,7 @@
             if (is_entry_point && !is_handle && !is_workgroup_matrix) {
               arg = ctx.dst->AddressOf(arg);
             }
-            ctx.InsertBack(call->params(), arg);
+            ctx.InsertBack(call->args(), arg);
           }
         }
       }
diff --git a/src/transform/robustness.cc b/src/transform/robustness.cc
index 185ff96..b6a111e 100644
--- a/src/transform/robustness.cc
+++ b/src/transform/robustness.cc
@@ -217,8 +217,8 @@
     auto level_idx =
         sem::IndexOf(intrinsic->Parameters(), sem::ParameterUsage::kLevel);
 
-    auto* texture_arg = expr->params()[texture_idx];
-    auto* coords_arg = expr->params()[coords_idx];
+    auto* texture_arg = expr->args()[texture_idx];
+    auto* coords_arg = expr->args()[coords_idx];
     auto* coords_ty = intrinsic->Parameters()[coords_idx]->Type();
 
     // If the level is provided, then we need to clamp this. As the level is
@@ -229,7 +229,7 @@
     std::function<ast::Expression*()> level_arg;
     if (level_idx >= 0) {
       level_arg = [&] {
-        auto* arg = expr->params()[level_idx];
+        auto* arg = expr->args()[level_idx];
         auto* num_levels = b.Call("textureNumLevels", ctx.Clone(texture_arg));
         auto* zero = b.Expr(0);
         auto* max = ctx.dst->Sub(num_levels, 1);
@@ -253,7 +253,7 @@
 
     // Clamp the array_index argument, if provided
     if (array_idx >= 0) {
-      auto* arg = expr->params()[array_idx];
+      auto* arg = expr->args()[array_idx];
       auto* num_layers = b.Call("textureNumLayers", ctx.Clone(texture_arg));
       auto* zero = b.Expr(0);
       auto* max = ctx.dst->Sub(num_layers, 1);
@@ -263,7 +263,7 @@
 
     // Clamp the level argument, if provided
     if (level_idx >= 0) {
-      auto* arg = expr->params()[level_idx];
+      auto* arg = expr->args()[level_idx];
       ctx.Replace(arg, level_arg ? level_arg() : ctx.dst->Expr(0));
     }
 
diff --git a/src/writer/glsl/generator_impl.cc b/src/writer/glsl/generator_impl.cc
index cecee03..4bf06b2 100644
--- a/src/writer/glsl/generator_impl.cc
+++ b/src/writer/glsl/generator_impl.cc
@@ -378,7 +378,7 @@
 }
 
 bool GeneratorImpl::EmitCall(std::ostream& out, ast::CallExpression* expr) {
-  const auto& params = expr->params();
+  const auto& args = expr->args();
   auto* ident = expr->func();
   auto* call = builder_.Sem().Get(expr);
   auto* target = call->Target();
@@ -389,11 +389,11 @@
             func->Declaration()->decorations())) {
       // Special function generated by the CalculateArrayLength transform for
       // calling X.GetDimensions(Y)
-      if (!EmitExpression(out, params[0])) {
+      if (!EmitExpression(out, args[0])) {
         return false;
       }
       out << ".GetDimensions(";
-      if (!EmitExpression(out, params[1])) {
+      if (!EmitExpression(out, args[1])) {
         return false;
       }
       out << ")";
@@ -413,7 +413,7 @@
     } else if (intrinsic->Type() == sem::IntrinsicType::kIsNormal) {
       return EmitIsNormalCall(out, expr, intrinsic);
     } else if (intrinsic->Type() == sem::IntrinsicType::kIgnore) {
-      return EmitExpression(out, expr->params()[0]);
+      return EmitExpression(out, expr->args()[0]);
     } else if (intrinsic->IsDataPacking()) {
       return EmitDataPackingCall(out, expr, intrinsic);
     } else if (intrinsic->IsDataUnpacking()) {
@@ -431,13 +431,13 @@
     out << name << "(";
 
     bool first = true;
-    for (auto* param : params) {
+    for (auto* arg : args) {
       if (!first) {
         out << ", ";
       }
       first = false;
 
-      if (!EmitExpression(out, param)) {
+      if (!EmitExpression(out, arg)) {
         return false;
       }
     }
@@ -460,13 +460,13 @@
   out << name << "(";
 
   bool first = true;
-  for (auto* param : params) {
+  for (auto* arg : args) {
     if (!first) {
       out << ", ";
     }
     first = false;
 
-    if (!EmitExpression(out, param)) {
+    if (!EmitExpression(out, arg)) {
       return false;
     }
   }
@@ -500,8 +500,8 @@
 
     {
       ScopedParen sp(pre);
-      for (size_t i = 0; i < expr->params().size(); i++) {
-        auto* arg = expr->params()[i];
+      for (size_t i = 0; i < expr->args().size(); i++) {
+        auto* arg = expr->args()[i];
         if (i > 0) {
           pre << ", ";
         }
@@ -527,7 +527,7 @@
       pre << "InterlockedOr";
       {
         ScopedParen sp(pre);
-        if (!EmitExpression(pre, expr->params()[0])) {
+        if (!EmitExpression(pre, expr->args()[0])) {
           return false;
         }
         pre << ", 0, " << result;
@@ -557,11 +557,11 @@
       out << "InterlockedExchange";
       {
         ScopedParen sp(out);
-        if (!EmitExpression(out, expr->params()[0])) {
+        if (!EmitExpression(out, expr->args()[0])) {
           return false;
         }
         out << ", ";
-        if (!EmitExpression(out, expr->params()[1])) {
+        if (!EmitExpression(out, expr->args()[1])) {
           return false;
         }
         out << ", " << result;
@@ -569,9 +569,9 @@
       return true;
     }
     case sem::IntrinsicType::kAtomicCompareExchangeWeak: {
-      auto* dest = expr->params()[0];
-      auto* compare_value = expr->params()[1];
-      auto* value = expr->params()[2];
+      auto* dest = expr->args()[0];
+      auto* compare_value = expr->args()[1];
+      auto* value = expr->args()[2];
 
       std::string compare = UniqueIdentifier("atomic_compare_value");
 
@@ -647,9 +647,9 @@
 
 bool GeneratorImpl::EmitSelectCall(std::ostream& out,
                                    ast::CallExpression* expr) {
-  auto* expr_false = expr->params()[0];
-  auto* expr_true = expr->params()[1];
-  auto* expr_cond = expr->params()[2];
+  auto* expr_false = expr->args()[0];
+  auto* expr_true = expr->args()[1];
+  auto* expr_cond = expr->args()[2];
   ScopedParen paren(out);
   if (!EmitExpression(out, expr_cond)) {
     return false;
@@ -673,7 +673,7 @@
 bool GeneratorImpl::EmitModfCall(std::ostream& out,
                                  ast::CallExpression* expr,
                                  const sem::Intrinsic* intrinsic) {
-  if (expr->params().size() == 1) {
+  if (expr->args().size() == 1) {
     return CallIntrinsicHelper(
         out, expr, intrinsic,
         [&](TextBuffer* b, const std::vector<std::string>& params) {
@@ -710,11 +710,11 @@
   // DEPRECATED
   out << "modf";
   ScopedParen sp(out);
-  if (!EmitExpression(out, expr->params()[0])) {
+  if (!EmitExpression(out, expr->args()[0])) {
     return false;
   }
   out << ", ";
-  if (!EmitExpression(out, expr->params()[1])) {
+  if (!EmitExpression(out, expr->args()[1])) {
     return false;
   }
   return true;
@@ -723,7 +723,7 @@
 bool GeneratorImpl::EmitFrexpCall(std::ostream& out,
                                   ast::CallExpression* expr,
                                   const sem::Intrinsic* intrinsic) {
-  if (expr->params().size() == 1) {
+  if (expr->args().size() == 1) {
     return CallIntrinsicHelper(
         out, expr, intrinsic,
         [&](TextBuffer* b, const std::vector<std::string>& params) {
@@ -977,7 +977,7 @@
   using Usage = sem::ParameterUsage;
 
   auto parameters = intrinsic->Parameters();
-  auto arguments = expr->params();
+  auto arguments = expr->args();
 
   // Returns the argument with the given usage
   auto arg = [&](Usage usage) {
@@ -2726,7 +2726,7 @@
   {
     ScopedParen sp(out);
     bool first = true;
-    for (auto* arg : call->params()) {
+    for (auto* arg : call->args()) {
       if (!first) {
         out << ", ";
       }
diff --git a/src/writer/hlsl/generator_impl.cc b/src/writer/hlsl/generator_impl.cc
index 44d44b3..1008c85 100644
--- a/src/writer/hlsl/generator_impl.cc
+++ b/src/writer/hlsl/generator_impl.cc
@@ -551,7 +551,7 @@
 }
 
 bool GeneratorImpl::EmitCall(std::ostream& out, ast::CallExpression* expr) {
-  const auto& params = expr->params();
+  const auto& args = expr->args();
   auto* ident = expr->func();
   auto* call = builder_.Sem().Get(expr);
   auto* target = call->Target();
@@ -562,11 +562,11 @@
             func->Declaration()->decorations())) {
       // Special function generated by the CalculateArrayLength transform for
       // calling X.GetDimensions(Y)
-      if (!EmitExpression(out, params[0])) {
+      if (!EmitExpression(out, args[0])) {
         return false;
       }
       out << ".GetDimensions(";
-      if (!EmitExpression(out, params[1])) {
+      if (!EmitExpression(out, args[1])) {
         return false;
       }
       out << ")";
@@ -602,7 +602,7 @@
     } else if (intrinsic->Type() == sem::IntrinsicType::kIsNormal) {
       return EmitIsNormalCall(out, expr, intrinsic);
     } else if (intrinsic->Type() == sem::IntrinsicType::kIgnore) {
-      return EmitExpression(out, expr->params()[0]);
+      return EmitExpression(out, expr->args()[0]);
     } else if (intrinsic->IsDataPacking()) {
       return EmitDataPackingCall(out, expr, intrinsic);
     } else if (intrinsic->IsDataUnpacking()) {
@@ -620,13 +620,13 @@
     out << name << "(";
 
     bool first = true;
-    for (auto* param : params) {
+    for (auto* arg : args) {
       if (!first) {
         out << ", ";
       }
       first = false;
 
-      if (!EmitExpression(out, param)) {
+      if (!EmitExpression(out, arg)) {
         return false;
       }
     }
@@ -649,13 +649,13 @@
   out << name << "(";
 
   bool first = true;
-  for (auto* param : params) {
+  for (auto* arg : args) {
     if (!first) {
       out << ", ";
     }
     first = false;
 
-    if (!EmitExpression(out, param)) {
+    if (!EmitExpression(out, arg)) {
       return false;
     }
   }
@@ -669,8 +669,8 @@
     std::ostream& out,
     ast::CallExpression* expr,
     const transform::DecomposeMemoryAccess::Intrinsic* intrinsic) {
-  const auto& params = expr->params();
-  auto* offset_arg = builder_.Sem().Get(params[1]);
+  const auto& args = expr->args();
+  auto* offset_arg = builder_.Sem().Get(args[1]);
 
   uint32_t scalar_offset_value = 0;
   std::string scalar_offset_expr;
@@ -691,7 +691,7 @@
     scalar_offset_expr = UniqueIdentifier("scalar_offset");
     auto pre = line();
     pre << "const uint " << scalar_offset_expr << " = (";
-    if (!EmitExpression(pre, params[1])) {  // offset
+    if (!EmitExpression(pre, args[1])) {  // offset
       return false;
     }
     pre << ") / 4;";
@@ -708,7 +708,7 @@
         return result;
       };
       auto load_scalar = [&]() {
-        if (!EmitExpression(out, params[0])) {  // buffer
+        if (!EmitExpression(out, args[0])) {  // buffer
           return false;
         }
         if (scalar_offset_constant) {
@@ -724,7 +724,7 @@
       // Has a minimum alignment of 8 bytes, so is either .xy or .zw
       auto load_vec2 = [&] {
         if (scalar_offset_constant) {
-          if (!EmitExpression(out, params[0])) {  // buffer
+          if (!EmitExpression(out, args[0])) {  // buffer
             return false;
           }
           out << "[" << (scalar_offset_value / 4) << "]";
@@ -734,7 +734,7 @@
           {
             auto pre = line();
             pre << "uint4 " << ubo_load << " = ";
-            if (!EmitExpression(pre, params[0])) {  // buffer
+            if (!EmitExpression(pre, args[0])) {  // buffer
               return false;
             }
             pre << "[" << scalar_offset_expr << " / 4];";
@@ -746,7 +746,7 @@
       };
       // vec4 has a minimum alignment of 16 bytes, easiest case
       auto load_vec4 = [&] {
-        if (!EmitExpression(out, params[0])) {  // buffer
+        if (!EmitExpression(out, args[0])) {  // buffer
           return false;
         }
         if (scalar_offset_constant) {
@@ -808,7 +808,7 @@
     std::ostream& out,
     ast::CallExpression* expr,
     const transform::DecomposeMemoryAccess::Intrinsic* intrinsic) {
-  const auto& params = expr->params();
+  const auto& args = expr->args();
 
   using Op = transform::DecomposeMemoryAccess::Intrinsic::Op;
   using DataType = transform::DecomposeMemoryAccess::Intrinsic::DataType;
@@ -818,7 +818,7 @@
         if (cast) {
           out << cast << "(";
         }
-        if (!EmitExpression(out, params[0])) {  // buffer
+        if (!EmitExpression(out, args[0])) {  // buffer
           return false;
         }
         out << ".Load";
@@ -826,7 +826,7 @@
           out << n;
         }
         ScopedParen sp(out);
-        if (!EmitExpression(out, params[1])) {  // offset
+        if (!EmitExpression(out, args[1])) {  // offset
           return false;
         }
         if (cast) {
@@ -868,7 +868,7 @@
 
     case Op::kStore: {
       auto store = [&](int n) {
-        if (!EmitExpression(out, params[0])) {  // buffer
+        if (!EmitExpression(out, args[0])) {  // buffer
           return false;
         }
         out << ".Store";
@@ -876,12 +876,12 @@
           out << n;
         }
         ScopedParen sp1(out);
-        if (!EmitExpression(out, params[1])) {  // offset
+        if (!EmitExpression(out, args[1])) {  // offset
           return false;
         }
         out << ", asuint";
         ScopedParen sp2(out);
-        if (!EmitExpression(out, params[2])) {  // value
+        if (!EmitExpression(out, args[2])) {  // value
           return false;
         }
         return true;
@@ -1057,7 +1057,7 @@
       case Op::kAtomicStore: {
         // HLSL does not have an InterlockedStore, so we emulate it with
         // InterlockedExchange and discard the returned value
-        auto* value_ty = TypeOf(expr->params()[2])->UnwrapRef();
+        auto* value_ty = TypeOf(expr->args()[2])->UnwrapRef();
         auto name = UniqueIdentifier("atomicStore");
         {
           auto fn = line(&buf);
@@ -1088,7 +1088,7 @@
         return name;
       }
       case Op::kAtomicCompareExchangeWeak: {
-        auto* value_ty = TypeOf(expr->params()[2])->UnwrapRef();
+        auto* value_ty = TypeOf(expr->args()[2])->UnwrapRef();
 
         auto name = UniqueIdentifier("atomicCompareExchangeWeak");
         {
@@ -1151,7 +1151,7 @@
   {
     ScopedParen sp(out);
     bool first = true;
-    for (auto* arg : expr->params()) {
+    for (auto* arg : expr->args()) {
       if (!first) {
         out << ", ";
       }
@@ -1189,8 +1189,8 @@
 
     {
       ScopedParen sp(pre);
-      for (size_t i = 0; i < expr->params().size(); i++) {
-        auto* arg = expr->params()[i];
+      for (size_t i = 0; i < expr->args().size(); i++) {
+        auto* arg = expr->args()[i];
         if (i > 0) {
           pre << ", ";
         }
@@ -1220,7 +1220,7 @@
       pre << "InterlockedOr";
       {
         ScopedParen sp(pre);
-        if (!EmitExpression(pre, expr->params()[0])) {
+        if (!EmitExpression(pre, expr->args()[0])) {
           return false;
         }
         pre << ", 0, " << result;
@@ -1250,11 +1250,11 @@
       out << "InterlockedExchange";
       {
         ScopedParen sp(out);
-        if (!EmitExpression(out, expr->params()[0])) {
+        if (!EmitExpression(out, expr->args()[0])) {
           return false;
         }
         out << ", ";
-        if (!EmitExpression(out, expr->params()[1])) {
+        if (!EmitExpression(out, expr->args()[1])) {
           return false;
         }
         out << ", " << result;
@@ -1262,9 +1262,9 @@
       return true;
     }
     case sem::IntrinsicType::kAtomicCompareExchangeWeak: {
-      auto* dest = expr->params()[0];
-      auto* compare_value = expr->params()[1];
-      auto* value = expr->params()[2];
+      auto* dest = expr->args()[0];
+      auto* compare_value = expr->args()[1];
+      auto* value = expr->args()[2];
 
       std::string compare = UniqueIdentifier("atomic_compare_value");
 
@@ -1340,9 +1340,9 @@
 
 bool GeneratorImpl::EmitSelectCall(std::ostream& out,
                                    ast::CallExpression* expr) {
-  auto* expr_false = expr->params()[0];
-  auto* expr_true = expr->params()[1];
-  auto* expr_cond = expr->params()[2];
+  auto* expr_false = expr->args()[0];
+  auto* expr_true = expr->args()[1];
+  auto* expr_cond = expr->args()[2];
   ScopedParen paren(out);
   if (!EmitExpression(out, expr_cond)) {
     return false;
@@ -1621,7 +1621,7 @@
   using Usage = sem::ParameterUsage;
 
   auto parameters = intrinsic->Parameters();
-  auto arguments = expr->params();
+  auto arguments = expr->args();
 
   // Returns the argument with the given usage
   auto arg = [&](Usage usage) {
@@ -3434,7 +3434,7 @@
   {
     ScopedParen sp(out);
     bool first = true;
-    for (auto* arg : call->params()) {
+    for (auto* arg : call->args()) {
       if (!first) {
         out << ", ";
       }
diff --git a/src/writer/msl/generator_impl.cc b/src/writer/msl/generator_impl.cc
index d3d6c16..6c839fb 100644
--- a/src/writer/msl/generator_impl.cc
+++ b/src/writer/msl/generator_impl.cc
@@ -538,14 +538,14 @@
     out << program_->Symbols().NameFor(var->Declaration()->symbol());
   }
 
-  const auto& params = expr->params();
-  for (auto* param : params) {
+  const auto& args = expr->args();
+  for (auto* arg : args) {
     if (!first) {
       out << ", ";
     }
     first = false;
 
-    if (!EmitExpression(out, param)) {
+    if (!EmitExpression(out, arg)) {
       return false;
     }
   }
@@ -580,7 +580,7 @@
       } else {
         out << "float2(as_type<half2>(";
       }
-      if (!EmitExpression(out, expr->params()[0])) {
+      if (!EmitExpression(out, expr->args()[0])) {
         return false;
       }
       out << "))";
@@ -598,14 +598,14 @@
     }
     case sem::IntrinsicType::kIgnore: {
       out << "(void) ";
-      if (!EmitExpression(out, expr->params()[0])) {
+      if (!EmitExpression(out, expr->args()[0])) {
         return false;
       }
       return true;
     }
 
     case sem::IntrinsicType::kLength: {
-      auto* sem = builder_.Sem().Get(expr->params()[0]);
+      auto* sem = builder_.Sem().Get(expr->args()[0]);
       if (sem->Type()->UnwrapRef()->is_scalar()) {
         // Emulate scalar overload using fabs(x).
         name = "fabs";
@@ -614,16 +614,16 @@
     }
 
     case sem::IntrinsicType::kDistance: {
-      auto* sem = builder_.Sem().Get(expr->params()[0]);
+      auto* sem = builder_.Sem().Get(expr->args()[0]);
       if (sem->Type()->UnwrapRef()->is_scalar()) {
         // Emulate scalar overload using fabs(x - y);
         out << "fabs";
         ScopedParen sp(out);
-        if (!EmitExpression(out, expr->params()[0])) {
+        if (!EmitExpression(out, expr->args()[0])) {
           return false;
         }
         out << " - ";
-        if (!EmitExpression(out, expr->params()[1])) {
+        if (!EmitExpression(out, expr->args()[1])) {
           return false;
         }
         return true;
@@ -642,14 +642,14 @@
   out << name << "(";
 
   bool first = true;
-  const auto& params = expr->params();
-  for (auto* param : params) {
+  const auto& args = expr->args();
+  for (auto* arg : args) {
     if (!first) {
       out << ", ";
     }
     first = false;
 
-    if (!EmitExpression(out, param)) {
+    if (!EmitExpression(out, arg)) {
       return false;
     }
   }
@@ -665,8 +665,8 @@
     out << name;
     {
       ScopedParen sp(out);
-      for (size_t i = 0; i < expr->params().size(); i++) {
-        auto* arg = expr->params()[i];
+      for (size_t i = 0; i < expr->args().size(); i++) {
+        auto* arg = expr->args()[i];
         if (i > 0) {
           out << ", ";
         }
@@ -713,7 +713,7 @@
       return call("atomic_exchange_explicit", true);
 
     case sem::IntrinsicType::kAtomicCompareExchangeWeak: {
-      auto* ptr_ty = TypeOf(expr->params()[0])->UnwrapRef()->As<sem::Pointer>();
+      auto* ptr_ty = TypeOf(expr->args()[0])->UnwrapRef()->As<sem::Pointer>();
       auto sc = ptr_ty->StorageClass();
 
       auto func = utils::GetOrCreate(
@@ -765,7 +765,7 @@
   using Usage = sem::ParameterUsage;
 
   auto parameters = intrinsic->Parameters();
-  auto arguments = expr->params();
+  auto arguments = expr->args();
 
   // Returns the argument with the given usage
   auto arg = [&](Usage usage) {
@@ -2815,7 +2815,7 @@
   {
     ScopedParen sp(out);
     bool first = true;
-    for (auto* arg : call->params()) {
+    for (auto* arg : call->args()) {
       if (!first) {
         out << ", ";
       }
diff --git a/src/writer/spirv/builder.cc b/src/writer/spirv/builder.cc
index 140e1dc..23be508 100644
--- a/src/writer/spirv/builder.cc
+++ b/src/writer/spirv/builder.cc
@@ -2251,7 +2251,7 @@
   ops.push_back(Operand::Int(func_id));
 
   size_t arg_idx = 0;
-  for (auto* arg : expr->params()) {
+  for (auto* arg : expr->args()) {
     auto id = GenerateExpression(arg);
     if (id == 0) {
       return 0;
@@ -2316,7 +2316,7 @@
   // and loads it if necessary. Returns 0 on error.
   auto get_param_as_value_id = [&](size_t i,
                                    bool generate_load = true) -> uint32_t {
-    auto* arg = call->params()[i];
+    auto* arg = call->args()[i];
     auto* param = intrinsic->Parameters()[i];
     auto val_id = GenerateExpression(arg);
     if (val_id == 0) {
@@ -2349,11 +2349,11 @@
       op = spv::Op::OpAll;
       break;
     case IntrinsicType::kArrayLength: {
-      if (call->params().empty()) {
+      if (call->args().empty()) {
         error_ = "missing param for runtime array length";
         return 0;
       }
-      auto* arg = call->params()[0];
+      auto* arg = call->args()[0];
 
       auto* address_of = arg->As<ast::UnaryOpExpression>();
       if (!address_of || address_of->op() != ast::UnaryOp::kAddressOf) {
@@ -2641,7 +2641,7 @@
     return 0;
   }
 
-  for (size_t i = 0; i < call->params().size(); i++) {
+  for (size_t i = 0; i < call->args().size(); i++) {
     if (auto val_id = get_param_as_value_id(i)) {
       params.emplace_back(Operand::Int(val_id));
     } else {
@@ -2663,7 +2663,7 @@
   using Usage = sem::ParameterUsage;
 
   auto parameters = intrinsic->Parameters();
-  auto arguments = call->params();
+  auto arguments = call->args();
 
   // Generates the given expression, returning the operand ID
   auto gen = [&](ast::Expression* expr) {
@@ -3139,18 +3139,18 @@
     return false;
   }
 
-  uint32_t pointer_id = GenerateExpression(call->params()[0]);
+  uint32_t pointer_id = GenerateExpression(call->args()[0]);
   if (pointer_id == 0) {
     return false;
   }
 
   uint32_t value_id = 0;
-  if (call->params().size() > 1) {
-    value_id = GenerateExpression(call->params().back());
+  if (call->args().size() > 1) {
+    value_id = GenerateExpression(call->args().back());
     if (value_id == 0) {
       return false;
     }
-    value_id = GenerateLoadIfNeeded(TypeOf(call->params().back()), value_id);
+    value_id = GenerateLoadIfNeeded(TypeOf(call->args().back()), value_id);
     if (value_id == 0) {
       return false;
     }
@@ -3254,12 +3254,12 @@
                                                                value,
                                                            });
     case sem::IntrinsicType::kAtomicCompareExchangeWeak: {
-      auto comparator = GenerateExpression(call->params()[1]);
+      auto comparator = GenerateExpression(call->args()[1]);
       if (comparator == 0) {
         return false;
       }
 
-      auto* value_sem_type = TypeOf(call->params()[2]);
+      auto* value_sem_type = TypeOf(call->args()[2]);
 
       auto value_type = GenerateTypeIfNeeded(value_sem_type);
       if (value_type == 0) {
diff --git a/src/writer/wgsl/generator_impl.cc b/src/writer/wgsl/generator_impl.cc
index 4db149d..1d12bcb 100644
--- a/src/writer/wgsl/generator_impl.cc
+++ b/src/writer/wgsl/generator_impl.cc
@@ -215,14 +215,14 @@
   out << "(";
 
   bool first = true;
-  const auto& params = expr->params();
-  for (auto* param : params) {
+  const auto& args = expr->args();
+  for (auto* arg : args) {
     if (!first) {
       out << ", ";
     }
     first = false;
 
-    if (!EmitExpression(out, param)) {
+    if (!EmitExpression(out, arg)) {
       return false;
     }
   }