6849d737a6
This CL avoids creating locals using KernelToLocalsMap when computing closure data for the J-model. Instead the closure data uses ir.VariableDeclaration, JTypeVariable, and internal locals (ThisLocal and BoxLocal) internally, and the accessor function require passes a KernelToLocalsMap to convert the internal model to a Locals upon use. The converted Locals are cached internal for performance only. This prepares for splitting the GlobalLocalsMap and KernelToLocalsMap from the JClosedWorld. Previously landed in https://dart-review.googlesource.com/c/sdk/+/180820 but reverted. Change-Id: Ic6a2ab63de7cb31c89dd50ca2af3f205a792fd74 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183000 Reviewed-by: Sigmund Cherem <sigmund@google.com>
20 lines
503 B
Dart
20 lines
503 B
Dart
// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
// Regression test for failure caused by refactoring of handling of scope info
|
|
// locals map in the ssa locals handler.
|
|
|
|
class Class {
|
|
static const list = [];
|
|
var field = {for (final key in list) key: null};
|
|
|
|
Class(parameter) {
|
|
parameter;
|
|
}
|
|
}
|
|
|
|
main() {
|
|
new Class(null);
|
|
}
|