Version 2.14.0-383.0.dev
Merge commit '56bd70b257366b2f1422166676326fb6bc93b793' into 'dev'
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index 549e1bc..c998b6a 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -949,7 +949,7 @@
static ConstructorElement? getNamedConstructorFromList(
String name, List<ConstructorElement> constructors) {
if (name == 'new') {
- // An unnamed constructor declared with `C.new(` is modeled as unnamed.
+ // A constructor declared as `C.new` is unnamed, and is modeled as such.
name = '';
}
for (ConstructorElement element in constructors) {
diff --git a/pkg/analyzer/lib/src/generated/testing/element_factory.dart b/pkg/analyzer/lib/src/generated/testing/element_factory.dart
index ed9b4f8..cdf06145 100644
--- a/pkg/analyzer/lib/src/generated/testing/element_factory.dart
+++ b/pkg/analyzer/lib/src/generated/testing/element_factory.dart
@@ -107,7 +107,7 @@
ClassElement definingClass, String? name, bool isConst,
[List<DartType> argumentTypes = const []]) {
var offset = name == null ? -1 : 0;
- // An unnamed constructor declared with `C.new(` is modeled as unnamed.
+ // A constructor declared as `C.new` is unnamed, and is modeled as such.
var constructor = name == null || name == 'new'
? ConstructorElementImpl('', offset)
: ConstructorElementImpl(name, offset);
diff --git a/pkg/analyzer/lib/src/summary2/element_builder.dart b/pkg/analyzer/lib/src/summary2/element_builder.dart
index b5b366b..8f9bd66 100644
--- a/pkg/analyzer/lib/src/summary2/element_builder.dart
+++ b/pkg/analyzer/lib/src/summary2/element_builder.dart
@@ -173,7 +173,7 @@
var nameNode = node.name ?? node.returnType;
var name = node.name?.name ?? '';
if (name == 'new') {
- // An unnamed constructor declared with `C.new(` is modeled as unnamed.
+ // A constructor declared as `C.new` is unnamed, and is modeled as such.
name = '';
}
var nameOffset = nameNode.offset;
diff --git a/pkg/compiler/lib/src/js_backend/annotations.dart b/pkg/compiler/lib/src/js_backend/annotations.dart
index f702ca37..98ebf0c 100644
--- a/pkg/compiler/lib/src/js_backend/annotations.dart
+++ b/pkg/compiler/lib/src/js_backend/annotations.dart
@@ -265,15 +265,15 @@
/// Serializes this [AnnotationsData] to [sink].
void writeToDataSink(DataSink sink);
- /// Returns `true` if [member] has an `@pragma('dart2js:assumeDynamic')` annotation.
+ /// Returns `true` if [member] has an `@pragma('dart2js:assumeDynamic')`
+ /// annotation.
bool hasAssumeDynamic(MemberEntity member);
- /// Returns `true` if [member] has a `@pragma('dart2js:noInline')`, or
- /// `@pragma('dart2js:noInline')` annotation.
+ /// Returns `true` if [member] has a `@pragma('dart2js:noInline')` annotation.
bool hasNoInline(MemberEntity member);
- /// Returns `true` if [member] has a `@pragma('dart2js:tryInline')`, or
- /// `@pragma('dart2js:tryInline')` annotation.
+ /// Returns `true` if [member] has a `@pragma('dart2js:tryInline')`
+ /// annotation.
bool hasTryInline(MemberEntity member);
/// Returns `true` if [member] has a `@pragma('dart2js:disableFinal')`
@@ -284,18 +284,19 @@
/// annotation.
bool hasNoElision(MemberEntity member);
- /// Returns `true` if [member] has a `@NoThrows()` annotation.
+ /// Returns `true` if [member] has a `@pragma('dart2js:noThrows')` annotation.
bool hasNoThrows(MemberEntity member);
- /// Returns `true` if [member] has a `@NoSideEffects()` annotation.
+ /// Returns `true` if [member] has a `@pragma('dart2js:noSideEffects')`
+ /// annotation.
bool hasNoSideEffects(MemberEntity member);
- /// Calls [f] for all functions with a `@pragma('dart2js:noInline')`, or
- /// `@pragma('dart2js:noInline')` annotation.
+ /// Calls [f] for all functions with a `@pragma('dart2js:noInline')`
+ /// annotation.
void forEachNoInline(void f(FunctionEntity function));
- /// Calls [f] for all functions with a `@pragma('dart2js:tryInline')`, or
- /// `@pragma('dart2js:tryInline')` annotation.
+ /// Calls [f] for all functions with a `@pragma('dart2js:tryInline')`
+ /// annotation.
void forEachTryInline(void f(FunctionEntity function));
/// Calls [f] for all functions with a `@pragma('dart2js:noThrows')`
diff --git a/runtime/lib/function.cc b/runtime/lib/function.cc
index eebce6d..785e713 100644
--- a/runtime/lib/function.cc
+++ b/runtime/lib/function.cc
@@ -48,7 +48,7 @@
Function::Handle(other_closure.function()).IsGeneric());
return false;
}
- // Closures that are not implicit instance closures are unique.
+ // Closures that are not implicit closures (tear-offs) are unique.
const auto& func_a = Function::Handle(zone, receiver.function());
if (!func_a.IsImplicitClosureFunction()) {
return false;
diff --git a/sdk/lib/_internal/js_dev_runtime/patch/collection_patch.dart b/sdk/lib/_internal/js_dev_runtime/patch/collection_patch.dart
index 1f585c1..41ac9d6 100644
--- a/sdk/lib/_internal/js_dev_runtime/patch/collection_patch.dart
+++ b/sdk/lib/_internal/js_dev_runtime/patch/collection_patch.dart
@@ -8,9 +8,6 @@
import 'dart:_interceptors' show JSArray;
import 'dart:_js_helper'
show
- NoInline,
- NoSideEffects,
- NoThrows,
patch,
LinkedMap,
IdentityMap,
diff --git a/sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart b/sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart
index 148016d..e07844b 100644
--- a/sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart
+++ b/sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart
@@ -12,7 +12,6 @@
getRuntimeType,
LinkedMap,
JSSyntaxRegExp,
- NoInline,
notNull,
nullCheck,
Primitives,
@@ -903,7 +902,6 @@
@patch
class StackTrace {
@patch
- @NoInline()
static StackTrace get current {
return dart.stackTrace(JS('', 'Error()'));
}
diff --git a/sdk/lib/_internal/js_dev_runtime/private/annotations.dart b/sdk/lib/_internal/js_dev_runtime/private/annotations.dart
index 9062f31..b2bc4b7 100644
--- a/sdk/lib/_internal/js_dev_runtime/private/annotations.dart
+++ b/sdk/lib/_internal/js_dev_runtime/private/annotations.dart
@@ -59,17 +59,6 @@
/// of a variable with null
const nullCheck = _NullCheck();
-/// Tells the optimizing compiler that the annotated method cannot throw.
-/// Requires @NoInline() to function correctly.
-class NoThrows {
- const NoThrows();
-}
-
-/// Tells the optimizing compiler to not inline the annotated method.
-class NoInline {
- const NoInline();
-}
-
/// Marks a class as native and defines its JavaScript name(s).
class Native {
final String name;
diff --git a/sdk/lib/_internal/js_dev_runtime/private/js_helper.dart b/sdk/lib/_internal/js_dev_runtime/private/js_helper.dart
index 08a1e1e..c32af9b 100644
--- a/sdk/lib/_internal/js_dev_runtime/private/js_helper.dart
+++ b/sdk/lib/_internal/js_dev_runtime/private/js_helper.dart
@@ -479,7 +479,6 @@
* Diagnoses an indexing error. Returns the ArgumentError or RangeError that
* describes the problem.
*/
-@NoInline()
Error diagnoseIndexError(indexable, int index) {
int length = indexable.length;
// The following returns the same error that would be thrown by calling
@@ -495,7 +494,6 @@
* Diagnoses a range error. Returns the ArgumentError or RangeError that
* describes the problem.
*/
-@NoInline()
Error diagnoseRangeError(int? start, int? end, int length) {
if (start == null) {
return ArgumentError.value(start, 'start');
@@ -517,7 +515,6 @@
JS<int>('!', r'#.lastIndexOf(#, #)', receiver, element, start);
/// 'factory' for constructing ArgumentError.value to keep the call sites small.
-@NoInline()
ArgumentError argumentErrorValue(object) {
return ArgumentError.value(object);
}
@@ -539,7 +536,6 @@
throw AbstractClassInstantiationError(className);
}
-@NoInline()
throwConcurrentModificationError(collection) {
throw ConcurrentModificationError(collection);
}
diff --git a/sdk/lib/_internal/js_runtime/lib/collection_patch.dart b/sdk/lib/_internal/js_runtime/lib/collection_patch.dart
index 6ff4a1f..b01ebb6 100644
--- a/sdk/lib/_internal/js_runtime/lib/collection_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/collection_patch.dart
@@ -9,9 +9,6 @@
fillLiteralMap,
fillLiteralSet,
InternalMap,
- NoInline,
- NoSideEffects,
- NoThrows,
patch,
JsLinkedHashMap,
LinkedHashMapCell,
diff --git a/sdk/lib/_internal/js_runtime/lib/core_patch.dart b/sdk/lib/_internal/js_runtime/lib/core_patch.dart
index abd63e2..5726f96 100644
--- a/sdk/lib/_internal/js_runtime/lib/core_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/core_patch.dart
@@ -17,7 +17,6 @@
JsLinkedHashMap,
jsonEncodeNative,
JSSyntaxRegExp,
- NoInline,
objectHashCode,
patch,
Primitives,
diff --git a/sdk/lib/_internal/js_runtime/lib/dart2js_runtime_metrics.dart b/sdk/lib/_internal/js_runtime/lib/dart2js_runtime_metrics.dart
index ab1d879..637d2c7 100644
--- a/sdk/lib/_internal/js_runtime/lib/dart2js_runtime_metrics.dart
+++ b/sdk/lib/_internal/js_runtime/lib/dart2js_runtime_metrics.dart
@@ -16,12 +16,17 @@
///
/// - `runtime`: `'dart2js'`
///
-/// - `firstMs`: first performance.now() reading in the main.dart.js file.
+/// - `firstMs`: First `performance.now()` reading taken from the main.dart.js
+/// file. This is the earliest time that the script is executing. The script
+/// has already been loaded and parsed (otherwise the script load would fail)
+/// and these earier events may be available from the `performance` API.
///
-/// - `dartMainProgramMs`: performance.now() immediately inside the function
-/// wrapping all the Dart code
+/// - `dartProgramMs`: `performance.now()` immediately inside the large function
+/// with the name 'dartProgram' that wraps all the Dart code, before doing any
+/// program setup actions.
///
-/// - `callMainMs`: performance.now() just before calling main()
+/// - `callMainMs`: performance.now() just before calling main(), after doing
+/// all program setup actions.
///
/// The injected code uses `Date.now()` if `performance.now()` is not defined.
Map<String, Object> get startupMetrics {
diff --git a/sdk/lib/_internal/js_runtime/lib/developer_patch.dart b/sdk/lib/_internal/js_runtime/lib/developer_patch.dart
index e7833f5..feb0d48 100644
--- a/sdk/lib/_internal/js_runtime/lib/developer_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/developer_patch.dart
@@ -4,7 +4,7 @@
// Patch file for dart:developer library.
-import 'dart:_js_helper' show patch, ForceInline;
+import 'dart:_js_helper' show patch;
import 'dart:_foreign_helper' show JS;
import 'dart:async' show Zone;
import 'dart:isolate';
diff --git a/sdk/lib/_internal/js_runtime/lib/interceptors.dart b/sdk/lib/_internal/js_runtime/lib/interceptors.dart
index 189bb8c..5a062ab 100644
--- a/sdk/lib/_internal/js_runtime/lib/interceptors.dart
+++ b/sdk/lib/_internal/js_runtime/lib/interceptors.dart
@@ -40,8 +40,7 @@
throwConcurrentModificationError,
lookupAndCacheInterceptor,
StringMatch,
- firstMatchAfter,
- NoInline;
+ firstMatchAfter;
import 'dart:_foreign_helper'
show
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 15695c1..50660b9 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -50,7 +50,6 @@
JSName,
Native,
Returns,
- ForceInline,
findDispatchTagForInterceptorClass,
setNativeSubclassDispatchRecord,
makeLeafDispatchRecord,
diff --git a/tests/lib/html/js_dispatch_property_test.dart b/tests/lib/html/js_dispatch_property_test.dart
index 3fbe2ea..f20a4ffa6 100644
--- a/tests/lib/html/js_dispatch_property_test.dart
+++ b/tests/lib/html/js_dispatch_property_test.dart
@@ -6,8 +6,6 @@
import 'package:expect/minitest.dart';
-import 'package:expect/expect.dart' show NoInline, AssumeDynamic;
-
import 'js_dispatch_property_test_lib.dart';
@pragma('dart2js:noInline')
diff --git a/tests/lib/html/js_interop_constructor_name/util.dart b/tests/lib/html/js_interop_constructor_name/util.dart
index 03659f0..3ec4563 100644
--- a/tests/lib/html/js_interop_constructor_name/util.dart
+++ b/tests/lib/html/js_interop_constructor_name/util.dart
@@ -5,7 +5,6 @@
@JS()
library util;
-import 'package:expect/expect.dart' show NoInline, AssumeDynamic;
import 'package:js/js.dart';
@JS()
diff --git a/tests/lib/html/js_typed_interop_callable_object_test.dart b/tests/lib/html/js_typed_interop_callable_object_test.dart
index 659d2a91..663a789 100644
--- a/tests/lib/html/js_typed_interop_callable_object_test.dart
+++ b/tests/lib/html/js_typed_interop_callable_object_test.dart
@@ -7,7 +7,6 @@
import 'dart:html';
-import 'package:expect/expect.dart' show NoInline, AssumeDynamic;
import 'package:js/js.dart';
import 'package:expect/minitest.dart';
diff --git a/tests/lib_2/html/js_dispatch_property_test.dart b/tests/lib_2/html/js_dispatch_property_test.dart
index 3ca4a9e..866b7e6 100644
--- a/tests/lib_2/html/js_dispatch_property_test.dart
+++ b/tests/lib_2/html/js_dispatch_property_test.dart
@@ -8,8 +8,6 @@
import 'package:expect/minitest.dart';
-import 'package:expect/expect.dart' show NoInline, AssumeDynamic;
-
import 'js_dispatch_property_test_lib.dart';
@pragma('dart2js:noInline')
diff --git a/tests/lib_2/html/js_interop_constructor_name/util.dart b/tests/lib_2/html/js_interop_constructor_name/util.dart
index 6eecab4..c98f612 100644
--- a/tests/lib_2/html/js_interop_constructor_name/util.dart
+++ b/tests/lib_2/html/js_interop_constructor_name/util.dart
@@ -7,7 +7,6 @@
@JS()
library util;
-import 'package:expect/expect.dart' show NoInline, AssumeDynamic;
import 'package:js/js.dart';
@JS()
diff --git a/tests/lib_2/html/js_typed_interop_callable_object_test.dart b/tests/lib_2/html/js_typed_interop_callable_object_test.dart
index 1a89ff6..9ede0a2 100644
--- a/tests/lib_2/html/js_typed_interop_callable_object_test.dart
+++ b/tests/lib_2/html/js_typed_interop_callable_object_test.dart
@@ -9,7 +9,6 @@
import 'dart:html';
-import 'package:expect/expect.dart' show NoInline, AssumeDynamic;
import 'package:js/js.dart';
import 'package:expect/minitest.dart';
diff --git a/tests/web/deferred_inheritance_test.dart b/tests/web/deferred_inheritance_test.dart
index 2443682..45a62fa 100644
--- a/tests/web/deferred_inheritance_test.dart
+++ b/tests/web/deferred_inheritance_test.dart
@@ -16,7 +16,7 @@
class B extends A {}
/// If the check `y is A` is generated as `y.$isA` then the issue is not
-/// exposed. We use `AssumeDynamic` to ensure that we generate as `y instanceof
+/// exposed. We use `assumeDynamic` to ensure that we generate as `y instanceof
/// A` in JS.
@pragma('dart2js:noInline')
@pragma('dart2js:assumeDynamic')
diff --git a/tests/web/internal/mock_libraries.dart b/tests/web/internal/mock_libraries.dart
index 9f0be35..d279e0c 100644
--- a/tests/web/internal/mock_libraries.dart
+++ b/tests/web/internal/mock_libraries.dart
@@ -246,10 +246,6 @@
'listTypeCheck': 'listTypeCheck(value) {}',
'makeLiteralMap': 'makeLiteralMap(List keyValuePairs) {}',
'Native': 'class Native {}',
- 'NoInline': 'class NoInline {}',
- 'ForceInline': 'class ForceInline {}',
- 'NoSideEffects': 'class NoSideEffects {}',
- 'NoThrows': 'class NoThrows {}',
'numberOrStringSuperNativeTypeCast':
'numberOrStringSuperNativeTypeCast(value) {}',
'numberOrStringSuperNativeTypeCheck':
diff --git a/tests/web/native/compiler_test_internals.dart b/tests/web/native/compiler_test_internals.dart
index 08e96d0..3278e34 100644
--- a/tests/web/native/compiler_test_internals.dart
+++ b/tests/web/native/compiler_test_internals.dart
@@ -4,6 +4,4 @@
library compiler_test_internals;
-export 'dart:_js_helper' show NoSideEffects, NoThrows, NoInline;
-
export 'dart:_foreign_helper' show JS;
diff --git a/tests/web_2/deferred_inheritance_test.dart b/tests/web_2/deferred_inheritance_test.dart
index 0373907..8f16b55 100644
--- a/tests/web_2/deferred_inheritance_test.dart
+++ b/tests/web_2/deferred_inheritance_test.dart
@@ -18,7 +18,7 @@
class B extends A {}
/// If the check `y is A` is generated as `y.$isA` then the issue is not
-/// exposed. We use `AssumeDynamic` to ensure that we generate as `y instanceof
+/// exposed. We use `assumeDynamic` to ensure that we generate as `y instanceof
/// A` in JS.
@pragma('dart2js:noInline')
@pragma('dart2js:assumeDynamic')
diff --git a/tests/web_2/internal/mock_libraries.dart b/tests/web_2/internal/mock_libraries.dart
index adec88a..9aa36ad 100644
--- a/tests/web_2/internal/mock_libraries.dart
+++ b/tests/web_2/internal/mock_libraries.dart
@@ -218,10 +218,6 @@
}''',
'makeLiteralMap': 'makeLiteralMap(List keyValuePairs) {}',
'Native': 'class Native {}',
- 'NoInline': 'class NoInline {}',
- 'ForceInline': 'class ForceInline {}',
- 'NoSideEffects': 'class NoSideEffects {}',
- 'NoThrows': 'class NoThrows {}',
'_Patch': 'class _Patch { final tag; const _Patch(this.tag); }',
'patch': 'const patch = const _Patch(null);',
'patch_full': 'const patch_full = const _Patch("full");',
diff --git a/tests/web_2/native/compiler_test_internals.dart b/tests/web_2/native/compiler_test_internals.dart
index c7b0218..a0ce071 100644
--- a/tests/web_2/native/compiler_test_internals.dart
+++ b/tests/web_2/native/compiler_test_internals.dart
@@ -6,6 +6,4 @@
library compiler_test_internals;
-export 'dart:_js_helper' show NoSideEffects, NoThrows, NoInline;
-
export 'dart:_foreign_helper' show JS;
diff --git a/tools/VERSION b/tools/VERSION
index 2e10b12..8c5ab71 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 14
PATCH 0
-PRERELEASE 382
+PRERELEASE 383
PRERELEASE_PATCH 0
\ No newline at end of file
diff --git a/tools/dom/templates/html/dart2js/html_dart2js.darttemplate b/tools/dom/templates/html/dart2js/html_dart2js.darttemplate
index fd4069b..1559461 100644
--- a/tools/dom/templates/html/dart2js/html_dart2js.darttemplate
+++ b/tools/dom/templates/html/dart2js/html_dart2js.darttemplate
@@ -42,7 +42,7 @@
import 'dart:web_sql';
import 'dart:_js_helper' show
convertDartClosureToJS, Creates, JavaScriptIndexingBehavior,
- JSName, Native, Returns, ForceInline,
+ JSName, Native, Returns,
findDispatchTagForInterceptorClass, setNativeSubclassDispatchRecord,
makeLeafDispatchRecord, registerGlobalObject, applyExtension;
import 'dart:_interceptors' show