Version 2.0.0-dev.35 Merge commit 'd2b7787186e3dc0f25681ad886e30b8ab31cfff7' into dev
diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d1f835..0d71cdf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md
@@ -1,3 +1,11 @@ + +### Core library changes + +* Temporarily disabled the `whereType` method until generic methods are enabled + on all platforms ([issue 32463]). + +[issue 32463]: https://github.com/dart-lang/sdk/issues/32463 + ## 2.0.0 ### Language
diff --git a/DEPS b/DEPS index f05a29f..0be6cc5 100644 --- a/DEPS +++ b/DEPS
@@ -58,8 +58,8 @@ "barback_tag" : "@0.15.2+14", "bazel_worker_tag": "@v0.1.9", "boolean_selector_tag" : "@1.0.3", - "boringssl_gen_rev": "@39762c7f9ee4d828ff212838fae79528b94d5443", - "boringssl_rev" : "@a62dbf88d8a3c04446db833a1eb80a620cb1514d", + "boringssl_gen_rev": "@344f455fd13d46f054726638e76026156ea73aa9", + "boringssl_rev" : "@672f6fc2486745d0cabc3aaeb4e0a3cd13b37b12", "charcode_tag": "@v1.1.1", "chrome_rev" : "@19997", "cli_util_tag" : "@0.1.2+1",
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn index ff7b42f..e9129e3 100644 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn
@@ -217,6 +217,7 @@ "//build/config/compiler:compiler", "//build/config/compiler:clang_stackrealign", "//build/config/compiler:compiler_arm_fpu", + "//build/config/compiler:compiler_arm_thumb", "//build/config/compiler:chromium_code", "//build/config/compiler:default_include_dirs", "//build/config/compiler:no_rtti",
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index d1c2c40..7418019 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn
@@ -197,12 +197,6 @@ if (arm_tune != "") { cflags += [ "-mtune=$arm_tune" ] } - if (arm_use_thumb) { - cflags += [ "-mthumb" ] - if (is_android && !is_clang) { # Clang doesn't support this option. - cflags += [ "-mthumb-interwork" ] - } - } if (!is_clang) { # Clang doesn't support these flags. cflags += [ @@ -380,6 +374,18 @@ } } +config("compiler_arm_thumb") { + if (current_cpu == "arm") { + if (arm_use_thumb) { + cflags = [ "-mthumb" ] + if (is_android && !is_clang) { # Clang doesn't support this option. + cflags += [ "-mthumb-interwork" ] + } + asmflags = cflags + } + } +} + # runtime_library ------------------------------------------------------------- # # Sets the runtime library and associated options.
diff --git a/pkg/analysis_server/benchmark/benchmarks.dart b/pkg/analysis_server/benchmark/benchmarks.dart index ae06bdf..62e0b44 100644 --- a/pkg/analysis_server/benchmark/benchmarks.dart +++ b/pkg/analysis_server/benchmark/benchmarks.dart
@@ -128,7 +128,7 @@ time.stop(); print('Finished in ${time.elapsed.inSeconds} seconds.\n'); Map m = {'benchmark': benchmarkId, 'result': result.toJson()}; - print(JSON.encode(m)); + print(json.encode(m)); } catch (error, st) { print('$benchmarkId threw exception: $error'); print(st);
diff --git a/pkg/analysis_server/benchmark/integration/input_converter.dart b/pkg/analysis_server/benchmark/integration/input_converter.dart index 70999d5..fdf4066 100644 --- a/pkg/analysis_server/benchmark/integration/input_converter.dart +++ b/pkg/analysis_server/benchmark/integration/input_converter.dart
@@ -195,7 +195,7 @@ var result = exception; if (exception is UnimplementedError) { if (exception.message.startsWith(ERROR_PREFIX)) { - result = JSON.decode(exception.message.substring(ERROR_PREFIX.length)); + result = json.decode(exception.message.substring(ERROR_PREFIX.length)); } } processResponseResult(id, result);
diff --git a/pkg/analysis_server/benchmark/integration/instrumentation_input_converter.dart b/pkg/analysis_server/benchmark/integration/instrumentation_input_converter.dart index 7a87594..7f54193 100644 --- a/pkg/analysis_server/benchmark/integration/instrumentation_input_converter.dart +++ b/pkg/analysis_server/benchmark/integration/instrumentation_input_converter.dart
@@ -94,7 +94,7 @@ Map<String, dynamic> decodeJson(String line, String text) { try { - return asMap(JSON.decode(text)); + return asMap(json.decode(text)); } catch (e, s) { throw new AnalysisException( 'Failed to decode JSON: $text\n$line', new CaughtException(e, s));
diff --git a/pkg/analysis_server/benchmark/integration/log_file_input_converter.dart b/pkg/analysis_server/benchmark/integration/log_file_input_converter.dart index 79d3d6e..2ef5e6a 100644 --- a/pkg/analysis_server/benchmark/integration/log_file_input_converter.dart +++ b/pkg/analysis_server/benchmark/integration/log_file_input_converter.dart
@@ -30,16 +30,16 @@ String timeStampString = _parseTimeStamp(line); String data = line.substring(timeStampString.length); if (data.startsWith(RECEIVED_FRAGMENT)) { - Map<String, dynamic> json = asMap(JSON.decode(data.substring(4))); - if (json.containsKey('event')) { - return convertNotification(json); + Map<String, dynamic> jsonData = asMap(json.decode(data.substring(4))); + if (jsonData.containsKey('event')) { + return convertNotification(jsonData); } else { - return convertResponse(json); + return convertResponse(jsonData); } } else if (data.startsWith(SENT_FRAGMENT)) { - Map<String, dynamic> json = asMap(JSON.decode(data.substring(4))); - if (json.containsKey('method')) { - return convertRequest(json); + Map<String, dynamic> jsonData = asMap(json.decode(data.substring(4))); + if (jsonData.containsKey('method')) { + return convertRequest(jsonData); } return null; }
diff --git a/pkg/analysis_server/benchmark/perf/memory_tests.dart b/pkg/analysis_server/benchmark/perf/memory_tests.dart index 6803a4e..ea4b3ba 100644 --- a/pkg/analysis_server/benchmark/perf/memory_tests.dart +++ b/pkg/analysis_server/benchmark/perf/memory_tests.dart
@@ -43,8 +43,8 @@ } else { result = _run('curl', <String>[vmService]); } - Map json = JSON.decode(result.stdout); - Map heaps = json['result']['heaps']; + Map jsonData = json.decode(result.stdout); + Map heaps = jsonData['result']['heaps']; int newSpace = heaps['new']['used']; int oldSpace = heaps['old']['used']; return newSpace + oldSpace; @@ -105,7 +105,7 @@ */ ProcessResult _run(String executable, List<String> arguments) { return Process.runSync(executable, arguments, - stderrEncoding: UTF8, stdoutEncoding: UTF8); + stderrEncoding: utf8, stdoutEncoding: utf8); } /**
diff --git a/pkg/analysis_server/doc/api.html b/pkg/analysis_server/doc/api.html index 06a8bf7..a656113 100644 --- a/pkg/analysis_server/doc/api.html +++ b/pkg/analysis_server/doc/api.html
@@ -109,7 +109,7 @@ <body> <h1>Analysis Server API Specification</h1> <h1 style="color:#999999">Version - 1.18.7 + 1.19.0 </h1> <p> This document contains a specification of the API provided by the @@ -3800,11 +3800,22 @@ <p> The length of the element. </p> + </dd><dt class="field"><b>codeOffset: int</b></dt><dd> + + <p> + The offset of the first character of the element code, which is + neither documentation, nor annotation. + </p> + </dd><dt class="field"><b>codeLength: int</b></dt><dd> + + <p> + The length of the element code. + </p> </dd><dt class="field"><b>children: List<<a href="#type_Outline">Outline</a>><span style="color:#999999"> (optional)</span></b></dt><dd> <p> The children of the node. The field will be omitted if the node has no - children. + children. Children are sorted by offset. </p> </dd></dl></dd><dt class="typeDefinition"><a name="type_OverriddenMember">OverriddenMember: object</a></dt><dd> <p>
diff --git a/pkg/analysis_server/lib/protocol/protocol.dart b/pkg/analysis_server/lib/protocol/protocol.dart index df989b1..9e77ed7 100644 --- a/pkg/analysis_server/lib/protocol/protocol.dart +++ b/pkg/analysis_server/lib/protocol/protocol.dart
@@ -207,7 +207,7 @@ */ factory Request.fromString(String data) { try { - var result = JSON.decode(data); + var result = json.decode(data); if (result is Map) { return new Request.fromJson(result as Map<String, dynamic>); }
diff --git a/pkg/analysis_server/lib/protocol/protocol_constants.dart b/pkg/analysis_server/lib/protocol/protocol_constants.dart index 02de8b5..d7651ac 100644 --- a/pkg/analysis_server/lib/protocol/protocol_constants.dart +++ b/pkg/analysis_server/lib/protocol/protocol_constants.dart
@@ -238,6 +238,7 @@ const String SEARCH_REQUEST_FIND_TOP_LEVEL_DECLARATIONS_PATTERN = 'pattern'; const String SEARCH_REQUEST_GET_ELEMENT_DECLARATIONS = 'search.getElementDeclarations'; +const String SEARCH_REQUEST_GET_ELEMENT_DECLARATIONS_FILE = 'file'; const String SEARCH_REQUEST_GET_ELEMENT_DECLARATIONS_MAX_RESULTS = 'maxResults'; const String SEARCH_REQUEST_GET_ELEMENT_DECLARATIONS_PATTERN = 'pattern'; const String SEARCH_REQUEST_GET_TYPE_HIERARCHY = 'search.getTypeHierarchy';
diff --git a/pkg/analysis_server/lib/protocol/protocol_generated.dart b/pkg/analysis_server/lib/protocol/protocol_generated.dart index 07bc629..953ec2a 100644 --- a/pkg/analysis_server/lib/protocol/protocol_generated.dart +++ b/pkg/analysis_server/lib/protocol/protocol_generated.dart
@@ -80,7 +80,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -206,7 +206,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -316,7 +316,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -430,7 +430,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -518,7 +518,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -629,7 +629,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -715,7 +715,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -805,7 +805,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -913,7 +913,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -1012,7 +1012,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -1145,7 +1145,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -1242,7 +1242,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -1392,7 +1392,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -1539,7 +1539,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -1693,7 +1693,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -1783,7 +1783,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -1881,7 +1881,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -2004,7 +2004,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -2149,7 +2149,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -2313,7 +2313,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -2501,7 +2501,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -2621,7 +2621,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -2910,7 +2910,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -3090,7 +3090,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -3207,7 +3207,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -3293,7 +3293,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -3604,7 +3604,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -3730,7 +3730,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -3844,7 +3844,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -3965,7 +3965,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -4097,7 +4097,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -4198,7 +4198,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -4259,7 +4259,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -4343,7 +4343,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -4454,7 +4454,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -4596,7 +4596,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -4679,7 +4679,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -4814,7 +4814,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -4964,7 +4964,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -5076,7 +5076,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -5163,7 +5163,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -5370,7 +5370,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -5556,7 +5556,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -5768,7 +5768,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -5883,7 +5883,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -6042,7 +6042,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -6190,7 +6190,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -6326,7 +6326,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -6420,7 +6420,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -6553,7 +6553,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -6648,7 +6648,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -6756,7 +6756,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -6847,7 +6847,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -6982,7 +6982,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -7071,7 +7071,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -7292,7 +7292,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -7567,7 +7567,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -7689,7 +7689,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -7804,7 +7804,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -7917,7 +7917,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -8014,7 +8014,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -8148,7 +8148,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -8237,7 +8237,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -8360,7 +8360,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -8445,7 +8445,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -8534,7 +8534,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -8617,7 +8617,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -8705,7 +8705,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -9014,7 +9014,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -9130,7 +9130,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -9287,7 +9287,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -9373,7 +9373,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -9457,7 +9457,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -9624,7 +9624,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -9758,7 +9758,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -9871,7 +9871,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -10012,7 +10012,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -10235,7 +10235,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -10356,7 +10356,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -10633,7 +10633,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -10862,7 +10862,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -11382,7 +11382,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -11596,7 +11596,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -11849,7 +11849,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -11994,7 +11994,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -12472,7 +12472,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -12591,7 +12591,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -12689,7 +12689,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -12814,7 +12814,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -12917,7 +12917,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -13068,7 +13068,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -13181,7 +13181,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -13268,7 +13268,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -13390,7 +13390,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -13493,7 +13493,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -13592,7 +13592,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -13755,7 +13755,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -13886,7 +13886,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -13964,7 +13964,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -14006,7 +14006,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -14046,7 +14046,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -14195,7 +14195,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -14281,7 +14281,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -14406,7 +14406,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -14896,7 +14896,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -15021,7 +15021,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -15106,7 +15106,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -15192,7 +15192,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -15276,7 +15276,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -15362,7 +15362,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -15449,7 +15449,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -15535,7 +15535,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -15557,6 +15557,7 @@ * search.getElementDeclarations params * * { + * "file": optional FilePath * "pattern": optional String * "maxResults": optional int * } @@ -15564,11 +15565,27 @@ * Clients may not extend, implement or mix-in this class. */ class SearchGetElementDeclarationsParams implements RequestParams { + String _file; + String _pattern; int _maxResults; /** + * If this field is provided, return only declarations in this file. If this + * field is missing, return declarations in all files. + */ + String get file => _file; + + /** + * If this field is provided, return only declarations in this file. If this + * field is missing, return declarations in all files. + */ + void set file(String value) { + this._file = value; + } + + /** * The regular expression used to match the names of declarations. If this * field is missing, return all declarations. */ @@ -15596,7 +15613,9 @@ this._maxResults = value; } - SearchGetElementDeclarationsParams({String pattern, int maxResults}) { + SearchGetElementDeclarationsParams( + {String file, String pattern, int maxResults}) { + this.file = file; this.pattern = pattern; this.maxResults = maxResults; } @@ -15607,6 +15626,10 @@ json = {}; } if (json is Map) { + String file; + if (json.containsKey("file")) { + file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]); + } String pattern; if (json.containsKey("pattern")) { pattern = @@ -15618,7 +15641,7 @@ jsonDecoder.decodeInt(jsonPath + ".maxResults", json["maxResults"]); } return new SearchGetElementDeclarationsParams( - pattern: pattern, maxResults: maxResults); + file: file, pattern: pattern, maxResults: maxResults); } else { throw jsonDecoder.mismatch( jsonPath, "search.getElementDeclarations params", json); @@ -15633,6 +15656,9 @@ @override Map<String, dynamic> toJson() { Map<String, dynamic> result = {}; + if (file != null) { + result["file"] = file; + } if (pattern != null) { result["pattern"] = pattern; } @@ -15648,12 +15674,14 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { if (other is SearchGetElementDeclarationsParams) { - return pattern == other.pattern && maxResults == other.maxResults; + return file == other.file && + pattern == other.pattern && + maxResults == other.maxResults; } return false; } @@ -15661,6 +15689,7 @@ @override int get hashCode { int hash = 0; + hash = JenkinsSmiHash.combine(hash, file.hashCode); hash = JenkinsSmiHash.combine(hash, pattern.hashCode); hash = JenkinsSmiHash.combine(hash, maxResults.hashCode); return JenkinsSmiHash.finish(hash); @@ -15766,7 +15795,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -15906,7 +15935,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -16017,7 +16046,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -16181,7 +16210,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -16436,7 +16465,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -16572,7 +16601,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -16713,7 +16742,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -16831,7 +16860,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -16968,7 +16997,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -17163,7 +17192,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -17431,7 +17460,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) {
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart index 0ca111b..87267c7 100644 --- a/pkg/analysis_server/lib/src/analysis_server.dart +++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -108,7 +108,7 @@ * The version of the analysis server. The value should be replaced * automatically during the build. */ - static final String VERSION = '1.18.7'; + static final String VERSION = '1.19.0'; /** * The options of this server instance.
diff --git a/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart b/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart index dce7e59..72e7cfb 100644 --- a/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart +++ b/pkg/analysis_server/lib/src/channel/byte_stream_channel.dart
@@ -51,7 +51,7 @@ @override Future<Response> sendRequest(Request request) async { String id = request.id; - output.write(JSON.encode(request.toJson()) + '\n'); + output.write(json.encode(request.toJson()) + '\n'); return await responseStream .firstWhere((Response response) => response.id == id); } @@ -120,7 +120,7 @@ return; } ServerPerformanceStatistics.serverChannel.makeCurrentWhile(() { - String jsonEncoding = JSON.encode(notification.toJson()); + String jsonEncoding = json.encode(notification.toJson()); _outputLine(jsonEncoding); _instrumentationService.logNotification(jsonEncoding); }); @@ -134,7 +134,7 @@ return; } ServerPerformanceStatistics.serverChannel.makeCurrentWhile(() { - String jsonEncoding = JSON.encode(response.toJson()); + String jsonEncoding = json.encode(response.toJson()); _outputLine(jsonEncoding); _instrumentationService.logResponse(jsonEncoding); });
diff --git a/pkg/analysis_server/lib/src/channel/channel.dart b/pkg/analysis_server/lib/src/channel/channel.dart index ca75739..0f580f1 100644 --- a/pkg/analysis_server/lib/src/channel/channel.dart +++ b/pkg/analysis_server/lib/src/channel/channel.dart
@@ -85,7 +85,7 @@ */ class JsonStreamDecoder extends Converter<String, Map> { @override - Map convert(String text) => JSON.decode(text); + Map convert(String text) => json.decode(text); @override ChunkedConversionSink<String> startChunkedConversion(Sink<Map> sink) =>
diff --git a/pkg/analysis_server/lib/src/computer/computer_outline.dart b/pkg/analysis_server/lib/src/computer/computer_outline.dart index 0f5bac1..3af3413 100644 --- a/pkg/analysis_server/lib/src/computer/computer_outline.dart +++ b/pkg/analysis_server/lib/src/computer/computer_outline.dart
@@ -112,56 +112,10 @@ return new Location(file, offset, length, startLine, startColumn); } - /** - * Returns the [AstNode]'s source region. - */ - SourceRange _getSourceRange(AstNode node) { - int endOffset = node.end; - // prepare position of the node among its siblings - int firstOffset; - List<AstNode> siblings; - AstNode parent = node.parent; - // field - if (parent is VariableDeclarationList) { - VariableDeclarationList variableList = parent as VariableDeclarationList; - List<VariableDeclaration> variables = variableList.variables; - int variableIndex = variables.indexOf(node); - if (variableIndex == variables.length - 1) { - endOffset = variableList.parent.end; - } - if (variableIndex == 0) { - node = parent.parent; - parent = node.parent; - } else if (variableIndex >= 1) { - firstOffset = variables[variableIndex - 1].end; - return new SourceRange(firstOffset, endOffset - firstOffset); - } - } - // unit or class member - if (parent is CompilationUnit) { - firstOffset = node.offset; - siblings = parent.declarations; - } else if (parent is ClassDeclaration) { - firstOffset = parent.leftBracket.end; - siblings = parent.members; - } else { - int offset = node.offset; - return new SourceRange(offset, endOffset - offset); - } - // first child: [endOfParent, endOfNode] - int index = siblings.indexOf(node); - if (index == 0) { - return new SourceRange(firstOffset, endOffset - firstOffset); - } - // not first child: [endOfPreviousSibling, endOfNode] - int prevSiblingEnd = siblings[index - 1].end; - return new SourceRange(prevSiblingEnd, endOffset - prevSiblingEnd); - } - Outline _newClassOutline(ClassDeclaration node, List<Outline> classContents) { + node.firstTokenAfterCommentAndMetadata; SimpleIdentifier nameNode = node.name; String name = nameNode.name; - SourceRange range = _getSourceRange(node); Element element = new Element( ElementKind.CLASS, name, @@ -171,14 +125,12 @@ isAbstract: node.isAbstract), location: _getLocationNode(nameNode), typeParameters: _getTypeParametersStr(node.typeParameters)); - return new Outline(element, range.offset, range.length, - children: nullIfEmpty(classContents)); + return _nodeOutline(node, element, classContents); } Outline _newClassTypeAlias(ClassTypeAlias node) { SimpleIdentifier nameNode = node.name; String name = nameNode.name; - SourceRange range = _getSourceRange(node); Element element = new Element( ElementKind.CLASS_TYPE_ALIAS, name, @@ -188,7 +140,7 @@ isAbstract: node.isAbstract), location: _getLocationNode(nameNode), typeParameters: _getTypeParametersStr(node.typeParameters)); - return new Outline(element, range.offset, range.length); + return _nodeOutline(node, element); } Outline _newConstructorOutline(ConstructorDeclaration constructor) { @@ -205,7 +157,6 @@ offset = constructorNameNode.offset; length = constructorNameNode.length; } - SourceRange range = _getSourceRange(constructor); FormalParameterList parameters = constructor.parameters; String parametersStr = _safeToSource(parameters); Element element = new Element( @@ -216,15 +167,12 @@ location: _getLocationOffsetLength(offset, length), parameters: parametersStr); List<Outline> contents = _addFunctionBodyOutlines(constructor.body); - Outline outline = new Outline(element, range.offset, range.length, - children: nullIfEmpty(contents)); - return outline; + return _nodeOutline(constructor, element, contents); } Outline _newEnumConstant(EnumConstantDeclaration node) { SimpleIdentifier nameNode = node.name; String name = nameNode.name; - SourceRange range = _getSourceRange(node); Element element = new Element( ElementKind.ENUM_CONSTANT, name, @@ -232,13 +180,12 @@ isPrivate: Identifier.isPrivateName(name), isDeprecated: _isDeprecated(node)), location: _getLocationNode(nameNode)); - return new Outline(element, range.offset, range.length); + return _nodeOutline(node, element); } Outline _newEnumOutline(EnumDeclaration node, List<Outline> children) { SimpleIdentifier nameNode = node.name; String name = nameNode.name; - SourceRange range = _getSourceRange(node); Element element = new Element( ElementKind.ENUM, name, @@ -246,8 +193,7 @@ isPrivate: Identifier.isPrivateName(name), isDeprecated: _isDeprecated(node)), location: _getLocationNode(nameNode)); - return new Outline(element, range.offset, range.length, - children: nullIfEmpty(children)); + return _nodeOutline(node, element, children); } Outline _newFunctionOutline(FunctionDeclaration function, bool isStatic) { @@ -264,7 +210,6 @@ } else { kind = ElementKind.FUNCTION; } - SourceRange range = _getSourceRange(function); String parametersStr = _safeToSource(parameters); String returnTypeStr = _safeToSource(returnType); Element element = new Element( @@ -278,16 +223,13 @@ parameters: parametersStr, returnType: returnTypeStr); List<Outline> contents = _addFunctionBodyOutlines(functionExpression.body); - Outline outline = new Outline(element, range.offset, range.length, - children: nullIfEmpty(contents)); - return outline; + return _nodeOutline(function, element, contents); } Outline _newFunctionTypeAliasOutline(FunctionTypeAlias node) { TypeAnnotation returnType = node.returnType; SimpleIdentifier nameNode = node.name; String name = nameNode.name; - SourceRange range = _getSourceRange(node); FormalParameterList parameters = node.parameters; String parametersStr = _safeToSource(parameters); String returnTypeStr = _safeToSource(returnType); @@ -301,7 +243,7 @@ parameters: parametersStr, returnType: returnTypeStr, typeParameters: _getTypeParametersStr(node.typeParameters)); - return new Outline(element, range.offset, range.length); + return _nodeOutline(node, element); } Outline _newMethodOutline(MethodDeclaration method) { @@ -317,7 +259,6 @@ } else { kind = ElementKind.METHOD; } - SourceRange range = _getSourceRange(method); String parametersStr = parameters?.toSource(); String returnTypeStr = _safeToSource(returnType); Element element = new Element( @@ -332,24 +273,20 @@ parameters: parametersStr, returnType: returnTypeStr); List<Outline> contents = _addFunctionBodyOutlines(method.body); - Outline outline = new Outline(element, range.offset, range.length, - children: nullIfEmpty(contents)); - return outline; + return _nodeOutline(method, element, contents); } Outline _newUnitOutline(List<Outline> unitContents) { Element element = new Element( ElementKind.COMPILATION_UNIT, '<unit>', Element.makeFlags(), location: _getLocationNode(unit)); - return new Outline(element, unit.offset, unit.length, - children: nullIfEmpty(unitContents)); + return _nodeOutline(unit, element, unitContents); } Outline _newVariableOutline(String typeName, ElementKind kind, VariableDeclaration variable, bool isStatic) { SimpleIdentifier nameNode = variable.name; String name = nameNode.name; - SourceRange range = _getSourceRange(variable); Element element = new Element( kind, name, @@ -361,8 +298,34 @@ isFinal: variable.isFinal), location: _getLocationNode(nameNode), returnType: typeName); - Outline outline = new Outline(element, range.offset, range.length); - return outline; + return _nodeOutline(variable, element); + } + + Outline _nodeOutline(AstNode node, Element element, + [List<Outline> children]) { + int offset = node.offset; + int end = node.end; + if (node is VariableDeclaration) { + AstNode parent = node.parent; + if (parent is VariableDeclarationList && parent.variables.isNotEmpty) { + if (parent.variables[0] == node) { + offset = parent.parent.offset; + } + if (parent.variables.last == node) { + end = parent.parent.end; + } + } + } + + int codeOffset = node.offset; + if (node is AnnotatedNode) { + codeOffset = node.firstTokenAfterCommentAndMetadata.offset; + } + + int length = end - offset; + int codeLength = node.end - codeOffset; + return new Outline(element, offset, length, codeOffset, codeLength, + children: nullIfEmpty(children)); } static String _getTypeParametersStr(TypeParameterList parameters) { @@ -429,7 +392,8 @@ Element element = new Element(ElementKind.CONSTRUCTOR_INVOCATION, text, 0, location: outlineComputer._getLocationOffsetLength(node.offset, 0)); - contents.add(new Outline(element, node.offset, node.length, + contents.add(new Outline( + element, node.offset, node.length, node.offset, node.length, children: nullIfEmpty(children))); } else { super.visitInstanceCreationExpression(node); @@ -456,13 +420,13 @@ } void addOutlineNode(ElementKind kind, [List<Outline> children]) { - SourceRange range = outlineComputer._getSourceRange(node); String kindName = kind == ElementKind.UNIT_TEST_GROUP ? 'group' : 'test'; String name = '$kindName("${extractString( node.argumentList?.arguments)}")'; Element element = new Element(kind, name, 0, location: outlineComputer._getLocationNode(nameNode)); - contents.add(new Outline(element, range.offset, range.length, + contents.add(new Outline( + element, node.offset, node.length, node.offset, node.length, children: nullIfEmpty(children))); }
diff --git a/pkg/analysis_server/lib/src/context_manager.dart b/pkg/analysis_server/lib/src/context_manager.dart index d6c3d91..7f56676 100644 --- a/pkg/analysis_server/lib/src/context_manager.dart +++ b/pkg/analysis_server/lib/src/context_manager.dart
@@ -1590,7 +1590,7 @@ try { String contents = specFile.readAsStringSync(); Map<String, Uri> map = - pkgfile.parse(UTF8.encode(contents), new Uri.file(specFile.path)); + pkgfile.parse(utf8.encode(contents), new Uri.file(specFile.path)); return new MapPackages(map); } catch (_) { //TODO(pquitslund): consider creating an error for the spec file.
diff --git a/pkg/analysis_server/lib/src/plugin/plugin_manager.dart b/pkg/analysis_server/lib/src/plugin/plugin_manager.dart index 55c8231..982e415 100644 --- a/pkg/analysis_server/lib/src/plugin/plugin_manager.dart +++ b/pkg/analysis_server/lib/src/plugin/plugin_manager.dart
@@ -688,8 +688,8 @@ pubPath = '$pubPath.bat'; } ProcessResult result = Process.runSync(pubPath, <String>['get'], - stderrEncoding: UTF8, - stdoutEncoding: UTF8, + stderrEncoding: utf8, + stdoutEncoding: utf8, workingDirectory: pluginFolder.path); if (result.exitCode != 0) { StringBuffer buffer = new StringBuffer();
diff --git a/pkg/analysis_server/lib/src/plugin/result_merger.dart b/pkg/analysis_server/lib/src/plugin/result_merger.dart index 06f0840..43d0a56 100644 --- a/pkg/analysis_server/lib/src/plugin/result_merger.dart +++ b/pkg/analysis_server/lib/src/plugin/result_merger.dart
@@ -469,8 +469,12 @@ // The [newChild] isn't in the existing list. Outline copiedOutline = copyMap.putIfAbsent( mergedOutline, - () => new Outline(mergedOutline.element, mergedOutline.offset, + () => new Outline( + mergedOutline.element, + mergedOutline.offset, mergedOutline.length, + mergedOutline.codeOffset, + mergedOutline.codeLength, children: mergedOutline.children.toList())); copiedOutline.children.add(newChild); addToMap(newChild); @@ -514,7 +518,11 @@ if (currentChildren != updatedChildren) { if (!isCopied) { return new Outline( - copiedOutline.element, copiedOutline.offset, copiedOutline.length, + copiedOutline.element, + copiedOutline.offset, + copiedOutline.length, + copiedOutline.codeOffset, + copiedOutline.codeLength, children: updatedChildren); } copiedOutline.children = updatedChildren;
diff --git a/pkg/analysis_server/lib/src/protocol/protocol_internal.dart b/pkg/analysis_server/lib/src/protocol/protocol_internal.dart index 4fe3031..19c6740 100644 --- a/pkg/analysis_server/lib/src/protocol/protocol_internal.dart +++ b/pkg/analysis_server/lib/src/protocol/protocol_internal.dart
@@ -272,7 +272,7 @@ buffer.write(expected); if (actual != null) { buffer.write('; found "'); - buffer.write(JSON.encode(actual)); + buffer.write(json.encode(actual)); buffer.write('"'); } return new RequestFailure( @@ -282,7 +282,7 @@ @override dynamic missingKey(String jsonPath, String key) { return new RequestFailure(new Response.invalidParameter( - _request, jsonPath, 'Expected to contain key ${JSON.encode(key)}')); + _request, jsonPath, 'Expected to contain key ${json.encode(key)}')); } } @@ -310,7 +310,7 @@ buffer.write(expected); if (actual != null) { buffer.write(' found "'); - buffer.write(JSON.encode(actual)); + buffer.write(json.encode(actual)); buffer.write('"'); } buffer.write(' at ');
diff --git a/pkg/analysis_server/lib/src/search/search_domain.dart b/pkg/analysis_server/lib/src/search/search_domain.dart index ecdce2a..d3ffa60 100644 --- a/pkg/analysis_server/lib/src/search/search_domain.dart +++ b/pkg/analysis_server/lib/src/search/search_domain.dart
@@ -180,8 +180,9 @@ int remainingMaxResults = params.maxResults; for (var driver in server.driverMap.values.toList()) { - var driverDeclarations = - await driver.search.declarations(regExp, remainingMaxResults, files); + var driverDeclarations = await driver.search.declarations( + regExp, remainingMaxResults, files, + onlyForFile: params.file); declarations.addAll(driverDeclarations); if (remainingMaxResults != null) {
diff --git a/pkg/analysis_server/lib/src/services/kythe/kythe_visitors.dart b/pkg/analysis_server/lib/src/services/kythe/kythe_visitors.dart index 3f26f7a..98bd43a 100644 --- a/pkg/analysis_server/lib/src/services/kythe/kythe_visitors.dart +++ b/pkg/analysis_server/lib/src/services/kythe/kythe_visitors.dart
@@ -992,28 +992,6 @@ // no children to visit } - void _handleVariableDeclaration( - Element element, SyntacticEntity syntacticEntity, - {String subKind, DartType type}) { - // variable - var variableVName = addNodeAndFacts(schema.VARIABLE_KIND, - element: element, subKind: subKind, completeFact: schema.DEFINITION); - - // anchor - addAnchorEdgesContainingEdge( - syntacticEntity: syntacticEntity, - edges: [ - schema.DEFINES_BINDING_EDGE, - ], - target: variableVName, - enclosingTarget: _enclosingVName); - - // type - if (type != null) { - addEdge(variableVName, schema.TYPED_EDGE, _vNameFromType(type)); - } - } - /// Add a "ref/imports" edge from the passed [uriNode] location to the /// [referencedElement] [Element]. If the passed element is null, the edge is /// not written out. @@ -1044,6 +1022,28 @@ } } + void _handleVariableDeclaration( + Element element, SyntacticEntity syntacticEntity, + {String subKind, DartType type}) { + // variable + var variableVName = addNodeAndFacts(schema.VARIABLE_KIND, + element: element, subKind: subKind, completeFact: schema.DEFINITION); + + // anchor + addAnchorEdgesContainingEdge( + syntacticEntity: syntacticEntity, + edges: [ + schema.DEFINES_BINDING_EDGE, + ], + target: variableVName, + enclosingTarget: _enclosingVName); + + // type + if (type != null) { + addEdge(variableVName, schema.TYPED_EDGE, _vNameFromType(type)); + } + } + _handleVariableDeclarationListAnnotations( VariableDeclarationList variableDeclarationList, KytheVName refVName) { assert(refVName != null); @@ -1308,11 +1308,11 @@ } List<int> _encode(String str) { - return UTF8.encode(str); + return utf8.encode(str); } List<int> _encodeInt(int i) { - return UTF8.encode(i.toString()); + return utf8.encode(i.toString()); } /// Given all parameters for a [KytheVName] this method creates and returns a
diff --git a/pkg/analysis_server/lib/src/status/diagnostics.dart b/pkg/analysis_server/lib/src/status/diagnostics.dart index 4e3f981..de63862 100644 --- a/pkg/analysis_server/lib/src/status/diagnostics.dart +++ b/pkg/analysis_server/lib/src/status/diagnostics.dart
@@ -905,7 +905,7 @@ InstrumentationServer instrumentation = AnalysisEngine.instance.instrumentationService.instrumentationServer; String description = instrumentation.describe; - HtmlEscape htmlEscape = new HtmlEscape(HtmlEscapeMode.ELEMENT); + HtmlEscape htmlEscape = new HtmlEscape(HtmlEscapeMode.element); description = htmlEscape.convert(description); // Convert http(s): references to hyperlinks. final RegExp urlRegExp = new RegExp(r'[http|https]+:\/*(\S+)');
diff --git a/pkg/analysis_server/lib/src/status/element_writer.dart b/pkg/analysis_server/lib/src/status/element_writer.dart index e80d2ea..5254fc6 100644 --- a/pkg/analysis_server/lib/src/status/element_writer.dart +++ b/pkg/analysis_server/lib/src/status/element_writer.dart
@@ -173,7 +173,7 @@ if (element.isSynthetic) { buffer.write('<i>'); } - buffer.write(HTML_ESCAPE.convert(element.toString())); + buffer.write(htmlEscape.convert(element.toString())); if (element.isSynthetic) { buffer.write('</i>'); }
diff --git a/pkg/analysis_server/lib/src/status/pages.dart b/pkg/analysis_server/lib/src/status/pages.dart index 1d85ecc..8105117 100644 --- a/pkg/analysis_server/lib/src/status/pages.dart +++ b/pkg/analysis_server/lib/src/status/pages.dart
@@ -10,7 +10,7 @@ final NumberFormat numberFormat = new NumberFormat.decimalPattern(); -String escape(String text) => text == null ? '' : HTML_ESCAPE.convert(text); +String escape(String text) => text == null ? '' : htmlEscape.convert(text); String printInteger(int value) => numberFormat.format(value);
diff --git a/pkg/analysis_server/lib/src/status/tree_writer.dart b/pkg/analysis_server/lib/src/status/tree_writer.dart index e6b4570..9feb8af 100644 --- a/pkg/analysis_server/lib/src/status/tree_writer.dart +++ b/pkg/analysis_server/lib/src/status/tree_writer.dart
@@ -113,10 +113,10 @@ String valueString = _toString(value); if (valueString == null) { buffer.write('<span style="color: #FF0000">'); - buffer.write(HTML_ESCAPE.convert(value.runtimeType.toString())); + buffer.write(htmlEscape.convert(value.runtimeType.toString())); buffer.write('</span>'); } else { - buffer.write(HTML_ESCAPE.convert(valueString)); + buffer.write(htmlEscape.convert(valueString)); } } }
diff --git a/pkg/analysis_server/test/benchmarks_test.dart b/pkg/analysis_server/test/benchmarks_test.dart index 6b3437c..6fa9319 100644 --- a/pkg/analysis_server/test/benchmarks_test.dart +++ b/pkg/analysis_server/test/benchmarks_test.dart
@@ -4,7 +4,6 @@ /// This tests the benchmarks in benchmark/benchmark.test, and ensures that our /// benchmarks can run. - import 'dart:convert'; import 'dart:io'; @@ -13,6 +12,12 @@ void main() => defineTests(); +String get _serverSourcePath { + String script = Platform.script.toFilePath(windows: Platform.isWindows); + String pkgPath = path.normalize(path.join(path.dirname(script), '..', '..')); + return path.join(pkgPath, 'analysis_server'); +} + void defineTests() { group('benchmarks', () { final List<String> benchmarks = _listBenchmarks(); @@ -66,13 +71,7 @@ [path.join('benchmark', 'benchmarks.dart'), 'list', '--machine'], workingDirectory: _serverSourcePath, ); - Map m = JSON.decode(result.stdout); + Map m = json.decode(result.stdout); List benchmarks = m['benchmarks']; return benchmarks.map((b) => b['id']).toList(); } - -String get _serverSourcePath { - String script = Platform.script.toFilePath(windows: Platform.isWindows); - String pkgPath = path.normalize(path.join(path.dirname(script), '..', '..')); - return path.join(pkgPath, 'analysis_server'); -}
diff --git a/pkg/analysis_server/test/channel/byte_stream_channel_test.dart b/pkg/analysis_server/test/channel/byte_stream_channel_test.dart index ad0c8ac..e5756a0 100644 --- a/pkg/analysis_server/test/channel/byte_stream_channel_test.dart +++ b/pkg/analysis_server/test/channel/byte_stream_channel_test.dart
@@ -91,7 +91,7 @@ test_sendRequest() { int assertCount = 0; Request request = new Request('72', 'foo.bar'); - outputLineStream.first.then((line) => JSON.decode(line)).then((json) { + outputLineStream.first.then((line) => json.decode(line)).then((json) { expect(json[Request.ID], equals('72')); expect(json[Request.METHOD], equals('foo.bar')); inputSink.writeln('{"id":"73"}');
diff --git a/pkg/analysis_server/test/integration/analysis/outline_test.dart b/pkg/analysis_server/test/integration/analysis/outline_test.dart index 6886e9c..0952955 100644 --- a/pkg/analysis_server/test/integration/analysis/outline_test.dart +++ b/pkg/analysis_server/test/integration/analysis/outline_test.dart
@@ -20,18 +20,6 @@ @reflectiveTest class OutlineTest extends AbstractAnalysisServerIntegrationTest { - /** - * Verify that the range of source text covered by the given outline objects - * is connected (the end of each object in the list corresponds to the start - * of the next). - */ - void checkConnected(List<Outline> outlineObjects) { - for (int i = 0; i < outlineObjects.length - 1; i++) { - expect(outlineObjects[i + 1].offset, - equals(outlineObjects[i].offset + outlineObjects[i].length)); - } - } - test_outline() { String pathname = sourcePath('test.dart'); String text = r''' @@ -73,7 +61,7 @@ expect(classes, hasLength(2)); expect(classes[0].element.name, equals('Class1')); expect(classes[1].element.name, equals('Class2')); - checkConnected(classes); + List<Outline> members = classes[0].children; expect(members, hasLength(5)); expect(members[0].element.name, equals('field')); @@ -81,7 +69,6 @@ expect(members[2].element.name, equals('staticMethod')); expect(members[3].element.name, equals('getter')); expect(members[4].element.name, equals('setter')); - checkConnected(members); }); } }
diff --git a/pkg/analysis_server/test/integration/diagnostic/get_server_port_test.dart b/pkg/analysis_server/test/integration/diagnostic/get_server_port_test.dart index bcce8b6..80b25b0 100644 --- a/pkg/analysis_server/test/integration/diagnostic/get_server_port_test.dart +++ b/pkg/analysis_server/test/integration/diagnostic/get_server_port_test.dart
@@ -32,7 +32,7 @@ HttpClientRequest request = await client .getUrl(Uri.parse('http://localhost:${result.port}/status')); HttpClientResponse response = await request.close(); - String responseBody = await UTF8.decodeStream(response); + String responseBody = await utf8.decodeStream(response); expect(responseBody, contains('<title>Analysis Server</title>')); } }
diff --git a/pkg/analysis_server/test/integration/support/integration_test_methods.dart b/pkg/analysis_server/test/integration/support/integration_test_methods.dart index f1c05fc..cf284ec 100644 --- a/pkg/analysis_server/test/integration/support/integration_test_methods.dart +++ b/pkg/analysis_server/test/integration/support/integration_test_methods.dart
@@ -1201,6 +1201,11 @@ * * Parameters * + * file: FilePath (optional) + * + * If this field is provided, return only declarations in this file. If + * this field is missing, return declarations in all files. + * * pattern: String (optional) * * The regular expression used to match the names of declarations. If this @@ -1222,9 +1227,9 @@ * The list of the paths of files with declarations. */ Future<SearchGetElementDeclarationsResult> sendSearchGetElementDeclarations( - {String pattern, int maxResults}) async { + {String file, String pattern, int maxResults}) async { var params = new SearchGetElementDeclarationsParams( - pattern: pattern, maxResults: maxResults) + file: file, pattern: pattern, maxResults: maxResults) .toJson(); var result = await server.send("search.getElementDeclarations", params); ResponseDecoder decoder = new ResponseDecoder(null);
diff --git a/pkg/analysis_server/test/integration/support/integration_tests.dart b/pkg/analysis_server/test/integration/support/integration_tests.dart index a0bc922..bd72a42 100644 --- a/pkg/analysis_server/test/integration/support/integration_tests.dart +++ b/pkg/analysis_server/test/integration/support/integration_tests.dart
@@ -158,6 +158,12 @@ } /** + * Whether to run integration tests with the --use-cfe flag. + */ + // TODO(devoncarew): Remove this when --use-cfe goes away. + bool get useCFE => false; + + /** * Print out any messages exchanged with the server. If some messages have * already been exchanged with the server, they are printed out immediately. */ @@ -253,12 +259,6 @@ } /** - * Whether to run integration tests with the --use-cfe flag. - */ - // TODO(devoncarew): Remove this when --use-cfe goes away. - bool get useCFE => false; - - /** * Start [server]. */ Future startServer({ @@ -583,7 +583,7 @@ _recordStdio('<== $trimmedLine'); var message; try { - message = JSON.decoder.convert(trimmedLine); + message = json.decoder.convert(trimmedLine); } catch (exception) { _badDataFromServer('JSON decode failure: $exception'); return; @@ -651,9 +651,9 @@ Completer<Map<String, dynamic>> completer = new Completer<Map<String, dynamic>>(); _pendingCommands[id] = completer; - String line = JSON.encode(command); + String line = json.encode(command); _recordStdio('==> $line'); - _process.stdin.add(UTF8.encoder.convert("$line\n")); + _process.stdin.add(utf8.encoder.convert("$line\n")); return completer.future; }
diff --git a/pkg/analysis_server/test/integration/support/protocol_matchers.dart b/pkg/analysis_server/test/integration/support/protocol_matchers.dart index 6a6dc6a..20794fb 100644 --- a/pkg/analysis_server/test/integration/support/protocol_matchers.dart +++ b/pkg/analysis_server/test/integration/support/protocol_matchers.dart
@@ -997,12 +997,21 @@ * "element": Element * "offset": int * "length": int + * "codeOffset": int + * "codeLength": int * "children": optional List<Outline> * } */ -final Matcher isOutline = new LazyMatcher(() => new MatchesJsonObject( - "Outline", {"element": isElement, "offset": isInt, "length": isInt}, - optionalFields: {"children": isListOf(isOutline)})); +final Matcher isOutline = + new LazyMatcher(() => new MatchesJsonObject("Outline", { + "element": isElement, + "offset": isInt, + "length": isInt, + "codeOffset": isInt, + "codeLength": isInt + }, optionalFields: { + "children": isListOf(isOutline) + })); /** * OverriddenMember @@ -2683,13 +2692,18 @@ * search.getElementDeclarations params * * { + * "file": optional FilePath * "pattern": optional String * "maxResults": optional int * } */ final Matcher isSearchGetElementDeclarationsParams = new LazyMatcher(() => new MatchesJsonObject("search.getElementDeclarations params", null, - optionalFields: {"pattern": isString, "maxResults": isInt})); + optionalFields: { + "file": isFilePath, + "pattern": isString, + "maxResults": isInt + })); /** * search.getElementDeclarations result
diff --git a/pkg/analysis_server/test/protocol_test.dart b/pkg/analysis_server/test/protocol_test.dart index ff48b1e..7d7e995 100644 --- a/pkg/analysis_server/test/protocol_test.dart +++ b/pkg/analysis_server/test/protocol_test.dart
@@ -122,8 +122,8 @@ class RequestTest { void test_fromJson() { Request original = new Request('one', 'aMethod'); - String json = JSON.encode(original.toJson()); - Request request = new Request.fromString(json); + String jsonData = json.encode(original.toJson()); + Request request = new Request.fromString(jsonData); expect(request.id, equals('one')); expect(request.method, equals('aMethod')); expect(request.clientRequestTime, isNull); @@ -154,15 +154,15 @@ Map<String, Object> map = original.toJson(); // Insert bad value - should be int but client sent string instead map[Request.CLIENT_REQUEST_TIME] = '347'; - String json = JSON.encode(map); - Request request = new Request.fromString(json); + String jsonData = json.encode(map); + Request request = new Request.fromString(jsonData); expect(request, isNull); } void test_fromJson_withClientTime() { Request original = new Request('one', 'aMethod', null, 347); - String json = JSON.encode(original.toJson()); - Request request = new Request.fromString(json); + String jsonData = json.encode(original.toJson()); + Request request = new Request.fromString(jsonData); expect(request.id, equals('one')); expect(request.method, equals('aMethod')); expect(request.clientRequestTime, 347); @@ -170,8 +170,8 @@ void test_fromJson_withParams() { Request original = new Request('one', 'aMethod', {'foo': 'bar'}); - String json = JSON.encode(original.toJson()); - Request request = new Request.fromString(json); + String jsonData = json.encode(original.toJson()); + Request request = new Request.fromString(jsonData); expect(request.id, equals('one')); expect(request.method, equals('aMethod')); expect(request.toJson()['params'], equals({'foo': 'bar'}));
diff --git a/pkg/analysis_server/test/search/abstract_search_domain.dart b/pkg/analysis_server/test/search/abstract_search_domain.dart index dc83c5a..d4d1465 100644 --- a/pkg/analysis_server/test/search/abstract_search_domain.dart +++ b/pkg/analysis_server/test/search/abstract_search_domain.dart
@@ -100,7 +100,7 @@ results = resultSet.results; return new Future.value(); } - return new Future.delayed(Duration.ZERO, waitForSearchResults); + return new Future.delayed(Duration.zero, waitForSearchResults); } }
diff --git a/pkg/analysis_server/test/search/declarations_test.dart b/pkg/analysis_server/test/search/declarations_test.dart index 4feda64..71bf567 100644 --- a/pkg/analysis_server/test/search/declarations_test.dart +++ b/pkg/analysis_server/test/search/declarations_test.dart
@@ -126,6 +126,21 @@ } } + test_onlyForFile() async { + var a = newFile(join(testFolder, 'a.dart'), content: 'class A {}').path; + newFile(join(testFolder, 'b.dart'), content: 'class B {}').path; + + await _getDeclarations(file: a); + + expect(declarationsResult.files, [a]); + expect(declarationsResult.declarations, hasLength(1)); + + var declaration = declarationsResult.declarations[0]; + expect(declaration.name, 'A'); + expect(declaration.kind, ElementKind.CLASS); + expect(declarationsResult.files[declaration.fileIndex], a); + } + test_parameters() async { addTestFile(r''' void f(bool a, String b) {} @@ -170,9 +185,10 @@ assertHas('tf2', ElementKind.FUNCTION_TYPE_ALIAS); } - Future<Null> _getDeclarations({String pattern, int maxResults}) async { + Future<Null> _getDeclarations( + {String file, String pattern, int maxResults}) async { Request request = new SearchGetElementDeclarationsParams( - pattern: pattern, maxResults: maxResults) + file: file, pattern: pattern, maxResults: maxResults) .toRequest('0'); Response response = await waitResponse(request);
diff --git a/pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart b/pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart index 40da511..e3b1de3 100644 --- a/pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart +++ b/pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart
@@ -557,7 +557,7 @@ // would therefore not wait for microtask callbacks that are scheduled after // invoking this method. return new Future.delayed( - Duration.ZERO, () => performAnalysis(times - 1, completer)); + Duration.zero, () => performAnalysis(times - 1, completer)); } void resolveSource(String path, String content) {
diff --git a/pkg/analysis_server/test/services/refactoring/extract_local_test.dart b/pkg/analysis_server/test/services/refactoring/extract_local_test.dart index 0d528d5..c6f022e 100644 --- a/pkg/analysis_server/test/services/refactoring/extract_local_test.dart +++ b/pkg/analysis_server/test/services/refactoring/extract_local_test.dart
@@ -1281,13 +1281,13 @@ "positions": positions.toList(), "suggestions": suggestions.toList() }; - _assertSingleLinkedEditGroupJson(JSON.encode(expected)); + _assertSingleLinkedEditGroupJson(json.encode(expected)); } void _assertSingleLinkedEditGroupJson(String expectedJsonString) { List<LinkedEditGroup> editGroups = refactoringChange.linkedEditGroups; expect(editGroups, hasLength(1)); - expect(editGroups.first.toJson(), JSON.decode(expectedJsonString)); + expect(editGroups.first.toJson(), json.decode(expectedJsonString)); } /**
diff --git a/pkg/analysis_server/test/src/computer/outline_computer_test.dart b/pkg/analysis_server/test/src/computer/outline_computer_test.dart index c9fc5c6..c955b00 100644 --- a/pkg/analysis_server/test/src/computer/outline_computer_test.dart +++ b/pkg/analysis_server/test/src/computer/outline_computer_test.dart
@@ -651,203 +651,155 @@ } } - test_sourceRange_inClass() async { + test_sourceRanges_fields() async { Outline unitOutline = await _computeOutline(''' -class A { // leftA - int methodA() {} // endA - int methodB() {} // endB -} -'''); - List<Outline> outlines = unitOutline.children[0].children; - expect(outlines, hasLength(2)); - // methodA - { - Outline outline = outlines[0]; - Element element = outline.element; - expect(element.kind, ElementKind.METHOD); - expect(element.name, "methodA"); - { - int offset = testCode.indexOf(" // leftA"); - int end = testCode.indexOf(" // endA"); - expect(outline.offset, offset); - expect(outline.length, end - offset); - } - } - // methodB - { - Outline outline = outlines[1]; - Element element = outline.element; - expect(element.kind, ElementKind.METHOD); - expect(element.name, "methodB"); - { - int offset = testCode.indexOf(" // endA"); - int end = testCode.indexOf(" // endB"); - expect(outline.offset, offset); - expect(outline.length, end - offset); - } - } - } - - test_sourceRange_inClass_inVariableList() async { - Outline unitOutline = await _computeOutline(''' -class A { // leftA - int fieldA, fieldB, fieldC; // marker - int fieldD; // marker2 +class A { + int fieldA, fieldB = 2; + + int fieldC; + + /// Documentation. + int fieldD; } '''); List<Outline> outlines = unitOutline.children[0].children; expect(outlines, hasLength(4)); + // fieldA { Outline outline = outlines[0]; Element element = outline.element; expect(element.kind, ElementKind.FIELD); expect(element.name, "fieldA"); - { - int offset = testCode.indexOf(" // leftA"); - int end = testCode.indexOf(", fieldB"); - expect(outline.offset, offset); - expect(outline.length, end - offset); - } + + expect(outline.offset, 12); + expect(outline.length, 10); + + expect(outline.codeOffset, 16); + expect(outline.codeLength, 6); } + // fieldB { Outline outline = outlines[1]; Element element = outline.element; expect(element.kind, ElementKind.FIELD); expect(element.name, "fieldB"); - { - int offset = testCode.indexOf(", fieldB"); - int end = testCode.indexOf(", fieldC"); - expect(outline.offset, offset); - expect(outline.length, end - offset); - } + + expect(outline.offset, 24); + expect(outline.length, 11); + + expect(outline.codeOffset, 24); + expect(outline.codeLength, 10); } + // fieldC { Outline outline = outlines[2]; Element element = outline.element; expect(element.kind, ElementKind.FIELD); expect(element.name, "fieldC"); - { - int offset = testCode.indexOf(", fieldC"); - int end = testCode.indexOf(" // marker"); - expect(outline.offset, offset); - expect(outline.length, end - offset); - } + + expect(outline.offset, 41); + expect(outline.length, 11); + + expect(outline.codeOffset, 45); + expect(outline.codeLength, 6); } + // fieldD { Outline outline = outlines[3]; Element element = outline.element; expect(element.kind, ElementKind.FIELD); expect(element.name, "fieldD"); - { - int offset = testCode.indexOf(" // marker"); - int end = testCode.indexOf(" // marker2"); - expect(outline.offset, offset); - expect(outline.length, end - offset); - } + + expect(outline.offset, 58); + expect(outline.length, 32); + + expect(outline.codeOffset, 83); + expect(outline.codeLength, 6); } } - test_sourceRange_inUnit() async { + test_sourceRanges_inUnit() async { Outline unitOutline = await _computeOutline(''' -library lib; /// My first class. -class A { -} // endA -class B { -} // endB +class A {} + +class B {} '''); List<Outline> topOutlines = unitOutline.children; expect(topOutlines, hasLength(2)); + // A { Outline outline = topOutlines[0]; Element element = outline.element; expect(element.kind, ElementKind.CLASS); expect(element.name, "A"); - { - int offset = testCode.indexOf("/// My first class."); - int end = testCode.indexOf(" // endA"); - expect(outline.offset, offset); - expect(outline.length, end - offset); - } + + expect(outline.offset, 0); + expect(outline.length, 30); + + expect(outline.codeOffset, 20); + expect(outline.codeLength, 10); } + // B { Outline outline = topOutlines[1]; Element element = outline.element; expect(element.kind, ElementKind.CLASS); expect(element.name, "B"); - { - int offset = testCode.indexOf(" // endA"); - int end = testCode.indexOf(" // endB"); - expect(outline.offset, offset); - expect(outline.length, end - offset); - } + + expect(outline.offset, 32); + expect(outline.length, 10); + + expect(outline.codeOffset, 32); + expect(outline.codeLength, 10); } } - test_sourceRange_inUnit_inVariableList() async { + test_sourceRanges_method() async { Outline unitOutline = await _computeOutline(''' -int fieldA, fieldB, fieldC; // marker -int fieldD; // marker2 +class A { + int methodA() {} + + /// Documentation. + @override + int methodB() {} +} '''); - List<Outline> outlines = unitOutline.children; - expect(outlines, hasLength(4)); - // fieldA + List<Outline> outlines = unitOutline.children[0].children; + expect(outlines, hasLength(2)); + + // methodA { Outline outline = outlines[0]; Element element = outline.element; - expect(element.kind, ElementKind.TOP_LEVEL_VARIABLE); - expect(element.name, "fieldA"); - { - int offset = 0; - int end = testCode.indexOf(", fieldB"); - expect(outline.offset, offset); - expect(outline.length, end - offset); - } + expect(element.kind, ElementKind.METHOD); + expect(element.name, "methodA"); + + expect(outline.offset, 12); + expect(outline.length, 16); + + expect(outline.codeOffset, 12); + expect(outline.codeLength, 16); } - // fieldB + + // methodB { Outline outline = outlines[1]; Element element = outline.element; - expect(element.kind, ElementKind.TOP_LEVEL_VARIABLE); - expect(element.name, "fieldB"); - { - int offset = testCode.indexOf(", fieldB"); - int end = testCode.indexOf(", fieldC"); - expect(outline.offset, offset); - expect(outline.length, end - offset); - } - } - // fieldC - { - Outline outline = outlines[2]; - Element element = outline.element; - expect(element.kind, ElementKind.TOP_LEVEL_VARIABLE); - expect(element.name, "fieldC"); - { - int offset = testCode.indexOf(", fieldC"); - int end = testCode.indexOf(" // marker"); - expect(outline.offset, offset); - expect(outline.length, end - offset); - } - } - // fieldD - { - Outline outline = outlines[3]; - Element element = outline.element; - expect(element.kind, ElementKind.TOP_LEVEL_VARIABLE); - expect(element.name, "fieldD"); - { - int offset = testCode.indexOf(" // marker"); - int end = testCode.indexOf(" // marker2"); - expect(outline.offset, offset); - expect(outline.length, end - offset); - } + expect(element.kind, ElementKind.METHOD); + expect(element.name, "methodB"); + + expect(outline.offset, 34); + expect(outline.length, 49); + + expect(outline.codeOffset, 67); + expect(outline.codeLength, 16); } }
diff --git a/pkg/analysis_server/test/src/plugin/protocol_test_utilities.dart b/pkg/analysis_server/test/src/plugin/protocol_test_utilities.dart index c0afe6a..91ff506 100644 --- a/pkg/analysis_server/test/src/plugin/protocol_test_utilities.dart +++ b/pkg/analysis_server/test/src/plugin/protocol_test_utilities.dart
@@ -115,13 +115,19 @@ /** * On return, increment [stringIndex] by 10 and [intIndex] by 14. */ - Outline outline(int stringIndex, int intIndex) => - new Outline(element(stringIndex, intIndex), intIndex + 5, intIndex + 6, + Outline outline(int stringIndex, int intIndex) => new Outline( + element(stringIndex, intIndex), + intIndex + 5, + intIndex + 6, + intIndex + 5, + intIndex + 6, children: <Outline>[ new Outline( element(stringIndex + 5, intIndex + 7, kind: ElementKind.METHOD), intIndex + 12, + intIndex + 13, + intIndex + 12, intIndex + 13) ]);
diff --git a/pkg/analysis_server/test/src/plugin/result_merger_test.dart b/pkg/analysis_server/test/src/plugin/result_merger_test.dart index 98a63fd..dc409fc 100644 --- a/pkg/analysis_server/test/src/plugin/result_merger_test.dart +++ b/pkg/analysis_server/test/src/plugin/result_merger_test.dart
@@ -297,10 +297,10 @@ // - element1_1 // - element1_2 // - Outline outline1_1 = new Outline(element1_1, 0, 0, children: []); - Outline outline1_2 = new Outline(element1_2, 0, 0, children: []); + Outline outline1_1 = new Outline(element1_1, 0, 0, 0, 0, children: []); + Outline outline1_2 = new Outline(element1_2, 0, 0, 0, 0, children: []); Outline outline1 = - new Outline(element1, 0, 0, children: [outline1_1, outline1_2]); + new Outline(element1, 0, 0, 0, 0, children: [outline1_1, outline1_2]); // // Same top level element, common child. // @@ -311,15 +311,15 @@ // - element3_1 // - element3_2 // - Outline outline2_1 = new Outline(element2_1, 0, 0, children: []); - Outline outline2_2 = new Outline(element2_2, 0, 0, children: []); - Outline outline3_1 = new Outline(element3_1, 0, 0, children: []); - Outline outline3_2 = new Outline(element3_2, 0, 0, children: []); + Outline outline2_1 = new Outline(element2_1, 0, 0, 0, 0, children: []); + Outline outline2_2 = new Outline(element2_2, 0, 0, 0, 0, children: []); + Outline outline3_1 = new Outline(element3_1, 0, 0, 0, 0, children: []); + Outline outline3_2 = new Outline(element3_2, 0, 0, 0, 0, children: []); Outline outline2 = - new Outline(element2, 0, 0, children: [outline2_1, outline2_2]); + new Outline(element2, 0, 0, 0, 0, children: [outline2_1, outline2_2]); Outline outline3 = - new Outline(element2, 0, 0, children: [outline3_1, outline3_2]); - Outline outline2and3 = new Outline(element2, 0, 0, + new Outline(element2, 0, 0, 0, 0, children: [outline3_1, outline3_2]); + Outline outline2and3 = new Outline(element2, 0, 0, 0, 0, children: [outline2_1, outline2_2, outline3_2]); // // Unique, contributed from second plugin. @@ -327,8 +327,9 @@ // element4 // - element4_1 // - Outline outline4_1 = new Outline(element4_1, 0, 0, children: []); - Outline outline4 = new Outline(element4, 0, 0, children: [outline4_1]); + Outline outline4_1 = new Outline(element4_1, 0, 0, 0, 0, children: []); + Outline outline4 = + new Outline(element4, 0, 0, 0, 0, children: [outline4_1]); void runTest() { expect(
diff --git a/pkg/analysis_server/test/stress/utilities/git.dart b/pkg/analysis_server/test/stress/utilities/git.dart index cfcef4f..6a1ff4f 100644 --- a/pkg/analysis_server/test/stress/utilities/git.dart +++ b/pkg/analysis_server/test/stress/utilities/git.dart
@@ -464,7 +464,7 @@ ProcessResult _run(List<String> arguments) { logger?.log('git', 'git', arguments: arguments); return Process.runSync('git', arguments, - stderrEncoding: UTF8, stdoutEncoding: UTF8, workingDirectory: path); + stderrEncoding: utf8, stdoutEncoding: utf8, workingDirectory: path); } }
diff --git a/pkg/analysis_server/test/stress/utilities/server.dart b/pkg/analysis_server/test/stress/utilities/server.dart index 533281b..8f7f3a3 100644 --- a/pkg/analysis_server/test/stress/utilities/server.dart +++ b/pkg/analysis_server/test/stress/utilities/server.dart
@@ -887,7 +887,7 @@ return; } logger?.log(fromServer, '$trimmedLine'); - Map message = asMap(JSON.decoder.convert(trimmedLine)); + Map message = asMap(json.decoder.convert(trimmedLine)); if (message.containsKey('id')) { // The message is a response. Response response = new Response.fromJson(message); @@ -935,8 +935,8 @@ if (params != null) { command['params'] = params; } - String line = JSON.encode(command); - _process.stdin.add(UTF8.encoder.convert('$line\n')); + String line = json.encode(command); + _process.stdin.add(utf8.encoder.convert('$line\n')); logger?.log(fromClient, '$line'); return requestData; }
diff --git a/pkg/analysis_server/tool/instrumentation/log/log.dart b/pkg/analysis_server/tool/instrumentation/log/log.dart index 544013c..011581a 100644 --- a/pkg/analysis_server/tool/instrumentation/log/log.dart +++ b/pkg/analysis_server/tool/instrumentation/log/log.dart
@@ -671,7 +671,7 @@ } else if (entryKind == InstrumentationService.TAG_LOG_ENTRY) { // Fall through } else if (entryKind == InstrumentationService.TAG_NOTIFICATION) { - Map requestData = JSON.decode(components[2]); + Map requestData = json.decode(components[2]); return new NotificationEntry(index, timeStamp, requestData); } else if (entryKind == InstrumentationService.TAG_PERFORMANCE) { // Fall through @@ -682,25 +682,25 @@ return new PluginExceptionEntry(index, timeStamp, entryKind, components.sublist(2, 5), components.sublist(5)); } else if (entryKind == InstrumentationService.TAG_PLUGIN_NOTIFICATION) { - Map requestData = JSON.decode(components[2]); + Map requestData = json.decode(components[2]); return new PluginNotificationEntry( index, timeStamp, requestData, components.sublist(3)); } else if (entryKind == InstrumentationService.TAG_PLUGIN_REQUEST) { - Map requestData = JSON.decode(components[2]); + Map requestData = json.decode(components[2]); return new PluginRequestEntry( index, timeStamp, requestData, components.sublist(3)); } else if (entryKind == InstrumentationService.TAG_PLUGIN_RESPONSE) { - Map responseData = JSON.decode(components[2]); + Map responseData = json.decode(components[2]); return new PluginResponseEntry( index, timeStamp, responseData, components.sublist(3)); } else if (entryKind == InstrumentationService.TAG_PLUGIN_TIMEOUT) { return new PluginErrorEntry(index, timeStamp, entryKind, components.sublist(2, 3), components.sublist(3)); } else if (entryKind == InstrumentationService.TAG_REQUEST) { - Map requestData = JSON.decode(components[2]); + Map requestData = json.decode(components[2]); return new RequestEntry(index, timeStamp, requestData); } else if (entryKind == InstrumentationService.TAG_RESPONSE) { - Map responseData = JSON.decode(components[2]); + Map responseData = json.decode(components[2]); return new ResponseEntry(index, timeStamp, responseData); } else if (entryKind == InstrumentationService.TAG_SUBPROCESS_START) { // Fall through
diff --git a/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart b/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart index 621da41..64f387c 100644 --- a/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart +++ b/pkg/analysis_server/tool/spec/codegen_dart_protocol.dart
@@ -504,7 +504,7 @@ writeln(); } writeln('@override'); - writeln('String toString() => JSON.encode(toJson());'); + writeln('String toString() => json.encode(toJson());'); writeln(); emitObjectEqualsMember(type, className); writeln(); @@ -1110,7 +1110,7 @@ * Create a string literal that evaluates to [s]. */ String literalString(String s) { - return JSON.encode(s); + return json.encode(s); } /**
diff --git a/pkg/analysis_server/tool/spec/codegen_inttest_methods.dart b/pkg/analysis_server/tool/spec/codegen_inttest_methods.dart index 06b26e6..d7e9064 100644 --- a/pkg/analysis_server/tool/spec/codegen_inttest_methods.dart +++ b/pkg/analysis_server/tool/spec/codegen_inttest_methods.dart
@@ -183,7 +183,7 @@ writeln('$streamName = _$streamName.stream.asBroadcastStream();'); })); notificationSwitchContents.add(collectCode(() { - writeln('case ${JSON.encode(notification.longEvent)}:'); + writeln('case ${json.encode(notification.longEvent)}:'); indent(() { String paramsValidator = camelJoin( ['is', notification.domainName, notification.event, 'params']); @@ -256,7 +256,7 @@ args.addAll(optionalArgs); writeln('var params = new $requestClass(${args.join(', ')}).toJson();'); } - String methodJson = JSON.encode(request.longMethod); + String methodJson = json.encode(request.longMethod); writeln('var result = await server.send($methodJson, $paramsVar);'); if (request.result != null) { String kind = 'null';
diff --git a/pkg/analysis_server/tool/spec/codegen_matchers.dart b/pkg/analysis_server/tool/spec/codegen_matchers.dart index a321ba0..9b194ae 100644 --- a/pkg/analysis_server/tool/spec/codegen_matchers.dart +++ b/pkg/analysis_server/tool/spec/codegen_matchers.dart
@@ -82,9 +82,9 @@ if (commaNeeded) { writeln(','); } - write('${JSON.encode(field.name)}: '); + write('${json.encode(field.name)}: '); if (field.value != null) { - write('equals(${JSON.encode(field.value)})'); + write('equals(${json.encode(field.value)})'); } else { visitTypeDecl(field.type); } @@ -116,14 +116,14 @@ @override visitTypeEnum(TypeEnum typeEnum) { - writeln('new MatchesEnum(${JSON.encode(context)}, ['); + writeln('new MatchesEnum(${json.encode(context)}, ['); indent(() { bool commaNeeded = false; for (TypeEnumValue value in typeEnum.values) { if (commaNeeded) { writeln(','); } - write('${JSON.encode(value.value)}'); + write('${json.encode(value.value)}'); commaNeeded = true; } writeln(); @@ -151,7 +151,7 @@ void visitTypeObject(TypeObject typeObject) { writeln('new LazyMatcher(() => new MatchesJsonObject('); indent(() { - write('${JSON.encode(context)}, '); + write('${json.encode(context)}, '); Iterable<TypeObjectField> requiredFields = typeObject.fields.where((TypeObjectField field) => !field.optional); outputObjectFields(requiredFields);
diff --git a/pkg/analysis_server/tool/spec/generated/java/AnalysisServer.java b/pkg/analysis_server/tool/spec/generated/java/AnalysisServer.java index f1f2401..e551044 100644 --- a/pkg/analysis_server/tool/spec/generated/java/AnalysisServer.java +++ b/pkg/analysis_server/tool/spec/generated/java/AnalysisServer.java
@@ -734,12 +734,14 @@ * * Return top-level and class member declarations. * + * @param file If this field is provided, return only declarations in this file. If this field is + * missing, return declarations in all files. * @param pattern The regular expression used to match the names of declarations. If this field is * missing, return all declarations. * @param maxResults The maximum number of declarations to return. If this field is missing, return * all matching declarations. */ - public void search_getElementDeclarations(String pattern, int maxResults, GetElementDeclarationsConsumer consumer); + public void search_getElementDeclarations(String file, String pattern, int maxResults, GetElementDeclarationsConsumer consumer); /** * {@code search.getTypeHierarchy}
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/Outline.java b/pkg/analysis_server/tool/spec/generated/java/types/Outline.java index 11083d5..347dd18 100644 --- a/pkg/analysis_server/tool/spec/generated/java/types/Outline.java +++ b/pkg/analysis_server/tool/spec/generated/java/types/Outline.java
@@ -52,6 +52,17 @@ */ private int length; + /** + * The offset of the first character of the element code, which is neither documentation, nor + * annotation. + */ + private int codeOffset; + + /** + * The length of the element code. + */ + private int codeLength; + private final Outline parent; private List<Outline> children; @@ -59,11 +70,13 @@ /** * Constructor for {@link Outline}. */ - public Outline(Outline parent, Element element, int offset, int length) { + public Outline(Outline parent, Element element, int offset, int length, int codeOffset, int codeLength) { this.parent = parent; this.element = element; this.offset = offset; this.length = length; + this.codeOffset = codeOffset; + this.codeLength = codeLength; } public boolean containsInclusive(int x) { @@ -78,6 +91,8 @@ ObjectUtilities.equals(other.element, element) && other.offset == offset && other.length == length && + other.codeOffset == codeOffset && + other.codeLength == codeLength && ObjectUtilities.equals(other.children, children); } return false; @@ -111,13 +126,29 @@ } /** - * The children of the node. The field will be omitted if the node has no children. + * The children of the node. The field will be omitted if the node has no children. Children are + * sorted by offset. */ public List<Outline> getChildren() { return children; } /** + * The length of the element code. + */ + public int getCodeLength() { + return codeLength; + } + + /** + * The offset of the first character of the element code, which is neither documentation, nor + * annotation. + */ + public int getCodeOffset() { + return codeOffset; + } + + /** * A description of the element represented by this node. */ public Element getElement() { @@ -146,18 +177,36 @@ builder.append(element); builder.append(offset); builder.append(length); + builder.append(codeOffset); + builder.append(codeLength); builder.append(children); return builder.toHashCode(); } /** - * The children of the node. The field will be omitted if the node has no children. + * The children of the node. The field will be omitted if the node has no children. Children are + * sorted by offset. */ public void setChildren(List<Outline> children) { this.children = children; } /** + * The length of the element code. + */ + public void setCodeLength(int codeLength) { + this.codeLength = codeLength; + } + + /** + * The offset of the first character of the element code, which is neither documentation, nor + * annotation. + */ + public void setCodeOffset(int codeOffset) { + this.codeOffset = codeOffset; + } + + /** * A description of the element represented by this node. */ public void setElement(Element element) { @@ -190,6 +239,10 @@ builder.append(offset + ", "); builder.append("length="); builder.append(length + ", "); + builder.append("codeOffset="); + builder.append(codeOffset + ", "); + builder.append("codeLength="); + builder.append(codeLength + ", "); builder.append("children="); builder.append(StringUtils.join(children, ", ")); builder.append("]");
diff --git a/pkg/analysis_server/tool/spec/spec_input.html b/pkg/analysis_server/tool/spec/spec_input.html index 5be66ae..c0877a9 100644 --- a/pkg/analysis_server/tool/spec/spec_input.html +++ b/pkg/analysis_server/tool/spec/spec_input.html
@@ -7,7 +7,7 @@ <body> <h1>Analysis Server API Specification</h1> <h1 style="color:#999999">Version - <version>1.18.7</version> + <version>1.19.0</version> </h1> <p> This document contains a specification of the API provided by the @@ -1579,6 +1579,13 @@ Return top-level and class member declarations. </p> <params> + <field name="file" optional="true"> + <ref>FilePath</ref> + <p> + If this field is provided, return only declarations in this file. + If this field is missing, return declarations in all files. + </p> + </field> <field name="pattern" optional="true"> <ref>String</ref> <p>
diff --git a/pkg/analysis_server/tool/spec/to_html.dart b/pkg/analysis_server/tool/spec/to_html.dart index 82a93c7..2032b25 100644 --- a/pkg/analysis_server/tool/spec/to_html.dart +++ b/pkg/analysis_server/tool/spec/to_html.dart
@@ -679,7 +679,7 @@ write(typeObjectField.name); } if (typeObjectField.value != null) { - write(' = ${JSON.encode(typeObjectField.value)}'); + write(' = ${json.encode(typeObjectField.value)}'); } else { write(': '); TypeVisitor typeVisitor = new TypeVisitor(api, short: true); @@ -789,7 +789,7 @@ } write('": '); if (field.value != null) { - write(JSON.encode(field.value)); + write(json.encode(field.value)); } else { if (field.optional) { gray(() {
diff --git a/pkg/analysis_server_client/lib/analysis_server_client.dart b/pkg/analysis_server_client/lib/analysis_server_client.dart index 96286e4..484397b 100644 --- a/pkg/analysis_server_client/lib/analysis_server_client.dart +++ b/pkg/analysis_server_client/lib/analysis_server_client.dart
@@ -33,6 +33,12 @@ return _process.stdin.flush(); } + /// Force kill the server. Returns exit code future. + Future<int> kill() { + _process.kill(); + return _process.exitCode; + } + void listenToOutput({NotificationProcessor notificationProcessor}) { _process.stdout .transform((new Utf8Codec()).decoder) @@ -42,7 +48,7 @@ if (trimmedLine.startsWith('Observatory listening on ')) { return; } - final result = JSON.decoder.convert(trimmedLine) as Map; + final result = json.decoder.convert(trimmedLine) as Map; if (result.containsKey('id')) { final id = result['id'] as String; final completer = _pendingCommands.remove(id); @@ -78,16 +84,10 @@ } Completer completer = new Completer(); _pendingCommands[id] = completer; - String commandAsJson = JSON.encode(command); - _process.stdin.add(UTF8.encoder.convert('$commandAsJson\n')); + String commandAsJson = json.encode(command); + _process.stdin.add(utf8.encoder.convert('$commandAsJson\n')); return completer.future; } - - /// Force kill the server. Returns exit code future. - Future<int> kill() { - _process.kill(); - return _process.exitCode; - } } class ServerErrorMessage {
diff --git a/pkg/analysis_server_client/test/analysis_server_client_test.dart b/pkg/analysis_server_client/test/analysis_server_client_test.dart index 03c8ae1..8d4c806 100644 --- a/pkg/analysis_server_client/test/analysis_server_client_test.dart +++ b/pkg/analysis_server_client/test/analysis_server_client_test.dart
@@ -62,15 +62,6 @@ }); } -Stream<List<int>> _goodMessage() async* { - yield UTF8.encoder.convert('Observatory listening on foo bar\n'); - final sampleJson = { - 'id': '0', - 'result': {'foo': 'bar'} - }; - yield UTF8.encoder.convert(JSON.encode(sampleJson)); -} - final _badErrorMessage = { 'code': 'someErrorCode', 'message': 'something went wrong', @@ -78,18 +69,27 @@ }; Stream<List<int>> _badMessage() async* { - yield UTF8.encoder.convert('Observatory listening on foo bar\n'); + yield utf8.encoder.convert('Observatory listening on foo bar\n'); final sampleJson = {'id': '0', 'error': _badErrorMessage}; - yield UTF8.encoder.convert(JSON.encode(sampleJson)); + yield utf8.encoder.convert(json.encode(sampleJson)); } Stream<List<int>> _eventMessage() async* { - yield UTF8.encoder.convert('Observatory listening on foo bar\n'); + yield utf8.encoder.convert('Observatory listening on foo bar\n'); final sampleJson = { 'event': 'fooEvent', 'params': {'foo': 'bar', 'baz': 'bang'} }; - yield UTF8.encoder.convert(JSON.encode(sampleJson)); + yield utf8.encoder.convert(json.encode(sampleJson)); +} + +Stream<List<int>> _goodMessage() async* { + yield utf8.encoder.convert('Observatory listening on foo bar\n'); + final sampleJson = { + 'id': '0', + 'result': {'foo': 'bar'} + }; + yield utf8.encoder.convert(json.encode(sampleJson)); } class MockProcess extends Mock implements Process {}
diff --git a/pkg/analyzer/lib/file_system/memory_file_system.dart b/pkg/analyzer/lib/file_system/memory_file_system.dart index d91dbd3..07493b9 100644 --- a/pkg/analyzer/lib/file_system/memory_file_system.dart +++ b/pkg/analyzer/lib/file_system/memory_file_system.dart
@@ -134,7 +134,7 @@ void modifyFile(String path, String content) { _checkFileAtPath(path); - _pathToBytes[path] = UTF8.encode(content); + _pathToBytes[path] = utf8.encode(content); _pathToTimestamp[path] = nextStamp++; _notifyWatchers(path, ChangeType.MODIFY); } @@ -156,7 +156,7 @@ File newFile(String path, String content, [int stamp]) { path = pathContext.normalize(path); _MemoryFile file = _newFile(path); - _pathToBytes[path] = UTF8.encode(content); + _pathToBytes[path] = utf8.encode(content); _pathToTimestamp[path] = stamp ?? nextStamp++; _notifyWatchers(path, ChangeType.ADD); return file; @@ -224,7 +224,7 @@ newFolder(pathContext.dirname(path)); _MemoryFile file = new _MemoryFile(this, path); _pathToResource[path] = file; - _pathToBytes[path] = UTF8.encode(content); + _pathToBytes[path] = utf8.encode(content); _pathToTimestamp[path] = stamp ?? nextStamp++; _notifyWatchers(path, ChangeType.MODIFY); return file; @@ -439,7 +439,7 @@ if (content == null) { throw new FileSystemException(path, 'File "$path" does not exist.'); } - return UTF8.decode(content); + return utf8.decode(content); } @override @@ -457,7 +457,7 @@ @override void writeAsStringSync(String content) { - _provider._setFileContent(this, UTF8.encode(content)); + _provider._setFileContent(this, utf8.encode(content)); } }
diff --git a/pkg/analyzer/lib/instrumentation/instrumentation.dart b/pkg/analyzer/lib/instrumentation/instrumentation.dart index f0337cf..27d0c1a 100644 --- a/pkg/analyzer/lib/instrumentation/instrumentation.dart +++ b/pkg/analyzer/lib/instrumentation/instrumentation.dart
@@ -315,8 +315,8 @@ TAG_SUBPROCESS_RESULT, subprocessId.toString(), exitCode.toString(), - JSON.encode(stdout), - JSON.encode(stderr) + json.encode(stdout), + json.encode(stderr) ])); } } @@ -335,7 +335,7 @@ subprocessId.toString(), executablePath, workingDirectory, - JSON.encode(arguments) + json.encode(arguments) ])); } return subprocessId;
diff --git a/pkg/analyzer/lib/source/pub_package_map_provider.dart b/pkg/analyzer/lib/source/pub_package_map_provider.dart index 3b2d731..26436d9 100644 --- a/pkg/analyzer/lib/source/pub_package_map_provider.dart +++ b/pkg/analyzer/lib/source/pub_package_map_provider.dart
@@ -85,7 +85,7 @@ } try { PackageMapInfo packageMap = - parsePackageMap(JSON.decode(result.stdout), folder); + parsePackageMap(json.decode(result.stdout), folder); return packageMap; } catch (exception, stackTrace) { AnalysisEngine.instance.logger.logError(
diff --git a/pkg/analyzer/lib/source/sdk_ext.dart b/pkg/analyzer/lib/source/sdk_ext.dart index 70682eb..a1ea2b3 100644 --- a/pkg/analyzer/lib/source/sdk_ext.dart +++ b/pkg/analyzer/lib/source/sdk_ext.dart
@@ -146,7 +146,7 @@ void _processSdkExt(String sdkExtJSON, Folder libDir) { var sdkExt; try { - sdkExt = JSON.decode(sdkExtJSON); + sdkExt = json.decode(sdkExtJSON); } catch (e) { return; }
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart index 323ff7ff..89ba18c 100644 --- a/pkg/analyzer/lib/src/dart/analysis/driver.dart +++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -1901,7 +1901,7 @@ if (times == 0) { return new Future.value(); } - return new Future.delayed(Duration.ZERO, () => _pumpEventQueue(times - 1)); + return new Future.delayed(Duration.zero, () => _pumpEventQueue(times - 1)); } }
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_state.dart b/pkg/analyzer/lib/src/dart/analysis/file_state.dart index 0bb7bbe..c8519de 100644 --- a/pkg/analyzer/lib/src/dart/analysis/file_state.dart +++ b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
@@ -428,7 +428,7 @@ } // Compute the content hash. - List<int> contentBytes = UTF8.encode(_content); + List<int> contentBytes = utf8.encode(_content); { List<int> hashBytes = md5.convert(contentBytes).bytes; _contentHash = hex.encode(hashBytes);
diff --git a/pkg/analyzer/lib/src/dart/analysis/frontend_resolution.dart b/pkg/analyzer/lib/src/dart/analysis/frontend_resolution.dart index bd156df..88bdde6 100644 --- a/pkg/analyzer/lib/src/dart/analysis/frontend_resolution.dart +++ b/pkg/analyzer/lib/src/dart/analysis/frontend_resolution.dart
@@ -494,7 +494,7 @@ @override Future<List<int>> readAsBytes() async { // TODO(scheglov) Optimize. - return UTF8.encode(file.content); + return utf8.encode(file.content); } @override
diff --git a/pkg/analyzer/lib/src/dart/analysis/kernel_metadata.dart b/pkg/analyzer/lib/src/dart/analysis/kernel_metadata.dart index a68d5aa..9ec5360 100644 --- a/pkg/analyzer/lib/src/dart/analysis/kernel_metadata.dart +++ b/pkg/analyzer/lib/src/dart/analysis/kernel_metadata.dart
@@ -104,7 +104,7 @@ int flag = source.readByte(); if (flag == 1) { List<int> bytes = source.readByteList(); - return UTF8.decode(bytes); + return utf8.decode(bytes); } else { return null; } @@ -119,7 +119,7 @@ void _writeOptionalString(kernel.BinarySink sink, String str) { if (str != null) { sink.writeByte(1); - List<int> bytes = UTF8.encode(str); + List<int> bytes = utf8.encode(str); sink.writeByteList(bytes); } else { sink.writeByte(0);
diff --git a/pkg/analyzer/lib/src/dart/analysis/search.dart b/pkg/analyzer/lib/src/dart/analysis/search.dart index 6b8d5e3..00b550c 100644 --- a/pkg/analyzer/lib/src/dart/analysis/search.dart +++ b/pkg/analyzer/lib/src/dart/analysis/search.dart
@@ -118,7 +118,8 @@ * we just want reduce amount of data, not to make it absolute minimum. */ Future<List<Declaration>> declarations( - RegExp regExp, int maxResults, List<String> files) async { + RegExp regExp, int maxResults, List<String> files, + {String onlyForFile}) async { List<Declaration> declarations = <Declaration>[]; UnlinkedUnit unlinkedUnit; @@ -179,6 +180,10 @@ try { for (String path in _driver.addedFiles) { + if (onlyForFile != null && path != onlyForFile) { + continue; + } + FileState file = _driver.fsState.getFileForPath(path); int fileIndex;
diff --git a/pkg/analyzer/lib/src/dart/sdk/sdk.dart b/pkg/analyzer/lib/src/dart/sdk/sdk.dart index cfed575..eefc1fa 100644 --- a/pkg/analyzer/lib/src/dart/sdk/sdk.dart +++ b/pkg/analyzer/lib/src/dart/sdk/sdk.dart
@@ -797,7 +797,7 @@ void _processSdkExt(String sdkExtJSON, Folder libDir) { var sdkExt; try { - sdkExt = JSON.decode(sdkExtJSON); + sdkExt = json.decode(sdkExtJSON); } catch (e) { return; }
diff --git a/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart b/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart index 543f95c..06ce559 100644 --- a/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart +++ b/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
@@ -667,21 +667,21 @@ ]; ConstFieldElementImpl varINFINITY = ElementFactory.fieldElement( "INFINITY", true, false, true, _doubleType, - initializer: AstTestFactory.doubleLiteral(double.INFINITY)); + initializer: AstTestFactory.doubleLiteral(double.infinity)); varINFINITY.constantInitializer = AstTestFactory.binaryExpression( AstTestFactory.integer(1), TokenType.SLASH, AstTestFactory.integer(0)); List<FieldElement> fields = <FieldElement>[ ElementFactory.fieldElement("NAN", true, false, true, _doubleType, - initializer: AstTestFactory.doubleLiteral(double.NAN)), + initializer: AstTestFactory.doubleLiteral(double.nan)), varINFINITY, ElementFactory.fieldElement( "NEGATIVE_INFINITY", true, false, true, _doubleType, - initializer: AstTestFactory.doubleLiteral(double.NEGATIVE_INFINITY)), + initializer: AstTestFactory.doubleLiteral(double.negativeInfinity)), ElementFactory.fieldElement( "MIN_POSITIVE", true, false, true, _doubleType, - initializer: AstTestFactory.doubleLiteral(double.MIN_POSITIVE)), + initializer: AstTestFactory.doubleLiteral(double.minPositive)), ElementFactory.fieldElement("MAX_FINITE", true, false, true, _doubleType, - initializer: AstTestFactory.doubleLiteral(double.MAX_FINITE)) + initializer: AstTestFactory.doubleLiteral(double.maxFinite)) ]; doubleElement.fields = fields; int fieldCount = fields.length;
diff --git a/pkg/analyzer/lib/src/summary/format.dart b/pkg/analyzer/lib/src/summary/format.dart index 5d981ba..fdf5e48 100644 --- a/pkg/analyzer/lib/src/summary/format.dart +++ b/pkg/analyzer/lib/src/summary/format.dart
@@ -402,7 +402,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class AnalysisDriverExceptionFileBuilder extends Object @@ -519,7 +519,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class AnalysisDriverResolvedUnitBuilder extends Object @@ -666,7 +666,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class AnalysisDriverSubtypeBuilder extends Object @@ -832,7 +832,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class AnalysisDriverUnitErrorBuilder extends Object @@ -1034,7 +1034,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class AnalysisDriverUnitIndexBuilder extends Object @@ -1899,7 +1899,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class AnalysisDriverUnlinkedUnitBuilder extends Object @@ -2168,7 +2168,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class CodeRangeBuilder extends Object @@ -2276,7 +2276,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class EntityRefBuilder extends Object @@ -2740,7 +2740,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class LinkedDependencyBuilder extends Object @@ -2864,7 +2864,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class LinkedExportNameBuilder extends Object @@ -3034,7 +3034,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class LinkedLibraryBuilder extends Object @@ -3373,7 +3373,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class LinkedReferenceBuilder extends Object @@ -3630,7 +3630,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class LinkedUnitBuilder extends Object @@ -3909,7 +3909,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class PackageBundleBuilder extends Object @@ -4303,7 +4303,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class PackageDependencyInfoBuilder extends Object @@ -4528,7 +4528,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class PackageIndexBuilder extends Object @@ -4985,7 +4985,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class TopLevelInferenceErrorBuilder extends Object @@ -5138,7 +5138,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class UnitIndexBuilder extends Object @@ -5730,7 +5730,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class UnlinkedClassBuilder extends Object @@ -6282,7 +6282,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class UnlinkedCombinatorBuilder extends Object @@ -6471,7 +6471,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class UnlinkedConfigurationBuilder extends Object @@ -6618,7 +6618,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class UnlinkedConstructorInitializerBuilder extends Object @@ -6861,7 +6861,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class UnlinkedDocumentationCommentBuilder extends Object @@ -6967,7 +6967,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class UnlinkedEnumBuilder extends Object @@ -7232,7 +7232,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class UnlinkedEnumValueBuilder extends Object @@ -7380,7 +7380,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class UnlinkedExecutableBuilder extends Object @@ -8369,7 +8369,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class UnlinkedExportNonPublicBuilder extends Object @@ -8555,7 +8555,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class UnlinkedExportPublicBuilder extends Object @@ -8732,7 +8732,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class UnlinkedExprBuilder extends Object @@ -9073,7 +9073,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class UnlinkedImportBuilder extends Object @@ -9488,7 +9488,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class UnlinkedParamBuilder extends Object @@ -10089,7 +10089,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class UnlinkedPartBuilder extends Object @@ -10244,7 +10244,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class UnlinkedPublicNameBuilder extends Object @@ -10438,7 +10438,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class UnlinkedPublicNamespaceBuilder extends Object @@ -10635,7 +10635,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class UnlinkedReferenceBuilder extends Object @@ -10754,7 +10754,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class UnlinkedTypedefBuilder extends Object @@ -11126,7 +11126,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class UnlinkedTypeParamBuilder extends Object @@ -11347,7 +11347,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class UnlinkedUnitBuilder extends Object @@ -12150,7 +12150,7 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); } class UnlinkedVariableBuilder extends Object @@ -12662,5 +12662,5 @@ }; @override - String toString() => convert.JSON.encode(toJson()); + String toString() => convert.json.encode(toJson()); }
diff --git a/pkg/analyzer/lib/src/summary/summarize_elements.dart b/pkg/analyzer/lib/src/summary/summarize_elements.dart index 169e3af..9f5e609 100644 --- a/pkg/analyzer/lib/src/summary/summarize_elements.dart +++ b/pkg/analyzer/lib/src/summary/summarize_elements.dart
@@ -101,6 +101,6 @@ * Compute a hash of the given file contents. */ String _hash(String contents) { - return hex.encode(md5.convert(UTF8.encode(contents)).bytes); + return hex.encode(md5.convert(utf8.encode(contents)).bytes); } }
diff --git a/pkg/analyzer/test/file_system/memory_file_system_test.dart b/pkg/analyzer/test/file_system/memory_file_system_test.dart index 205f1c1..ceca3d4 100644 --- a/pkg/analyzer/test/file_system/memory_file_system_test.dart +++ b/pkg/analyzer/test/file_system/memory_file_system_test.dart
@@ -872,7 +872,7 @@ } Future _delayed(computation()) { - return new Future.delayed(Duration.ZERO, computation); + return new Future.delayed(Duration.zero, computation); } _watchingFolder(String path, test(List<WatchEvent> changesReceived)) {
diff --git a/pkg/analyzer/test/generated/source_factory_test.dart b/pkg/analyzer/test/generated/source_factory_test.dart index 78c9c9d..eda1c21 100644 --- a/pkg/analyzer/test/generated/source_factory_test.dart +++ b/pkg/analyzer/test/generated/source_factory_test.dart
@@ -44,7 +44,7 @@ ]; Packages createPackageMap(Uri base, String configFileContents) { - List<int> bytes = UTF8.encode(configFileContents); + List<int> bytes = utf8.encode(configFileContents); Map<String, Uri> map = pkgfile.parse(bytes, base); return new MapPackages(map); }
diff --git a/pkg/analyzer/test/src/dart/analysis/driver_test.dart b/pkg/analyzer/test/src/dart/analysis/driver_test.dart index d258087..bb2cba2 100644 --- a/pkg/analyzer/test/src/dart/analysis/driver_test.dart +++ b/pkg/analyzer/test/src/dart/analysis/driver_test.dart
@@ -60,7 +60,7 @@ // Future.value or Future() constructors use scheduleMicrotask themselves and // would therefore not wait for microtask callbacks that are scheduled after // invoking this method. - return new Future.delayed(Duration.ZERO, () => pumpEventQueue(times - 1)); + return new Future.delayed(Duration.zero, () => pumpEventQueue(times - 1)); } /**
diff --git a/pkg/analyzer/test/src/dart/analysis/file_state_test.dart b/pkg/analyzer/test/src/dart/analysis/file_state_test.dart index bda6454..11815d5 100644 --- a/pkg/analyzer/test/src/dart/analysis/file_state_test.dart +++ b/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
@@ -788,7 +788,7 @@ String _p(String path) => provider.convertPath(path); static String _md5(String content) { - return hex.encode(md5.convert(UTF8.encode(content)).bytes); + return hex.encode(md5.convert(utf8.encode(content)).bytes); } }
diff --git a/pkg/analyzer/test/src/dart/analysis/search_test.dart b/pkg/analyzer/test/src/dart/analysis/search_test.dart index d2a4e23..933ade7 100644 --- a/pkg/analyzer/test/src/dart/analysis/search_test.dart +++ b/pkg/analyzer/test/src/dart/analysis/search_test.dart
@@ -157,20 +157,23 @@ expect(declarations, hasLength(2)); } - test_declarations_regExp() async { - await _resolveTestUnit(''' -class A {} -class B {} -class C {} -class D {} -'''); + test_declarations_onlyForFile() async { + var a = _p('/test/lib/a.dart'); + var b = _p('/test/lib/b.dart'); + provider.newFile(a, 'class A {}'); + provider.newFile(b, 'class B {}'); + + driver.addFile(a); + driver.addFile(b); + var files = <String>[]; List<Declaration> declarations = - await driver.search.declarations(new RegExp(r'[A-C]'), null, files); - _assertHasDeclaration(declarations, 'A', DeclarationKind.CLASS); + await driver.search.declarations(null, null, files, onlyForFile: b); + + expect(files, [b]); + + _assertNoDeclaration(declarations, 'A'); _assertHasDeclaration(declarations, 'B', DeclarationKind.CLASS); - _assertHasDeclaration(declarations, 'C', DeclarationKind.CLASS); - _assertNoDeclaration(declarations, 'D'); } test_declarations_parameters() async { @@ -211,6 +214,22 @@ expect(declaration.parameters, '(int a)'); } + test_declarations_regExp() async { + await _resolveTestUnit(''' +class A {} +class B {} +class C {} +class D {} +'''); + var files = <String>[]; + List<Declaration> declarations = + await driver.search.declarations(new RegExp(r'[A-C]'), null, files); + _assertHasDeclaration(declarations, 'A', DeclarationKind.CLASS); + _assertHasDeclaration(declarations, 'B', DeclarationKind.CLASS); + _assertHasDeclaration(declarations, 'C', DeclarationKind.CLASS); + _assertNoDeclaration(declarations, 'D'); + } + test_declarations_top() async { await _resolveTestUnit(''' int get g => 0;
diff --git a/pkg/analyzer/tool/summary/dump_inferred_types.dart b/pkg/analyzer/tool/summary/dump_inferred_types.dart index 676ecd6..2107faa 100644 --- a/pkg/analyzer/tool/summary/dump_inferred_types.dart +++ b/pkg/analyzer/tool/summary/dump_inferred_types.dart
@@ -166,7 +166,7 @@ String formatParam(UnlinkedParam param) { if (param.isFunctionTyped) { // TODO(paulberry): fix this case. - return 'BAD(${JSON.encode(param)})'; + return 'BAD(${json.encode(param)})'; } String result; if (param.type != null) {
diff --git a/pkg/analyzer/tool/summary/generate.dart b/pkg/analyzer/tool/summary/generate.dart index afa5205..0fc27f1 100644 --- a/pkg/analyzer/tool/summary/generate.dart +++ b/pkg/analyzer/tool/summary/generate.dart
@@ -521,7 +521,7 @@ * Enclose [s] in quotes, escaping as necessary. */ String quoted(String s) { - return JSON.encode(s); + return json.encode(s); } void _generateBuilder(idlModel.ClassDeclaration cls) { @@ -915,7 +915,7 @@ out(); // Write toString(). out('@override'); - out('String toString() => convert.JSON.encode(toJson());'); + out('String toString() => convert.json.encode(toJson());'); }); out('}'); }
diff --git a/pkg/analyzer/tool/summary/inspect.dart b/pkg/analyzer/tool/summary/inspect.dart index c5adc30..e1daf10 100644 --- a/pkg/analyzer/tool/summary/inspect.dart +++ b/pkg/analyzer/tool/summary/inspect.dart
@@ -211,7 +211,7 @@ } return new DecodedEntity.group('[', parts, ']', false); } else if (obj is String) { - return new DecodedEntity.short(JSON.encode(obj)); + return new DecodedEntity.short(json.encode(obj)); } else if (isEnum(obj)) { return new DecodedEntity.short(obj.toString().split('.')[1]); } else if (obj is int && @@ -243,7 +243,7 @@ new UnitWrapper(linked.units[0], unlinked[0]); for (int i = 1; i < linked.units.length; i++) { String partUri = unlinked[0].publicNamespace.parts[i - 1]; - result['part ${JSON.encode(partUri)}'] = + result['part ${json.encode(partUri)}'] = new UnitWrapper(linked.units[i], unlinked[i]); } return decodeMap(result); @@ -324,14 +324,14 @@ libraryUnits.add(units[partUriString]); seenUnits.add(partUriString); } - result['library ${JSON.encode(libraryUriString)}'] = + result['library ${json.encode(libraryUriString)}'] = new LibraryWrapper(linkedLibrary, libraryUnits); } for (String uriString in units.keys) { if (seenUnits.contains(uriString)) { continue; } - result['orphan unit ${JSON.encode(uriString)}'] = + result['orphan unit ${json.encode(uriString)}'] = new UnitWrapper(null, units[uriString]); } restOfMap.remove('linkedLibraries');
diff --git a/pkg/analyzer_cli/lib/src/batch_mode.dart b/pkg/analyzer_cli/lib/src/batch_mode.dart index 40037cb..0bd9d6f 100644 --- a/pkg/analyzer_cli/lib/src/batch_mode.dart +++ b/pkg/analyzer_cli/lib/src/batch_mode.dart
@@ -30,7 +30,7 @@ ErrorSeverity batchResult = ErrorSeverity.NONE; // Read line from stdin. Stream<String> cmdLine = - stdin.transform(UTF8.decoder).transform(new LineSplitter()); + stdin.transform(utf8.decoder).transform(new LineSplitter()); cmdLine.listen((String line) async { // Maybe finish. if (line.isEmpty) {
diff --git a/pkg/analyzer_cli/test/perf_report_test.dart b/pkg/analyzer_cli/test/perf_report_test.dart index 313328d..71ba735 100644 --- a/pkg/analyzer_cli/test/perf_report_test.dart +++ b/pkg/analyzer_cli/test/perf_report_test.dart
@@ -4,7 +4,7 @@ library analyzer_cli.test.perf_report; -import 'dart:convert' show JSON; +import 'dart:convert' show json; import 'package:analyzer_cli/src/error_formatter.dart' show AnalysisStats; import 'package:analyzer_cli/src/options.dart'; @@ -16,8 +16,8 @@ var options = CommandLineOptions.parse(["somefile.dart"]); var encoded = makePerfReport(1000, 1234, options, 0, new AnalysisStats()); - var json = JSON.decode(encoded); - expect(json['totalElapsedTime'], 234); - expect(json['options']['sourceFiles'], ["somefile.dart"]); + var jsonData = json.decode(encoded); + expect(jsonData['totalElapsedTime'], 234); + expect(jsonData['options']['sourceFiles'], ["somefile.dart"]); }); }
diff --git a/pkg/analyzer_plugin/doc/api.html b/pkg/analyzer_plugin/doc/api.html index 8c92a60..a87463f 100644 --- a/pkg/analyzer_plugin/doc/api.html +++ b/pkg/analyzer_plugin/doc/api.html
@@ -1729,11 +1729,22 @@ <p> The length of the element. </p> + </dd><dt class="field"><b>codeOffset: int</b></dt><dd> + + <p> + The offset of the first character of the element code, which is + neither documentation, nor annotation. + </p> + </dd><dt class="field"><b>codeLength: int</b></dt><dd> + + <p> + The length of the element code. + </p> </dd><dt class="field"><b>children: List<<a href="#type_Outline">Outline</a>><span style="color:#999999"> (optional)</span></b></dt><dd> <p> The children of the node. The field will be omitted if the node has no - children. + children. Children are sorted by offset. </p> </dd></dl></dd><dt class="typeDefinition"><a name="type_Position">Position: object</a></dt><dd> <p>
diff --git a/pkg/analyzer_plugin/lib/protocol/protocol_common.dart b/pkg/analyzer_plugin/lib/protocol/protocol_common.dart index cb24ea5..fa6e4fc 100644 --- a/pkg/analyzer_plugin/lib/protocol/protocol_common.dart +++ b/pkg/analyzer_plugin/lib/protocol/protocol_common.dart
@@ -73,7 +73,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -317,7 +317,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -570,7 +570,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -1256,7 +1256,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -1725,7 +1725,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -2139,7 +2139,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -2265,7 +2265,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -3138,7 +3138,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -3328,7 +3328,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -3491,7 +3491,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -3595,7 +3595,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -3840,7 +3840,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -3974,7 +3974,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -4183,7 +4183,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -4316,7 +4316,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -4345,6 +4345,8 @@ * "element": Element * "offset": int * "length": int + * "codeOffset": int + * "codeLength": int * "children": optional List<Outline> * } * @@ -4357,6 +4359,10 @@ int _length; + int _codeOffset; + + int _codeLength; + List<Outline> _children; /** @@ -4405,23 +4411,55 @@ } /** + * The offset of the first character of the element code, which is neither + * documentation, nor annotation. + */ + int get codeOffset => _codeOffset; + + /** + * The offset of the first character of the element code, which is neither + * documentation, nor annotation. + */ + void set codeOffset(int value) { + assert(value != null); + this._codeOffset = value; + } + + /** + * The length of the element code. + */ + int get codeLength => _codeLength; + + /** + * The length of the element code. + */ + void set codeLength(int value) { + assert(value != null); + this._codeLength = value; + } + + /** * The children of the node. The field will be omitted if the node has no - * children. + * children. Children are sorted by offset. */ List<Outline> get children => _children; /** * The children of the node. The field will be omitted if the node has no - * children. + * children. Children are sorted by offset. */ void set children(List<Outline> value) { this._children = value; } - Outline(Element element, int offset, int length, {List<Outline> children}) { + Outline( + Element element, int offset, int length, int codeOffset, int codeLength, + {List<Outline> children}) { this.element = element; this.offset = offset; this.length = length; + this.codeOffset = codeOffset; + this.codeLength = codeLength; this.children = children; } @@ -4450,6 +4488,20 @@ } else { throw jsonDecoder.mismatch(jsonPath, "length"); } + int codeOffset; + if (json.containsKey("codeOffset")) { + codeOffset = + jsonDecoder.decodeInt(jsonPath + ".codeOffset", json["codeOffset"]); + } else { + throw jsonDecoder.mismatch(jsonPath, "codeOffset"); + } + int codeLength; + if (json.containsKey("codeLength")) { + codeLength = + jsonDecoder.decodeInt(jsonPath + ".codeLength", json["codeLength"]); + } else { + throw jsonDecoder.mismatch(jsonPath, "codeLength"); + } List<Outline> children; if (json.containsKey("children")) { children = jsonDecoder.decodeList( @@ -4458,7 +4510,8 @@ (String jsonPath, Object json) => new Outline.fromJson(jsonDecoder, jsonPath, json)); } - return new Outline(element, offset, length, children: children); + return new Outline(element, offset, length, codeOffset, codeLength, + children: children); } else { throw jsonDecoder.mismatch(jsonPath, "Outline", json); } @@ -4470,6 +4523,8 @@ result["element"] = element.toJson(); result["offset"] = offset; result["length"] = length; + result["codeOffset"] = codeOffset; + result["codeLength"] = codeLength; if (children != null) { result["children"] = children.map((Outline value) => value.toJson()).toList(); @@ -4478,7 +4533,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -4486,6 +4541,8 @@ return element == other.element && offset == other.offset && length == other.length && + codeOffset == other.codeOffset && + codeLength == other.codeLength && listEqual(children, other.children, (Outline a, Outline b) => a == b); } return false; @@ -4497,6 +4554,8 @@ hash = JenkinsSmiHash.combine(hash, element.hashCode); hash = JenkinsSmiHash.combine(hash, offset.hashCode); hash = JenkinsSmiHash.combine(hash, length.hashCode); + hash = JenkinsSmiHash.combine(hash, codeOffset.hashCode); + hash = JenkinsSmiHash.combine(hash, codeLength.hashCode); hash = JenkinsSmiHash.combine(hash, children.hashCode); return JenkinsSmiHash.finish(hash); } @@ -4581,7 +4640,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -4867,7 +4926,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -5066,7 +5125,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -5223,7 +5282,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -5448,7 +5507,7 @@ SourceFileEdit getFileEdit(String file) => getChangeFileEdit(this, file); @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -5634,7 +5693,7 @@ String apply(String code) => applyEdit(code, this); @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -5788,7 +5847,7 @@ void addAll(Iterable<SourceEdit> edits) => addAllEditsForSource(this, edits); @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) {
diff --git a/pkg/analyzer_plugin/lib/protocol/protocol_generated.dart b/pkg/analyzer_plugin/lib/protocol/protocol_generated.dart index e6cb08a..421beca 100644 --- a/pkg/analyzer_plugin/lib/protocol/protocol_generated.dart +++ b/pkg/analyzer_plugin/lib/protocol/protocol_generated.dart
@@ -104,7 +104,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -218,7 +218,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -332,7 +332,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -471,7 +471,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -625,7 +625,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -720,7 +720,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -860,7 +860,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -1033,7 +1033,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -1153,7 +1153,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -1266,7 +1266,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -1433,7 +1433,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -1547,7 +1547,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -1668,7 +1668,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -1799,7 +1799,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -1935,7 +1935,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -2097,7 +2097,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -2230,7 +2230,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -2449,7 +2449,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -2544,7 +2544,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -2677,7 +2677,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -2782,7 +2782,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -2890,7 +2890,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -2981,7 +2981,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -3203,7 +3203,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -3478,7 +3478,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -3686,7 +3686,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -3807,7 +3807,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -4084,7 +4084,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -4313,7 +4313,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -4424,7 +4424,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -4575,7 +4575,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -4688,7 +4688,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -4775,7 +4775,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -4897,7 +4897,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -5000,7 +5000,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -5141,7 +5141,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -5342,7 +5342,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -5552,7 +5552,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -5662,7 +5662,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -5705,7 +5705,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -5745,7 +5745,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -5894,7 +5894,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -5980,7 +5980,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -6105,7 +6105,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) { @@ -6300,7 +6300,7 @@ } @override - String toString() => JSON.encode(toJson()); + String toString() => json.encode(toJson()); @override bool operator ==(other) {
diff --git a/pkg/analyzer_plugin/lib/src/channel/isolate_channel.dart b/pkg/analyzer_plugin/lib/src/channel/isolate_channel.dart index fdf6190..1c2fad7 100644 --- a/pkg/analyzer_plugin/lib/src/channel/isolate_channel.dart +++ b/pkg/analyzer_plugin/lib/src/channel/isolate_channel.dart
@@ -269,11 +269,11 @@ channelReady.complete(null); } else if (input is Map) { if (input.containsKey('id')) { - String encodedInput = JSON.encode(input); + String encodedInput = json.encode(input); instrumentationService.logPluginResponse(pluginId, encodedInput); onResponse(new Response.fromJson(input)); } else if (input.containsKey('event')) { - String encodedInput = JSON.encode(input); + String encodedInput = json.encode(input); instrumentationService.logPluginNotification(pluginId, encodedInput); onNotification(new Notification.fromJson(input)); } @@ -285,10 +285,10 @@ @override void sendRequest(Request request) { if (_sendPort != null) { - Map<String, Object> json = request.toJson(); - String encodedRequest = JSON.encode(json); + Map<String, Object> jsonData = request.toJson(); + String encodedRequest = json.encode(jsonData); instrumentationService.logPluginRequest(pluginId, encodedRequest); - _sendPort.send(json); + _sendPort.send(jsonData); } }
diff --git a/pkg/analyzer_plugin/lib/src/protocol/protocol_internal.dart b/pkg/analyzer_plugin/lib/src/protocol/protocol_internal.dart index 54a1efe..ba03cb8 100644 --- a/pkg/analyzer_plugin/lib/src/protocol/protocol_internal.dart +++ b/pkg/analyzer_plugin/lib/src/protocol/protocol_internal.dart
@@ -309,14 +309,14 @@ * Decode a JSON object that is expected to be a Map. [keyDecoder] is used * to decode the keys, and [valueDecoder] is used to decode the values. */ - Map<K, V> decodeMap<K, V>(String jsonPath, Object json, + Map<K, V> decodeMap<K, V>(String jsonPath, Object jsonData, {JsonDecoderCallback<K> keyDecoder, JsonDecoderCallback<V> valueDecoder}) { - if (json == null) { + if (jsonData == null) { return {}; - } else if (json is Map) { + } else if (jsonData is Map) { Map<K, V> result = <K, V>{}; - json.forEach((key, value) { + jsonData.forEach((key, value) { K decodedKey; if (keyDecoder != null) { decodedKey = keyDecoder('$jsonPath.key', key); @@ -324,13 +324,13 @@ decodedKey = key as K; } if (valueDecoder != null) { - value = valueDecoder('$jsonPath[${JSON.encode(key)}]', value); + value = valueDecoder('$jsonPath[${json.encode(key)}]', value); } result[decodedKey] = value as V; }); return result; } else { - throw mismatch(jsonPath, 'Map', json); + throw mismatch(jsonPath, 'Map', jsonData); } } @@ -351,21 +351,21 @@ * [decoders] is a map from each possible string in the field to the decoder * that should be used to decode the JSON object. */ - Object decodeUnion(String jsonPath, Map json, String field, + Object decodeUnion(String jsonPath, Map jsonData, String field, Map<String, JsonDecoderCallback> decoders) { - if (json is Map) { - if (!json.containsKey(field)) { + if (jsonData is Map) { + if (!jsonData.containsKey(field)) { throw missingKey(jsonPath, field); } - var disambiguatorPath = '$jsonPath[${JSON.encode(field)}]'; - String disambiguator = decodeString(disambiguatorPath, json[field]); + var disambiguatorPath = '$jsonPath[${json.encode(field)}]'; + String disambiguator = decodeString(disambiguatorPath, jsonData[field]); if (!decoders.containsKey(disambiguator)) { throw mismatch( - disambiguatorPath, 'One of: ${decoders.keys.toList()}', json); + disambiguatorPath, 'One of: ${decoders.keys.toList()}', jsonData); } - return decoders[disambiguator](jsonPath, json); + return decoders[disambiguator](jsonPath, jsonData); } else { - throw mismatch(jsonPath, 'Map', json); + throw mismatch(jsonPath, 'Map', jsonData); } } @@ -407,7 +407,7 @@ buffer.write(expected); if (actual != null) { buffer.write('; found "'); - buffer.write(JSON.encode(actual)); + buffer.write(json.encode(actual)); buffer.write('"'); } return new RequestFailure( @@ -417,7 +417,7 @@ @override dynamic missingKey(String jsonPath, String key) { return new RequestFailure(RequestErrorFactory.invalidParameter( - jsonPath, 'Expected to contain key ${JSON.encode(key)}')); + jsonPath, 'Expected to contain key ${json.encode(key)}')); } } @@ -446,7 +446,7 @@ buffer.write(expected); if (actual != null) { buffer.write(' found "'); - buffer.write(JSON.encode(actual)); + buffer.write(json.encode(actual)); buffer.write('"'); } buffer.write(' at ');
diff --git a/pkg/analyzer_plugin/lib/src/utilities/outline/outline.dart b/pkg/analyzer_plugin/lib/src/utilities/outline/outline.dart index 3329e16..fd0a457 100644 --- a/pkg/analyzer_plugin/lib/src/utilities/outline/outline.dart +++ b/pkg/analyzer_plugin/lib/src/utilities/outline/outline.dart
@@ -49,7 +49,7 @@ @override void startElement(Element element, int offset, int length) { - Outline outline = new Outline(element, offset, length); + Outline outline = new Outline(element, offset, length, offset, length); if (outlineStack.isEmpty) { outlines.add(outline); } else {
diff --git a/pkg/analyzer_plugin/test/integration/support/integration_tests.dart b/pkg/analyzer_plugin/test/integration/support/integration_tests.dart index 58003eb..0e58499 100644 --- a/pkg/analyzer_plugin/test/integration/support/integration_tests.dart +++ b/pkg/analyzer_plugin/test/integration/support/integration_tests.dart
@@ -542,7 +542,7 @@ _recordStdio('RECV: $trimmedLine'); var message; try { - message = JSON.decoder.convert(trimmedLine); + message = json.decoder.convert(trimmedLine); } catch (exception) { _badDataFromServer('JSON decode failure: $exception'); return; @@ -608,9 +608,9 @@ } Completer completer = new Completer(); _pendingCommands[id] = completer; - String line = JSON.encode(command); + String line = json.encode(command); _recordStdio('SEND: $line'); - _process.stdin.add(UTF8.encoder.convert("$line\n")); + _process.stdin.add(utf8.encoder.convert("$line\n")); return completer.future; }
diff --git a/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart b/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart index 62aebc6..960bce1 100644 --- a/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart +++ b/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart
@@ -670,12 +670,21 @@ * "element": Element * "offset": int * "length": int + * "codeOffset": int + * "codeLength": int * "children": optional List<Outline> * } */ -final Matcher isOutline = new LazyMatcher(() => new MatchesJsonObject( - "Outline", {"element": isElement, "offset": isInt, "length": isInt}, - optionalFields: {"children": isListOf(isOutline)})); +final Matcher isOutline = + new LazyMatcher(() => new MatchesJsonObject("Outline", { + "element": isElement, + "offset": isInt, + "length": isInt, + "codeOffset": isInt, + "codeLength": isInt + }, optionalFields: { + "children": isListOf(isOutline) + })); /** * Position
diff --git a/pkg/analyzer_plugin/test/src/channel/isolate_channel_test.dart b/pkg/analyzer_plugin/test/src/channel/isolate_channel_test.dart index b47369c..1f925d7 100644 --- a/pkg/analyzer_plugin/test/src/channel/isolate_channel_test.dart +++ b/pkg/analyzer_plugin/test/src/channel/isolate_channel_test.dart
@@ -86,7 +86,7 @@ // Future.value or Future() constructors use scheduleMicrotask themselves and // would therefore not wait for microtask callbacks that are scheduled after // invoking this method. - return new Future.delayed(Duration.ZERO, () => _pumpEventQueue(times - 1)); + return new Future.delayed(Duration.zero, () => _pumpEventQueue(times - 1)); } }
diff --git a/pkg/analyzer_plugin/test/utilities/completion/completion_contributor_util.dart b/pkg/analyzer_plugin/test/utilities/completion/completion_contributor_util.dart index 23f1fba..6bb494c 100644 --- a/pkg/analyzer_plugin/test/utilities/completion/completion_contributor_util.dart +++ b/pkg/analyzer_plugin/test/utilities/completion/completion_contributor_util.dart
@@ -551,7 +551,7 @@ // would therefore not wait for microtask callbacks that are scheduled after // invoking this method. return new Future.delayed( - Duration.ZERO, () => performAnalysis(times - 1, completer)); + Duration.zero, () => performAnalysis(times - 1, completer)); } void resolveSource(String path, String content) {
diff --git a/pkg/analyzer_plugin/tool/spec/codegen_dart_protocol.dart b/pkg/analyzer_plugin/tool/spec/codegen_dart_protocol.dart index 9fb8ad3..681f646 100644 --- a/pkg/analyzer_plugin/tool/spec/codegen_dart_protocol.dart +++ b/pkg/analyzer_plugin/tool/spec/codegen_dart_protocol.dart
@@ -503,7 +503,7 @@ writeln(); } writeln('@override'); - writeln('String toString() => JSON.encode(toJson());'); + writeln('String toString() => json.encode(toJson());'); writeln(); emitObjectEqualsMember(type, className); writeln(); @@ -1109,7 +1109,7 @@ * Create a string literal that evaluates to [s]. */ String literalString(String s) { - return JSON.encode(s); + return json.encode(s); } /**
diff --git a/pkg/analyzer_plugin/tool/spec/codegen_inttest_methods.dart b/pkg/analyzer_plugin/tool/spec/codegen_inttest_methods.dart index 0cd660e..88870a7a 100644 --- a/pkg/analyzer_plugin/tool/spec/codegen_inttest_methods.dart +++ b/pkg/analyzer_plugin/tool/spec/codegen_inttest_methods.dart
@@ -182,7 +182,7 @@ writeln('$streamName = _$streamName.stream.asBroadcastStream();'); })); notificationSwitchContents.add(collectCode(() { - writeln('case ${JSON.encode(notification.longEvent)}:'); + writeln('case ${json.encode(notification.longEvent)}:'); indent(() { String paramsValidator = camelJoin( ['is', notification.domainName, notification.event, 'params']); @@ -255,7 +255,7 @@ args.addAll(optionalArgs); writeln('var params = new $requestClass(${args.join(', ')}).toJson();'); } - String methodJson = JSON.encode(request.longMethod); + String methodJson = json.encode(request.longMethod); writeln('var result = await server.send($methodJson, $paramsVar);'); if (request.result != null) { String kind = 'null';
diff --git a/pkg/analyzer_plugin/tool/spec/codegen_matchers.dart b/pkg/analyzer_plugin/tool/spec/codegen_matchers.dart index ad47111..480e46f 100644 --- a/pkg/analyzer_plugin/tool/spec/codegen_matchers.dart +++ b/pkg/analyzer_plugin/tool/spec/codegen_matchers.dart
@@ -81,9 +81,9 @@ if (commaNeeded) { writeln(','); } - write('${JSON.encode(field.name)}: '); + write('${json.encode(field.name)}: '); if (field.value != null) { - write('equals(${JSON.encode(field.value)})'); + write('equals(${json.encode(field.value)})'); } else { visitTypeDecl(field.type); } @@ -115,14 +115,14 @@ @override visitTypeEnum(TypeEnum typeEnum) { - writeln('new MatchesEnum(${JSON.encode(context)}, ['); + writeln('new MatchesEnum(${json.encode(context)}, ['); indent(() { bool commaNeeded = false; for (TypeEnumValue value in typeEnum.values) { if (commaNeeded) { writeln(','); } - write('${JSON.encode(value.value)}'); + write('${json.encode(value.value)}'); commaNeeded = true; } writeln(); @@ -150,7 +150,7 @@ void visitTypeObject(TypeObject typeObject) { writeln('new LazyMatcher(() => new MatchesJsonObject('); indent(() { - write('${JSON.encode(context)}, '); + write('${json.encode(context)}, '); Iterable<TypeObjectField> requiredFields = typeObject.fields.where((TypeObjectField field) => !field.optional); outputObjectFields(requiredFields);
diff --git a/pkg/analyzer_plugin/tool/spec/common_types_spec.html b/pkg/analyzer_plugin/tool/spec/common_types_spec.html index fb0b467..76f0995 100644 --- a/pkg/analyzer_plugin/tool/spec/common_types_spec.html +++ b/pkg/analyzer_plugin/tool/spec/common_types_spec.html
@@ -1141,13 +1141,26 @@ The length of the element. </p> </field> + <field name="codeOffset"> + <ref>int</ref> + <p> + The offset of the first character of the element code, which is + neither documentation, nor annotation. + </p> + </field> + <field name="codeLength"> + <ref>int</ref> + <p> + The length of the element code. + </p> + </field> <field name="children" optional="true"> <list> <ref>Outline</ref> </list> <p> The children of the node. The field will be omitted if the node has no - children. + children. Children are sorted by offset. </p> </field> </object>
diff --git a/pkg/analyzer_plugin/tool/spec/to_html.dart b/pkg/analyzer_plugin/tool/spec/to_html.dart index ccb0868..64c8135 100644 --- a/pkg/analyzer_plugin/tool/spec/to_html.dart +++ b/pkg/analyzer_plugin/tool/spec/to_html.dart
@@ -675,7 +675,7 @@ write(typeObjectField.name); } if (typeObjectField.value != null) { - write(' = ${JSON.encode(typeObjectField.value)}'); + write(' = ${json.encode(typeObjectField.value)}'); } else { write(': '); TypeVisitor typeVisitor = new TypeVisitor(api, short: true); @@ -785,7 +785,7 @@ } write('": '); if (field.value != null) { - write(JSON.encode(field.value)); + write(json.encode(field.value)); } else { if (field.optional) { gray(() {
diff --git a/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart b/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart index 4c57841..532499d 100644 --- a/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart +++ b/pkg/compiler/lib/src/js_emitter/runtime_type_generator.dart
@@ -175,6 +175,10 @@ } } + // TODO(johnniwinther): Avoid unneeded function type indices or + // signatures. We either need them for mirrors or because [type] is + // potentially a subtype of a checked function. Currently we eagerly + // generate a function type index or signature for all callable classes. if (storeFunctionTypeInMetadata && !type.containsTypeVariables) { // TODO(sigmund): use output unit of `method` (Issue #31032) OutputUnit outputUnit = _outputUnitData.mainOutputUnit; @@ -191,9 +195,7 @@ encoding = generatedCode[signature]; } else { // TODO(efortuna): Reinsert assertion. - // TODO(johnniwinther): Avoid unneeded signatures from closure - // classes. - // Use shared signature function. + // Generate the signature on the fly. encoding = _rtiEncoder.getSignatureEncoding( emitterTask.emitter, type, thisAccess); }
diff --git a/pkg/compiler/lib/src/js_model/closure.dart b/pkg/compiler/lib/src/js_model/closure.dart index d1dff65..9ab7fc6 100644 --- a/pkg/compiler/lib/src/js_model/closure.dart +++ b/pkg/compiler/lib/src/js_model/closure.dart
@@ -116,7 +116,6 @@ void _updateScopeBasedOnRtiNeed( KernelScopeInfo scope, - ir.Node node, bool Function(ClassEntity) classNeedsTypeArguments, bool Function(MemberEntity) methodNeedsTypeArguments, bool Function(ir.Node) localFunctionNeedsTypeArguments, @@ -189,7 +188,7 @@ .forEach((ir.Node node, KernelCapturedScope scope) { Map<Local, JRecordField> boxedVariables = _elementMap.makeRecordContainer(scope, member, localsMap); - _updateScopeBasedOnRtiNeed(scope, node, classNeedsTypeArguments, + _updateScopeBasedOnRtiNeed(scope, classNeedsTypeArguments, methodNeedsTypeArguments, localFunctionNeedsTypeArguments, member); if (scope is KernelCapturedLoopScope) { @@ -222,7 +221,8 @@ classNeedsTypeArguments, methodNeedsTypeArguments, localFunctionNeedsTypeArguments, - needsSignature: localFunctionNeedsSignature(functionNode)); + createSignatureMethod: + localFunctionNeedsSignature(functionNode.parent)); // Add also for the call method. _scopeMap[closureClassInfo.callMethod] = closureClassInfo; _scopeMap[closureClassInfo.signatureMethod] = closureClassInfo; @@ -247,14 +247,14 @@ bool Function(ClassEntity) classNeedsTypeArguments, bool Function(FunctionEntity) methodNeedsTypeArguments, bool Function(ir.Node) localFunctionNeedsTypeArguments, - {bool needsSignature}) { - _updateScopeBasedOnRtiNeed(info, node.parent, classNeedsTypeArguments, + {bool createSignatureMethod}) { + _updateScopeBasedOnRtiNeed(info, classNeedsTypeArguments, methodNeedsTypeArguments, localFunctionNeedsTypeArguments, member); KernelToLocalsMap localsMap = _globalLocalsMap.getLocalsMap(member); KernelClosureClassInfo closureClassInfo = closedWorldBuilder.buildClosureClass( member, node, member.library, boxedVariables, info, localsMap, - needsSignature: needsSignature); + createSignatureMethod: createSignatureMethod); // We want the original declaration where that function is used to point // to the correct closure class. @@ -263,7 +263,7 @@ _memberClosureRepresentationMap[closureClassInfo.signatureMethod] = closureClassInfo; _globalLocalsMap.setLocalsMap(closureClassInfo.callMethod, localsMap); - if (needsSignature) { + if (createSignatureMethod) { _globalLocalsMap.setLocalsMap( closureClassInfo.signatureMethod, localsMap); }
diff --git a/pkg/compiler/lib/src/js_model/closure_visitors.dart b/pkg/compiler/lib/src/js_model/closure_visitors.dart index 941a284..4650e6b 100644 --- a/pkg/compiler/lib/src/js_model/closure_visitors.dart +++ b/pkg/compiler/lib/src/js_model/closure_visitors.dart
@@ -235,7 +235,12 @@ TypeVariableTypeWithContext typeVariable = new TypeVariableTypeWithContext( new ir.TypeParameterType(typeParameter), - typeParameter.parent.parent); + // If this typeParameter is part of a typedef then its parent is + // null because it has no context. Just pass in null for the + // context in that case. + typeParameter.parent != null + ? typeParameter.parent.parent + : null); if (_isInsideClosure && context is ir.Procedure && context.isFactory) { // This is a closure in a factory constructor. Since there is no // [:this:], we have to mark the type arguments as free variables to
diff --git a/pkg/compiler/lib/src/js_model/js_strategy.dart b/pkg/compiler/lib/src/js_model/js_strategy.dart index e48188e..888b04b 100644 --- a/pkg/compiler/lib/src/js_model/js_strategy.dart +++ b/pkg/compiler/lib/src/js_model/js_strategy.dart
@@ -291,26 +291,40 @@ Set<ir.Node> localFunctionsNodesNeedingSignature = new Set<ir.Node>(); for (KLocalFunction localFunction in kernelRtiNeed.localFunctionsNeedingSignature) { - localFunctionsNodesNeedingSignature.add(localFunction.node); + ir.Node node = localFunction.node; + assert(node is ir.FunctionDeclaration || node is ir.FunctionExpression, + "Unexpected local function node: $node"); + localFunctionsNodesNeedingSignature.add(node); } Set<ir.Node> localFunctionsNodesNeedingTypeArguments = new Set<ir.Node>(); for (KLocalFunction localFunction in kernelRtiNeed.localFunctionsNeedingTypeArguments) { - localFunctionsNodesNeedingTypeArguments.add(localFunction.node); + ir.Node node = localFunction.node; + assert(node is ir.FunctionDeclaration || node is ir.FunctionExpression, + "Unexpected local function node: $node"); + localFunctionsNodesNeedingTypeArguments.add(node); } RuntimeTypesNeedImpl jRtiNeed = _convertRuntimeTypesNeed(map, backendUsage, kernelRtiNeed); callMethods = _closureConversionTask.createClosureEntities( this, map.toBackendMemberMap(closureModels, identity), - localFunctionNeedsSignature: backendUsage.isRuntimeTypeUsed - ? (_) => true - : localFunctionsNodesNeedingSignature.contains, + localFunctionNeedsSignature: (ir.Node node) { + assert(node is ir.FunctionDeclaration || + node is ir.FunctionExpression); + return backendUsage.isRuntimeTypeUsed + ? true + : localFunctionsNodesNeedingSignature.contains(node); + }, classNeedsTypeArguments: jRtiNeed.classNeedsTypeArguments, methodNeedsTypeArguments: jRtiNeed.methodNeedsTypeArguments, - localFunctionNeedsTypeArguments: backendUsage.isRuntimeTypeUsed - ? (_) => true - : localFunctionsNodesNeedingTypeArguments.contains); + localFunctionNeedsTypeArguments: (ir.Node node) { + assert(node is ir.FunctionDeclaration || + node is ir.FunctionExpression); + return backendUsage.isRuntimeTypeUsed + ? true + : localFunctionsNodesNeedingTypeArguments.contains(node); + }); List<FunctionEntity> callMethodsNeedingSignature = <FunctionEntity>[]; for (ir.Node node in localFunctionsNodesNeedingSignature) { @@ -536,7 +550,7 @@ Map<Local, JRecordField> boxedVariables, KernelScopeInfo info, KernelToLocalsMap localsMap, - {bool needsSignature}) { + {bool createSignatureMethod}) { ClassEntity superclass = _commonElements.closureClass; KernelClosureClassInfo closureClassInfo = _elementMap.constructClosureClass( @@ -547,7 +561,7 @@ info, localsMap, new InterfaceType(superclass, const []), - needsSignature: needsSignature); + createSignatureMethod: createSignatureMethod); // Tell the hierarchy that this is the super class. then we can use // .getSupertypes(class)
diff --git a/pkg/compiler/lib/src/kernel/element_map_impl.dart b/pkg/compiler/lib/src/kernel/element_map_impl.dart index b54f422..06bdf3a 100644 --- a/pkg/compiler/lib/src/kernel/element_map_impl.dart +++ b/pkg/compiler/lib/src/kernel/element_map_impl.dart
@@ -2461,7 +2461,7 @@ KernelScopeInfo info, KernelToLocalsMap localsMap, InterfaceType supertype, - {bool needsSignature}) { + {bool createSignatureMethod}) { InterfaceType memberThisType = member.enclosingClass != null ? _elementEnvironment.getThisType(member.enclosingClass) : null; @@ -2530,7 +2530,7 @@ _buildClosureClassFields(closureClassInfo, member, memberThisType, info, localsMap, recordFieldsVisibleInScope, memberMap); - if (needsSignature) { + if (createSignatureMethod) { _constructSignatureMethod(closureClassInfo, memberMap, node, memberThisType, location, typeVariableAccess); }
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart index 8b448f8..847a3e6 100644 --- a/pkg/compiler/lib/src/ssa/builder.dart +++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -4159,11 +4159,11 @@ TypeMask type = TypeMaskFactory.inferredTypeForSelector( selector, mask, globalInferenceResults); if (selector.isGetter) { - push(new HInvokeDynamicGetter( - selector, mask, null, inputs, type, sourceInformation)); + push(new HInvokeDynamicGetter(selector, mask, null, inputs, isIntercepted, + type, sourceInformation)); } else if (selector.isSetter) { - push(new HInvokeDynamicSetter( - selector, mask, null, inputs, type, sourceInformation)); + push(new HInvokeDynamicSetter(selector, mask, null, inputs, isIntercepted, + type, sourceInformation)); } else { push(new HInvokeDynamicMethod( selector, mask, inputs, type, const <DartType>[], sourceInformation, @@ -4319,10 +4319,11 @@ // TODO(5346): Try to avoid the need for calling [declaration] before // creating an [HStatic]. List<HInstruction> inputs = <HInstruction>[]; - if (interceptorData.isInterceptedSelector(selector) && - // Fields don't need an interceptor; consider generating HFieldGet/Set - // instead. - element.kind != ElementKind.FIELD) { + // Fields don't need an interceptor; consider generating HFieldGet/Set instead. + + bool isIntercepted = interceptorData.isInterceptedSelector(selector) && + element.kind != ElementKind.FIELD; + if (isIntercepted) { inputs.add(invokeInterceptor(receiver)); } inputs.add(receiver); @@ -4338,8 +4339,15 @@ } else { type = closedWorld.commonMasks.dynamicType; } - HInstruction instruction = new HInvokeSuper(element, currentNonClosureClass, - selector, inputs, type, const <DartType>[], sourceInformation, + HInstruction instruction = new HInvokeSuper( + element, + currentNonClosureClass, + selector, + inputs, + isIntercepted, + type, + const <DartType>[], + sourceInformation, isSetter: selector.isSetter || selector.isIndexSet); instruction.sideEffects = closedWorld.getSideEffectsOfSelector(selector, null);
diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart index cc9ea4b..d19b61e 100644 --- a/pkg/compiler/lib/src/ssa/builder_kernel.dart +++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
@@ -3837,11 +3837,11 @@ TypeMask type = _typeInferenceMap.selectorTypeOf(selector, mask); if (selector.isGetter) { - push(new HInvokeDynamicGetter( - selector, mask, null, inputs, type, sourceInformation)); + push(new HInvokeDynamicGetter(selector, mask, null, inputs, isIntercepted, + type, sourceInformation)); } else if (selector.isSetter) { - push(new HInvokeDynamicSetter( - selector, mask, null, inputs, type, sourceInformation)); + push(new HInvokeDynamicSetter(selector, mask, null, inputs, isIntercepted, + type, sourceInformation)); } else { push(new HInvokeDynamicMethod( selector, mask, inputs, type, typeArguments, sourceInformation, @@ -4127,7 +4127,9 @@ localsHandler.readThis(sourceInformation: sourceInformation); List<HInstruction> inputs = <HInstruction>[]; - if (closedWorld.interceptorData.isInterceptedSelector(selector)) { + bool isIntercepted = + closedWorld.interceptorData.isInterceptedSelector(selector); + if (isIntercepted) { inputs.add(_interceptorFor(receiver, sourceInformation)); } inputs.add(receiver); @@ -4139,8 +4141,15 @@ } else { typeMask = closedWorld.commonMasks.dynamicType; } - HInstruction instruction = new HInvokeSuper(target, containingClass, - selector, inputs, typeMask, typeArguments, sourceInformation, + HInstruction instruction = new HInvokeSuper( + target, + containingClass, + selector, + inputs, + isIntercepted, + typeMask, + typeArguments, + sourceInformation, isSetter: selector.isSetter || selector.isIndexSet); instruction.sideEffects = closedWorld.getSideEffectsOfSelector(selector, null);
diff --git a/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart b/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart index cc9b761..cb2948a 100644 --- a/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart +++ b/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart
@@ -411,6 +411,7 @@ mask, node.element, <HInstruction>[constant, node.inputs[1]], + true, node.instructionType, node.sourceInformation); } else if (selector.isSetter) { @@ -419,6 +420,7 @@ mask, node.element, <HInstruction>[constant, node.inputs[1], node.inputs[2]], + true, node.instructionType, node.sourceInformation); } else {
diff --git a/pkg/compiler/lib/src/ssa/nodes.dart b/pkg/compiler/lib/src/ssa/nodes.dart index 423a94d..5033547 100644 --- a/pkg/compiler/lib/src/ssa/nodes.dart +++ b/pkg/compiler/lib/src/ssa/nodes.dart
@@ -1662,22 +1662,17 @@ abstract class HInvoke extends HInstruction { bool isAllocation = false; + + /// [isInterceptedCall] is true if this invocation uses the interceptor + /// calling convention where the first input is the methods and the second + /// input is the Dart receiver. + bool isInterceptedCall = false; HInvoke(List<HInstruction> inputs, type) : super(inputs, type) { sideEffects.setAllSideEffects(); sideEffects.setDependsOnSomething(); } static const int ARGUMENTS_OFFSET = 1; bool canThrow() => true; - - /** - * Returns whether this call is on an intercepted method. - */ - bool get isInterceptedCall { - // We know it's a selector call if it follows the interceptor - // calling convention, which adds the actual receiver as a - // parameter to the call. - return (selector != null) && (inputs.length - 2 == selector.argumentCount); - } } abstract class HInvokeDynamic extends HInvoke { @@ -1687,13 +1682,15 @@ MemberEntity element; HInvokeDynamic(Selector selector, this.mask, this.element, - List<HInstruction> inputs, TypeMask type, - [bool isIntercepted = false]) + List<HInstruction> inputs, bool isIntercepted, TypeMask type) : this.selector = selector, specializer = isIntercepted ? InvokeDynamicSpecializer.lookupSpecializer(selector) : const InvokeDynamicSpecializer(), - super(inputs, type); + super(inputs, type) { + assert(isIntercepted != null); + isInterceptedCall = isIntercepted; + } toString() => 'invoke dynamic: selector=$selector, mask=$mask'; HInstruction get receiver => inputs[0]; HInstruction getDartReceiver(ClosedWorld closedWorld) { @@ -1726,9 +1723,10 @@ HInvokeClosure(Selector selector, List<HInstruction> inputs, TypeMask type, this.typeArguments) - : super(selector, null, null, inputs, type) { + : super(selector, null, null, inputs, false, type) { assert(selector.isClosureCall); assert(selector.callStructure.typeArgumentCount == typeArguments.length); + assert(!isInterceptedCall); } accept(HVisitor visitor) => visitor.visitInvokeClosure(this); } @@ -1744,7 +1742,7 @@ this.typeArguments, SourceInformation sourceInformation, {bool isIntercepted: false}) - : super(selector, mask, null, inputs, type, isIntercepted) { + : super(selector, mask, null, inputs, isIntercepted, type) { this.sourceInformation = sourceInformation; assert(selector.callStructure.typeArgumentCount == typeArguments.length); } @@ -1755,8 +1753,8 @@ abstract class HInvokeDynamicField extends HInvokeDynamic { HInvokeDynamicField(Selector selector, TypeMask mask, MemberEntity element, - List<HInstruction> inputs, TypeMask type) - : super(selector, mask, element, inputs, type); + List<HInstruction> inputs, bool isIntercepted, TypeMask type) + : super(selector, mask, element, inputs, isIntercepted, type); String toString() => 'invoke dynamic field: selector=$selector, mask=$mask'; } @@ -1767,9 +1765,10 @@ TypeMask mask, MemberEntity element, List<HInstruction> inputs, + bool isIntercepted, TypeMask type, SourceInformation sourceInformation) - : super(selector, mask, element, inputs, type) { + : super(selector, mask, element, inputs, isIntercepted, type) { this.sourceInformation = sourceInformation; } @@ -1791,9 +1790,10 @@ TypeMask mask, MemberEntity element, List<HInstruction> inputs, + bool isIntercepted, TypeMask type, SourceInformation sourceInformation) - : super(selector, mask, element, inputs, type) { + : super(selector, mask, element, inputs, isIntercepted, type) { this.sourceInformation = sourceInformation; } @@ -1822,8 +1822,10 @@ /** The first input must be the target. */ HInvokeStatic(this.element, inputs, TypeMask type, this.typeArguments, - {this.targetCanThrow: true}) - : super(inputs, type); + {this.targetCanThrow: true, bool isIntercepted: false}) + : super(inputs, type) { + isInterceptedCall = isIntercepted; + } accept(HVisitor visitor) => visitor.visitInvokeStatic(this); @@ -1843,11 +1845,13 @@ this.caller, this.selector, List<HInstruction> inputs, + bool isIntercepted, TypeMask type, List<DartType> typeArguments, SourceInformation sourceInformation, {this.isSetter}) - : super(element, inputs, type, typeArguments) { + : super(element, inputs, type, typeArguments, + isIntercepted: isIntercepted) { this.sourceInformation = sourceInformation; } @@ -2840,7 +2844,7 @@ TypeMask type, this.typeArguments, this.interceptedClasses) - : super(selector, mask, null, inputs, type, true) { + : super(selector, mask, null, inputs, true, type) { assert(inputs[0] is HConstant); assert(inputs[0].isNull()); assert(selector.callStructure.typeArgumentCount == typeArguments.length);
diff --git a/pkg/compiler/lib/src/ssa/optimize.dart b/pkg/compiler/lib/src/ssa/optimize.dart index 8fee4ed..b5cfb5b 100644 --- a/pkg/compiler/lib/src/ssa/optimize.dart +++ b/pkg/compiler/lib/src/ssa/optimize.dart
@@ -447,10 +447,11 @@ HInvokeDynamicMethod result = new HInvokeDynamicMethod( node.selector, node.mask, - node.inputs.sublist(1), + node.inputs.sublist(1), // Drop interceptor. node.instructionType, node.typeArguments, - node.sourceInformation); + node.sourceInformation, + isIntercepted: false); result.element = target; return result; } @@ -481,10 +482,11 @@ HInvokeDynamicMethod splitInstruction = new HInvokeDynamicMethod( node.selector, node.mask, - node.inputs.sublist(1), + node.inputs.sublist(1), // Drop interceptor. resultMask, const <DartType>[], - node.sourceInformation) + node.sourceInformation, + isIntercepted: false) ..element = commonElements.jsStringSplit ..isAllocation = true; @@ -1310,7 +1312,8 @@ inputs, toStringType, const <DartType>[], - node.sourceInformation); + node.sourceInformation, + isIntercepted: true); return result; } return null;
diff --git a/pkg/dev_compiler/lib/src/analyzer/code_generator.dart b/pkg/dev_compiler/lib/src/analyzer/code_generator.dart index db33ffb..58d2169 100644 --- a/pkg/dev_compiler/lib/src/analyzer/code_generator.dart +++ b/pkg/dev_compiler/lib/src/analyzer/code_generator.dart
@@ -1623,6 +1623,8 @@ /// Emits a Dart factory constructor to a JS static method. JS.Method _emitFactoryConstructor(ConstructorDeclaration node) { + if (isUnsupportedFactoryConstructor(node)) return null; + var element = node.element; var returnType = emitTypeRef(element.returnType); var name = _constructorName(element.name);
diff --git a/pkg/dev_compiler/lib/src/analyzer/element_helpers.dart b/pkg/dev_compiler/lib/src/analyzer/element_helpers.dart index 23b9d8f..e595819 100644 --- a/pkg/dev_compiler/lib/src/analyzer/element_helpers.dart +++ b/pkg/dev_compiler/lib/src/analyzer/element_helpers.dart
@@ -6,15 +6,7 @@ /// Helpers for Analyzer's Element model and corelib model. -import 'package:analyzer/dart/ast/ast.dart' - show - ConstructorDeclaration, - Expression, - FunctionBody, - FunctionExpression, - MethodDeclaration, - MethodInvocation, - SimpleIdentifier; +import 'package:analyzer/dart/ast/ast.dart'; import 'package:analyzer/dart/element/element.dart' show ClassElement, @@ -226,3 +218,31 @@ // TODO(jmesserly): shouldn't this be path.toUri? : new Uri.file(sourcePath); } + +/// Returns true iff this factory constructor just throws [UnsupportedError]/ +/// +/// `dart:html` has many of these. +bool isUnsupportedFactoryConstructor(ConstructorDeclaration node) { + var ctorBody = node.body; + var element = node.element; + if (element.isPrivate && + element.librarySource.isInSystemLibrary && + ctorBody is BlockFunctionBody) { + var statements = ctorBody.block.statements; + if (statements.length == 1) { + var statement = statements[0]; + if (statement is ExpressionStatement) { + var expr = statement.expression; + if (expr is ThrowExpression && + expr.expression is InstanceCreationExpression) { + if (expr.expression.staticType.name == 'UnsupportedError') { + // HTML adds a lot of private constructors that are unreachable. + // Skip these. + return true; + } + } + } + } + } + return false; +}
diff --git a/pkg/dev_compiler/lib/src/kernel/compiler.dart b/pkg/dev_compiler/lib/src/kernel/compiler.dart index 62ac08d..9e7b386 100644 --- a/pkg/dev_compiler/lib/src/kernel/compiler.dart +++ b/pkg/dev_compiler/lib/src/kernel/compiler.dart
@@ -1778,6 +1778,8 @@ /// Emits a Dart factory constructor to a JS static method. JS.Method _emitFactoryConstructor(Procedure node) { + if (isUnsupportedFactoryConstructor(node)) return null; + return new JS.Method( _constructorName(node.name.name), new JS.Fun(_emitFormalParameters(node.function),
diff --git a/pkg/dev_compiler/lib/src/kernel/kernel_helpers.dart b/pkg/dev_compiler/lib/src/kernel/kernel_helpers.dart index c16ad0d..312116b 100644 --- a/pkg/dev_compiler/lib/src/kernel/kernel_helpers.dart +++ b/pkg/dev_compiler/lib/src/kernel/kernel_helpers.dart
@@ -264,3 +264,31 @@ // Usually we don't, so we can use the same type. bool isCovariant(VariableDeclaration p) => p.isCovariant || p.isGenericCovariantImpl; + +/// Returns true iff this factory constructor just throws [UnsupportedError]/ +/// +/// `dart:html` has many of these. +bool isUnsupportedFactoryConstructor(Procedure node) { + if (node.name.isPrivate && node.enclosingLibrary.importUri.scheme == 'dart') { + var body = node.function.body; + if (body is Block) { + var statements = body.statements; + if (statements.length == 1) { + var statement = statements[0]; + if (statement is ExpressionStatement) { + var expr = statement.expression; + if (expr is Throw) { + var error = expr.expression; + if (error is ConstructorInvocation && + error.target.enclosingClass.name == 'UnsupportedError') { + // HTML adds a lot of private constructors that are unreachable. + // Skip these. + return true; + } + } + } + } + } + } + return false; +}
diff --git a/pkg/dev_compiler/tool/input_sdk/private/js_array.dart b/pkg/dev_compiler/tool/input_sdk/private/js_array.dart index 69c90ff..abcf157 100644 --- a/pkg/dev_compiler/tool/input_sdk/private/js_array.dart +++ b/pkg/dev_compiler/tool/input_sdk/private/js_array.dart
@@ -601,7 +601,11 @@ Iterable<E> followedBy(Iterable<E> other) => new FollowedByIterable<E>.firstEfficient(this, other); - Iterable<T> whereType<T>() => new WhereTypeIterable<T>(this); + // TODO(leafp): Restore this functionality once generic methods are enabled + // in the VM and dart2js. + // https://github.com/dart-lang/sdk/issues/32463 + Iterable<T> whereType<T>() => + throw new UnimplementedError("whereType is not yet supported"); List<E> operator +(List<E> other) { int totalLength = this.length + other.length;
diff --git a/runtime/bin/gen_snapshot.cc b/runtime/bin/gen_snapshot.cc index 63c0c87..7179a53 100644 --- a/runtime/bin/gen_snapshot.cc +++ b/runtime/bin/gen_snapshot.cc
@@ -312,23 +312,28 @@ return 0; } +static File* OpenFile(const char* filename) { + File* file = File::Open(NULL, filename, File::kWriteTruncate); + if (file == NULL) { + Log::PrintErr("Error: Unable to write file: %s\n\n", filename); + Dart_ExitScope(); + Dart_ShutdownIsolate(); + exit(kErrorExitCode); + } + return file; +} + static void WriteFile(const char* filename, const uint8_t* buffer, const intptr_t size) { - File* file = File::Open(NULL, filename, File::kWriteTruncate); - if (file == NULL) { - Log::PrintErr("Error: Unable to write snapshot file: %s\n\n", filename); - Dart_ExitScope(); - Dart_ShutdownIsolate(); - exit(kErrorExitCode); - } + File* file = OpenFile(filename); + RefCntReleaseScope<File> rs(file); if (!file->WriteFully(buffer, size)) { - Log::PrintErr("Error: Unable to write snapshot file: %s\n\n", filename); + Log::PrintErr("Error: Unable to write file: %s\n\n", filename); Dart_ExitScope(); Dart_ShutdownIsolate(); exit(kErrorExitCode); } - file->Release(); } static void ReadFile(const char* filename, uint8_t** buffer, intptr_t* size) { @@ -339,6 +344,7 @@ Dart_ShutdownIsolate(); exit(kErrorExitCode); } + RefCntReleaseScope<File> rs(file); *size = file->Length(); *buffer = reinterpret_cast<uint8_t*>(malloc(*size)); if (!file->ReadFully(*buffer, *size)) { @@ -347,7 +353,6 @@ Dart_ShutdownIsolate(); exit(kErrorExitCode); } - file->Release(); } class UriResolverIsolateScope { @@ -493,6 +498,7 @@ dependencies_filename); exit(kErrorExitCode); } + RefCntReleaseScope<File> rs(file_); // Write dependencies for one of the output files. // TODO(https://github.com/ninja-build/ninja/issues/1184): Do this for all @@ -524,7 +530,6 @@ dependencies_filename); exit(kErrorExitCode); } - file_->Release(); } private: @@ -1199,6 +1204,18 @@ WriteFile(script_snapshot_filename, buffer, size); } +static void StreamingWriteCallback(void* callback_data, + const uint8_t* buffer, + intptr_t size) { + File* file = reinterpret_cast<File*>(callback_data); + if (!file->WriteFully(buffer, size)) { + Log::PrintErr("Error: Unable to write snapshot file\n\n"); + Dart_ExitScope(); + Dart_ShutdownIsolate(); + exit(kErrorExitCode); + } +} + static void CreateAndWritePrecompiledSnapshot( Dart_QualifiedFunctionName* standalone_entry_points) { ASSERT(IsSnapshottingForPrecompilation()); @@ -1212,14 +1229,10 @@ bool as_assembly = assembly_filename != NULL; if (as_assembly) { ASSERT(snapshot_kind == kAppAOTAssembly); - - uint8_t* assembly_buffer = NULL; - intptr_t assembly_size = 0; - result = - Dart_CreateAppAOTSnapshotAsAssembly(&assembly_buffer, &assembly_size); + File* file = OpenFile(assembly_filename); + RefCntReleaseScope<File> rs(file); + result = Dart_CreateAppAOTSnapshotAsAssembly(StreamingWriteCallback, file); CHECK_RESULT(result); - - WriteFile(assembly_filename, assembly_buffer, assembly_size); } else { ASSERT(snapshot_kind == kAppAOTBlobs); @@ -1349,6 +1362,7 @@ Log::PrintErr("Failed to open: %s\n", filename); exit(kErrorExitCode); } + RefCntReleaseScope<File> rs(file); intptr_t length = file->Length(); if (length == 0) { // Can't map an empty file. @@ -1360,7 +1374,6 @@ Log::PrintErr("Failed to read: %s\n", filename); exit(kErrorExitCode); } - file->Release(); *buffer = reinterpret_cast<const uint8_t*>(mapping->address()); return mapping; } @@ -1582,14 +1595,10 @@ Dart_EnterScope(); if (snapshot_kind == kVMAOTAssembly) { - uint8_t* assembly_buffer = NULL; - intptr_t assembly_size = 0; - result = - Dart_CreateVMAOTSnapshotAsAssembly(&assembly_buffer, &assembly_size); + File* file = OpenFile(assembly_filename); + RefCntReleaseScope<File> rs(file); + result = Dart_CreateVMAOTSnapshotAsAssembly(StreamingWriteCallback, file); CHECK_RESULT(result); - - WriteFile(assembly_filename, assembly_buffer, assembly_size); - Dart_ExitScope(); Dart_ShutdownIsolate(); return 0;
diff --git a/runtime/bin/snapshot_utils.cc b/runtime/bin/snapshot_utils.cc index 00fc580..7c827cd 100644 --- a/runtime/bin/snapshot_utils.cc +++ b/runtime/bin/snapshot_utils.cc
@@ -75,20 +75,18 @@ if (file == NULL) { return NULL; } + RefCntReleaseScope<File> rs(file); if (file->Length() < kAppSnapshotHeaderSize) { - file->Release(); return NULL; } int64_t header[5]; ASSERT(sizeof(header) == kAppSnapshotHeaderSize); if (!file->ReadFully(&header, kAppSnapshotHeaderSize)) { - file->Release(); return NULL; } ASSERT(sizeof(header[0]) == appjit_magic_number.length); if (memcmp(&header[0], appjit_magic_number.bytes, appjit_magic_number.length) != 0) { - file->Release(); return NULL; } @@ -149,7 +147,6 @@ } } - file->Release(); return new MappedAppSnapshot(vm_data_mapping, vm_instr_mapping, isolate_data_mapping, isolate_instr_mapping); } @@ -391,15 +388,27 @@ isolate_instructions_buffer, isolate_instructions_size); } +static void StreamingWriteCallback(void* callback_data, + const uint8_t* buffer, + intptr_t size) { + File* file = reinterpret_cast<File*>(callback_data); + if (!file->WriteFully(buffer, size)) { + ErrorExit(kErrorExitCode, "Unable to write snapshot file\n"); + } +} + void Snapshot::GenerateAppAOTAsAssembly(const char* snapshot_filename) { - uint8_t* assembly_buffer = NULL; - intptr_t assembly_size = 0; + File* file = File::Open(NULL, snapshot_filename, File::kWriteTruncate); + RefCntReleaseScope<File> rs(file); + if (file == NULL) { + ErrorExit(kErrorExitCode, "Unable to open file %s for writing snapshot\n", + snapshot_filename); + } Dart_Handle result = - Dart_CreateAppAOTSnapshotAsAssembly(&assembly_buffer, &assembly_size); + Dart_CreateAppAOTSnapshotAsAssembly(StreamingWriteCallback, file); if (Dart_IsError(result)) { ErrorExit(kErrorExitCode, "%s\n", Dart_GetError(result)); } - WriteSnapshotFile(snapshot_filename, false, assembly_buffer, assembly_size); } } // namespace bin
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h index a8f9e4d..ae0dcbd 100644 --- a/runtime/include/dart_api.h +++ b/runtime/include/dart_api.h
@@ -3244,6 +3244,10 @@ DART_EXPORT Dart_Handle Dart_Precompile(Dart_QualifiedFunctionName entry_points[]); +typedef void (*Dart_StreamingWriteCallback)(void* callback_data, + const uint8_t* buffer, + intptr_t size); + /** * Creates a precompiled snapshot. * - A root library must have been loaded. @@ -3262,22 +3266,21 @@ * Dart_Initialize. The kDartIsolateSnapshotData and * kDartIsoalteSnapshotInstructions should be passed to Dart_CreateIsolate. * - * The buffers are scope allocated and are only valid until the next call to - * Dart_ExitScope. + * The callback will be invoked one or more times to provide the assembly code. * * \return A valid handle if no error occurs during the operation. */ DART_EXPORT Dart_Handle -Dart_CreateAppAOTSnapshotAsAssembly(uint8_t** assembly_buffer, - intptr_t* assembly_size); +Dart_CreateAppAOTSnapshotAsAssembly(Dart_StreamingWriteCallback callback, + void* callback_data); /** * Like Dart_CreateAppAOTSnapshotAsAssembly, but only includes * kDartVmSnapshotData and kDartVmSnapshotInstructions. */ DART_EXPORT Dart_Handle -Dart_CreateVMAOTSnapshotAsAssembly(uint8_t** assembly_buffer, - intptr_t* assembly_size); +Dart_CreateVMAOTSnapshotAsAssembly(Dart_StreamingWriteCallback callback, + void* callback_data); /** * Same as Dart_CreateAppAOTSnapshotAsAssembly, except all the pieces are
diff --git a/runtime/lib/typed_data_patch.dart b/runtime/lib/typed_data_patch.dart index 4d6161c..7e4e9cf 100644 --- a/runtime/lib/typed_data_patch.dart +++ b/runtime/lib/typed_data_patch.dart
@@ -114,7 +114,11 @@ List<int> _createList(int length); - Iterable<T> whereType<T>() => new WhereTypeIterable<T>(this); + // TODO(leafp): Restore this functionality once generic methods are enabled + // in the VM and dart2js. + // https://github.com/dart-lang/sdk/issues/32463 + Iterable<T> whereType<T>() => + throw new UnimplementedError("whereType is not yet supported"); Iterable<int> followedBy(Iterable<int> other) => new FollowedByIterable<int>.firstEfficient(this, other); @@ -473,7 +477,11 @@ List<double> _createList(int length); - Iterable<T> whereType<T>() => new WhereTypeIterable<T>(this); + // TODO(leafp): Restore this functionality once generic methods are enabled + // in the VM and dart2js. + // https://github.com/dart-lang/sdk/issues/32463 + Iterable<T> whereType<T>() => + throw new UnimplementedError("whereType is not yet supported"); Iterable<double> followedBy(Iterable<double> other) => new FollowedByIterable<double>.firstEfficient(this, other); @@ -835,7 +843,11 @@ List<Float32x4> _createList(int length); - Iterable<T> whereType<T>() => new WhereTypeIterable<T>(this); + // TODO(leafp): Restore this functionality once generic methods are enabled + // in the VM and dart2js. + // https://github.com/dart-lang/sdk/issues/32463 + Iterable<T> whereType<T>() => + throw new UnimplementedError("whereType is not yet supported"); Iterable<Float32x4> followedBy(Iterable<Float32x4> other) => new FollowedByIterable<Float32x4>.firstEfficient(this, other); @@ -1201,7 +1213,11 @@ List<Int32x4> _createList(int length); - Iterable<T> whereType<T>() => new WhereTypeIterable<T>(this); + // TODO(leafp): Restore this functionality once generic methods are enabled + // in the VM and dart2js. + // https://github.com/dart-lang/sdk/issues/32463 + Iterable<T> whereType<T>() => + throw new UnimplementedError("whereType is not yet supported"); Iterable<Int32x4> followedBy(Iterable<Int32x4> other) => new FollowedByIterable<Int32x4>.firstEfficient(this, other); @@ -1566,7 +1582,11 @@ List<Float64x2> _createList(int length); - Iterable<T> whereType<T>() => new WhereTypeIterable<T>(this); + // TODO(leafp): Restore this functionality once generic methods are enabled + // in the VM and dart2js. + // https://github.com/dart-lang/sdk/issues/32463 + Iterable<T> whereType<T>() => + throw new UnimplementedError("whereType is not yet supported"); Iterable<Float64x2> followedBy(Iterable<Float64x2> other) => new FollowedByIterable<Float64x2>.firstEfficient(this, other);
diff --git a/runtime/vm/compiler/method_recognizer.h b/runtime/vm/compiler/method_recognizer.h index 23686a3..67ae5b3 100644 --- a/runtime/vm/compiler/method_recognizer.h +++ b/runtime/vm/compiler/method_recognizer.h
@@ -146,15 +146,14 @@ V(_Smi, ~, Smi_bitNegate, Smi, 0x67299f4f) \ V(_Smi, get:bitLength, Smi_bitLength, Smi, 0x25b3cb0a) \ V(_Smi, _bitAndFromSmi, Smi_bitAndFromSmi, Smi, 0x562d5047) \ - V(_BigIntImpl, _lsh, Bigint_lsh, Dynamic, 0x6cd9b291) \ - V(_BigIntImpl, _rsh, Bigint_rsh, Dynamic, 0x1ac17d4d) \ - V(_BigIntImpl, _absAdd, Bigint_absAdd, Dynamic, 0x5bf14238) \ - V(_BigIntImpl, _absSub, Bigint_absSub, Dynamic, 0x1de5bd32) \ - V(_BigIntImpl, _mulAdd, Bigint_mulAdd, Smi, 0x6f277966) \ - V(_BigIntImpl, _sqrAdd, Bigint_sqrAdd, Smi, 0x68e4c8ea) \ - V(_BigIntImpl, _estimateQuotientDigit, Bigint_estQuotientDigit, Smi, \ - 0x35456d91) \ - V(_BigIntMontgomeryReduction, _mulMod, Montgomery_mulMod, Smi, 0x0f7b0375) \ + V(_Bigint, _lsh, Bigint_lsh, Dynamic, 0x7b99f80e) \ + V(_Bigint, _rsh, Bigint_rsh, Dynamic, 0x5262b3a1) \ + V(_Bigint, _absAdd, Bigint_absAdd, Dynamic, 0x07cad968) \ + V(_Bigint, _absSub, Bigint_absSub, Dynamic, 0x1bf1bb4c) \ + V(_Bigint, _mulAdd, Bigint_mulAdd, Dynamic, 0x229759b7) \ + V(_Bigint, _sqrAdd, Bigint_sqrAdd, Dynamic, 0x5212b81f) \ + V(_Bigint, _estQuotientDigit, Bigint_estQuotientDigit, Dynamic, 0x4dd342fe) \ + V(_Montgomery, _mulMod, Montgomery_mulMod, Dynamic, 0x17a515ac) \ V(_Double, >, Double_greaterThan, Bool, 0x4f1375a3) \ V(_Double, >=, Double_greaterEqualThan, Bool, 0x4260c184) \ V(_Double, <, Double_lessThan, Bool, 0x365d1eba) \ @@ -461,14 +460,14 @@ V(::, sin, MathSin, 0x6b7bd98c) \ V(::, sqrt, MathSqrt, 0x70482cf3) \ V(::, tan, MathTan, 0x3bcd772a) \ - V(_BigIntImpl, _lsh, Bigint_lsh, 0x6cd9b291) \ - V(_BigIntImpl, _rsh, Bigint_rsh, 0x1ac17d4d) \ - V(_BigIntImpl, _absAdd, Bigint_absAdd, 0x5bf14238) \ - V(_BigIntImpl, _absSub, Bigint_absSub, 0x1de5bd32) \ - V(_BigIntImpl, _mulAdd, Bigint_mulAdd, 0x6f277966) \ - V(_BigIntImpl, _sqrAdd, Bigint_sqrAdd, 0x68e4c8ea) \ - V(_BigIntImpl, _estimateQuotientDigit, Bigint_estQuotientDigit, 0x35456d91) \ - V(_BigIntMontgomeryReduction, _mulMod, Montgomery_mulMod, 0x0f7b0375) \ + V(_Bigint, _lsh, Bigint_lsh, 0x7b99f80e) \ + V(_Bigint, _rsh, Bigint_rsh, 0x5262b3a1) \ + V(_Bigint, _absAdd, Bigint_absAdd, 0x07cad968) \ + V(_Bigint, _absSub, Bigint_absSub, 0x1bf1bb4c) \ + V(_Bigint, _mulAdd, Bigint_mulAdd, 0x229759b7) \ + V(_Bigint, _sqrAdd, Bigint_sqrAdd, 0x5212b81f) \ + V(_Bigint, _estQuotientDigit, Bigint_estQuotientDigit, 0x4dd342fe) \ + V(_Montgomery, _mulMod, Montgomery_mulMod, 0x17a515ac) \ V(_Double, >, Double_greaterThan, 0x4f1375a3) \ V(_Double, >=, Double_greaterEqualThan, 0x4260c184) \ V(_Double, <, Double_lessThan, 0x365d1eba) \
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc index 8d58ab9..6fcc4e0 100644 --- a/runtime/vm/dart_api_impl.cc +++ b/runtime/vm/dart_api_impl.cc
@@ -6470,8 +6470,8 @@ } DART_EXPORT Dart_Handle -Dart_CreateAppAOTSnapshotAsAssembly(uint8_t** assembly_buffer, - intptr_t* assembly_size) { +Dart_CreateAppAOTSnapshotAsAssembly(Dart_StreamingWriteCallback callback, + void* callback_data) { #if defined(TARGET_ARCH_IA32) return Api::NewError("AOT compilation is not supported on IA32."); #elif defined(TARGET_ARCH_DBC) @@ -6489,13 +6489,11 @@ "Did you forget to call Dart_Precompile?"); } ASSERT(FLAG_load_deferred_eagerly); - CHECK_NULL(assembly_buffer); - CHECK_NULL(assembly_size); + CHECK_NULL(callback); NOT_IN_PRODUCT(TimelineDurationScope tds2(T, Timeline::GetIsolateStream(), "WriteAppAOTSnapshot")); - AssemblyImageWriter image_writer(assembly_buffer, ApiReallocate, - 2 * MB /* initial_size */); + AssemblyImageWriter image_writer(callback, callback_data); uint8_t* vm_snapshot_data_buffer = NULL; uint8_t* isolate_snapshot_data_buffer = NULL; FullSnapshotWriter writer(Snapshot::kFullAOT, &vm_snapshot_data_buffer, @@ -6504,15 +6502,14 @@ writer.WriteFullSnapshot(); image_writer.Finalize(); - *assembly_size = image_writer.AssemblySize(); return Api::Success(); #endif } DART_EXPORT Dart_Handle -Dart_CreateVMAOTSnapshotAsAssembly(uint8_t** assembly_buffer, - intptr_t* assembly_size) { +Dart_CreateVMAOTSnapshotAsAssembly(Dart_StreamingWriteCallback callback, + void* callback_data) { #if defined(TARGET_ARCH_IA32) return Api::NewError("AOT compilation is not supported on IA32."); #elif defined(TARGET_ARCH_DBC) @@ -6523,19 +6520,16 @@ #else DARTSCOPE(Thread::Current()); API_TIMELINE_DURATION(T); - CHECK_NULL(assembly_buffer); - CHECK_NULL(assembly_size); + CHECK_NULL(callback); NOT_IN_PRODUCT(TimelineDurationScope tds2(T, Timeline::GetIsolateStream(), "WriteVMAOTSnapshot")); - AssemblyImageWriter image_writer(assembly_buffer, ApiReallocate, - 2 * MB /* initial_size */); + AssemblyImageWriter image_writer(callback, callback_data); uint8_t* vm_snapshot_data_buffer = NULL; FullSnapshotWriter writer(Snapshot::kFullAOT, &vm_snapshot_data_buffer, NULL, ApiReallocate, &image_writer, NULL); writer.WriteFullSnapshot(); - *assembly_size = image_writer.AssemblySize(); return Api::Success(); #endif
diff --git a/runtime/vm/datastream.cc b/runtime/vm/datastream.cc new file mode 100644 index 0000000..de77937 --- /dev/null +++ b/runtime/vm/datastream.cc
@@ -0,0 +1,68 @@ +// Copyright (c) 2018, 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. + +#include "vm/datastream.h" + +namespace dart { + +StreamingWriteStream::StreamingWriteStream(intptr_t initial_capacity, + Dart_StreamingWriteCallback callback, + void* callback_data) + : flushed_size_(0), callback_(callback), callback_data_(callback_data) { + buffer_ = reinterpret_cast<uint8_t*>(malloc(initial_capacity)); + if (buffer_ == NULL) { + OUT_OF_MEMORY(); + } + cursor_ = buffer_; + limit_ = buffer_ + initial_capacity; +} + +StreamingWriteStream::~StreamingWriteStream() { + Flush(); + free(buffer_); +} + +void StreamingWriteStream::VPrint(const char* format, va_list args) { + // Measure. + va_list measure_args; + va_copy(measure_args, args); + intptr_t len = Utils::VSNPrint(NULL, 0, format, measure_args); + va_end(measure_args); + + // Alloc. + EnsureAvailable(len + 1); + + // Print. + va_list print_args; + va_copy(print_args, args); + Utils::VSNPrint(reinterpret_cast<char*>(cursor_), len + 1, format, + print_args); + va_end(print_args); + cursor_ += len; // Not len + 1 to swallow the terminating NUL. +} + +void StreamingWriteStream::EnsureAvailableSlowPath(intptr_t needed) { + Flush(); + + intptr_t available = limit_ - cursor_; + if (available >= needed) return; + + intptr_t new_capacity = Utils::RoundUp(needed, 64 * KB); + free(buffer_); + buffer_ = reinterpret_cast<uint8_t*>(malloc(new_capacity)); + if (buffer_ == NULL) { + OUT_OF_MEMORY(); + } + cursor_ = buffer_; + limit_ = buffer_ + new_capacity; +} + +void StreamingWriteStream::Flush() { + intptr_t size = cursor_ - buffer_; + callback_(callback_data_, buffer_, size); + flushed_size_ += size; + cursor_ = buffer_; +} + +} // namespace dart
diff --git a/runtime/vm/datastream.h b/runtime/vm/datastream.h index bab0dff..71e08f4 100644 --- a/runtime/vm/datastream.h +++ b/runtime/vm/datastream.h
@@ -5,6 +5,7 @@ #ifndef RUNTIME_VM_DATASTREAM_H_ #define RUNTIME_VM_DATASTREAM_H_ +#include "include/dart_api.h" #include "platform/assert.h" #include "platform/utils.h" #include "vm/allocation.h" @@ -462,6 +463,56 @@ DISALLOW_COPY_AND_ASSIGN(WriteStream); }; +class StreamingWriteStream : public ValueObject { + public: + explicit StreamingWriteStream(intptr_t initial_capacity, + Dart_StreamingWriteCallback callback, + void* callback_data); + ~StreamingWriteStream(); + + intptr_t position() const { return flushed_size_ + (cursor_ - buffer_); } + + void Align(intptr_t alignment) { + intptr_t padding = Utils::RoundUp(position(), alignment) - position(); + EnsureAvailable(padding); + memset(cursor_, 0, padding); + cursor_ += padding; + } + + void Print(const char* format, ...) { + va_list args; + va_start(args, format); + VPrint(format, args); + va_end(args); + } + void VPrint(const char* format, va_list args); + + void WriteBytes(const uint8_t* buffer, intptr_t size) { + EnsureAvailable(size); + memmove(cursor_, buffer, size); + cursor_ += size; + } + + private: + void EnsureAvailable(intptr_t needed) { + intptr_t available = limit_ - cursor_; + if (available >= needed) return; + EnsureAvailableSlowPath(needed); + } + + void EnsureAvailableSlowPath(intptr_t needed); + void Flush(); + + uint8_t* buffer_; + uint8_t* cursor_; + uint8_t* limit_; + intptr_t flushed_size_; + Dart_StreamingWriteCallback callback_; + void* callback_data_; + + DISALLOW_COPY_AND_ASSIGN(StreamingWriteStream); +}; + } // namespace dart #endif // RUNTIME_VM_DATASTREAM_H_
diff --git a/runtime/vm/dwarf.cc b/runtime/vm/dwarf.cc index 21f69c0..fc48ab7 100644 --- a/runtime/vm/dwarf.cc +++ b/runtime/vm/dwarf.cc
@@ -51,7 +51,7 @@ InliningNode* children_next; }; -Dwarf::Dwarf(Zone* zone, WriteStream* stream) +Dwarf::Dwarf(Zone* zone, StreamingWriteStream* stream) : zone_(zone), stream_(stream), codes_(zone, 1024),
diff --git a/runtime/vm/dwarf.h b/runtime/vm/dwarf.h index 070eb75..b523663 100644 --- a/runtime/vm/dwarf.h +++ b/runtime/vm/dwarf.h
@@ -117,7 +117,7 @@ class Dwarf : public ZoneAllocated { public: - Dwarf(Zone* zone, WriteStream* stream); + Dwarf(Zone* zone, StreamingWriteStream* stream); intptr_t AddCode(const Code& code); intptr_t AddFunction(const Function& function); @@ -198,7 +198,7 @@ void WriteLines(); Zone* const zone_; - WriteStream* stream_; + StreamingWriteStream* stream_; ZoneGrowableArray<const Code*> codes_; CodeIndexMap code_to_index_; ZoneGrowableArray<const Function*> functions_;
diff --git a/runtime/vm/image_snapshot.cc b/runtime/vm/image_snapshot.cc index b98e08d..9900a7c 100644 --- a/runtime/vm/image_snapshot.cc +++ b/runtime/vm/image_snapshot.cc
@@ -95,11 +95,10 @@ } } -AssemblyImageWriter::AssemblyImageWriter(uint8_t** assembly_buffer, - ReAlloc alloc, - intptr_t initial_size) +AssemblyImageWriter::AssemblyImageWriter(Dart_StreamingWriteCallback callback, + void* callback_data) : ImageWriter(), - assembly_stream_(assembly_buffer, alloc, initial_size), + assembly_stream_(512 * KB, callback, callback_data), dwarf_(NULL) { #if defined(DART_PRECOMPILER) Zone* zone = Thread::Current()->zone();
diff --git a/runtime/vm/image_snapshot.h b/runtime/vm/image_snapshot.h index 66bf552..f43bc1a 100644 --- a/runtime/vm/image_snapshot.h +++ b/runtime/vm/image_snapshot.h
@@ -126,15 +126,12 @@ class AssemblyImageWriter : public ImageWriter { public: - AssemblyImageWriter(uint8_t** assembly_buffer, - ReAlloc alloc, - intptr_t initial_size); + AssemblyImageWriter(Dart_StreamingWriteCallback callback, + void* callback_data); void Finalize(); virtual void WriteText(WriteStream* clustered_stream, bool vm); - intptr_t AssemblySize() const { return assembly_stream_.bytes_written(); } - private: void FrameUnwindPrologue(); void FrameUnwindEpilogue(); @@ -148,7 +145,7 @@ #endif } - WriteStream assembly_stream_; + StreamingWriteStream assembly_stream_; Dwarf* dwarf_; DISALLOW_COPY_AND_ASSIGN(AssemblyImageWriter);
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc index f7113a6..8c6d854 100644 --- a/runtime/vm/object.cc +++ b/runtime/vm/object.cc
@@ -22506,9 +22506,10 @@ // code with identityHashCode of cached receiver. result = static_cast<uint32_t>(func.ComputeClosureHash()); const Context& context = Context::Handle(zone, this->context()); - const Object& receiver = Object::Handle(zone, context.At(0)); + const Instance& receiver = + Instance::Handle(zone, Instance::RawCast(context.At(0))); const Object& receiverHash = - Object::Handle(zone, Instance::Cast(receiver).IdentityHashCode()); + Object::Handle(zone, receiver.IdentityHashCode()); if (receiverHash.IsError()) { Exceptions::PropagateError(Error::Cast(receiverHash)); UNREACHABLE();
diff --git a/runtime/vm/program_visitor.cc b/runtime/vm/program_visitor.cc index 197d55a..14148be 100644 --- a/runtime/vm/program_visitor.cc +++ b/runtime/vm/program_visitor.cc
@@ -614,6 +614,10 @@ } RawArray* DedupList(const Array& list) { + if (list.InVMHeap()) { + // Avoid using read-only VM objects for de-duplication. + return list.raw(); + } const Array* canonical_list = canonical_lists_.LookupValue(&list); if (canonical_list == NULL) { canonical_lists_.Insert(&Array::ZoneHandle(zone_, list.raw()));
diff --git a/runtime/vm/vm_sources.gni b/runtime/vm/vm_sources.gni index 220bfa8..53fa500 100644 --- a/runtime/vm/vm_sources.gni +++ b/runtime/vm/vm_sources.gni
@@ -79,6 +79,7 @@ "dart_api_state.h", "dart_entry.cc", "dart_entry.h", + "datastream.cc", "datastream.h", "debugger.cc", "debugger.h",
diff --git a/samples/samples.status b/samples/samples.status index 3e8b4db..2f353c2 100644 --- a/samples/samples.status +++ b/samples/samples.status
@@ -16,12 +16,6 @@ [ $compiler == precompiler ] sample_extension/test/*: Skip # These tests attempt to spawn another script using the precompiled runtime. -# Skip tests that use dart:io -[ $browser ] -build_dart: Skip -build_dart_simple: Skip -sample_extension: Skip - [ $compiler == dart2analyzer && $strong ] *: Skip # Issue 28649 @@ -34,3 +28,9 @@ [ $compiler == none && $runtime == vm && $system == fuchsia ] *: Skip # Not yet triaged. +# Skip tests that use dart:io +[ $runtime == d8 || $browser ] +build_dart/*: Skip +build_dart_simple/*: Skip +sample_extension/*: Skip +
diff --git a/sdk/lib/collection/iterable.dart b/sdk/lib/collection/iterable.dart index 67bfdd8..6b88ff9 100644 --- a/sdk/lib/collection/iterable.dart +++ b/sdk/lib/collection/iterable.dart
@@ -26,7 +26,11 @@ Iterable<E> where(bool f(E element)) => new WhereIterable<E>(this, f); - Iterable<T> whereType<T>() => new WhereTypeIterable<T>(this); + // TODO(leafp): Restore this functionality once generic methods are enabled + // in the VM and dart2js. + // https://github.com/dart-lang/sdk/issues/32463 + Iterable<T> whereType<T>() => + throw new UnimplementedError("whereType is not yet supported"); Iterable<T> expand<T>(Iterable<T> f(E element)) => new ExpandIterable<E, T>(this, f);
diff --git a/sdk/lib/collection/list.dart b/sdk/lib/collection/list.dart index 2a5792d..4ced94b 100644 --- a/sdk/lib/collection/list.dart +++ b/sdk/lib/collection/list.dart
@@ -191,7 +191,11 @@ Iterable<E> where(bool test(E element)) => new WhereIterable<E>(this, test); - Iterable<T> whereType<T>() => new WhereTypeIterable<T>(this); + // TODO(leafp): Restore this functionality once generic methods are enabled + // in the VM and dart2js. + // https://github.com/dart-lang/sdk/issues/32463 + Iterable<T> whereType<T>() => + throw new UnimplementedError("whereType is not yet supported"); Iterable<T> map<T>(T f(E element)) => new MappedListIterable<E, T>(this, f);
diff --git a/sdk/lib/collection/set.dart b/sdk/lib/collection/set.dart index 71bf718..377d574 100644 --- a/sdk/lib/collection/set.dart +++ b/sdk/lib/collection/set.dart
@@ -61,7 +61,11 @@ Iterable<E> followedBy(Iterable<E> other) => new FollowedByIterable<E>.firstEfficient(this, other); - Iterable<T> whereType<T>() => new WhereTypeIterable<T>(this); + // TODO(leafp): Restore this functionality once generic methods are enabled + // in the VM and dart2js. + // https://github.com/dart-lang/sdk/issues/32463 + Iterable<T> whereType<T>() => + throw new UnimplementedError("whereType is not yet supported"); void clear() { removeAll(toList());
diff --git a/tests/co19/co19-dart2js.status b/tests/co19/co19-dart2js.status index 506508e..8cb3115 100644 --- a/tests/co19/co19-dart2js.status +++ b/tests/co19/co19-dart2js.status
@@ -5,32 +5,12 @@ [ $compiler == dart2js ] Language/Classes/Constructors/Generative_Constructors/execution_of_a_superinitializer_t01: RuntimeError # compiler cancelled: cannot resolve type T Language/Classes/Constructors/Generative_Constructors/execution_of_a_superinitializer_t01: RuntimeError, OK # co19 issue 258 -Language/Classes/Constructors/Generative_Constructors/execution_t03: RuntimeError # https://github.com/dart-lang/sdk/issues/29596 -Language/Classes/Getters/static_getter_t02: CompileTimeError # Should be fixed with unified frontend. Issue 24534 -Language/Classes/Instance_Methods/same_name_setter_t01: Fail # Issue 21201 -Language/Classes/Setters/name_t01: CompileTimeError # Issue 5023 -Language/Classes/Setters/name_t02: CompileTimeError # Issue 5023 -Language/Classes/Setters/name_t03: RuntimeError # Issue 5023 -Language/Classes/Setters/name_t07: CompileTimeError # Issue 5023 -Language/Classes/Setters/static_setter_t06: RuntimeError # Should be fixed with unified frontend. Issue 23749 -Language/Classes/Static_Methods/same_name_method_and_setter_t01: CompileTimeError # Should be fixed with unified frontend. Issue 23749 -Language/Classes/same_name_type_variable_t01: Fail # Missing CT error on class with same name a type parameter -Language/Classes/same_name_type_variable_t02: Fail # Missing CT error on member with same name a type parameter -Language/Classes/same_name_type_variable_t03: Fail # Missing CT error on member with same name a type parameter -Language/Classes/same_name_type_variable_t05: Fail # Missing CT error on member with same name a type parameter -Language/Classes/same_name_type_variable_t06: Fail # Missing CT error on member with same name a type parameter -Language/Classes/same_name_type_variable_t08: Fail # Missing CT error on member with same name a type parameter -Language/Classes/same_name_type_variable_t09: Fail # Missing CT error on member with same name a type parameter -Language/Errors_and_Warnings/compile_error_t06: MissingCompileTimeError # Please triage this failure -Language/Errors_and_Warnings/compile_error_t07: MissingCompileTimeError # Please triage this failure Language/Expressions/Assignment/super_assignment_failed_t05: RuntimeError # Issue 25671 Language/Expressions/Assignment/super_assignment_value_t02: RuntimeError # Please triage this failure Language/Expressions/Await_Expressions/evaluation_throws_t03: RuntimeError # Please triage this failure Language/Expressions/Await_Expressions/evaluation_throws_t04: RuntimeError # Please triage this failure Language/Expressions/Await_Expressions/evaluation_throws_t06: RuntimeError # Please triage this failure Language/Expressions/Await_Expressions/evaluation_throws_t07: RuntimeError # Please triage this failure -Language/Expressions/Constants/identifier_denotes_a_constant_t06: MissingCompileTimeError # Issue 26580 -Language/Expressions/Constants/identifier_denotes_a_constant_t07: MissingCompileTimeError # Issue 26580 Language/Expressions/Function_Invocation/async_cleanup_t01: Skip # https://github.com/dart-lang/sdk/issues/28873 Language/Expressions/Function_Invocation/async_cleanup_t03: Skip # https://github.com/dart-lang/sdk/issues/28873 Language/Expressions/Function_Invocation/async_cleanup_t05: Skip # https://github.com/dart-lang/sdk/issues/28873 @@ -41,10 +21,6 @@ Language/Expressions/Function_Invocation/async_invokation_t04: RuntimeError, Pass # co19 issue 57 Language/Expressions/Instance_Creation/New/evaluation_t19: RuntimeError # Please triage this failure Language/Expressions/Instance_Creation/New/evaluation_t20: RuntimeError # Please triage this failure -Language/Expressions/Instance_Creation/New/execution_t04: RuntimeError # https://github.com/dart-lang/sdk/issues/29596 -Language/Expressions/Instance_Creation/New/execution_t06: RuntimeError # https://github.com/dart-lang/sdk/issues/29596 -Language/Expressions/Maps/key_value_equals_operator_t02: CompileTimeError # Please triage this failure -Language/Expressions/Maps/static_type_dynamic_t01: CompileTimeError # Maybe ok. Issue 17207 Language/Expressions/Method_Invocation/Ordinary_Invocation/object_method_invocation_t01: MissingCompileTimeError # Issue 25496 Language/Expressions/Method_Invocation/Ordinary_Invocation/object_method_invocation_t02: MissingCompileTimeError # Issue 25496 Language/Expressions/Numbers/syntax_t06: Fail # Issue 21098 @@ -64,12 +40,7 @@ Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t07: MissingCompileTimeError # Issue 24332 Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t08: MissingCompileTimeError # Issue 24332 Language/Expressions/Shift/syntax_t01/14: MissingRuntimeError # Please triage this failure -Language/Functions/External_Functions/not_connected_to_a_body_t01: CompileTimeError, OK # Issue 5021 -Language/Interfaces/Superinterfaces/Inheritance_and_Overriding/same_name_method_and_getter_t01: CompileTimeError # Please triage this failure -Language/Interfaces/Superinterfaces/Inheritance_and_Overriding/same_name_method_and_getter_t02: CompileTimeError # Please triage this failure -Language/Libraries_and_Scripts/Imports/invalid_uri_deferred_t01/01: CompileTimeError # Please triage this failure Language/Libraries_and_Scripts/Imports/invalid_uri_deferred_t02: CompileTimeError # Please triage this failure -Language/Libraries_and_Scripts/Scripts/top_level_main_t05: RuntimeError # Please triage this failure Language/Metadata/before_export_t01: RuntimeError # Please triage this failure Language/Metadata/before_import_t01: RuntimeError # Please triage this failure Language/Metadata/before_library_t01: RuntimeError # Please triage this failure @@ -77,20 +48,7 @@ Language/Metadata/before_type_param_t01: RuntimeError # Please triage this failure Language/Metadata/before_typedef_t01: RuntimeError # Please triage this failure Language/Metadata/before_variable_t01: RuntimeError # Please triage this failure -Language/Mixins/Mixin_Application/static_warning_t01: CompileTimeError # Please triage this failure -Language/Mixins/Mixin_Application/static_warning_t02: CompileTimeError # Please triage this failure -Language/Mixins/Mixin_Application/superinterfaces_t06: CompileTimeError # Please triage this failure -Language/Mixins/Mixin_Application/superinterfaces_t07: CompileTimeError # Please triage this failure -Language/Mixins/Mixin_Application/syntax_t11: CompileTimeError # Please triage this failure -Language/Mixins/Mixin_Application/syntax_t12: CompileTimeError # Please triage this failure -Language/Mixins/Mixin_Application/syntax_t13: CompileTimeError # Please triage this failure -Language/Mixins/Mixin_Application/syntax_t14: CompileTimeError # Please triage this failure Language/Mixins/Mixin_Application/syntax_t20: CompileTimeError # Please triage this failure -Language/Mixins/Mixin_Application/syntax_t21: CompileTimeError # Please triage this failure -Language/Mixins/Mixin_Application/syntax_t22: CompileTimeError # Please triage this failure -Language/Mixins/Mixin_Application/syntax_t23: CompileTimeError # Please triage this failure -Language/Mixins/Mixin_Application/syntax_t24: CompileTimeError # Please triage this failure -Language/Mixins/Mixin_Application/syntax_t25: CompileTimeError # Please triage this failure Language/Mixins/declaring_constructor_t05: MissingCompileTimeError # Issue 24767 Language/Mixins/declaring_constructor_t06: MissingCompileTimeError # Issue 24767 Language/Mixins/deferred_t01: MissingCompileTimeError # Please triage this failure @@ -99,9 +57,6 @@ Language/Reference/Operator_Precedence/precedence_15_unary_prefix_t08: RuntimeError # Please triage this failure Language/Statements/Assert/syntax_t04: MissingCompileTimeError # This is legal Dart Language/Statements/Continue/async_loops_t09: Crash # Please triage this failure -Language/Statements/Local_Function_Declaration/reference_before_declaration_t01: MissingCompileTimeError # Issue 21050 -Language/Statements/Local_Function_Declaration/reference_before_declaration_t03: MissingCompileTimeError # Issue 21050 -Language/Statements/Try/catch_scope_t01: RuntimeError # Please triage this failure Language/Statements/Yield_and_Yield_Each/Yield/execution_async_t02: RuntimeError # Please triage this failure Language/Statements/Yield_and_Yield_Each/Yield/execution_async_t03: Skip # https://github.com/dart-lang/sdk/issues/28873 Language/Statements/Yield_and_Yield_Each/Yield/execution_async_t05: Skip # https://github.com/dart-lang/sdk/issues/28873 @@ -115,12 +70,9 @@ Language/Types/Interface_Types/subtype_t27: Skip # Times out or crashes. Issue 21174 Language/Types/Interface_Types/subtype_t28: Pass, Fail, Crash # Stack overflow. Issue 25282 Language/Types/Interface_Types/subtype_t30: Fail # Issue 14654 -Language/Types/Type_Void/syntax_t02: CompileTimeError # Please triage this failure Language/Types/Type_Void/syntax_t05: MissingCompileTimeError, Crash Language/Types/Type_Void/syntax_t08: MissingCompileTimeError -Language/Variables/final_t01/01: CompileTimeError # co19 issue 77 -Language/Variables/final_t02/01: CompileTimeError # co19 issue 77 -Language/Variables/local_variable_t01: MissingCompileTimeError # Issue 21050 +LayoutTests/fast/css/content/content-quotes-01_t01: Pass, RuntimeError LayoutTests/fast/dom/HTMLLinkElement/link-onload-stylesheet-with-import_t01: Skip # https://github.com/dart-lang/sdk/issues/28873 LayoutTests/fast/dom/css-innerHTML_t01: SkipByDesign # Test is incorrect. LayoutTests/fast/dom/mutation-event-remove-inserted-node_t01: Skip # https://github.com/dart-lang/sdk/issues/28873 @@ -138,6 +90,8 @@ LayoutTests/fast/replaced/table-percent-width_t01: Skip # https://github.com/dart-lang/sdk/issues/28873 LayoutTests/fast/shapes/shape-outside-floats/shape-outside-floats-image-margin_t01: Skip # https://github.com/dart-lang/sdk/issues/28873 LayoutTests/fast/table/css-table-max-height_t01: Skip # https://github.com/dart-lang/sdk/issues/28873 +LayoutTests/fast/table/fixed-table-layout-toggle-colwidth_t01: Pass, RuntimeError +LayoutTests/fast/table/fixed-table-with-percent-width-inside-extra-large-div_t01: Pass, RuntimeError LayoutTests/fast/table/hittest-tablecell-right-edge_t01: Skip # https://github.com/dart-lang/sdk/issues/28873 LayoutTests/fast/table/hittest-tablecell-with-borders-right-edge_t01: Skip # https://github.com/dart-lang/sdk/issues/28873 LayoutTests/fast/table/table-all-rowspans-height-distribution-in-rows-except-overlapped_t01: Skip # https://github.com/dart-lang/sdk/issues/28873 @@ -208,9 +162,6 @@ LibTest/isolate/Isolate/spawn_A02_t02: RuntimeError, Pass # Dart issue 15617 LibTest/isolate/Isolate/spawn_A04_t01: RuntimeError # Dart issue 15974 LibTest/isolate/Isolate/spawn_A06_t06: Skip # Times out. Please triage this failure. -LibTest/isolate/SendPort/send_A01_t01: CompileTimeError # co19-roll r706: Please triage this failure -LibTest/isolate/SendPort/send_A01_t02: CompileTimeError # co19-roll r706: Please triage this failure -LibTest/isolate/SendPort/send_A01_t03: CompileTimeError # co19-roll r706: Please triage this failure LibTest/math/MutableRectangle/boundingBox_A01_t01: RuntimeError, Pass # co19-roll r706: Please triage this failure. LibTest/math/Rectangle/boundingBox_A01_t01: RuntimeError, Pass # co19-roll r706: Please triage this failure. LibTest/math/pow_A04_t01: Fail # co19-roll r587: Please triage this failure @@ -390,7 +341,6 @@ LayoutTests/fast/canvas/canvas-strokePath-gradient-shadow_t01: Pass, RuntimeError # Please triage this failure LayoutTests/fast/canvas/draw-custom-focus-ring_t01: RuntimeError # Please triage this failure LayoutTests/fast/canvas/getPutImageDataPairTest_t01: RuntimeError # Please triage this failure -LayoutTests/fast/canvas/gradient-addColorStop-with-invalid-color_t01: RuntimeError LayoutTests/fast/canvas/rgba-parsing_t01: RuntimeError # Please triage this failure LayoutTests/fast/canvas/setWidthResetAfterForcedRender_t01: Skip # Times out. Please triage this failure LayoutTests/fast/canvas/webgl/bad-arguments-test_t01: RuntimeError # Please triage this failure @@ -1398,6 +1348,9 @@ LayoutTests/fast/dom/HTMLScriptElement/remove-source_t01: RuntimeError # Please triage this failure LayoutTests/fast/events/event-listener-html-non-html-confusion_t01: RuntimeError # Please triage this failure +[ $compiler == dart2js && $runtime == chrome && !$fasta ] +LayoutTests/fast/canvas/gradient-addColorStop-with-invalid-color_t01: RuntimeError + [ $compiler == dart2js && $runtime != chrome && $runtime != drt && $browser && $fast_startup ] WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/attributes/test-005_t01: Fail # please triage WebPlatformTest/shadow-dom/elements-and-dom-objects/extensions-to-element-interface/methods/test-001_t01: Fail # please triage @@ -1495,6 +1448,11 @@ [ $compiler == dart2js && $runtime == d8 && $fast_startup ] LibTest/isolate/Isolate/spawn_A04_t04: Fail # Issue 27558 +[ $compiler == dart2js && $runtime == d8 && $fasta ] +LayoutTests/*: SkipByDesign +LibTest/html/*: SkipByDesign +WebPlatformTest/*: SkipByDesign + [ $compiler == dart2js && $runtime != d8 && $runtime != drt && $checked ] WebPlatformTest/custom-elements/instantiating/createElementNS_A04_t01: RuntimeError # Please triage this failure WebPlatformTest/custom-elements/instantiating/createElement_A04_t01: RuntimeError # Please triage this failure @@ -7017,6 +6975,303 @@ Language/Metadata/compilation_t11: Pass # mirrors not supported, fails for the wrong reason WebPlatformTest/shadow-dom/testcommon: Fail # mirrors not supported +[ $compiler == dart2js && $fasta ] +Language/Classes/Constructors/Generative_Constructors/execution_of_an_initializer_t02: MissingCompileTimeError +Language/Classes/Constructors/Generative_Constructors/execution_t04: Crash +Language/Classes/Constructors/Generative_Constructors/execution_t05: Crash +Language/Classes/Constructors/Generative_Constructors/execution_t06: Crash +Language/Classes/Constructors/Generative_Constructors/execution_t07: Crash +Language/Classes/Constructors/Generative_Constructors/execution_t12: Crash +Language/Classes/Constructors/Generative_Constructors/initializing_formals_execution_t02: MissingCompileTimeError +Language/Classes/Constructors/Generative_Constructors/redirection_t03: Crash +Language/Classes/Constructors/Generative_Constructors/redirection_t07: Crash +Language/Classes/Constructors/Generative_Constructors/redirection_t08: Crash +Language/Classes/Getters/same_name_method_t03: MissingCompileTimeError +Language/Classes/Getters/same_name_method_t04: MissingCompileTimeError +Language/Classes/Getters/same_name_method_t05: MissingCompileTimeError +Language/Classes/Getters/same_name_method_t07: MissingCompileTimeError +Language/Classes/Superinterfaces/more_than_once_t01: MissingCompileTimeError +Language/Classes/Superinterfaces/superclass_as_superinterface_t01: MissingCompileTimeError +Language/Classes/definition_t16: Crash +Language/Classes/definition_t24: MissingCompileTimeError +Language/Classes/same_name_instance_and_static_members_t01: MissingCompileTimeError +Language/Classes/same_name_instance_and_static_members_t02: MissingCompileTimeError +Language/Classes/same_name_instance_and_static_members_t03: MissingCompileTimeError +Language/Classes/same_name_instance_and_static_members_t04: MissingCompileTimeError +Language/Expressions/Assignment/expression_assignment_t07: RuntimeError +Language/Expressions/Assignment/no_such_method_t01: RuntimeError +Language/Expressions/Assignment/no_such_method_t02: RuntimeError +Language/Expressions/Assignment/no_such_method_t03: RuntimeError +Language/Expressions/Assignment/no_such_method_t04: RuntimeError +Language/Expressions/Assignment/no_such_method_t05: RuntimeError +Language/Expressions/Assignment/no_such_method_t06: RuntimeError +Language/Expressions/Assignment/no_such_method_t07: RuntimeError +Language/Expressions/Assignment/no_such_method_t08: RuntimeError +Language/Expressions/Assignment/no_such_method_t09: RuntimeError +Language/Expressions/Constants/bitwise_operators_t05: MissingCompileTimeError +Language/Expressions/Constants/depending_on_itself_t03: Crash +Language/Expressions/Constants/exception_t01: MissingCompileTimeError +Language/Expressions/Constants/exception_t02: MissingCompileTimeError +Language/Expressions/Constants/logical_expression_t04: MissingCompileTimeError +Language/Expressions/Function_Invocation/Unqualified_Invocation/instance_context_invocation_t04: Crash +Language/Expressions/Identifier_Reference/evaluation_variable_or_parameter_t02: RuntimeError +Language/Expressions/Instance_Creation/Const/exception_t01: MissingCompileTimeError +Language/Expressions/Maps/syntax_t08: Crash +Language/Expressions/Method_Invocation/Ordinary_Invocation/evaluation_t08: RuntimeError +Language/Expressions/Method_Invocation/Super_Invocation/accessible_instance_member_t02: Crash +Language/Expressions/Method_Invocation/Super_Invocation/evaluation_t05: RuntimeError +Language/Expressions/Method_Invocation/Super_Invocation/invocation_t02: Crash +Language/Expressions/Null/instance_of_class_null_t01: RuntimeError +Language/Expressions/Strings/String_Interpolation/syntax_t08: Crash +Language/Expressions/Strings/multi_line_t11: Crash # Investiage: source-data from FE causes us to crash +Language/Expressions/Strings/multi_line_t12: Crash +Language/Expressions/Strings/multi_line_t13: Crash +Language/Expressions/Strings/multi_line_t15: Crash +Language/Expressions/Strings/multi_line_t16: Crash +Language/Expressions/Strings/multi_line_t17: Crash +Language/Expressions/Strings/multi_line_t18: Crash +Language/Expressions/Strings/multi_line_t19: Crash +Language/Expressions/Strings/multi_line_t20: Crash +Language/Expressions/Strings/multi_line_t21: Crash +Language/Expressions/Strings/multi_line_t22: Crash +Language/Expressions/Strings/multi_line_t23: Crash +Language/Expressions/Strings/multi_line_t24: Crash +Language/Expressions/Strings/multi_line_t25: Crash +Language/Expressions/Strings/multi_line_t28: Crash +Language/Expressions/Strings/multi_line_t29: Crash +Language/Expressions/Strings/multi_line_t32: Crash +Language/Expressions/Strings/multi_line_t33: Crash +Language/Expressions/This/placement_t04: Crash +Language/Functions/External_Functions/not_connected_to_a_body_t01: RuntimeError +Language/Functions/syntax_t09: Crash +Language/Libraries_and_Scripts/Imports/same_name_t10: RuntimeError +Language/Libraries_and_Scripts/Scripts/top_level_main_t01: CompileTimeError +Language/Metadata/before_class_t01: RuntimeError +Language/Metadata/before_ctor_t01: RuntimeError +Language/Metadata/before_ctor_t02: RuntimeError +Language/Metadata/before_factory_t01: RuntimeError +Language/Metadata/before_function_t01: RuntimeError +Language/Metadata/before_function_t02: RuntimeError +Language/Metadata/before_function_t03: RuntimeError +Language/Metadata/before_function_t04: RuntimeError +Language/Metadata/before_function_t05: RuntimeError +Language/Metadata/before_function_t06: RuntimeError +Language/Metadata/before_function_t07: RuntimeError +Language/Metadata/before_param_t01: RuntimeError +Language/Metadata/before_param_t02: RuntimeError +Language/Metadata/before_param_t03: RuntimeError +Language/Metadata/before_param_t04: RuntimeError +Language/Metadata/before_param_t05: RuntimeError +Language/Metadata/before_param_t06: RuntimeError +Language/Metadata/before_param_t07: RuntimeError +Language/Metadata/before_param_t08: RuntimeError +Language/Metadata/before_variable_t02: RuntimeError +Language/Mixins/Mixin_Application/error_t01: MissingCompileTimeError +Language/Mixins/Mixin_Application/error_t02: MissingCompileTimeError +Language/Mixins/Mixin_Application/syntax_t23: RuntimeError +Language/Mixins/Mixin_Application/syntax_t24: RuntimeError +Language/Mixins/Mixin_Application/syntax_t25: RuntimeError +Language/Statements/Continue/async_loops_t10: Timeout +Language/Types/Type_Void/syntax_t09: MissingCompileTimeError +LayoutTests/fast/canvas/gradient-addColorStop-with-invalid-color_t01: RuntimeError +LayoutTests/fast/canvas/rgba-parsing_t01: RuntimeError +LibTest/core/Invocation/namedArguments_A01_t01: RuntimeError +LibTest/html/Document/dispatchEvent_A01_t01: Crash +LibTest/html/Document/on_A01_t01: Crash +LibTest/html/Document/on_A01_t02: Crash +LibTest/html/Element/mouseEnterEvent_A01_t01: RuntimeError +LibTest/html/HttpRequest/abort_A01_t01: Crash +LibTest/html/HttpRequest/dispatchEvent_A01_t01: Crash +LibTest/html/HttpRequest/getAllResponseHeaders_A01_t01: Crash +LibTest/html/HttpRequest/getResponseHeader_A01_t01: Crash +LibTest/html/HttpRequest/getString_A01_t01: Crash +LibTest/html/HttpRequest/onAbort_A01_t01: Crash +LibTest/html/HttpRequest/onLoadEnd_A01_t01: Crash +LibTest/html/HttpRequest/onLoadStart_A01_t01: Crash +LibTest/html/HttpRequest/onLoad_A01_t01: Crash +LibTest/html/HttpRequest/onReadyStateChange_A01_t01: Crash +LibTest/html/HttpRequest/overrideMimeType_A01_t01: Crash +LibTest/html/HttpRequest/readyStateChangeEvent_A01_t01: Crash +LibTest/html/HttpRequest/request_A01_t01: Crash +LibTest/html/HttpRequest/responseText_A01_t01: Crash +LibTest/html/HttpRequest/setRequestHeader_A01_t01: Crash +LibTest/html/HttpRequest/statusText_A01_t01: Crash +LibTest/html/HttpRequest/status_A01_t01: Crash +LibTest/html/HttpRequestUpload/onAbort_A01_t01: Crash +LibTest/html/IFrameElement/contentWindow_A01_t01: Crash +LibTest/html/IFrameElement/dispatchEvent_A01_t01: Crash +LibTest/html/Node/dispatchEvent_A01_t01: Crash +LibTest/html/Window/dispatchEvent_A01_t01: Crash +LibTest/html/Window/postMessage_A01_t02: Crash +LibTest/html/Window/requestFileSystem_A02_t01: Crash +LibTest/isolate/SendPort/send_A01_t03: RuntimeError +WebPlatformTest/html/semantics/embedded-content/the-audio-element/audio_constructor_t01: RuntimeError + +[ $compiler == dart2js && $fasta && $host_checked ] +Language/Classes/Constructors/Factories/redirecting_constructor_t03: Crash +Language/Classes/Constructors/Generative_Constructors/execution_t04: Crash +Language/Classes/Constructors/Generative_Constructors/execution_t05: Crash +Language/Classes/Constructors/Generative_Constructors/execution_t06: Crash +Language/Classes/Constructors/Generative_Constructors/execution_t07: Crash +Language/Classes/Constructors/Generative_Constructors/execution_t12: Crash +Language/Classes/Constructors/Generative_Constructors/redirection_t03: Crash +Language/Classes/Constructors/Generative_Constructors/redirection_t07: Crash +Language/Classes/Constructors/Generative_Constructors/redirection_t08: Crash +Language/Classes/Instance_Methods/Operators/allowed_names_t02: Crash +Language/Classes/Instance_Methods/Operators/allowed_names_t05: Crash +Language/Classes/Instance_Methods/Operators/allowed_names_t07: Crash +Language/Classes/Instance_Methods/Operators/allowed_names_t08: Crash +Language/Classes/Instance_Methods/Operators/allowed_names_t09: Crash +Language/Classes/Instance_Methods/Operators/allowed_names_t10: Crash +Language/Classes/Instance_Methods/Operators/allowed_names_t11: Crash +Language/Classes/Instance_Methods/Operators/allowed_names_t12: Crash +Language/Classes/Instance_Methods/Operators/allowed_names_t13: Crash +Language/Classes/Instance_Methods/Operators/allowed_names_t14: Crash +Language/Classes/Instance_Methods/Operators/allowed_names_t15: Crash +Language/Classes/Instance_Methods/Operators/allowed_names_t16: Crash +Language/Classes/Instance_Methods/Operators/allowed_names_t17: Crash +Language/Classes/Instance_Methods/Operators/allowed_names_t18: Crash +Language/Classes/Instance_Methods/Operators/allowed_names_t19: Crash +Language/Classes/Instance_Methods/Operators/allowed_names_t20: Crash +Language/Classes/Instance_Methods/Operators/allowed_names_t21: Crash +Language/Classes/Instance_Methods/Operators/allowed_names_t22: Crash +Language/Classes/definition_t16: Crash +Language/Classes/member_definition_t04: Crash +Language/Classes/member_definition_t06: Crash +Language/Classes/member_definition_t07: Crash +Language/Classes/member_definition_t08: Crash +Language/Classes/member_definition_t09: Crash +Language/Classes/member_definition_t10: Crash +Language/Classes/member_definition_t11: Crash +Language/Classes/member_definition_t12: Crash +Language/Expressions/Constants/depending_on_itself_t03: Crash +Language/Expressions/Function_Invocation/Unqualified_Invocation/instance_context_invocation_t04: Crash +Language/Expressions/Maps/syntax_t08: Crash +Language/Expressions/Method_Invocation/Super_Invocation/accessible_instance_member_t02: Crash +Language/Expressions/Method_Invocation/Super_Invocation/evaluation_t05: Crash +Language/Expressions/Method_Invocation/Super_Invocation/getter_lookup_failed_t03: Crash +Language/Expressions/Method_Invocation/Super_Invocation/getter_lookup_failed_t04: Crash +Language/Expressions/Method_Invocation/Super_Invocation/invocation_t02: Crash +Language/Expressions/Strings/String_Interpolation/syntax_t08: Crash +Language/Expressions/Strings/multi_line_t11: Crash +Language/Expressions/Strings/multi_line_t12: Crash +Language/Expressions/Strings/multi_line_t13: Crash +Language/Expressions/Strings/multi_line_t15: Crash +Language/Expressions/Strings/multi_line_t16: Crash +Language/Expressions/Strings/multi_line_t17: Crash +Language/Expressions/Strings/multi_line_t18: Crash +Language/Expressions/Strings/multi_line_t19: Crash +Language/Expressions/Strings/multi_line_t20: Crash +Language/Expressions/Strings/multi_line_t21: Crash +Language/Expressions/Strings/multi_line_t22: Crash +Language/Expressions/Strings/multi_line_t23: Crash +Language/Expressions/Strings/multi_line_t24: Crash +Language/Expressions/Strings/multi_line_t25: Crash +Language/Expressions/Strings/multi_line_t28: Crash +Language/Expressions/Strings/multi_line_t29: Crash +Language/Expressions/Strings/multi_line_t32: Crash +Language/Expressions/Strings/multi_line_t33: Crash +Language/Expressions/This/placement_t04: Crash +Language/Functions/setter_modifier_t01: Crash +Language/Functions/setter_modifier_t02: Crash +Language/Functions/setter_modifier_t03: Crash +Language/Functions/setter_modifier_t04: Crash +Language/Functions/setter_modifier_t05: Crash +Language/Functions/setter_modifier_t06: Crash +Language/Functions/syntax_t09: Crash +Language/Statements/For/syntax_t13: Crash +Language/Statements/For/syntax_t20: Crash +LibTest/core/Invocation/namedArguments_A01_t01: Crash +LibTest/html/Document/dispatchEvent_A01_t01: Crash +LibTest/html/Document/on_A01_t01: Crash +LibTest/html/Document/on_A01_t02: Crash +LibTest/html/HttpRequest/abort_A01_t01: Crash +LibTest/html/HttpRequest/dispatchEvent_A01_t01: Crash +LibTest/html/HttpRequest/getAllResponseHeaders_A01_t01: Crash +LibTest/html/HttpRequest/getResponseHeader_A01_t01: Crash +LibTest/html/HttpRequest/getString_A01_t01: Crash +LibTest/html/HttpRequest/onAbort_A01_t01: Crash +LibTest/html/HttpRequest/onError_A01_t02: Crash +LibTest/html/HttpRequest/onLoadEnd_A01_t01: Crash +LibTest/html/HttpRequest/onLoadStart_A01_t01: Crash +LibTest/html/HttpRequest/onLoad_A01_t01: Crash +LibTest/html/HttpRequest/onReadyStateChange_A01_t01: Crash +LibTest/html/HttpRequest/overrideMimeType_A01_t01: Crash +LibTest/html/HttpRequest/readyStateChangeEvent_A01_t01: Crash +LibTest/html/HttpRequest/request_A01_t01: Crash +LibTest/html/HttpRequest/responseText_A01_t01: Crash +LibTest/html/HttpRequest/responseText_A01_t02: Crash +LibTest/html/HttpRequest/setRequestHeader_A01_t01: Crash +LibTest/html/HttpRequest/statusText_A01_t01: Crash +LibTest/html/HttpRequest/status_A01_t01: Crash +LibTest/html/HttpRequestUpload/onAbort_A01_t01: Crash +LibTest/html/HttpRequestUpload/onError_A01_t02: Crash +LibTest/html/HttpRequestUpload/onLoadEnd_A01_t01: Crash +LibTest/html/HttpRequestUpload/onLoadStart_A01_t01: Crash +LibTest/html/HttpRequestUpload/onLoad_A01_t01: Crash +LibTest/html/IFrameElement/contentWindow_A01_t01: Crash +LibTest/html/IFrameElement/dispatchEvent_A01_t01: Crash +LibTest/html/Node/dispatchEvent_A01_t01: Crash +LibTest/html/Window/dispatchEvent_A01_t01: Crash +LibTest/html/Window/postMessage_A01_t02: Crash +LibTest/html/Window/requestFileSystem_A01_t01: Crash +LibTest/html/Window/requestFileSystem_A01_t02: Crash +LibTest/html/Window/requestFileSystem_A02_t01: Crash + +[ $compiler == dart2js && !$fasta ] +Language/Classes/Constructors/Generative_Constructors/execution_t03: RuntimeError # https://github.com/dart-lang/sdk/issues/29596 +Language/Classes/Getters/static_getter_t02: CompileTimeError # Should be fixed with unified frontend. Issue 24534 +Language/Classes/Instance_Methods/same_name_setter_t01: Fail # Issue 21201 +Language/Classes/Setters/name_t01: CompileTimeError # Issue 5023 +Language/Classes/Setters/name_t02: CompileTimeError # Issue 5023 +Language/Classes/Setters/name_t03: RuntimeError # Issue 5023 +Language/Classes/Setters/name_t07: CompileTimeError # Issue 5023 +Language/Classes/Setters/static_setter_t06: RuntimeError # Should be fixed with unified frontend. Issue 23749 +Language/Classes/Static_Methods/same_name_method_and_setter_t01: CompileTimeError # Should be fixed with unified frontend. Issue 23749 +Language/Classes/same_name_type_variable_t01: Fail # Missing CT error on class with same name a type parameter +Language/Classes/same_name_type_variable_t02: Fail # Missing CT error on member with same name a type parameter +Language/Classes/same_name_type_variable_t03: Fail # Missing CT error on member with same name a type parameter +Language/Classes/same_name_type_variable_t05: Fail # Missing CT error on member with same name a type parameter +Language/Classes/same_name_type_variable_t06: Fail # Missing CT error on member with same name a type parameter +Language/Classes/same_name_type_variable_t08: Fail # Missing CT error on member with same name a type parameter +Language/Classes/same_name_type_variable_t09: Fail # Missing CT error on member with same name a type parameter +Language/Errors_and_Warnings/compile_error_t06: MissingCompileTimeError # Please triage this failure +Language/Errors_and_Warnings/compile_error_t07: MissingCompileTimeError # Please triage this failure +Language/Expressions/Constants/identifier_denotes_a_constant_t06: MissingCompileTimeError # Issue 26580 +Language/Expressions/Constants/identifier_denotes_a_constant_t07: MissingCompileTimeError # Issue 26580 +Language/Expressions/Instance_Creation/New/execution_t04: RuntimeError # https://github.com/dart-lang/sdk/issues/29596 +Language/Expressions/Instance_Creation/New/execution_t06: RuntimeError # https://github.com/dart-lang/sdk/issues/29596 +Language/Expressions/Maps/key_value_equals_operator_t02: CompileTimeError # Please triage this failure +Language/Expressions/Maps/static_type_dynamic_t01: CompileTimeError # Maybe ok. Issue 17207 +Language/Functions/External_Functions/not_connected_to_a_body_t01: CompileTimeError, OK # Issue 5021 +Language/Interfaces/Superinterfaces/Inheritance_and_Overriding/same_name_method_and_getter_t01: CompileTimeError # Please triage this failure +Language/Interfaces/Superinterfaces/Inheritance_and_Overriding/same_name_method_and_getter_t02: CompileTimeError # Please triage this failure +Language/Libraries_and_Scripts/Imports/invalid_uri_deferred_t01/01: CompileTimeError # Please triage this failure +Language/Libraries_and_Scripts/Scripts/top_level_main_t05: RuntimeError # Please triage this failure +Language/Mixins/Mixin_Application/static_warning_t01: CompileTimeError # Please triage this failure +Language/Mixins/Mixin_Application/static_warning_t02: CompileTimeError # Please triage this failure +Language/Mixins/Mixin_Application/superinterfaces_t06: CompileTimeError # Please triage this failure +Language/Mixins/Mixin_Application/superinterfaces_t07: CompileTimeError # Please triage this failure +Language/Mixins/Mixin_Application/syntax_t11: CompileTimeError # Please triage this failure +Language/Mixins/Mixin_Application/syntax_t12: CompileTimeError # Please triage this failure +Language/Mixins/Mixin_Application/syntax_t13: CompileTimeError # Please triage this failure +Language/Mixins/Mixin_Application/syntax_t14: CompileTimeError # Please triage this failure +Language/Mixins/Mixin_Application/syntax_t21: CompileTimeError # Please triage this failure +Language/Mixins/Mixin_Application/syntax_t22: CompileTimeError # Please triage this failure +Language/Mixins/Mixin_Application/syntax_t23: CompileTimeError # Please triage this failure +Language/Mixins/Mixin_Application/syntax_t24: CompileTimeError # Please triage this failure +Language/Mixins/Mixin_Application/syntax_t25: CompileTimeError # Please triage this failure +Language/Statements/Local_Function_Declaration/reference_before_declaration_t01: MissingCompileTimeError # Issue 21050 +Language/Statements/Local_Function_Declaration/reference_before_declaration_t03: MissingCompileTimeError # Issue 21050 +Language/Statements/Try/catch_scope_t01: RuntimeError # Please triage this failure +Language/Types/Type_Void/syntax_t02: CompileTimeError # Please triage this failure +Language/Variables/final_t01/01: CompileTimeError # co19 issue 77 +Language/Variables/final_t02/01: CompileTimeError # co19 issue 77 +Language/Variables/local_variable_t01: MissingCompileTimeError # Issue 21050 +LibTest/isolate/SendPort/send_A01_t01: CompileTimeError # co19-roll r706: Please triage this failure +LibTest/isolate/SendPort/send_A01_t02: CompileTimeError # co19-roll r706: Please triage this failure +LibTest/isolate/SendPort/send_A01_t03: CompileTimeError # co19-roll r706: Please triage this failure + [ $compiler == dart2js && $jscl ] LibTest/core/RegExp/Pattern_semantics/firstMatch_NonEmptyClassRanges_A01_t01: RuntimeError, OK # This is not rejected by V8. Issue 22200 LibTest/core/RegExp/Pattern_semantics/firstMatch_NonEmptyClassRanges_A01_t05: RuntimeError # Issue 22200
diff --git a/tests/co19/co19-kernel.status b/tests/co19/co19-kernel.status index 302d5a6..a66ff5b 100644 --- a/tests/co19/co19-kernel.status +++ b/tests/co19/co19-kernel.status
@@ -11,6 +11,46 @@ LibTest/html/*: Skip # TODO(ahe): Make dart:html available. WebPlatformTest/*: Skip # TODO(ahe): Make dart:html available. +[ $compiler != dart2js && $fasta && !$strong ] +Language/Classes/Constructors/Constant_Constructors/initializer_not_a_constant_t03: MissingCompileTimeError +Language/Classes/Constructors/Generative_Constructors/execution_t05: MissingCompileTimeError +Language/Expressions/Constants/bitwise_operators_t02: MissingCompileTimeError +Language/Expressions/Constants/exception_t04: MissingCompileTimeError +Language/Expressions/Constants/literal_number_t01: CompileTimeError +Language/Expressions/Constants/literal_string_t02: MissingCompileTimeError +Language/Expressions/Constants/logical_expression_t03: MissingCompileTimeError +Language/Expressions/Constants/math_operators_t01: CompileTimeError +Language/Expressions/Constants/math_operators_t04: MissingCompileTimeError +Language/Expressions/Constants/math_operators_t06: CompileTimeError +Language/Expressions/Numbers/static_type_of_int_t01: CompileTimeError +Language/Expressions/Numbers/syntax_t10: CompileTimeError +Language/Expressions/This/placement_t04: MissingCompileTimeError +LibTest/core/double/isInfinite_A01_t03: CompileTimeError +LibTest/core/int/abs_A01_t01: CompileTimeError +LibTest/core/int/ceilToDouble_A01_t01: CompileTimeError +LibTest/core/int/ceil_A01_t01: CompileTimeError +LibTest/core/int/floorToDouble_A01_t01: CompileTimeError +LibTest/core/int/floor_A01_t01: CompileTimeError +LibTest/core/int/isInfinite_A01_t01: CompileTimeError +LibTest/core/int/isNaN_A01_t01: CompileTimeError +LibTest/core/int/isNegative_A01_t01: CompileTimeError +LibTest/core/int/operator_GE_A01_t01: CompileTimeError +LibTest/core/int/operator_LE_A01_t01: CompileTimeError +LibTest/core/int/operator_division_A01_t01: CompileTimeError +LibTest/core/int/operator_multiplication_A01_t01: CompileTimeError +LibTest/core/int/operator_remainder_A01_t02: CompileTimeError +LibTest/core/int/operator_subtraction_A01_t01: CompileTimeError +LibTest/core/int/operator_truncating_division_A01_t01: CompileTimeError +LibTest/core/int/operator_unary_minus_A01_t01: CompileTimeError +LibTest/core/int/parse_A01_t01: CompileTimeError +LibTest/core/int/remainder_A01_t02: CompileTimeError +LibTest/core/int/roundToDouble_A01_t01: CompileTimeError +LibTest/core/int/round_A01_t01: CompileTimeError +LibTest/core/int/toInt_A01_t01: CompileTimeError +LibTest/core/int/truncateToDouble_A01_t01: CompileTimeError +LibTest/core/int/truncate_A01_t01: CompileTimeError +LibTest/math/pow_A10_t01: CompileTimeError + [ $compiler == fasta && $strong ] Language/Classes/Constructors/Constant_Constructors/initializer_not_a_constant_t01: MissingCompileTimeError Language/Classes/Constructors/Constant_Constructors/initializer_not_a_constant_t02: MissingCompileTimeError @@ -1609,7 +1649,6 @@ Utils/tests/Expect/throws_A01_t04: CompileTimeError [ $fasta && !$strong ] -Language/Classes/Constructors/Constant_Constructors/initializer_not_a_constant_t03: MissingCompileTimeError Language/Classes/Constructors/Constant_Constructors/potentially_constant_expression_t01: MissingCompileTimeError Language/Classes/Constructors/Factories/const_modifier_t01: MissingCompileTimeError Language/Classes/Constructors/Factories/const_modifier_t02: MissingCompileTimeError @@ -1620,7 +1659,6 @@ Language/Classes/Constructors/Factories/name_t04: MissingCompileTimeError Language/Classes/Constructors/Factories/name_t05: MissingCompileTimeError Language/Classes/Constructors/Generative_Constructors/execution_t04: MissingCompileTimeError -Language/Classes/Constructors/Generative_Constructors/execution_t05: MissingCompileTimeError Language/Classes/Constructors/Generative_Constructors/execution_t06: MissingCompileTimeError Language/Classes/Constructors/Generative_Constructors/execution_t07: MissingCompileTimeError Language/Classes/Constructors/Generative_Constructors/execution_t12: MissingCompileTimeError @@ -1637,7 +1675,6 @@ Language/Classes/Superinterfaces/wrong_type_t05: MissingCompileTimeError Language/Classes/same_name_type_variable_t04: MissingCompileTimeError Language/Classes/same_name_type_variable_t07: MissingCompileTimeError -Language/Expressions/Constants/bitwise_operators_t02: MissingCompileTimeError Language/Expressions/Constants/bitwise_operators_t03: MissingCompileTimeError Language/Expressions/Constants/bitwise_operators_t04: MissingCompileTimeError Language/Expressions/Constants/bitwise_operators_t06: MissingCompileTimeError @@ -1645,14 +1682,7 @@ Language/Expressions/Constants/constant_map_t02: MissingCompileTimeError Language/Expressions/Constants/depending_on_itself_t03: MissingCompileTimeError Language/Expressions/Constants/equals_expression_t03: MissingCompileTimeError -Language/Expressions/Constants/exception_t04: MissingCompileTimeError -Language/Expressions/Constants/literal_number_t01: CompileTimeError -Language/Expressions/Constants/literal_string_t02: MissingCompileTimeError -Language/Expressions/Constants/logical_expression_t03: MissingCompileTimeError -Language/Expressions/Constants/math_operators_t01: CompileTimeError -Language/Expressions/Constants/math_operators_t04: MissingCompileTimeError Language/Expressions/Constants/math_operators_t05: MissingCompileTimeError -Language/Expressions/Constants/math_operators_t06: CompileTimeError Language/Expressions/Function_Invocation/Unqualified_Invocation/instance_context_invocation_t03: MissingCompileTimeError Language/Expressions/Function_Invocation/Unqualified_Invocation/instance_context_invocation_t04: MissingCompileTimeError Language/Expressions/Instance_Creation/Const/arguments_t03: MissingCompileTimeError @@ -1662,10 +1692,8 @@ Language/Expressions/Method_Invocation/Ordinary_Invocation/object_method_invocation_t02: MissingCompileTimeError Language/Expressions/Method_Invocation/Super_Invocation/invocation_t02: MissingCompileTimeError Language/Expressions/Method_Invocation/Super_Invocation/invocation_t03: MissingCompileTimeError -Language/Expressions/Numbers/static_type_of_int_t01: CompileTimeError Language/Expressions/Numbers/syntax_t06: CompileTimeError Language/Expressions/Numbers/syntax_t09: CompileTimeError -Language/Expressions/Numbers/syntax_t10: CompileTimeError Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t01: MissingCompileTimeError Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t02: MissingCompileTimeError Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t03: MissingCompileTimeError @@ -1674,7 +1702,6 @@ Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t06: MissingCompileTimeError Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t07: MissingCompileTimeError Language/Expressions/Property_Extraction/Getter_Access_and_Method_Extraction/class_object_member_t08: MissingCompileTimeError -Language/Expressions/This/placement_t04: MissingCompileTimeError Language/Expressions/Throw/syntax_t02: MissingCompileTimeError Language/Functions/Formal_Parameters/Optional_Formals/default_value_t01: MissingCompileTimeError Language/Functions/Formal_Parameters/Optional_Formals/default_value_t02: MissingCompileTimeError @@ -1703,47 +1730,22 @@ Language/Types/Interface_Types/subtype_t30: CompileTimeError Language/Variables/final_or_static_initialization_t02: MissingCompileTimeError Language/Variables/final_or_static_initialization_t03: MissingCompileTimeError -LibTest/core/double/isInfinite_A01_t03: CompileTimeError -LibTest/core/int/abs_A01_t01: CompileTimeError -LibTest/core/int/ceilToDouble_A01_t01: CompileTimeError -LibTest/core/int/ceil_A01_t01: CompileTimeError LibTest/core/int/compareTo_A01_t01: CompileTimeError -LibTest/core/int/floorToDouble_A01_t01: CompileTimeError -LibTest/core/int/floor_A01_t01: CompileTimeError LibTest/core/int/isEven_A01_t01: CompileTimeError -LibTest/core/int/isInfinite_A01_t01: CompileTimeError -LibTest/core/int/isNaN_A01_t01: CompileTimeError -LibTest/core/int/isNegative_A01_t01: CompileTimeError LibTest/core/int/isOdd_A01_t01: CompileTimeError LibTest/core/int/operator_AND_A01_t01: CompileTimeError -LibTest/core/int/operator_GE_A01_t01: CompileTimeError LibTest/core/int/operator_GT_A01_t01: CompileTimeError -LibTest/core/int/operator_LE_A01_t01: CompileTimeError LibTest/core/int/operator_LT_A01_t01: CompileTimeError LibTest/core/int/operator_NOT_A01_t01: CompileTimeError LibTest/core/int/operator_OR_A01_t01: CompileTimeError LibTest/core/int/operator_XOR_A01_t01: CompileTimeError LibTest/core/int/operator_addition_A01_t01: CompileTimeError -LibTest/core/int/operator_division_A01_t01: CompileTimeError LibTest/core/int/operator_left_shift_A01_t01: CompileTimeError -LibTest/core/int/operator_multiplication_A01_t01: CompileTimeError LibTest/core/int/operator_remainder_A01_t01: CompileTimeError -LibTest/core/int/operator_remainder_A01_t02: CompileTimeError LibTest/core/int/operator_right_shift_A01_t01: CompileTimeError -LibTest/core/int/operator_subtraction_A01_t01: CompileTimeError -LibTest/core/int/operator_truncating_division_A01_t01: CompileTimeError LibTest/core/int/operator_truncating_division_A01_t02: CompileTimeError -LibTest/core/int/operator_unary_minus_A01_t01: CompileTimeError -LibTest/core/int/parse_A01_t01: CompileTimeError LibTest/core/int/remainder_A01_t01: CompileTimeError -LibTest/core/int/remainder_A01_t02: CompileTimeError -LibTest/core/int/roundToDouble_A01_t01: CompileTimeError -LibTest/core/int/round_A01_t01: CompileTimeError LibTest/core/int/toDouble_A01_t01: CompileTimeError -LibTest/core/int/toInt_A01_t01: CompileTimeError -LibTest/core/int/truncateToDouble_A01_t01: CompileTimeError -LibTest/core/int/truncate_A01_t01: CompileTimeError -LibTest/math/pow_A10_t01: CompileTimeError LibTest/typed_data/ByteData/getUint64_A01_t01: CompileTimeError LibTest/typed_data/ByteData/setUint64_A01_t01: CompileTimeError LibTest/typed_data/Uint64List/Uint64List.fromList_A01_t01: CompileTimeError
diff --git a/tests/compiler/dart2js/rti/data/closure_unneeded.dart b/tests/compiler/dart2js/rti/data/closure_unneeded.dart new file mode 100644 index 0000000..5e985bd --- /dev/null +++ b/tests/compiler/dart2js/rti/data/closure_unneeded.dart
@@ -0,0 +1,20 @@ +// Copyright (c) 2018, 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. + +import 'package:expect/expect.dart'; + +/*class: A:*/ +class A<T> { + @NoInline() + m() { + return /**/ (T t, String s) {}; + } +} + +@NoInline() +test(o) => o is void Function(int); + +main() { + test(new A<int>().m()); +}
diff --git a/tests/compiler/dart2js/rti/data/type_variable_function_type.dart b/tests/compiler/dart2js/rti/data/type_variable_function_type.dart new file mode 100644 index 0000000..53e53f3 --- /dev/null +++ b/tests/compiler/dart2js/rti/data/type_variable_function_type.dart
@@ -0,0 +1,29 @@ +// Copyright (c) 2018, 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. + +// Based on tests\language_2\type_variable_function_type_test.dart + +import 'package:expect/expect.dart'; + +typedef T Func<T>(); + +/*class: Foo:explicit=[Foo.S Function()],needsArgs*/ +class Foo<S> { + m(x) => x is Func<S>; +} + +/*class: Bar:needsArgs*/ +class Bar<T> { + f() { + /*needsSignature*/ T local() => null; + return local; + } +} + +void main() { + dynamic x = new Foo<List<String>>(); + if (new DateTime.now().millisecondsSinceEpoch == 42) x = new Foo<int>(); + Expect.isFalse(x.m(new Bar<String>().f())); + Expect.isTrue(x.m(new Bar<List<String>>().f())); +}
diff --git a/tests/compiler/dart2js/rti/emission/closure_signature.dart b/tests/compiler/dart2js/rti/emission/closure_signature.dart new file mode 100644 index 0000000..b1250b0 --- /dev/null +++ b/tests/compiler/dart2js/rti/emission/closure_signature.dart
@@ -0,0 +1,26 @@ +// Copyright (c) 2018, 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. + +import 'package:expect/expect.dart'; + +/*class: A:checks=[],instance*/ +class A<T> { + @NoInline() + m() { + return /*checks=[$signature],instance*/ (T t) {}; + } + + @NoInline() + f() { + return /*checks=[],functionType,instance*/ (int t) {}; + } +} + +@NoInline() +test(o) => o is void Function(int); + +main() { + test(new A<int>().m()); + test(new A<int>().f()); +}
diff --git a/tests/compiler/dart2js/rti/emission/closure_signature_unneeded.dart b/tests/compiler/dart2js/rti/emission/closure_signature_unneeded.dart new file mode 100644 index 0000000..c205496 --- /dev/null +++ b/tests/compiler/dart2js/rti/emission/closure_signature_unneeded.dart
@@ -0,0 +1,22 @@ +// Copyright (c) 2018, 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. + +import 'package:expect/expect.dart'; + +/*class: A:checks=[],instance*/ +class A<T> { + @NoInline() + m() { + // TODO(johnniwinther): The signature is not needed since the type isn't a + // potential subtype of the checked function types. + return /*checks=[$signature],instance*/ (T t, String s) {}; + } +} + +@NoInline() +test(o) => o is void Function(int); + +main() { + test(new A<int>().m()); +}
diff --git a/tests/compiler/dart2js/rti/emission/type_variable_function_type.dart b/tests/compiler/dart2js/rti/emission/type_variable_function_type.dart new file mode 100644 index 0000000..6f7f82e --- /dev/null +++ b/tests/compiler/dart2js/rti/emission/type_variable_function_type.dart
@@ -0,0 +1,30 @@ +// Copyright (c) 2018, 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. + +// Based on tests\language_2\type_variable_function_type_test.dart + +import 'package:expect/expect.dart'; + +typedef T Func<T>(); + +/*class: Foo:checks=[],instance*/ +class Foo<S> { + m(x) => x is Func<S>; +} + +/*class: Bar:checks=[],instance*/ +class Bar<T> { + f() { + /*checks=[$signature],instance*/ + T local() => null; + return local; + } +} + +void main() { + dynamic x = new Foo<List<String>>(); + if (new DateTime.now().millisecondsSinceEpoch == 42) x = new Foo<int>(); + Expect.isFalse(x.m(new Bar<String>().f())); + Expect.isTrue(x.m(new Bar<List<String>>().f())); +}
diff --git a/tests/compiler/dart2js_extra/closure_signature_unneeded_test.dart b/tests/compiler/dart2js_extra/closure_signature_unneeded_test.dart new file mode 100644 index 0000000..7712dad --- /dev/null +++ b/tests/compiler/dart2js_extra/closure_signature_unneeded_test.dart
@@ -0,0 +1,19 @@ +// Copyright (c) 2018, 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. + +import 'package:expect/expect.dart'; + +class A<T> { + @NoInline() + m() { + return (T t, String s) {}; + } +} + +@NoInline() +test(o) => o is void Function(int); + +main() { + Expect.isFalse(test(new A<int>().m())); +}
diff --git a/tests/compiler/dart2js_extra/dart2js_extra.status b/tests/compiler/dart2js_extra/dart2js_extra.status index 06bdac6..265e9ab 100644 --- a/tests/compiler/dart2js_extra/dart2js_extra.status +++ b/tests/compiler/dart2js_extra/dart2js_extra.status
@@ -12,6 +12,7 @@ no_such_method_test: Fail # Wrong Invocation.memberName. statements_test: Fail typed_locals_test: Pass, Fail +closure_signature_unneeded_test: RuntimeError # Too eager signature generation. [ $compiler != dart2js ] dummy_compiler_test: SkipByDesign # Issue 30773. Test should be migrated as a unit test of dart2js, is only intended to test self-hosting.
diff --git a/tests/corelib_2/corelib_2.status b/tests/corelib_2/corelib_2.status index 011448e..0602e04 100644 --- a/tests/corelib_2/corelib_2.status +++ b/tests/corelib_2/corelib_2.status
@@ -2,6 +2,8 @@ # 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. +iterable_where_type_test: RuntimeError # Disabled. Issue 32463 + [ $compiler == dart2analyzer ] compare_to2_test: CompileTimeError # invalid test int_parse_radix_bad_handler_test: MissingCompileTimeError @@ -217,7 +219,6 @@ integer_to_radix_string_test/02: RuntimeError integer_to_radix_string_test/none: RuntimeError integer_to_string_test/01: RuntimeError -iterable_empty_test: Crash # 'file:*/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart': Failed assertion: line 391 pos 16: 'receiver.nonCheck() == user.inputs[1].nonCheck()': is not true. iterable_fold_test: Crash # NoSuchMethodError: The getter 'isDynamic' was called on null. iterable_followed_by_test: RuntimeError iterable_reduce_test: Crash # NoSuchMethodError: The getter 'isDynamic' was called on null. @@ -230,7 +231,6 @@ list_test/none: RuntimeError list_unmodifiable_test: RuntimeError nan_infinity_test/01: RuntimeError -queue_test: Crash # 'file:*/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart': Failed assertion: line 391 pos 16: 'receiver.nonCheck() == user.inputs[1].nonCheck()': is not true. reg_exp_all_matches_test: RuntimeError reg_exp_start_end_test: RuntimeError regexp/capture_test: RuntimeError @@ -284,7 +284,6 @@ list_unmodifiable_test: RuntimeError nan_infinity_test/01: RuntimeError nsm_invocation_test: RuntimeError # Symbols don't match due to minifiaction. -queue_test: RuntimeError reg_exp_all_matches_test: RuntimeError reg_exp_start_end_test: RuntimeError regexp/capture_test: RuntimeError
diff --git a/tests/html/html.status b/tests/html/html.status index 889eb50..cf32f19 100644 --- a/tests/html/html.status +++ b/tests/html/html.status
@@ -192,6 +192,177 @@ speechrecognition_test/types: Fail # TODO(dart2js-team): Please triage this failure. xhr_test/json: Fail # TODO(dart2js-team): Please triage this failure. +[ $compiler == dart2js && $runtime == d8 && $fasta ] +async_spawnuri_test: RuntimeError +async_test: RuntimeError +audiobuffersourcenode_test: RuntimeError +audiocontext_test: RuntimeError +audioelement_test: RuntimeError +b_element_test: RuntimeError +blob_constructor_test: RuntimeError +cache_test: RuntimeError +callbacks_test: RuntimeError +canvas_pixel_array_type_alias_test: RuntimeError +canvas_test: RuntimeError +canvasrenderingcontext2d_test: RuntimeError +cdata_test: RuntimeError +client_rect_test: RuntimeError +cross_domain_iframe_test: RuntimeError +crypto_test: RuntimeError +css_rule_list_test: RuntimeError +css_test: RuntimeError +cssstyledeclaration_test: RuntimeError +custom/attribute_changed_callback_test: RuntimeError +custom/constructor_calls_created_synchronously_test: RuntimeError +custom/created_callback_test: RuntimeError +custom/document_register_basic_test: RuntimeError +custom/document_register_template_test: RuntimeError +custom/document_register_type_extensions_test: RuntimeError +custom/element_upgrade_test: RuntimeError +custom/entered_left_view_test: RuntimeError +custom/js_custom_test: RuntimeError +custom_element_method_clash_test: RuntimeError +custom_element_name_clash_test: RuntimeError +custom_elements_23127_test: RuntimeError +custom_elements_test: RuntimeError +custom_tags_test: RuntimeError +dart_object_local_storage_test: RuntimeError +datalistelement_test: RuntimeError +document_test: RuntimeError +documentfragment_test: RuntimeError +dom_constructors_test: RuntimeError +domparser_test: RuntimeError +element_add_test: RuntimeError +element_animate_test: RuntimeError +element_classes_svg_test: RuntimeError +element_classes_test: RuntimeError +element_constructor_1_test: RuntimeError +element_dimensions_test: RuntimeError +element_offset_test: RuntimeError +element_test: RuntimeError +element_types_constructors1_test: RuntimeError +element_types_constructors2_test: RuntimeError +element_types_constructors3_test: RuntimeError +element_types_constructors4_test: RuntimeError +element_types_constructors5_test: RuntimeError +element_types_constructors6_test: RuntimeError +element_types_test: RuntimeError +event_customevent_test: RuntimeError +event_test: RuntimeError +events_test: RuntimeError +exceptions_test: RuntimeError +fileapi_test: RuntimeError +filereader_test: RuntimeError +filteredelementlist_test: RuntimeError +fontface_test: RuntimeError +form_data_test: RuntimeError +form_element_test: RuntimeError +gamepad_test: RuntimeError +geolocation_test: RuntimeError +hidden_dom_1_test: RuntimeError +hidden_dom_2_test: RuntimeError +history_test: RuntimeError +htmlcollection_test: RuntimeError +htmlelement_test: RuntimeError +htmloptionscollection_test: RuntimeError +indexeddb_1_test: RuntimeError +indexeddb_2_test: RuntimeError +indexeddb_4_test: RuntimeError +input_element_test: RuntimeError +instance_of_test: RuntimeError +isolates_test: RuntimeError +js_array_test: RuntimeError +js_dart_to_string_test: RuntimeError +js_dispatch_property_test: RuntimeError +js_function_getter_test: RuntimeError +js_function_getter_trust_types_test: RuntimeError +js_interop_1_test: RuntimeError +js_interop_constructor_name_test: RuntimeError +js_test: RuntimeError +js_type_test: RuntimeError +js_typed_interop_anonymous2_exp_test: RuntimeError +js_typed_interop_anonymous2_test: RuntimeError +js_typed_interop_anonymous_exp_test: RuntimeError +js_typed_interop_anonymous_test: RuntimeError +js_typed_interop_anonymous_unreachable_exp_test: RuntimeError +js_typed_interop_anonymous_unreachable_test: RuntimeError +js_typed_interop_bind_this_test: RuntimeError +js_typed_interop_callable_object_test: RuntimeError +js_typed_interop_default_arg_test/none: RuntimeError +js_typed_interop_side_cast_test: RuntimeError +js_typed_interop_test: RuntimeError +js_typed_interop_type1_test/01: RuntimeError +js_typed_interop_type1_test/none: RuntimeError +js_typed_interop_type3_test/01: RuntimeError +js_typed_interop_type3_test/02: RuntimeError +js_typed_interop_type3_test/none: RuntimeError +js_typed_interop_type_test: RuntimeError +js_typed_interop_window_property_test: RuntimeError +js_util_test: RuntimeError +keyboard_event_test: RuntimeError +localstorage_test: RuntimeError +location_test: RuntimeError +media_stream_test: RuntimeError +mediasource_test: RuntimeError +messageevent_test: RuntimeError +mouse_event_test: RuntimeError +mutationobserver_test: RuntimeError +native_gc_test: RuntimeError +navigator_test: RuntimeError +node_test: RuntimeError +node_validator_important_if_you_suppress_make_the_bug_critical_test: RuntimeError +non_instantiated_is_test: RuntimeError +notification_test: RuntimeError +performance_api_test: RuntimeError +postmessage_structured_test: RuntimeError +query_test: RuntimeError +queryall_test: RuntimeError +range_test: RuntimeError +request_animation_frame_test: RuntimeError +rtc_test: RuntimeError +selectelement_test: RuntimeError +serialized_script_value_test: RuntimeError +shadow_dom_test: RuntimeError +shadowroot_test: RuntimeError +speechrecognition_test: RuntimeError +storage_test: RuntimeError +svg_test: RuntimeError +svgelement_test: RuntimeError +table_test: RuntimeError +text_event_test: RuntimeError +touchevent_test: RuntimeError +track_element_constructor_test: RuntimeError +transferables_test: RuntimeError +transition_event_test: RuntimeError +trusted_html_tree_sanitizer_test: RuntimeError +typed_arrays_1_test: RuntimeError +typed_arrays_2_test: RuntimeError +typed_arrays_3_test: RuntimeError +typed_arrays_4_test: RuntimeError +typed_arrays_5_test: RuntimeError +typed_arrays_arraybuffer_test: RuntimeError +typed_arrays_dataview_test: RuntimeError +typed_arrays_range_checks_test: RuntimeError +typed_arrays_simd_test: RuntimeError +typing_test: RuntimeError +unknownelement_test: RuntimeError +uri_test: RuntimeError +url_test: RuntimeError +webgl_1_test: RuntimeError +webgl_extensions_test: RuntimeError +websocket_test: RuntimeError +websql_test: RuntimeError +wheelevent_test: RuntimeError +window_eq_test: RuntimeError +window_mangling_test: RuntimeError +window_nosuchmethod_test: RuntimeError +window_test: RuntimeError +worker_api_test: RuntimeError +worker_test: RuntimeError +xhr_cross_origin_test: RuntimeError +xhr_test: RuntimeError +xsltprocessor_test: RuntimeError + [ $compiler == dart2js && $runtime == drt && !$checked ] audiocontext_test/functional: Pass, Fail @@ -333,6 +504,11 @@ indexeddb_5_test: RuntimeError js_typed_interop_default_arg_test/explicit_argument: RuntimeError js_typed_interop_test/static_method_tearoff_1: RuntimeError +mirrors_js_typed_interop_test: SkipByDesign + +[ $compiler == dart2js && $fasta && $host_checked ] +fontface_loaded_test: Crash +streams_test: Crash [ $compiler == dart2js && $minified ] canvas_pixel_array_type_alias_test/types2_runtimeTypeName: Fail, OK # Issue 12605
diff --git a/tests/isolate/isolate.status b/tests/isolate/isolate.status index 885d599..d22d01b 100644 --- a/tests/isolate/isolate.status +++ b/tests/isolate/isolate.status
@@ -69,6 +69,9 @@ mandel_isolate_test: Pass, Timeout # TODO(kasperl): Please triage. unresolved_ports_test: Pass, Timeout # Issue 15610 +[ $compiler == dart2js && $runtime == d8 && $fasta ] +isolate_stress_test: RuntimeError + [ $compiler == dart2js && $runtime != d8 ] error_at_spawn_test: Skip # Issue 23876 error_exit_at_spawn_test: Skip # Issue 23876 @@ -133,6 +136,9 @@ static_function_test: RuntimeError # mirrors not supported unresolved_ports_test: RuntimeError # mirrors not supported +[ $compiler == dart2js && $fasta && $host_checked ] +deferred_in_isolate2_test: Crash + [ $compiler == dart2js && $jscl ] browser/*: SkipByDesign # Browser specific tests spawn_uri_test: SkipByDesign # Loading another file is not supported in JS shell
diff --git a/tests/kernel/kernel.status b/tests/kernel/kernel.status index eaf10cd6..807e76c 100644 --- a/tests/kernel/kernel.status +++ b/tests/kernel/kernel.status
@@ -7,7 +7,6 @@ unsorted/nsm_dispatcher_test: Skip # The test uses Symbol without MirrorsUsed unsorted/simple_literal_test/01: Skip # The test expects error for large integer literal. unsorted/super_initializer_test: Skip -unsorted/super_mixin_test: CompileTimeError [ !$fasta ] unsorted/loop_test: Skip # This test uses optional new/const. @@ -18,6 +17,16 @@ [ $compiler == dart2analyzer && $strong ] *: Skip # Issue 28649 +[ $compiler == dart2js && $fasta ] +unsorted/super_mixin_test: RuntimeError +unsorted/try_finally_test: Crash + +[ $compiler == dart2js && $fasta && $host_checked ] +unsorted/super_mixin_test: Crash + +[ $compiler == dart2js && !$fasta ] +unsorted/super_mixin_test: CompileTimeError + [ $compiler != dartk && $compiler != dartkp && $runtime != none ] unsorted/types_test: RuntimeError
diff --git a/tests/language/language_dart2js.status b/tests/language/language_dart2js.status index 5e33574..a1906b5 100644 --- a/tests/language/language_dart2js.status +++ b/tests/language/language_dart2js.status
@@ -19,9 +19,19 @@ [ $compiler == dart2js && $runtime == chrome && $system == macos ] await_future_test: Pass, Timeout # Issue 26735 +[ $compiler == dart2js && $runtime == chrome && $fasta ] +conditional_import_string_test: RuntimeError +conditional_import_test: RuntimeError +config_import_corelib_test: RuntimeError +library_env_test/has_io_support: RuntimeError + [ $compiler == dart2js && $runtime == chromeOnAndroid ] override_field_test/02: Pass, Slow # TODO(kasperl): Please triage. +[ $compiler == dart2js && $runtime == d8 && $fasta ] +library_env_test/has_no_io_support: RuntimeError +regress_23408_test: RuntimeError + [ $compiler == dart2js && $runtime != drt ] issue23244_test: RuntimeError # 23244 @@ -513,7 +523,6 @@ left_shift_test: RuntimeError library_env_test/has_mirror_support: RuntimeError library_env_test/has_no_html_support: RuntimeError -library_env_test/has_no_io_support: RuntimeError list_literal4_test: RuntimeError main_not_a_function_test/01: CompileTimeError many_overridden_no_such_method_test: RuntimeError @@ -660,7 +669,6 @@ regress_18535_test: RuntimeError regress_20394_test/01: MissingCompileTimeError regress_22936_test/01: RuntimeError -regress_23408_test: RuntimeError regress_24283_test: RuntimeError regress_27572_test: RuntimeError regress_27617_test/1: Crash # Assertion failure: Unexpected constructor j:constructor(Foo._) in ConstructorDataImpl._getConstructorConstant
diff --git a/tests/language_2/language_2_dart2js.status b/tests/language_2/language_2_dart2js.status index 422e838..f9b08c8 100644 --- a/tests/language_2/language_2_dart2js.status +++ b/tests/language_2/language_2_dart2js.status
@@ -357,7 +357,6 @@ generalized_void_syntax_test: CompileTimeError # Issue #30176. generic_closure_test/01: RuntimeError generic_closure_test/none: RuntimeError -generic_function_bounds_test: Crash # Unsupported operation: Unsupported type parameter type node T. generic_function_dcall_test: Crash # Unsupported operation: Unsupported type parameter type node T. generic_function_typedef_test/01: RuntimeError generic_instanceof_test: RuntimeError
diff --git a/tests/language_2/language_2_kernel.status b/tests/language_2/language_2_kernel.status index 58b6a9d..57094de 100644 --- a/tests/language_2/language_2_kernel.status +++ b/tests/language_2/language_2_kernel.status
@@ -531,7 +531,6 @@ [ $compiler == dartk && $mode == debug && $runtime == vm && $strong ] const_instance_field_test/01: Crash # Issue 32326. deopt_inlined_function_lazy_test: Skip -tearoff_dynamic_test: Crash [ $compiler == dartk && $mode == product && $runtime == vm ] deferred_load_constants_test/02: Fail @@ -803,7 +802,6 @@ [ $compiler == dartkp && $mode == debug && $runtime == dart_precompiled && $strong ] const_instance_field_test/01: Crash # Issue 32326. external_test/13: Crash -tearoff_dynamic_test: Crash type_promotion_functions_test/05: Pass type_promotion_functions_test/06: Pass type_promotion_functions_test/07: Pass
diff --git a/tests/language_2/language_2_precompiled.status b/tests/language_2/language_2_precompiled.status index 731b81f..b5d8b63 100644 --- a/tests/language_2/language_2_precompiled.status +++ b/tests/language_2/language_2_precompiled.status
@@ -1158,7 +1158,6 @@ implicit_downcast_during_while_statement_test: RuntimeError issue31596_implement_covariant_test: RuntimeError issue31596_test: RuntimeError -tearoff_dynamic_test: RuntimeError type_argument_in_super_type_test: RuntimeError type_check_const_function_typedef2_test: MissingCompileTimeError
diff --git a/tests/language_2/language_2_vm.status b/tests/language_2/language_2_vm.status index cf89bec..dcd6d4d 100644 --- a/tests/language_2/language_2_vm.status +++ b/tests/language_2/language_2_vm.status
@@ -92,9 +92,6 @@ generic_methods_dynamic_test/02: MissingRuntimeError generic_methods_dynamic_test/04: MissingRuntimeError -[ $compiler != dartk && $mode == debug && $runtime == vm && $checked ] -tearoff_dynamic_test: Crash - [ $compiler != dartk && $mode == product && $runtime == vm ] deferred_load_constants_test/02: Fail deferred_load_constants_test/03: Fail @@ -1235,7 +1232,6 @@ list_is_test: RuntimeError list_literal1_test/01: MissingCompileTimeError malformed2_test/00: MissingCompileTimeError -tearoff_dynamic_test: RuntimeError type_argument_in_super_type_test: RuntimeError type_check_const_function_typedef2_test: MissingCompileTimeError typevariable_substitution2_test/02: RuntimeError
diff --git a/tests/lib/lib.status b/tests/lib/lib.status index e1326f2..08d180a 100644 --- a/tests/lib/lib.status +++ b/tests/lib/lib.status
@@ -205,6 +205,9 @@ async/*deferred*: Pass, RuntimeError # Issue 17458 mirrors/*deferred*: Pass, RuntimeError # Issue 17458 +[ $compiler == dart2js && $runtime == d8 && $fasta ] +js/null_test: RuntimeError + [ $compiler == dart2js && $runtime == jsshell ] async/catch_errors12_test: Fail # Timer interface not supported: Issue 7728. async/catch_errors13_test: Fail # Timer interface not supported: Issue 7728. @@ -266,6 +269,9 @@ [ $compiler == dart2js && $fasta ] mirrors/*: SkipByDesign # mirrors not supported +[ $compiler == dart2js && $fasta && $host_checked ] +async/stream_controller_async_test: Crash + [ $compiler == dart2js && $host_checked ] mirrors/metadata_allowed_values_test/28: Crash # Issue 25911 mirrors/metadata_allowed_values_test/29: Crash # Issue 25911
diff --git a/tests/lib_2/lib_2_dart2js.status b/tests/lib_2/lib_2_dart2js.status index 6b692c6..3cf06a1 100644 --- a/tests/lib_2/lib_2_dart2js.status +++ b/tests/lib_2/lib_2_dart2js.status
@@ -124,6 +124,239 @@ typed_data/setRange_2_test: RuntimeError # TODO(dart2js-team): Please triage this failure. typed_data/setRange_3_test: RuntimeError # TODO(dart2js-team): Please triage this failure. +[ $compiler == dart2js && $runtime == d8 && $fasta ] +async/dart2js_uncaught_error_test: RuntimeError +html/async_spawnuri_test: RuntimeError +html/async_test: RuntimeError +html/audiobuffersourcenode_test: RuntimeError +html/audiocontext_test: RuntimeError +html/audioelement_test: RuntimeError +html/b_element_test: RuntimeError +html/blob_constructor_test: RuntimeError +html/cache_test: RuntimeError +html/callbacks_test: RuntimeError +html/canvas_pixel_array_type_alias_test: RuntimeError +html/canvas_test: RuntimeError +html/canvasrenderingcontext2d_test: RuntimeError +html/cdata_test: RuntimeError +html/client_rect_test: RuntimeError +html/cross_domain_iframe_test: RuntimeError +html/crypto_test: RuntimeError +html/css_rule_list_test: RuntimeError +html/css_test: RuntimeError +html/cssstyledeclaration_test: RuntimeError +html/custom/attribute_changed_callback_test: RuntimeError +html/custom/constructor_calls_created_synchronously_test: RuntimeError +html/custom/created_callback_test: RuntimeError +html/custom/document_register_basic_test: RuntimeError +html/custom/document_register_template_test: RuntimeError +html/custom/document_register_type_extensions_test: RuntimeError +html/custom/element_upgrade_test: RuntimeError +html/custom/entered_left_view_test: RuntimeError +html/custom/js_custom_test: RuntimeError +html/custom_element_method_clash_test: RuntimeError +html/custom_element_name_clash_test: RuntimeError +html/custom_elements_23127_test: RuntimeError +html/custom_elements_test: RuntimeError +html/custom_tags_test: RuntimeError +html/dart_object_local_storage_test: RuntimeError +html/datalistelement_test: RuntimeError +html/document_test: RuntimeError +html/documentfragment_test: RuntimeError +html/dom_constructors_test: RuntimeError +html/domparser_test: RuntimeError +html/element_add_test: RuntimeError +html/element_animate_test: RuntimeError +html/element_classes_svg_test: RuntimeError +html/element_classes_test: RuntimeError +html/element_constructor_1_test: RuntimeError +html/element_dimensions_test: RuntimeError +html/element_offset_test: RuntimeError +html/element_test: RuntimeError +html/element_types_constructors1_test: RuntimeError +html/element_types_constructors2_test: RuntimeError +html/element_types_constructors3_test: RuntimeError +html/element_types_constructors4_test: RuntimeError +html/element_types_constructors5_test: RuntimeError +html/element_types_constructors6_test: RuntimeError +html/element_types_content_test: RuntimeError +html/element_types_datalist_test: RuntimeError +html/element_types_details_test: RuntimeError +html/element_types_embed_test: RuntimeError +html/element_types_keygen_test: RuntimeError +html/element_types_meter_test: RuntimeError +html/element_types_object_test: RuntimeError +html/element_types_output_test: RuntimeError +html/element_types_progress_test: RuntimeError +html/element_types_shadow_test: RuntimeError +html/element_types_template_test: RuntimeError +html/element_types_track_test: RuntimeError +html/event_customevent_test: RuntimeError +html/event_test: RuntimeError +html/events_test: RuntimeError +html/exceptions_test: RuntimeError +html/file_sample_test: RuntimeError +html/fileapi_directory_reader_test: RuntimeError +html/fileapi_directory_test: RuntimeError +html/fileapi_entry_test: RuntimeError +html/fileapi_file_entry_test: RuntimeError +html/fileapi_file_test: RuntimeError +html/fileapi_supported_test: RuntimeError +html/fileapi_supported_throws_test: RuntimeError +html/filereader_test: RuntimeError +html/filteredelementlist_test: RuntimeError +html/fontface_test: RuntimeError +html/form_data_test: RuntimeError +html/form_element_test: RuntimeError +html/gamepad_test: RuntimeError +html/geolocation_test: RuntimeError +html/hidden_dom_1_test: RuntimeError +html/hidden_dom_2_test: RuntimeError +html/history_hash_change_test: RuntimeError +html/history_history_test: RuntimeError +html/history_test: RuntimeError +html/html_mock_test: RuntimeError +html/htmlcollection_test: RuntimeError +html/htmlelement_test: RuntimeError +html/htmloptionscollection_test: RuntimeError +html/indexeddb_1_test: RuntimeError +html/indexeddb_2_test: RuntimeError +html/indexeddb_4_test: RuntimeError +html/input_element_attributes_test: RuntimeError +html/input_element_constructor_test: RuntimeError +html/input_element_date_test: RuntimeError +html/input_element_datetime_test: RuntimeError +html/input_element_email_test: RuntimeError +html/input_element_month_test: RuntimeError +html/input_element_number_test: RuntimeError +html/input_element_range_test: RuntimeError +html/input_element_search_test: RuntimeError +html/input_element_tel_test: RuntimeError +html/input_element_time_test: RuntimeError +html/input_element_url_test: RuntimeError +html/input_element_week_test: RuntimeError +html/instance_of_test: RuntimeError +html/interactive_media_test: RuntimeError +html/interactive_test: RuntimeError +html/isolates_test: RuntimeError +html/js_array_test: RuntimeError +html/js_array_test: CompileTimeError +html/js_browser_test: RuntimeError +html/js_caching_test: RuntimeError +html/js_context_test: RuntimeError +html/js_dart_functions_test: RuntimeError +html/js_dart_js_test: RuntimeError +html/js_dart_to_string_test: RuntimeError +html/js_dispatch_property_test: CompileTimeError +html/js_dispatch_property_test: RuntimeError +html/js_extend_class_test: RuntimeError +html/js_function_getter_test: RuntimeError +html/js_function_getter_trust_types_test: RuntimeError +html/js_function_getter_trust_types_test: CompileTimeError +html/js_identity_test: RuntimeError +html/js_interop_1_test: RuntimeError +html/js_interop_constructor_name_div_test: RuntimeError +html/js_interop_constructor_name_error1_test: RuntimeError +html/js_interop_constructor_name_error2_test: RuntimeError +html/js_interop_constructor_name_method_test: RuntimeError +html/js_javascript_function_test: RuntimeError +html/js_jsarray_test: RuntimeError +html/js_jsfunc_callmethod_test: RuntimeError +html/js_jsify_test: RuntimeError +html/js_jsobject_test: RuntimeError +html/js_methods_test: RuntimeError +html/js_mock_test: RuntimeError +html/js_transferrables_test: RuntimeError +html/js_typed_interop_bind_this_test: RuntimeError +html/js_typed_interop_callable_object_test: RuntimeError +html/js_typed_interop_default_arg_test/explicit_argument: CompileTimeError +html/js_typed_interop_default_arg_test/none: RuntimeError +html/js_typed_interop_dynamic_test: RuntimeError +html/js_typed_interop_lazy_test/01: RuntimeError +html/js_typed_interop_lazy_test/none: RuntimeError +html/js_typed_interop_rename_static_test: RuntimeError +html/js_typed_interop_test: CompileTimeError +html/js_typed_interop_type1_test/01: RuntimeError +html/js_typed_interop_type1_test/none: RuntimeError +html/js_typed_interop_type3_test/01: RuntimeError +html/js_typed_interop_type3_test/02: RuntimeError +html/js_typed_interop_type3_test/none: RuntimeError +html/js_typed_interop_type_test: RuntimeError +html/js_typed_interop_window_property_test: RuntimeError +html/js_util_test: RuntimeError +html/keyboard_event_test: RuntimeError +html/localstorage_test: RuntimeError +html/location_test: RuntimeError +html/media_stream_test: RuntimeError +html/mediasource_test: RuntimeError +html/messageevent_test: RuntimeError +html/mirrors_js_typed_interop_test: RuntimeError +html/mouse_event_test: RuntimeError +html/mutationobserver_test: RuntimeError +html/native_gc_test: RuntimeError +html/navigator_test: RuntimeError +html/node_test: RuntimeError +html/node_validator_important_if_you_suppress_make_the_bug_critical_test: RuntimeError +html/notification_permission_test: RuntimeError +html/notification_test: RuntimeError +html/performance_api_test: RuntimeError +html/postmessage_structured_test: RuntimeError +html/private_extension_member_test: RuntimeError +html/query_test: RuntimeError +html/queryall_test: RuntimeError +html/range_test: RuntimeError +html/request_animation_frame_test: RuntimeError +html/rtc_test: RuntimeError +html/selectelement_test: RuntimeError +html/serialized_script_value_test: RuntimeError +html/shadow_dom_test: RuntimeError +html/shadowroot_test: RuntimeError +html/speechrecognition_test: RuntimeError +html/storage_test: RuntimeError +html/streams_test: RuntimeError +html/svg_test: RuntimeError +html/svgelement_test: RuntimeError +html/table_test: RuntimeError +html/text_event_test: RuntimeError +html/touchevent_test: RuntimeError +html/track_element_constructor_test: RuntimeError +html/transferables_test: RuntimeError +html/transition_event_test: RuntimeError +html/trusted_html_tree_sanitizer_test: RuntimeError +html/typed_arrays_1_test: RuntimeError +html/typed_arrays_2_test: RuntimeError +html/typed_arrays_3_test: RuntimeError +html/typed_arrays_4_test: RuntimeError +html/typed_arrays_5_test: RuntimeError +html/typed_arrays_arraybuffer_test: RuntimeError +html/typed_arrays_dataview_test: RuntimeError +html/typed_arrays_range_checks_test: RuntimeError +html/typed_arrays_simd_test: RuntimeError +html/typing_test: RuntimeError +html/unknownelement_test: RuntimeError +html/uri_test: RuntimeError +html/url_test: RuntimeError +html/webgl_1_test: RuntimeError +html/webgl_extensions_test: RuntimeError +html/websocket_test: RuntimeError +html/websql_test: RuntimeError +html/wheelevent_test: RuntimeError +html/window_eq_test: RuntimeError +html/window_mangling_test: RuntimeError +html/window_nosuchmethod_test: RuntimeError +html/window_test: RuntimeError +html/worker_api_test: RuntimeError +html/worker_test: RuntimeError +html/xhr_cross_origin_test: RuntimeError +html/xhr_test: RuntimeError +html/xsltprocessor_test: RuntimeError +isolate/browser/package_resolve_browser_hook2_test: RuntimeError +isolate/browser/package_resolve_browser_hook_test: RuntimeError +isolate/browser/package_resolve_browser_test: RuntimeError +isolate/isolate_stress_test: RuntimeError +js/null_test: RuntimeError +js/prototype_access_test: RuntimeError + [ $compiler == dart2js && $runtime != d8 ] isolate/error_at_spawn_test: Skip # Issue 23876 isolate/error_exit_at_spawn_test: Skip # Issue 23876 @@ -365,181 +598,23 @@ isolate/unresolved_ports_test: RuntimeError # mirrors not supported [ $compiler == dart2js && $fasta && $host_checked ] -html/async_spawnuri_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/async_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/audiobuffersourcenode_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/audiocontext_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/audioelement_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/b_element_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/blob_constructor_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/cache_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/callbacks_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/canvas_pixel_array_type_alias_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. +async/stream_controller_async_test: Crash html/custom/mirrors_2_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. html/custom/mirrors_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/custom/regress_194523002_test: Crash # 'file:*/pkg/compiler/lib/src/js_emitter/program_builder/program_builder.dart': Failed assertion: line 877 pos 18: 'defaultValue != null': is not true. -html/custom_element_method_clash_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/custom_element_name_clash_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/custom_elements_23127_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/custom_elements_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/custom_tags_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/dart_object_local_storage_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/datalistelement_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/document_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/documentfragment_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/dom_constructors_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/domparser_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/element_add_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/element_animate_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/element_classes_svg_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true.html/js_typed_interop_anonymous2_exp_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/element_classes_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/element_constructor_1_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/element_dimensions_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/element_offset_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/element_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/element_types_constructors1_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/element_types_constructors2_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/element_types_constructors3_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/element_types_constructors4_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/element_types_constructors5_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/element_types_constructors6_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/element_types_content_test: Crash -html/element_types_datalist_test: Crash -html/element_types_details_test: Crash -html/element_types_embed_test: Crash -html/element_types_keygen_test: Crash -html/element_types_meter_test: Crash -html/element_types_object_test: Crash -html/element_types_output_test: Crash -html/element_types_progress_test: Crash -html/element_types_shadow_test: Crash -html/element_types_template_test: Crash -html/element_types_track_test: Crash -html/event_customevent_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/event_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/exceptions_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/filereader_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/filteredelementlist_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. html/fontface_loaded_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/fontface_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/form_data_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/form_element_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/gamepad_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/geolocation_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/hidden_dom_1_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/hidden_dom_2_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/history_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/htmlcollection_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/htmlelement_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/htmloptionscollection_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/indexeddb_1_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/indexeddb_2_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. html/indexeddb_3_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/indexeddb_4_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. html/indexeddb_5_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/instance_of_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/isolates_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. html/js_array_test: CompileTimeError -html/js_array_test: Crash # FileSystemException(uri=file:///usr/local/google/home/efortuna/dart2/sdk/sdk/lib/_internal/dart2js_platform.dill; message=Error reading 'sdk/lib/_internal/dart2js_platform.dill' (No such file or directory)) -html/js_dart_to_string_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. html/js_dispatch_property_test: CompileTimeError -html/js_dispatch_property_test: Crash # FileSystemException(uri=file:///usr/local/google/home/efortuna/dart2/sdk/sdk/lib/_internal/dart2js_platform.dill; message=Error reading 'sdk/lib/_internal/dart2js_platform.dill' (No such file or directory)) -html/js_function_getter_test: CompileTimeError html/js_function_getter_test/call getter as function: Crash # FileSystemException(uri=file:///usr/local/google/home/efortuna/dart2/sdk/sdk/lib/_internal/dart2js_platform.dill; message=Error reading 'sdk/lib/_internal/dart2js_platform.dill' (No such file or directory)) -html/js_function_getter_trust_types_test: Crash # FileSystemException(uri=file:///usr/local/google/home/efortuna/dart2/sdk/sdk/lib/_internal/dart2js_platform.dill; message=Error reading 'sdk/lib/_internal/dart2js_platform.dill' (No such file or directory)) html/js_function_getter_trust_types_test: CompileTimeError -html/js_interop_1_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/js_interop_constructor_name_div_test: Crash # FileSystemException(uri=file:///usr/local/google/home/efortuna/dart2/sdk/sdk/lib/_internal/dart2js_platform.dill; message=Error reading 'sdk/lib/_internal/dart2js_platform.dill' (No such file or directory)) -html/js_interop_constructor_name_error1_test: Crash # FileSystemException(uri=file:///usr/local/google/home/efortuna/dart2/sdk/sdk/lib/_internal/dart2js_platform.dill; message=Error reading 'sdk/lib/_internal/dart2js_platform.dill' (No such file or directory)) -html/js_interop_constructor_name_error2_test: Crash # FileSystemException(uri=file:///usr/local/google/home/efortuna/dart2/sdk/sdk/lib/_internal/dart2js_platform.dill; message=Error reading 'sdk/lib/_internal/dart2js_platform.dill' (No such file or directory)) -html/js_interop_constructor_name_method_test: Crash # FileSystemException(uri=file:///usr/local/google/home/efortuna/dart2/sdk/sdk/lib/_internal/dart2js_platform.dill; message=Error reading 'sdk/lib/_internal/dart2js_platform.dill' (No such file or directory)) -html/js_typed_interop_anonymous2_exp_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/js_typed_interop_anonymous2_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/js_typed_interop_anonymous_exp_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/js_typed_interop_anonymous_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/js_typed_interop_anonymous_unreachable_exp_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/js_typed_interop_anonymous_unreachable_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/js_typed_interop_bind_this_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/js_typed_interop_callable_object_test: CompileTimeError html/js_typed_interop_default_arg_test/explicit_argument: CompileTimeError -html/js_typed_interop_default_arg_test/none: CompileTimeError html/js_typed_interop_side_cast_exp_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/js_typed_interop_side_cast_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. html/js_typed_interop_test: CompileTimeError -html/js_typed_interop_type1_test/01: RuntimeError -html/js_typed_interop_type1_test/none: RuntimeError -html/js_typed_interop_type2_test/01: RuntimeError -html/js_typed_interop_type2_test/none: RuntimeError -html/js_typed_interop_type3_test/01: RuntimeError -html/js_typed_interop_type3_test/02: RuntimeError -html/js_typed_interop_type3_test/none: RuntimeError -html/js_typed_interop_type_test: RuntimeError -html/js_typed_interop_window_property_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/js_util_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/keyboard_event_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/localstorage_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/location_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/media_stream_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/mediasource_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/messageevent_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/mirrors_js_typed_interop_test: Crash # FileSystemException(uri=file:///usr/local/google/home/efortuna/dart2/sdk/sdk/lib/_internal/dart2js_platform.dill; message=Error reading 'sdk/lib/_internal/dart2js_platform.dill' (No such file or directory)) -html/mouse_event_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/mutationobserver_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/native_gc_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/navigator_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/node_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/node_validator_important_if_you_suppress_make_the_bug_critical_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/non_instantiated_is_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/notification_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/performance_api_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/postmessage_structured_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/query_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/queryall_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/range_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/request_animation_frame_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/rtc_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/selectelement_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/serialized_script_value_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/shadow_dom_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/shadowroot_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/speechrecognition_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/storage_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/streams_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/svg_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/svgelement_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/table_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/text_event_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/touchevent_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/track_element_constructor_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/transferables_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/transition_event_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/trusted_html_tree_sanitizer_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/typed_arrays_1_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/typed_arrays_2_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/typed_arrays_3_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/typed_arrays_4_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/typed_arrays_5_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/typed_arrays_arraybuffer_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/typed_arrays_dataview_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/typed_arrays_range_checks_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/typed_arrays_simd_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/typing_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/unknownelement_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/uri_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/url_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/webgl_1_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/webgl_extensions_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/websocket_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/websql_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/wheelevent_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/window_eq_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/window_mangling_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/window_nosuchmethod_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/window_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/worker_api_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/worker_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/xhr_cross_origin_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. -html/xhr_test: Crash # 'file:*/pkg/compiler/lib/src/common_elements.dart': Failed assertion: line 405 pos 12: 'element.name == '=='': is not true. +isolate/deferred_in_isolate2_test: Crash +isolate/mint_maker_test: Crash +typed_data/typed_data_list_test: Crash +typed_data/typed_list_iterable_test: Crash [ $compiler == dart2js && $fasta && $minified ] html/async_spawnuri_test: RuntimeError
diff --git a/tests/lib_2/lib_2_dartdevc.status b/tests/lib_2/lib_2_dartdevc.status index 2f18565..476cbd7 100644 --- a/tests/lib_2/lib_2_dartdevc.status +++ b/tests/lib_2/lib_2_dartdevc.status
@@ -35,6 +35,7 @@ [ $system == macos && ($compiler == dartdevc || $compiler == dartdevk) ] html/client_rect_test: Pass, RuntimeError # Issue 31019 html/css_test: Pass, RuntimeError # Issue 31019 +html/fileapi_entry_test: Pass, RuntimeError # Issue 31019 [ $system == windows && ($compiler == dartdevc || $compiler == dartdevk) ] html/xhr_test: Skip # Times out. Issue 21527
diff --git a/third_party/tcmalloc/BUILD.gn b/third_party/tcmalloc/BUILD.gn index 5ffcb89..bea0427 100644 --- a/third_party/tcmalloc/BUILD.gn +++ b/third_party/tcmalloc/BUILD.gn
@@ -72,6 +72,7 @@ configs -= [ "//build/config/compiler:chromium_code", "//build/config/compiler:clang_stackrealign", + "//build/config/compiler:compiler_arm_thumb", ] configs += [ ":internal_config" ]
diff --git a/tools/VERSION b/tools/VERSION index c64c59a..fd31ce7 100644 --- a/tools/VERSION +++ b/tools/VERSION
@@ -27,5 +27,5 @@ MAJOR 2 MINOR 0 PATCH 0 -PRERELEASE 34 +PRERELEASE 35 PRERELEASE_PATCH 0
diff --git a/tools/gn.py b/tools/gn.py index 7d37620..d348a21 100755 --- a/tools/gn.py +++ b/tools/gn.py
@@ -22,7 +22,6 @@ DART_USE_ASAN = "DART_USE_ASAN" # Use instead of --asan DART_USE_MSAN = "DART_USE_MSAN" # Use instead of --msan DART_USE_TSAN = "DART_USE_TSAN" # Use instead of --tsan -DART_USE_WHEEZY = "DART_USE_WHEEZY" # Use instread of --wheezy DART_USE_TOOLCHAIN = "DART_USE_TOOLCHAIN" # Use instread of --toolchain-prefix DART_USE_SYSROOT = "DART_USE_SYSROOT" # Use instead of --target-sysroot # use instead of --platform-sdk @@ -42,10 +41,6 @@ return DART_USE_TSAN in os.environ -def UseWheezy(): - return DART_USE_WHEEZY in os.environ - - def ToolchainPrefix(args): if args.toolchain_prefix: return args.toolchain_prefix @@ -152,32 +147,18 @@ def DontUseClang(args, target_os, host_cpu, target_cpu): # We don't have clang on Windows. - return (target_os == 'win' - # TODO(infra): Clang cannot compile boringssl and tcmalloc in -mthumb - # mode. - # See dartbug.com/32363. - # - # We also can't compile the whole VM with clang in -marm mode - # See: dartbug.com/32362. - or (target_os == 'linux' - and target_cpu.startswith('arm') - and target_cpu != 'arm64' - and not UseSanitizer(args))) + return target_os == 'win' -def UseWheezySysroot(args, gn_args): +def UseSysroot(args, gn_args): # Don't try to use a Linux sysroot if we aren't on Linux. if gn_args['target_os'] != 'linux': return False - # Use the wheezy sysroot if explicitly asked to do so. - if args.wheezy: - return True - # Don't use the wheezy sysroot if we're given another sysroot. + # Don't use the sysroot if we're given another sysroot. if TargetSysroot(args): return False - # The clang toolchain we pull from Fuchsia doesn't have arm and arm64 - # sysroots, so use the wheezy/jesse ones. - return gn_args['is_clang'] and gn_args['target_cpu'].startswith('arm') + # Otherwise use the sysroot. + return True def ToGnArgs(args, mode, arch, target_os): @@ -254,7 +235,7 @@ gn_args['dart_stripped_binary'] = 'exe.stripped/dart' # Setup the user-defined sysroot. - if UseWheezySysroot(args, gn_args): + if UseSysroot(args, gn_args): gn_args['dart_use_wheezy_sysroot'] = True else: sysroot = TargetSysroot(args) @@ -442,11 +423,11 @@ dest='tsan', action='store_false') other_group.add_argument('--wheezy', - help='Use the Debian wheezy sysroot on Linux', - default=UseWheezy(), + help='This flag is deprecated.', + default=True, action='store_true') other_group.add_argument('--no-wheezy', - help='Disable the Debian wheezy sysroot on Linux', + help='This flag is deprecated', dest='wheezy', action='store_false') other_group.add_argument('--workers', '-w',