Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/xlint/lint1 lint: document the difference between FA...
details: https://anonhg.NetBSD.org/src/rev/d2c5a31f7338
branches: trunk
changeset: 985163:d2c5a31f7338
user: rillig <rillig%NetBSD.org@localhost>
date: Tue Aug 10 07:02:00 2021 +0000
description:
lint: document the difference between FARG and PUSH
diffstat:
usr.bin/xlint/lint1/ops.def | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diffs (26 lines):
diff -r 75584aebda0a -r d2c5a31f7338 usr.bin/xlint/lint1/ops.def
--- a/usr.bin/xlint/lint1/ops.def Tue Aug 10 06:47:48 2021 +0000
+++ b/usr.bin/xlint/lint1/ops.def Tue Aug 10 07:02:00 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ops.def,v 1.21 2021/08/10 06:31:16 rillig Exp $ */
+/* $NetBSD: ops.def,v 1.22 2021/08/10 07:02:00 rillig Exp $ */
begin_ops()
@@ -104,6 +104,16 @@
op( CASE, "case", -,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-,-)
op( FARG, "farg", 1,-,1,-,-,-,-,-,-,-,-,-,-,-,-,-,-,1,-,-)
+/*
+ * Both FARG and PUSH represent function arguments. FARG is used in the
+ * early phase of analysis, when the node is not yet part of a function call
+ * expression (CALL or ICALL). Later, build_function_argument builds a
+ * function call expression out of the FARG nodes, where they become PUSH.
+ * In a function call expression, the PUSH nodes are ordered from right to
+ * left, that is, the function call f(17, 23) is represented as
+ * CALL(f, PUSH(23, PUSH(17, NULL))).
+ */
+
end_ops()
#ifndef NOPS
Home |
Main Index |
Thread Index |
Old Index