Daco Harkes
6378a26212
[vm] Variable scoping fixes
...
This CL fixes two bugs related to scoping:
1. Empty variable name lookup in outer functions failing.
2. Let expressions not pushing and popping contexts.
Additionally, this CL introduces a `--print-scoping` debug flag to
ease debugging scoping issues in the future.
Variable lookup is now only using kernel offset, unless the offset
is `kNoKernelOffset`. In that case, the names are used.
All synthetic variables in the VM now use `kNoKernelOffset` as their
offset.
The let expressions not pushing contexts is fixed by pushing context.
The context is only pushed if the scope captures variables. So this
should not lead to performance regressions. (Any lacking pushing of
scopes should have lead to crashes.)
TEST=tests/ffi/regress_56412_2_test.dart
TEST=tests/ffi/regress_56412_test.dart
Closes: https://github.com/dart-lang/sdk/issues/56412
Change-Id: I85fc4a161b833df80ce8f2911d618aa2ac9797eb
Cq-Include-Trybots: dart/try:vm-aot-android-release-arm64c-try,vm-aot-android-release-arm_x64-try,vm-aot-asan-linux-release-x64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-mac-release-arm64-try,vm-aot-mac-release-x64-try,vm-aot-msan-linux-release-x64-try,vm-aot-obfuscate-linux-release-x64-try,vm-aot-optimization-level-linux-release-x64-try,vm-aot-tsan-linux-release-x64-try,vm-aot-ubsan-linux-release-x64-try,vm-aot-win-debug-arm64-try,vm-aot-win-debug-x64-try,vm-aot-win-debug-x64c-try,vm-appjit-linux-debug-x64-try,vm-asan-linux-release-arm64-try,vm-asan-linux-release-x64-try,vm-checked-mac-release-arm64-try,vm-eager-optimization-linux-release-ia32-try,vm-eager-optimization-linux-release-x64-try,vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-qemu-linux-release-arm-try,vm-ffi-qemu-linux-release-riscv64-try,vm-fuchsia-release-arm64-try,vm-fuchsia-release-x64-try,vm-linux-debug-ia32-try,vm-linux-debug-x64-try,vm-linux-debug-x64c-try,vm-mac-debug-arm64-try,vm-mac-debug-x64-try,vm-msan-linux-release-arm64-try,vm-msan-linux-release-x64-try,vm-reload-linux-debug-x64-try,vm-reload-rollback-linux-debug-x64-try,vm-tsan-linux-release-arm64-try,vm-tsan-linux-release-x64-try,vm-ubsan-linux-release-arm64-try,vm-ubsan-linux-release-x64-try,vm-win-debug-arm64-try,vm-win-debug-x64-try,vm-win-debug-x64c-try,vm-win-release-ia32-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/380983
Reviewed-by: Slava Egorov <vegorov@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2024-08-23 07:03:15 +00:00
..
2024-08-23 07:03:15 +00:00
2024-07-23 10:43:43 +00:00
2024-08-22 20:10:52 +00:00
2023-04-17 15:58:28 +00:00
2024-03-25 10:35:49 +00:00
2024-08-06 15:37:44 +00:00
2023-04-20 17:42:06 +00:00
2023-06-06 02:07:58 +00:00
2023-04-10 18:15:12 +00:00
2023-05-24 08:42:14 +00:00
2023-07-03 12:29:15 +00:00
2024-08-15 14:09:52 +00:00
2024-06-18 09:10:00 +00:00
2023-09-05 21:47:59 +00:00
2023-04-21 08:06:49 +00:00
2024-07-10 19:45:29 +00:00
2023-04-10 18:15:12 +00:00
2023-04-12 22:18:54 +00:00
2024-05-30 21:01:39 +00:00
2023-04-12 22:18:54 +00:00
2024-04-17 19:14:41 +00:00
2023-03-06 22:06:59 +00:00
2024-07-26 19:26:11 +00:00
2024-08-15 14:09:52 +00:00
2024-04-11 17:55:26 +00:00
2023-04-10 18:15:12 +00:00
2024-04-19 08:10:18 +00:00
2024-04-19 08:10:18 +00:00
2024-07-26 19:26:11 +00:00
2024-08-19 13:09:31 +00:00
2024-08-15 14:09:52 +00:00
2023-12-12 02:09:27 +00:00
2023-12-15 15:25:29 +00:00
2024-08-15 14:09:52 +00:00
2024-08-15 14:09:52 +00:00
2024-08-15 14:09:52 +00:00
2024-06-10 20:38:30 +00:00
2024-06-10 20:38:30 +00:00
2024-03-13 14:33:48 +00:00
2023-06-28 11:48:26 +00:00
2023-04-10 18:15:12 +00:00
2023-10-12 16:16:21 +00:00
2023-04-12 22:18:54 +00:00
2023-04-10 18:15:12 +00:00
2023-04-12 22:18:54 +00:00
2023-04-10 18:15:12 +00:00
2023-04-12 22:18:54 +00:00
2023-04-10 18:15:12 +00:00
2023-11-28 13:15:56 +00:00
2024-01-09 20:28:55 +00:00
2023-04-10 18:15:12 +00:00
2024-08-19 21:46:26 +00:00
2024-04-24 08:52:18 +00:00
2024-04-24 08:52:18 +00:00
2023-11-30 16:42:28 +00:00
2024-04-24 08:52:18 +00:00
2024-08-15 14:09:52 +00:00
2024-08-15 14:09:52 +00:00
2023-08-01 17:01:41 +00:00
2024-05-14 16:40:59 +00:00
2024-04-24 08:52:18 +00:00
2023-09-04 14:38:27 +00:00
2023-11-28 13:15:56 +00:00
2023-06-23 20:35:00 +00:00
2023-02-27 22:26:36 +00:00
2024-02-15 23:08:48 +00:00
2023-09-12 16:22:19 +00:00
2023-06-23 20:35:00 +00:00
2023-06-23 20:35:00 +00:00
2023-06-23 20:35:00 +00:00
2024-03-14 21:48:59 +00:00
2023-05-22 16:43:04 +00:00
2023-04-10 21:38:57 +00:00
2023-04-10 21:38:57 +00:00
2023-04-10 21:38:57 +00:00
2024-03-15 19:26:13 +00:00
2023-04-10 18:15:12 +00:00
2024-06-26 19:58:11 +00:00
2024-08-19 21:46:26 +00:00
2024-08-14 17:09:07 +00:00
2023-07-26 21:53:49 +00:00
2024-04-17 19:14:41 +00:00
2023-07-20 17:06:44 +00:00
2024-08-15 14:09:52 +00:00
2024-08-15 14:09:52 +00:00
2024-06-20 17:08:10 +00:00
2024-02-13 23:32:01 +00:00
2023-04-12 22:18:54 +00:00
2024-08-19 21:46:26 +00:00
2024-01-22 16:07:39 +00:00
2024-08-15 14:09:52 +00:00
2024-06-24 22:00:28 +00:00
2024-08-19 21:46:26 +00:00
2023-04-10 18:15:12 +00:00
2024-04-17 19:14:41 +00:00
2024-06-17 22:45:59 +00:00
2023-11-07 16:13:11 +00:00
2023-04-12 22:18:54 +00:00
2023-04-12 22:18:54 +00:00
2023-10-23 13:54:04 +00:00
2023-05-31 08:06:08 +00:00
2024-04-19 08:10:18 +00:00
2023-08-17 17:38:48 +00:00
2023-04-10 18:15:12 +00:00
2024-08-15 14:09:52 +00:00
2024-06-27 18:29:58 +00:00
2024-08-13 04:09:39 +00:00
2024-08-13 04:09:39 +00:00
2023-12-15 15:25:29 +00:00
2023-12-15 15:25:29 +00:00
2024-04-17 19:14:41 +00:00
2024-06-20 17:08:10 +00:00
2024-06-20 17:08:10 +00:00
2023-04-10 18:15:12 +00:00
2023-04-10 18:15:12 +00:00
2024-08-23 07:03:15 +00:00
2023-04-10 18:15:12 +00:00
2024-05-29 10:16:28 +00:00
2024-05-08 17:03:59 +00:00
2023-10-20 19:45:49 +00:00
2024-08-15 14:09:52 +00:00
2023-10-20 19:45:49 +00:00
2024-04-17 19:14:41 +00:00
2023-02-06 22:19:55 +00:00
2023-04-10 18:15:12 +00:00
2023-06-23 20:35:00 +00:00
2023-06-23 20:35:00 +00:00
2023-04-10 18:15:12 +00:00
2023-04-12 22:18:54 +00:00
2024-04-17 19:14:41 +00:00
2024-04-17 19:14:41 +00:00
2024-06-27 18:29:58 +00:00
2024-08-14 17:09:07 +00:00
2024-04-24 08:52:18 +00:00
2023-11-28 13:15:56 +00:00
2023-04-12 22:18:54 +00:00
2023-11-28 13:15:56 +00:00
2023-04-12 22:18:54 +00:00
2023-04-12 22:18:54 +00:00
2023-11-28 13:15:56 +00:00
2023-04-12 22:18:54 +00:00
2024-04-17 19:14:41 +00:00
2023-04-12 22:18:54 +00:00
2024-08-19 21:46:26 +00:00
2024-08-15 14:09:52 +00:00
2024-08-14 17:09:07 +00:00
2024-08-14 17:09:07 +00:00
2024-07-16 20:46:52 +00:00
2024-02-15 01:18:40 +00:00
2024-08-20 20:38:19 +00:00
2024-08-20 20:38:19 +00:00
2024-08-20 20:38:19 +00:00
2024-08-20 20:38:19 +00:00
2024-06-10 20:38:30 +00:00
2024-03-20 20:08:13 +00:00
2023-04-17 15:58:28 +00:00
2024-04-17 19:14:41 +00:00
2024-07-22 14:42:13 +00:00
2024-04-22 18:12:22 +00:00
2024-06-10 20:38:30 +00:00
2024-08-15 14:09:52 +00:00
2024-08-15 14:09:52 +00:00
2024-04-17 19:14:41 +00:00
2024-04-17 19:14:41 +00:00
2024-08-19 14:04:47 +00:00
2024-08-19 14:04:47 +00:00
2023-04-10 18:15:12 +00:00
2023-04-20 17:42:06 +00:00
2023-04-10 18:15:12 +00:00
2023-06-29 08:04:20 +00:00
2023-06-29 08:04:20 +00:00
2023-04-12 22:18:54 +00:00
2023-04-10 18:15:12 +00:00
2023-04-10 18:15:12 +00:00
2023-08-09 06:01:55 +00:00
2024-08-07 12:59:35 +00:00
2024-08-07 12:59:35 +00:00
2024-08-19 21:46:26 +00:00
2023-04-10 18:15:12 +00:00
2023-04-10 18:15:12 +00:00
2023-07-26 21:53:49 +00:00
2023-03-29 19:58:33 +00:00
2024-02-14 22:56:49 +00:00
2023-03-29 19:58:33 +00:00
2023-04-10 18:15:12 +00:00
2024-02-21 20:15:15 +00:00
2024-08-15 14:09:52 +00:00
2024-08-19 21:46:26 +00:00
2024-08-14 17:09:07 +00:00
2023-09-20 16:08:51 +00:00
2023-08-08 10:57:47 +00:00
2024-04-17 19:14:41 +00:00
2024-05-16 16:33:52 +00:00
2024-05-02 16:36:20 +00:00
2024-05-02 16:36:20 +00:00
2024-08-15 14:09:52 +00:00
2023-02-23 03:11:08 +00:00
2023-04-10 18:15:12 +00:00
2024-08-14 17:09:07 +00:00
2023-12-14 22:48:49 +00:00
2024-08-20 20:38:19 +00:00
2024-08-20 20:38:19 +00:00
2024-08-20 20:38:19 +00:00
2024-06-06 10:56:12 +00:00
2024-08-15 14:09:52 +00:00
2024-08-19 14:04:47 +00:00
2024-08-13 09:20:05 +00:00
2024-08-19 21:46:26 +00:00
2024-08-19 21:46:26 +00:00
2024-08-19 21:46:26 +00:00
2024-04-19 08:10:18 +00:00
2024-04-19 08:10:18 +00:00
2024-04-19 08:10:18 +00:00
2024-04-19 08:10:18 +00:00
2023-04-10 18:15:12 +00:00
2024-08-07 12:59:35 +00:00
2024-08-07 12:59:35 +00:00
2024-08-07 12:59:35 +00:00
2024-08-07 12:59:35 +00:00
2024-08-07 12:59:35 +00:00
2024-08-07 12:59:35 +00:00
2024-08-07 12:59:35 +00:00
2024-08-07 12:59:35 +00:00
2024-08-07 12:59:35 +00:00
2024-08-07 12:59:35 +00:00
2024-08-07 12:59:35 +00:00
2024-08-07 12:59:35 +00:00
2024-02-21 22:13:09 +00:00
2024-08-07 12:59:35 +00:00
2024-03-11 20:14:49 +00:00
2024-04-19 08:10:18 +00:00
2024-04-19 08:10:18 +00:00
2024-08-23 07:03:15 +00:00
2023-08-04 11:07:46 +00:00
2024-04-15 11:10:23 +00:00
2024-04-15 11:10:23 +00:00
2023-12-15 16:48:37 +00:00
2023-04-12 22:18:54 +00:00
2023-08-09 06:01:55 +00:00
2023-08-09 06:01:55 +00:00
2024-04-17 19:14:41 +00:00
2023-04-10 18:15:12 +00:00
2024-05-02 16:36:20 +00:00
2024-04-17 19:14:41 +00:00
2023-10-02 17:57:33 +00:00
2024-07-10 16:31:19 +00:00
2024-06-12 20:22:41 +00:00
2024-04-17 19:14:41 +00:00
2024-04-17 19:14:41 +00:00
2024-08-07 12:59:35 +00:00
2023-08-01 15:50:11 +00:00
2024-08-15 14:09:52 +00:00
2024-08-15 14:09:52 +00:00
2024-08-15 14:09:52 +00:00
2024-03-20 20:08:13 +00:00
2023-04-12 22:18:54 +00:00
2024-03-26 11:12:38 +00:00
2023-04-10 18:15:12 +00:00
2024-04-19 19:46:47 +00:00
2023-04-12 22:18:54 +00:00
2024-04-17 19:14:41 +00:00
2023-04-12 22:18:54 +00:00
2023-04-12 22:18:54 +00:00
2024-03-20 20:08:13 +00:00
2023-11-27 15:22:40 +00:00
2023-07-06 21:10:28 +00:00
2024-06-10 20:38:30 +00:00
2024-03-20 20:08:13 +00:00
2024-04-17 19:14:41 +00:00
2024-04-17 19:14:41 +00:00
2022-12-29 10:18:02 +00:00
2023-04-12 22:18:54 +00:00
2024-06-06 10:56:12 +00:00
2024-06-06 10:56:12 +00:00
2024-08-15 14:09:52 +00:00
2023-04-12 22:18:54 +00:00
2024-08-15 14:09:52 +00:00
2024-08-19 21:46:26 +00:00
2024-08-15 14:09:52 +00:00
2023-04-10 18:15:12 +00:00
2024-08-23 07:03:15 +00:00
2024-08-23 07:03:15 +00:00
2023-08-21 16:46:46 +00:00
2024-02-13 23:32:01 +00:00
2024-06-10 20:38:30 +00:00
2024-08-20 20:38:19 +00:00
2024-08-20 20:38:19 +00:00
2024-08-20 20:38:19 +00:00
2023-09-27 15:11:05 +00:00
2023-06-23 17:01:58 +00:00
2023-01-06 07:48:22 +00:00
2023-09-27 15:11:05 +00:00
2024-06-11 18:00:35 +00:00
2024-06-11 18:00:35 +00:00
2024-06-11 18:00:35 +00:00
2024-06-11 18:00:35 +00:00
2024-06-11 18:00:35 +00:00
2024-06-11 18:00:35 +00:00
2023-07-11 15:13:58 +00:00
2023-04-12 22:18:54 +00:00
2024-04-30 17:49:37 +00:00
2023-04-10 18:15:12 +00:00
2024-04-12 15:42:47 +00:00
2024-02-27 21:59:50 +00:00
2024-06-17 10:47:58 +00:00
2024-03-05 21:48:00 +00:00
2023-04-12 22:18:54 +00:00
2023-04-12 22:18:54 +00:00
2023-04-12 22:18:54 +00:00
2024-08-15 14:09:52 +00:00
2023-04-12 22:18:54 +00:00
2024-06-06 10:56:12 +00:00
2023-04-12 22:18:54 +00:00
2024-08-15 14:09:52 +00:00
2024-08-15 14:09:52 +00:00
2024-08-19 06:52:34 +00:00
2024-08-15 14:09:52 +00:00
2024-08-15 14:09:52 +00:00
2024-08-15 14:09:52 +00:00
2024-08-15 14:09:52 +00:00
2024-04-17 19:14:41 +00:00
2024-08-15 14:09:52 +00:00
2024-08-15 14:09:52 +00:00
2024-04-19 19:46:47 +00:00
2024-08-15 14:09:52 +00:00
2023-04-12 22:18:54 +00:00
2024-08-07 16:39:10 +00:00
2023-04-10 18:15:12 +00:00
2023-04-10 18:15:12 +00:00
2023-02-21 19:07:57 +00:00
2023-10-09 17:23:23 +00:00
2023-09-27 15:11:05 +00:00
2023-09-27 15:11:05 +00:00
2023-04-10 18:15:12 +00:00
2024-08-07 12:59:35 +00:00
2024-08-22 20:10:52 +00:00
2024-06-17 21:43:32 +00:00
2024-01-26 18:58:54 +00:00
2024-04-17 19:14:41 +00:00
2023-04-10 18:15:12 +00:00
2024-04-17 19:14:41 +00:00
2024-04-17 19:14:41 +00:00
2024-08-22 20:10:52 +00:00
2024-08-22 20:10:52 +00:00
2023-04-10 18:15:12 +00:00
2024-04-17 19:14:41 +00:00
2023-04-10 18:15:12 +00:00
2024-01-25 08:23:51 +00:00
2023-07-10 20:33:33 +00:00
2024-07-10 16:03:38 +00:00
2024-05-29 10:16:28 +00:00
2024-04-17 19:14:41 +00:00
2023-02-20 14:57:57 +00:00
2023-09-27 16:23:38 +00:00
2023-09-27 16:23:38 +00:00
2024-04-30 17:49:37 +00:00
2024-04-10 19:19:31 +00:00
2023-04-17 16:26:35 +00:00
2023-04-12 22:18:54 +00:00
2023-04-12 22:18:54 +00:00
2023-04-12 22:18:54 +00:00
2024-03-20 20:08:13 +00:00
2024-06-26 11:10:06 +00:00
2024-04-30 17:49:37 +00:00
2024-02-23 04:13:39 +00:00
2024-04-17 19:14:41 +00:00
2023-05-11 03:14:27 +00:00
2023-10-31 19:39:51 +00:00
2024-04-17 19:14:41 +00:00
2024-06-14 23:24:19 +00:00
2024-06-14 23:24:19 +00:00
2024-08-07 12:59:35 +00:00
2023-06-23 20:35:00 +00:00
2024-01-09 12:36:55 +00:00
2024-02-16 01:05:49 +00:00
2023-11-03 07:36:25 +00:00
2024-02-16 01:05:49 +00:00
2024-01-09 12:36:55 +00:00
2024-01-09 12:36:55 +00:00
2024-05-07 17:04:29 +00:00
2024-08-15 14:09:52 +00:00
2023-06-07 19:01:51 +00:00
2024-08-07 12:59:35 +00:00
2024-04-17 19:14:41 +00:00