| # Copyright (c) 2025, 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. |
| |
| # Evaluate const local when inside a closure so the VM doesn't provide the name. |
| |
| # Definition, offset, method etc extracted by starting the VM with |
| # `-DDFE_VERBOSE=true`, e.g. |
| # ``` |
| # out/ReleaseX64/dart -DDFE_VERBOSE=true --enable-vm-service \ |
| # --serve-observatory --disable-service-auth-codes --pause_isolates_on_start \ |
| # inputFile.dart |
| # ``` |
| # and then issuing the expression compilation. It will then print stuff like |
| # `DFE: request[6]: [dart:core, _OneByteString, 1, 0]` in the terminal. |
| |
| sources: | |
| import "dart:developer"; |
| |
| void main() { |
| const String foo = "hello from foo"; |
| List<String> list = ["hello"]; |
| list.forEach((String input) { |
| debugger(); |
| print(foo); |
| print(list); |
| print(input); |
| }); |
| } |
| |
| definitions: ["list", "input"] |
| # String |
| definition_types: ["dart:core", "_GrowableList", "1", "1", "dart:core", "String", "1", "0", "dart:core", "_OneByteString", "1", "0"] |
| type_definitions: [] |
| type_bounds: [] |
| type_defaults: [] |
| method: "<anonymous closure>" |
| static: true |
| offset: 148 # on the 'debugger' call. |
| scriptUri: main.dart |
| expression: foo |