Cuong Manh Le
7b314d27ce
cmd/compile: fix bad order of evaluation for multi-value f()(g()) calls
...
The compiler use to compile f()(g()) as:
t1, t2 := g()
f()(t1, t2)
That violates the Go spec, since when "..., all function calls, ... are
evaluated in lexical left-to-right order"
This PR fixes the bug by compiling f()(g()) as:
t0 := f()
t1, t2 := g()
t0(t1, t2)
to make "f()" to be evaluated before "g()".
Fixes #50672
Change-Id: I6a766f3dfc7347d10f8fa3a151f6a5ea79bcf818
Reviewed-on: https://go-review.googlesource.com/c/go/+/392834
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
2022-05-11 08:12:15 +00:00
..
2021-09-17 22:59:44 +00:00
2022-01-10 21:27:19 +00:00
2021-07-18 21:03:43 +00:00
2021-07-14 23:33:46 +00:00
2021-11-24 15:55:56 +00:00
2022-03-24 02:14:15 +00:00
2022-05-10 20:03:53 +00:00
2022-05-11 08:12:15 +00:00
2022-03-09 21:31:58 +00:00
2021-12-05 12:50:44 +00:00
2022-03-24 17:50:47 +00:00
2021-12-13 22:42:08 +00:00
2019-08-28 19:27:20 +00:00
2021-04-05 17:51:15 +00:00
2022-03-31 00:26:58 +00:00
2022-05-10 19:40:04 +00:00
2021-11-12 23:07:01 +00:00
2021-11-12 23:07:01 +00:00
2021-10-30 18:30:05 +00:00
2020-12-14 12:13:36 -08:00
2020-12-14 12:13:36 -08:00
2020-10-27 03:11:45 +00:00
2020-12-01 21:49:31 +00:00
2021-01-05 21:44:30 +00:00
2020-03-29 17:12:56 +00:00
2021-03-05 18:46:43 +00:00
2019-03-06 20:04:07 +00:00
2021-01-01 13:44:37 +00:00
2021-02-24 21:34:21 +00:00
2021-01-20 22:53:32 +00:00
2021-01-23 02:15:24 +00:00
2021-02-01 18:28:05 +00:00
2020-12-01 21:49:31 +00:00
2019-03-14 21:00:20 +00:00
2021-06-02 05:14:45 +00:00
2020-12-01 21:49:31 +00:00
2020-12-01 21:49:31 +00:00
2022-03-09 21:31:58 +00:00
2019-09-26 23:54:29 +00:00
2021-04-21 00:53:48 +00:00
2021-04-21 00:53:48 +00:00
2021-03-23 05:11:09 +00:00
2020-12-04 21:22:23 +00:00
2021-11-12 23:07:01 +00:00
2021-06-14 07:12:37 +00:00
2020-02-26 16:54:17 +00:00
2021-01-05 21:11:31 +00:00
2019-10-16 00:05:37 +00:00
2021-08-09 16:10:20 +00:00
2021-12-03 16:24:32 +00:00
2021-12-03 16:24:32 +00:00
2021-01-19 20:07:52 +00:00
2021-01-19 20:07:52 +00:00
2021-06-23 16:48:12 +00:00
2021-06-23 16:48:12 +00:00
2021-01-18 05:55:08 +00:00
2021-07-28 21:41:07 +00:00
2021-05-26 23:50:32 +00:00
2021-05-26 23:50:32 +00:00
2021-05-26 23:50:32 +00:00
2020-09-12 08:31:49 +00:00
2021-07-28 21:41:07 +00:00
2019-11-16 20:31:45 +00:00
2020-10-30 00:47:37 +00:00
2020-09-12 08:31:49 +00:00
2019-09-03 17:52:06 +00:00
2020-09-12 08:31:49 +00:00
2021-05-26 23:50:32 +00:00
2021-05-26 23:50:32 +00:00
2019-04-17 16:36:56 +00:00
2021-05-26 23:50:32 +00:00
2020-09-12 08:31:49 +00:00
2020-09-12 08:31:49 +00:00
2021-05-26 23:50:32 +00:00
2019-04-17 19:09:15 +00:00
2021-05-26 23:50:32 +00:00
2019-09-08 17:28:20 +00:00
2021-12-03 16:24:32 +00:00
2020-12-04 21:22:23 +00:00
2020-12-04 21:22:23 +00:00
2020-12-04 21:22:23 +00:00
2021-04-28 15:55:10 +00:00
2019-10-10 19:38:06 +00:00
2019-03-07 21:05:15 +00:00
2022-01-11 02:26:58 +00:00
2022-01-11 02:26:58 +00:00
2019-09-08 17:28:20 +00:00
2020-12-14 12:13:36 -08:00
2019-11-04 20:19:15 +00:00
2021-01-08 17:14:20 +00:00
2022-01-11 02:26:58 +00:00
2020-12-09 23:56:19 +00:00
2021-05-27 23:40:56 +00:00
2019-01-08 21:54:04 +00:00
2019-01-08 21:54:04 +00:00
2021-10-07 00:39:17 +00:00
2020-03-25 01:11:15 +00:00
2021-05-26 23:50:45 +00:00
2022-04-14 19:37:30 +00:00
2020-03-25 01:11:15 +00:00
2020-11-28 02:31:54 +00:00
2020-11-28 02:31:54 +00:00
2022-03-09 21:31:58 +00:00
2021-12-03 16:24:32 +00:00
2019-08-28 19:27:20 +00:00
2022-03-09 21:31:58 +00:00
2020-12-18 00:10:44 +00:00
2019-11-01 20:13:05 +00:00
2019-02-19 22:45:09 +00:00
2019-09-03 19:33:04 +00:00
2021-08-20 19:58:13 +00:00
2022-04-21 18:06:38 +00:00
2021-08-09 16:10:20 +00:00
2019-09-26 18:47:12 +00:00
2020-12-17 04:43:46 +00:00
2021-04-23 00:41:01 +00:00
2021-04-23 00:41:01 +00:00
2020-12-04 21:22:23 +00:00
2020-05-07 17:50:24 +00:00
2020-12-14 12:13:36 -08:00
2021-11-05 00:52:06 +00:00
2022-01-10 22:48:40 +00:00
2020-12-04 21:22:23 +00:00
2021-01-26 17:05:06 +00:00
2020-12-04 21:22:23 +00:00
2019-05-11 03:02:33 +00:00
2021-01-10 08:01:49 +00:00
2018-11-27 15:36:08 +00:00
2018-11-26 14:13:53 +00:00
2018-11-26 14:13:53 +00:00
2018-11-26 14:13:53 +00:00
2021-02-19 00:40:22 +00:00
2022-04-19 15:59:26 +00:00
2020-09-17 19:35:53 +00:00
2018-12-05 21:54:54 +00:00
2020-09-17 19:35:53 +00:00
2020-04-03 21:43:52 +00:00
2019-09-08 17:28:20 +00:00
2021-03-29 05:50:11 +00:00
2022-05-04 20:30:17 +00:00
2022-05-08 20:10:06 +00:00
2020-08-28 21:23:32 +00:00
2019-09-03 20:41:29 +00:00
2021-11-12 16:58:34 +00:00
2020-04-19 03:12:32 +00:00
2020-04-19 03:12:32 +00:00
2021-10-26 14:24:17 +00:00
2021-07-22 17:48:41 +00:00
2020-12-04 21:22:23 +00:00
2021-01-16 23:19:26 +00:00
2022-05-03 14:14:31 +00:00
2020-12-09 23:56:19 +00:00
2021-12-03 16:24:32 +00:00
2022-04-07 17:19:55 +00:00
2022-03-09 21:31:58 +00:00
2018-12-03 16:48:21 +00:00
2020-12-14 21:28:48 +00:00
2018-10-03 19:54:29 +00:00
2018-10-03 19:54:16 +00:00
2018-10-03 19:54:16 +00:00
2019-09-08 17:28:20 +00:00
2020-12-15 19:43:32 +00:00
2020-12-14 21:28:48 +00:00
2021-10-19 17:01:35 +00:00
2020-12-14 21:28:48 +00:00
2022-01-11 02:26:58 +00:00
2020-12-09 23:55:41 +00:00
2019-09-11 23:33:11 +00:00
2019-10-28 23:34:13 +00:00
2021-11-12 22:20:51 +00:00
2021-06-24 18:24:24 +00:00
2019-11-05 00:26:30 +00:00
2022-04-21 18:06:38 +00:00
2021-10-13 18:15:16 +00:00
2020-12-28 00:39:17 -08:00
2020-12-04 21:22:23 +00:00
2020-12-02 16:33:57 +00:00
2021-08-23 19:46:36 +00:00
2021-10-06 15:53:04 +00:00