Files
sdk/tests/compiler/dart2js/inference/data/map.dart
T
Johnni Winther d29cd4f183 Add toText to SideEffects and TypeMask for testing
- and make toString more structured.

Change-Id: If62cfb8e7ee110db6dfb713236e119e7e2f0e244
Reviewed-on: https://dart-review.googlesource.com/22401
Reviewed-by: Stephen Adams <sra@google.com>
2017-11-27 09:12:42 +00:00

40 lines
1.6 KiB
Dart

// Copyright (c) 2017, 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.
/*element: main:[null]*/
main() {
emptyMap();
nullMap();
constMap();
constNullMap();
stringIntMap();
intStringMap();
constStringIntMap();
constIntStringMap();
}
/*element: emptyMap:Dictionary([subclass=JsLinkedHashMap], key: [empty], value: [null], map: {})*/
emptyMap() => {};
/*element: constMap:Dictionary([subclass=ConstantMap], key: [empty], value: [null], map: {})*/
constMap() => const {};
/*element: nullMap:Map([subclass=JsLinkedHashMap], key: [null], value: [null])*/
nullMap() => {null: null};
/*element: constNullMap:Map([subclass=ConstantMap], key: [null], value: [null])*/
constNullMap() => const {null: null};
/*element: stringIntMap:Dictionary([subclass=JsLinkedHashMap], key: [exact=JSString], value: [null|exact=JSUInt31], map: {a: [exact=JSUInt31], b: [exact=JSUInt31], c: [exact=JSUInt31]})*/
stringIntMap() => {'a': 1, 'b': 2, 'c': 3};
/*element: intStringMap:Map([subclass=JsLinkedHashMap], key: [exact=JSUInt31], value: [null|exact=JSString])*/
intStringMap() => {1: 'a', 2: 'b', 3: 'c'};
/*element: constStringIntMap:Dictionary([subclass=ConstantMap], key: [exact=JSString], value: [null|exact=JSUInt31], map: {a: [exact=JSUInt31], b: [exact=JSUInt31], c: [exact=JSUInt31]})*/
constStringIntMap() => const {'a': 1, 'b': 2, 'c': 3};
/*element: constIntStringMap:Map([subclass=ConstantMap], key: [exact=JSUInt31], value: [null|exact=JSString])*/
constIntStringMap() => const {1: 'a', 2: 'b', 3: 'c'};