[L] Change in dart/sdk[main]: [js] Move `allowInterop` functions to `dart:js_util`.

0 views
Skip to first unread message

Joshua Litt (Gerrit)

unread,
Feb 7, 2023, 10:25:21 AM2/7/23
to Srujan Gaddam, dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org

Attention is currently required from: Srujan Gaddam.

Joshua Litt would like Srujan Gaddam to review this change.

View Change

[js] Move `allowInterop` functions to `dart:js_util`.

Change-Id: Iea2f2e707c69c9082e158b48b50dcaf4a7b01067
---
M pkg/_js_interop_checks/lib/src/transformations/export_creator.dart
M pkg/_js_interop_checks/lib/src/transformations/js_util_optimizer.dart
M pkg/compiler/lib/src/common/elements.dart
M pkg/compiler/lib/src/common/names.dart
M pkg/compiler/test/impact/data/jsinterop.dart
M pkg/dart2wasm/lib/js_runtime_generator.dart
M pkg/dart2wasm/lib/target.dart
M pkg/dev_compiler/lib/src/kernel/js_interop.dart
M pkg/js/lib/js.dart
A sdk/lib/_internal/js_dev_runtime/patch/js_allow_interop_patch.dart
M sdk/lib/_internal/js_dev_runtime/patch/js_patch.dart
A sdk/lib/_internal/js_runtime/lib/js_allow_interop_patch.dart
M sdk/lib/_internal/js_runtime/lib/js_helper.dart
M sdk/lib/_internal/js_runtime/lib/js_patch.dart
M sdk/lib/_internal/js_shared/lib/js_util_patch.dart
D sdk/lib/_internal/wasm/lib/js_patch.dart
M sdk/lib/_internal/wasm/lib/js_util_patch.dart
M sdk/lib/js/_js_annotations.dart
M sdk/lib/js/js.dart
M sdk/lib/js_util/js_util.dart
M sdk/lib/libraries.json
M sdk/lib/libraries.yaml
22 files changed, 213 insertions(+), 307 deletions(-)

diff --git a/pkg/_js_interop_checks/lib/src/transformations/export_creator.dart b/pkg/_js_interop_checks/lib/src/transformations/export_creator.dart
index caade57..d49eaba 100644
--- a/pkg/_js_interop_checks/lib/src/transformations/export_creator.dart
+++ b/pkg/_js_interop_checks/lib/src/transformations/export_creator.dart
@@ -36,7 +36,7 @@
ExportCreator(
this._typeEnvironment, this._diagnosticReporter, this._exportChecker)
: _allowInterop = _typeEnvironment.coreTypes.index
- .getTopLevelProcedure('dart:js', 'allowInterop'),
+ .getTopLevelProcedure('dart:js_util', 'allowInterop'),
_createDartExport = _typeEnvironment.coreTypes.index
.getTopLevelProcedure('dart:js_util', 'createDartExport'),
_createStaticInteropMock = _typeEnvironment.coreTypes.index
diff --git a/pkg/_js_interop_checks/lib/src/transformations/js_util_optimizer.dart b/pkg/_js_interop_checks/lib/src/transformations/js_util_optimizer.dart
index b46e4c5..384ba65 100644
--- a/pkg/_js_interop_checks/lib/src/transformations/js_util_optimizer.dart
+++ b/pkg/_js_interop_checks/lib/src/transformations/js_util_optimizer.dart
@@ -89,8 +89,8 @@
.getTopLevelProcedure('dart:js_util', '_setPropertyUnchecked'),
_jsTarget =
_coreTypes.index.getTopLevelProcedure('dart:_foreign_helper', 'JS'),
- _allowInteropTarget =
- _coreTypes.index.getTopLevelProcedure('dart:js', 'allowInterop'),
+ _allowInteropTarget = _coreTypes.index
+ .getTopLevelProcedure('dart:js_util', 'allowInterop'),
_allowedInteropJsUtilTargets = _allowedInteropJsUtilMembers.map(
(member) =>
_coreTypes.index.getTopLevelProcedure('dart:js_util', member)),
diff --git a/pkg/compiler/lib/src/common/elements.dart b/pkg/compiler/lib/src/common/elements.dart
index 1dbff8b..3de4114 100644
--- a/pkg/compiler/lib/src/common/elements.dart
+++ b/pkg/compiler/lib/src/common/elements.dart
@@ -139,8 +139,9 @@
late final LibraryEntity internalLibrary =
_env.lookupLibrary(Uris.dart__internal, required: true)!;

- /// The dart:js library.
- late final LibraryEntity? dartJsLibrary = _env.lookupLibrary(Uris.dart_js);
+ /// The dart:js_util library.
+ late final LibraryEntity? dartJsUtilLibrary =
+ _env.lookupLibrary(Uris.dart_js_util);

/// The package:js library.
late final LibraryEntity? packageJsLibrary =
@@ -1039,22 +1040,15 @@
: objectClass;
}

- // From package:js
+ // From dart:js_util
late final FunctionEntity? jsAllowInterop1 =
- _findLibraryMember(dartJsLibrary, 'allowInterop', required: false);
+ _findLibraryMember(dartJsUtilLibrary, 'allowInterop', required: false);

// From dart:_js_annotations;
late final FunctionEntity? jsAllowInterop2 = _findLibraryMember(
dartJsAnnotationsLibrary, 'allowInterop',
required: false);

- /// Returns `true` if [function] is `allowInterop`.
- ///
- /// This function can come from either `package:js` or `dart:_js_annotations`.
- bool isJsAllowInterop(FunctionEntity function) {
- return function == jsAllowInterop1 || function == jsAllowInterop2;
- }
-
bool isCreateInvocationMirrorHelper(MemberEntity member) {
return member.isTopLevel &&
member.name == '_createInvocationMirror' &&
diff --git a/pkg/compiler/lib/src/common/names.dart b/pkg/compiler/lib/src/common/names.dart
index abd2114..470f3f1 100644
--- a/pkg/compiler/lib/src/common/names.dart
+++ b/pkg/compiler/lib/src/common/names.dart
@@ -255,8 +255,8 @@
static final Uri dart__js_shared_embedded_names =
Uri(scheme: 'dart', path: '_js_shared_embedded_names');

- /// The URI for 'dart:js'.
- static final Uri dart_js = Uri(scheme: 'dart', path: 'js');
+ /// The URI for 'dart:js_util'.
+ static final Uri dart_js_util = Uri(scheme: 'dart', path: 'js_util');

/// The URI for 'package:js'.
static final Uri package_js = Uri(scheme: 'package', path: 'js/js.dart');
diff --git a/pkg/compiler/test/impact/data/jsinterop.dart b/pkg/compiler/test/impact/data/jsinterop.dart
index 65598fd..ba65d5d 100644
--- a/pkg/compiler/test/impact/data/jsinterop.dart
+++ b/pkg/compiler/test/impact/data/jsinterop.dart
@@ -30,21 +30,9 @@
/*member: JsInteropClass.:*/
external JsInteropClass();

- /*member: JsInteropClass.method:
- type=[
- native:ApplicationCacheErrorEvent,
- native:DomError,
- native:DomException,
- native:ErrorEvent,
+ /*member: JsInteropClass.method:type=[
native:GenericClass<dynamic>,
- native:JsInteropClass,
- native:MediaError,
- native:NavigatorUserMediaError,
- native:OverconstrainedError,
- native:PositionError,
- native:SensorErrorEvent,
- native:SpeechRecognitionError]
- */
+ native:JsInteropClass]*/
@JS()
external double method();
}
diff --git a/pkg/dart2wasm/lib/js_runtime_generator.dart b/pkg/dart2wasm/lib/js_runtime_generator.dart
index 8cf8cbc..43db38e 100644
--- a/pkg/dart2wasm/lib/js_runtime_generator.dart
+++ b/pkg/dart2wasm/lib/js_runtime_generator.dart
@@ -161,8 +161,8 @@
.getClass('dart:_js_helper', 'JSValue')
.procedures
.firstWhere((p) => p.name.text == 'unbox'),
- _allowInteropTarget =
- _coreTypes.index.getTopLevelProcedure('dart:js', 'allowInterop'),
+ _allowInteropTarget = _coreTypes.index
+ .getTopLevelProcedure('dart:js_util', 'allowInterop'),
_inlineJSTarget =
_coreTypes.index.getTopLevelProcedure('dart:_js_helper', 'JS'),
_wasmExternRefClass =
diff --git a/pkg/dart2wasm/lib/target.dart b/pkg/dart2wasm/lib/target.dart
index eeb07e7..617f592 100644
--- a/pkg/dart2wasm/lib/target.dart
+++ b/pkg/dart2wasm/lib/target.dart
@@ -61,7 +61,6 @@
'dart:typed_data',
'dart:nativewrappers',
'dart:io',
- 'dart:js',
'dart:js_util',
'dart:wasm',
'dart:developer',
@@ -73,7 +72,6 @@
'dart:_js_interop',
'dart:collection',
'dart:typed_data',
- 'dart:js',
'dart:js_util',
'dart:wasm',
];
diff --git a/pkg/dev_compiler/lib/src/kernel/js_interop.dart b/pkg/dev_compiler/lib/src/kernel/js_interop.dart
index 16f1038..b78ee59 100644
--- a/pkg/dev_compiler/lib/src/kernel/js_interop.dart
+++ b/pkg/dev_compiler/lib/src/kernel/js_interop.dart
@@ -34,7 +34,7 @@
bool isAllowInterop(Expression node) {
if (node is StaticInvocation) {
var target = node.target;
- return _isLibrary(target.enclosingLibrary, ['dart:js']) &&
+ return _isLibrary(target.enclosingLibrary, ['dart:js_util']) &&
target.name.text == 'allowInterop';
}
return false;
diff --git a/pkg/js/lib/js.dart b/pkg/js/lib/js.dart
index b395efe..b6897c5 100644
--- a/pkg/js/lib/js.dart
+++ b/pkg/js/lib/js.dart
@@ -7,7 +7,7 @@

import 'package:meta/meta.dart';

-export 'dart:js' show allowInterop, allowInteropCaptureThis;
+export 'dart:js_util' show allowInterop, allowInteropCaptureThis;

/// An annotation that indicates a library, class, or member is implemented
/// directly in JavaScript.
diff --git a/sdk/lib/_internal/js_dev_runtime/patch/js_allow_interop_patch.dart b/sdk/lib/_internal/js_dev_runtime/patch/js_allow_interop_patch.dart
new file mode 100644
index 0000000..b3bfee5
--- /dev/null
+++ b/sdk/lib/_internal/js_dev_runtime/patch/js_allow_interop_patch.dart
@@ -0,0 +1,48 @@
+// Copyright (c) 2023, 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.
+
+// Patch file for dart:js_util library.
+import 'dart:_foreign_helper' show JS;
+import 'dart:_internal' show patch;
+import 'dart:_runtime' as dart;
+
+Expando<Function> _interopExpando = Expando<Function>();
+
+@patch
+F allowInterop<F extends Function>(F f) {
+ if (!dart.isDartFunction(f)) return f;
+ var ret = _interopExpando[f] as F?;
+ if (ret == null) {
+ ret = JS<F>(
+ '',
+ 'function (...args) {'
+ ' return #(#, args);'
+ '}',
+ dart.dcall,
+ f);
+ _interopExpando[f] = ret;
+ }
+ return ret;
+}
+
+Expando<Function> _interopCaptureThisExpando = Expando<Function>();
+
+@patch
+Function allowInteropCaptureThis(Function f) {
+ if (!dart.isDartFunction(f)) return f;
+ var ret = _interopCaptureThisExpando[f];
+ if (ret == null) {
+ ret = JS<Function>(
+ '',
+ 'function(...arguments) {'
+ ' let args = [this];'
+ ' args.push.apply(args, arguments);'
+ ' return #(#, args);'
+ '}',
+ dart.dcall,
+ f);
+ _interopCaptureThisExpando[f] = ret;
+ }
+ return ret;
+}
diff --git a/sdk/lib/_internal/js_dev_runtime/patch/js_patch.dart b/sdk/lib/_internal/js_dev_runtime/patch/js_patch.dart
index 2eda2b4..f934979 100644
--- a/sdk/lib/_internal/js_dev_runtime/patch/js_patch.dart
+++ b/sdk/lib/_internal/js_dev_runtime/patch/js_patch.dart
@@ -404,43 +404,3 @@
// TODO(vsm): Static cast. Unnecessary?
return JS('', '#', value);
}
-
-Expando<Function> _interopExpando = Expando<Function>();
-
-@patch
-F allowInterop<F extends Function>(F f) {
- if (!dart.isDartFunction(f)) return f;
- var ret = _interopExpando[f] as F?;
- if (ret == null) {
- ret = JS<F>(
- '',
- 'function (...args) {'
- ' return #(#, args);'
- '}',
- dart.dcall,
- f);
- _interopExpando[f] = ret;
- }
- return ret;
-}
-
-Expando<Function> _interopCaptureThisExpando = Expando<Function>();
-
-@patch
-Function allowInteropCaptureThis(Function f) {
- if (!dart.isDartFunction(f)) return f;
- var ret = _interopCaptureThisExpando[f];
- if (ret == null) {
- ret = JS<Function>(
- '',
- 'function(...arguments) {'
- ' let args = [this];'
- ' args.push.apply(args, arguments);'
- ' return #(#, args);'
- '}',
- dart.dcall,
- f);
- _interopCaptureThisExpando[f] = ret;
- }
- return ret;
-}
diff --git a/sdk/lib/_internal/js_runtime/lib/js_allow_interop_patch.dart b/sdk/lib/_internal/js_runtime/lib/js_allow_interop_patch.dart
new file mode 100644
index 0000000..831cd49
--- /dev/null
+++ b/sdk/lib/_internal/js_runtime/lib/js_allow_interop_patch.dart
@@ -0,0 +1,82 @@
+// Copyright (c) 2023, 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.
+
+// Patch file for dart:js_util library.
+
+import 'dart:_foreign_helper' show JS, DART_CLOSURE_TO_JS;
+import 'dart:_interceptors' show DART_CLOSURE_PROPERTY_NAME;
+import 'dart:_internal' show patch;
+import 'dart:_js_helper'
+ show
+ isJSFunction,
+ JS_FUNCTION_PROPERTY_NAME,
+ JS_FUNCTION_PROPERTY_NAME_CAPTURE_THIS;
+
+_convertDartFunctionFast(Function f) {
+ var existing = JS('', '#.#', f, JS_FUNCTION_PROPERTY_NAME);
+ if (existing != null) return existing;
+ var ret = JS(
+ 'JavaScriptFunction',
+ '''
+ function(_call, f) {
+ return function() {
+ return _call(f, Array.prototype.slice.apply(arguments));
+ }
+ }(#, #)
+ ''',
+ DART_CLOSURE_TO_JS(_callDartFunctionFast),
+ f);
+ JS('', '#.# = #', ret, DART_CLOSURE_PROPERTY_NAME, f);
+ JS('', '#.# = #', f, JS_FUNCTION_PROPERTY_NAME, ret);
+ return ret;
+}
+
+_convertDartFunctionFastCaptureThis(Function f) {
+ var existing = JS('', '#.#', f, JS_FUNCTION_PROPERTY_NAME_CAPTURE_THIS);
+ if (existing != null) return existing;
+ var ret = JS(
+ 'JavaScriptFunction',
+ '''
+ function(_call, f) {
+ return function() {
+ return _call(f, this,Array.prototype.slice.apply(arguments));
+ }
+ }(#, #)
+ ''',
+ DART_CLOSURE_TO_JS(_callDartFunctionFastCaptureThis),
+ f);
+ JS('', '#.# = #', ret, DART_CLOSURE_PROPERTY_NAME, f);
+ JS('', '#.# = #', f, JS_FUNCTION_PROPERTY_NAME_CAPTURE_THIS, ret);
+ return ret;
+}
+
+_callDartFunctionFast(callback, List arguments) {
+ return Function.apply(callback, arguments);
+}
+
+_callDartFunctionFastCaptureThis(callback, self, List arguments) {
+ return Function.apply(callback, [self]..addAll(arguments));
+}
+
+@patch
+F allowInterop<F extends Function>(F f) {
+ if (isJSFunction(f)) {
+ // Already supports interop, just use the existing function.
+ return f;
+ } else {
+ return _convertDartFunctionFast(f);
+ }
+}
+
+@patch
+Function allowInteropCaptureThis(Function f) {
+ if (isJSFunction(f)) {
+ // Behavior when the function is already a JS function is unspecified.
+ throw ArgumentError(
+ "Function is already a JS function so cannot capture this.");
+ return f;
+ } else {
+ return _convertDartFunctionFastCaptureThis(f);
+ }
+}
diff --git a/sdk/lib/_internal/js_runtime/lib/js_helper.dart b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
index cefeb71..38f3c62 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_helper.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
@@ -82,6 +82,9 @@
part 'linked_hash_map.dart';
part 'records.dart';

+const JS_FUNCTION_PROPERTY_NAME = r'$dart_jsFunction';
+const JS_FUNCTION_PROPERTY_NAME_CAPTURE_THIS = r'_$dart_jsFunctionCaptureThis';
+
/// Marks the internal map in dart2js, so that internal libraries can is-check
/// them.
abstract class InternalMap {}
diff --git a/sdk/lib/_internal/js_runtime/lib/js_patch.dart b/sdk/lib/_internal/js_runtime/lib/js_patch.dart
index ede1668..ff574c6 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_patch.dart
@@ -9,7 +9,12 @@
import 'dart:_foreign_helper' show JS, DART_CLOSURE_TO_JS;
import 'dart:_interceptors' show DART_CLOSURE_PROPERTY_NAME;
import 'dart:_internal' show patch;
-import 'dart:_js_helper' show Primitives, getIsolateAffinityTag, isJSFunction;
+import 'dart:_js_helper'
+ show
+ Primitives,
+ getIsolateAffinityTag,
+ isJSFunction,
+ JS_FUNCTION_PROPERTY_NAME;
import 'dart:_js' show isBrowserObject, convertFromBrowserObject;

@patch
@@ -370,8 +375,6 @@

// property added to a JS object referencing its Dart-side JsObject proxy
const _JS_OBJECT_PROPERTY_NAME = r'_$dart_jsObject';
-const _JS_FUNCTION_PROPERTY_NAME = r'$dart_jsFunction';
-const _JS_FUNCTION_PROPERTY_NAME_CAPTURE_THIS = r'_$dart_jsFunctionCaptureThis';

@pragma('dart2js:tryInline')
JsObject _castToJsObject(o) => JS<JsObject>('', '#', o);
@@ -431,7 +434,7 @@
return Primitives.lazyAsJsDate(o);
}
if (o is Function) {
- return _getJsProxy(o, _JS_FUNCTION_PROPERTY_NAME, (o) {
+ return _getJsProxy(o, JS_FUNCTION_PROPERTY_NAME, (o) {
var jsFunction = _convertDartFunction(o);
// set a property on the JS closure referencing the Dart closure
_defineProperty(jsFunction, DART_CLOSURE_PROPERTY_NAME, o);
@@ -502,71 +505,3 @@
}
return dartProxy;
}
-
-_convertDartFunctionFast(Function f) {
- var existing = JS('', '#.#', f, _JS_FUNCTION_PROPERTY_NAME);
- if (existing != null) return existing;
- var ret = JS(
- 'JavaScriptFunction',
- '''
- function(_call, f) {
- return function() {
- return _call(f, Array.prototype.slice.apply(arguments));
- }
- }(#, #)
- ''',
- DART_CLOSURE_TO_JS(_callDartFunctionFast),
- f);
- JS('', '#.# = #', ret, DART_CLOSURE_PROPERTY_NAME, f);
- JS('', '#.# = #', f, _JS_FUNCTION_PROPERTY_NAME, ret);
- return ret;
-}
-
-_convertDartFunctionFastCaptureThis(Function f) {
- var existing = JS('', '#.#', f, _JS_FUNCTION_PROPERTY_NAME_CAPTURE_THIS);
- if (existing != null) return existing;
- var ret = JS(
- 'JavaScriptFunction',
- '''
- function(_call, f) {
- return function() {
- return _call(f, this,Array.prototype.slice.apply(arguments));
- }
- }(#, #)
- ''',
- DART_CLOSURE_TO_JS(_callDartFunctionFastCaptureThis),
- f);
- JS('', '#.# = #', ret, DART_CLOSURE_PROPERTY_NAME, f);
- JS('', '#.# = #', f, _JS_FUNCTION_PROPERTY_NAME_CAPTURE_THIS, ret);
- return ret;
-}
-
-_callDartFunctionFast(callback, List arguments) {
- return Function.apply(callback, arguments);
-}
-
-_callDartFunctionFastCaptureThis(callback, self, List arguments) {
- return Function.apply(callback, [self]..addAll(arguments));
-}
-
-@patch
-F allowInterop<F extends Function>(F f) {
- if (isJSFunction(f)) {
- // Already supports interop, just use the existing function.
- return f;
- } else {
- return _convertDartFunctionFast(f);
- }
-}
-
-@patch
-Function allowInteropCaptureThis(Function f) {
- if (isJSFunction(f)) {
- // Behavior when the function is already a JS function is unspecified.
- throw ArgumentError(
- "Function is already a JS function so cannot capture this.");
- return f;
- } else {
- return _convertDartFunctionFastCaptureThis(f);
- }
-}
diff --git a/sdk/lib/_internal/js_shared/lib/js_util_patch.dart b/sdk/lib/_internal/js_shared/lib/js_util_patch.dart
index d2b5595..fe45f9b 100644
--- a/sdk/lib/_internal/js_shared/lib/js_util_patch.dart
+++ b/sdk/lib/_internal/js_shared/lib/js_util_patch.dart
@@ -8,7 +8,6 @@
show convertDartClosureToJS, assertInterop, assertInteropArgs;
import 'dart:collection' show HashMap;
import 'dart:async' show Completer;
-import 'dart:js_util';

@patch
dynamic jsify(Object object) {
diff --git a/sdk/lib/_internal/wasm/lib/js_patch.dart b/sdk/lib/_internal/wasm/lib/js_patch.dart
deleted file mode 100644
index fde0468..0000000
--- a/sdk/lib/_internal/wasm/lib/js_patch.dart
+++ /dev/null
@@ -1,122 +0,0 @@
-// Copyright (c) 2022, 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.
-
-// This library is only supported on dart2wasm because of [allowInterop].
-
-library dart.js;
-
-import 'dart:_internal' show patch;
-import 'dart:_js_helper';
-import 'dart:collection' show ListMixin;
-import 'dart:wasm';
-
-@patch
-JsObject get context => throw UnimplementedError();
-
-@patch
-class JsObject {
- // No argument empty constructor to support inheritance.
- JsObject._() {
- throw UnimplementedError();
- }
-
- @patch
- factory JsObject(JsFunction constructor, [List? arguments]) =>
- throw UnimplementedError();
-
- @patch
- factory JsObject.fromBrowserObject(Object object) =>
- throw UnimplementedError();
-
- @patch
- factory JsObject.jsify(Object object) => throw UnimplementedError();
-
- @patch
- dynamic operator [](Object property) => throw UnimplementedError();
-
- @patch
- void operator []=(Object property, Object? value) =>
- throw UnimplementedError();
-
- @patch
- bool operator ==(Object other) => throw UnimplementedError();
-
- @patch
- bool hasProperty(Object property) => throw UnimplementedError();
-
- @patch
- void deleteProperty(Object property) => throw UnimplementedError();
-
- @patch
- bool instanceof(JsFunction type) => throw UnimplementedError();
-
- @patch
- String toString() => throw UnimplementedError();
-
- @patch
- dynamic callMethod(Object method, [List? args]) => throw UnimplementedError();
-}
-
-@patch
-class JsFunction extends JsObject {
- @patch
- factory JsFunction.withThis(Function f) => throw UnimplementedError();
-
- @patch
- dynamic apply(List args, {thisArg}) => throw UnimplementedError();
-}
-
-@patch
-class JsArray<E> extends JsObject with ListMixin<E> {
- @patch
- factory JsArray() => throw UnimplementedError();
-
- @patch
- factory JsArray.from(Iterable<E> other) => throw UnimplementedError();
-
- @patch
- E operator [](Object index) => throw UnimplementedError();
-
- @patch
- void operator []=(Object index, E value) => throw UnimplementedError();
-
- @patch
- int get length => throw UnimplementedError();
-
- @patch
- void set length(int length) => throw UnimplementedError();
-
- @patch
- void add(E value) => throw UnimplementedError();
-
- @patch
- void addAll(Iterable<E> iterable) => throw UnimplementedError();
-
- @patch
- void insert(int index, E element) => throw UnimplementedError();
-
- @patch
- E removeAt(int index) => throw UnimplementedError();
-
- @patch
- E removeLast() => throw UnimplementedError();
-
- @patch
- void removeRange(int start, int end) => throw UnimplementedError();
-
- @patch
- void setRange(int start, int end, Iterable<E> iterable,
- [int skipCount = 0]) =>
- throw UnimplementedError();
-
- @patch
- void sort([int compare(E a, E b)?]) => throw UnimplementedError();
-}
-
-/// This will be lowered to a call to `_wrapDartCallback`.
-@patch
-F allowInterop<F extends Function>(F f) => throw UnimplementedError();
-
-@patch
-Function allowInteropCaptureThis(Function f) => throw UnimplementedError();
diff --git a/sdk/lib/_internal/wasm/lib/js_util_patch.dart b/sdk/lib/_internal/wasm/lib/js_util_patch.dart
index 3dfc102..a14a25e 100644
--- a/sdk/lib/_internal/wasm/lib/js_util_patch.dart
+++ b/sdk/lib/_internal/wasm/lib/js_util_patch.dart
@@ -150,10 +150,10 @@
Future<T> promiseToFuture<T>(Object jsPromise) {
Completer<T> completer = Completer<T>();

- final success = js.allowInterop<_PromiseSuccessFunc>((r) {
+ final success = allowInterop<_PromiseSuccessFunc>((r) {
return completer.complete(r as FutureOr<T>?);
});
- final error = js.allowInterop<_PromiseFailureFunc>((e) {
+ final error = allowInterop<_PromiseFailureFunc>((e) {
// Note that `completeError` expects a non-nullable error regardless of
// whether null-safety is enabled, so a `NullRejectionException` is always
// provided if the error is `null` or `undefined`.
@@ -257,3 +257,10 @@

return convert(object);
}
+
+/// This will be lowered to a a call to `_wrapDartCallback`.
+@patch
+F allowInterop<F extends Function>(F f) => throw UnimplementedError();
+
+@patch
+Function allowInteropCaptureThis(Function f) => throw UnimplementedError();
diff --git a/sdk/lib/js/_js_annotations.dart b/sdk/lib/js/_js_annotations.dart
index 4155470..f053d6e 100644
--- a/sdk/lib/js/_js_annotations.dart
+++ b/sdk/lib/js/_js_annotations.dart
@@ -7,7 +7,7 @@
// https://github.com/dart-lang/sdk/blob/master/pkg/js/lib/js.dart
library _js_annotations;

-export 'dart:js' show allowInterop, allowInteropCaptureThis;
+export 'dart:js_util' show allowInterop, allowInteropCaptureThis;

class JS {
final String? name;
diff --git a/sdk/lib/js/js.dart b/sdk/lib/js/js.dart
index 7f2921e..4fba6a4 100644
--- a/sdk/lib/js/js.dart
+++ b/sdk/lib/js/js.dart
@@ -86,6 +86,8 @@

import 'dart:collection' show ListMixin;

+export 'dart:js_util' show allowInterop, allowInteropCaptureThis;
+
/// The JavaScript global object, usually `window`.
external JsObject get context;

@@ -209,25 +211,3 @@

external void sort([int compare(E a, E b)?]);
}
-
-/// Returns a wrapper around function [f] that can be called from JavaScript
-/// using `package:js` JavaScript interop.
-///
-/// The calling conventions in Dart2Js differ from JavaScript and so, by
-/// default, it is not possible to call a Dart function directly. Wrapping with
-/// `allowInterop` creates a function that can be called from JavaScript or
-/// Dart. The semantics of the wrapped function are still more strict than
-/// JavaScript, and the function will throw if called with too many or too few
-/// arguments.
-///
-/// Calling this method repeatedly on a function will return the same result.
-external F allowInterop<F extends Function>(F f);
-
-/// Returns a wrapper around function [f] that can be called from JavaScript
-/// using `package:js` JavaScript interop, passing JavaScript `this` as the first
-/// argument.
-///
-/// See [allowInterop].
-///
-/// When called from Dart, `null` will be passed as the first argument.
-external Function allowInteropCaptureThis(Function f);
diff --git a/sdk/lib/js_util/js_util.dart b/sdk/lib/js_util/js_util.dart
index 75c9cf0..81aca59 100644
--- a/sdk/lib/js_util/js_util.dart
+++ b/sdk/lib/js_util/js_util.dart
@@ -256,3 +256,25 @@
/// Expect.isTrue(counter.stringify(), export.stringify());
/// ```
external Object createDartExport<T extends Object>(T dartObject);
+
+/// Returns a wrapper around function [f] that can be called from JavaScript
+/// using `package:js` JavaScript interop.
+///
+/// The calling conventions in Dart web backends differ from JavaScript and so,
+/// by default, it is not possible to call a Dart function directly. Wrapping
+/// with `allowInterop` creates a function that can be called from JavaScript or
+/// Dart. The semantics of the wrapped function are still more strict than
+/// JavaScript, and the function will throw if called with too many or too few
+/// arguments.
+///
+/// Calling this method repeatedly on a function will return the same result.
+external F allowInterop<F extends Function>(F f);
+
+/// Returns a wrapper around function [f] that can be called from JavaScript
+/// using `package:js` JavaScript interop, passing JavaScript `this` as the first
+/// argument.
+///
+/// See [allowInterop].
+///
+/// When called from Dart, `null` will be passed as the first argument.
+external Function allowInteropCaptureThis(Function f);
diff --git a/sdk/lib/libraries.json b/sdk/lib/libraries.json
index b114c00..cc29748 100644
--- a/sdk/lib/libraries.json
+++ b/sdk/lib/libraries.json
@@ -211,10 +211,6 @@
"_internal/wasm/lib/isolate_patch.dart"
]
},
- "js": {
- "uri": "js/js.dart",
- "patches": "_internal/wasm/lib/js_patch.dart"
- },
"js_util": {
"uri": "js_util/js_util.dart",
"patches": "_internal/wasm/lib/js_util_patch.dart"
@@ -334,7 +330,10 @@
},
"js_util": {
"uri": "js_util/js_util.dart",
- "patches": "_internal/js_shared/lib/js_util_patch.dart"
+ "patches": [
+ "_internal/js_shared/lib/js_util_patch.dart",
+ "_internal/js_runtime/lib/js_allow_interop_patch.dart"
+ ]
},
"math": {
"uri": "math/math.dart",
@@ -506,7 +505,10 @@
},
"js_util": {
"uri": "js_util/js_util.dart",
- "patches": "_internal/js_shared/lib/js_util_patch.dart"
+ "patches": [
+ "_internal/js_shared/lib/js_util_patch.dart",
+ "_internal/js_dev_runtime/patch/js_allow_interop_patch.dart"
+ ]
},
"svg": {
"uri": "svg/dart2js/svg_dart2js.dart"
diff --git a/sdk/lib/libraries.yaml b/sdk/lib/libraries.yaml
index 474aa74..3466e84 100644
--- a/sdk/lib/libraries.yaml
+++ b/sdk/lib/libraries.yaml
@@ -181,9 +181,6 @@
uri: isolate/isolate.dart
patches:
- "_internal/wasm/lib/isolate_patch.dart"
- js:
- uri: js/js.dart
- patches: _internal/wasm/lib/js_patch.dart
js_util:
uri: js_util/js_util.dart
patches: _internal/wasm/lib/js_util_patch.dart
@@ -287,7 +284,9 @@

js_util:
uri: "js_util/js_util.dart"
- patches: "_internal/js_shared/lib/js_util_patch.dart"
+ patches:
+ - "_internal/js_shared/lib/js_util_patch.dart"
+ - "_internal/js_runtime/lib/js_allow_interop_patch.dart"

math:
uri: "math/math.dart"
@@ -457,7 +456,9 @@

js_util:
uri: "js_util/js_util.dart"
- patches: "_internal/js_shared/lib/js_util_patch.dart"
+ patches:
+ - "_internal/js_shared/lib/js_util_patch.dart"
+ - "_internal/js_dev_runtime/patch/js_allow_interop_patch.dart"

svg:
uri: "svg/dart2js/svg_dart2js.dart"

To view, visit change 279740. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Iea2f2e707c69c9082e158b48b50dcaf4a7b01067
Gerrit-Change-Number: 279740
Gerrit-PatchSet: 14
Gerrit-Owner: Joshua Litt <joshu...@google.com>
Gerrit-Reviewer: Joshua Litt <joshu...@google.com>
Gerrit-Reviewer: Srujan Gaddam <sru...@google.com>
Gerrit-Attention: Srujan Gaddam <sru...@google.com>
Gerrit-MessageType: newchange

Joshua Litt (Gerrit)

unread,
Feb 7, 2023, 10:25:22 AM2/7/23
to dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org, Srujan Gaddam, CBuild, Commit Queue

Attention is currently required from: Srujan Gaddam.

Patch set 14:Commit-Queue +1

View Change

2 comments:

    •   // From dart:_js_annotations;
      late final FunctionEntity? jsAllowInterop2 = _findLibraryMember(
      dartJsAnnotationsLibrary, 'allowInterop',
      required: false);

    • Should we just delete this?

To view, visit change 279740. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Iea2f2e707c69c9082e158b48b50dcaf4a7b01067
Gerrit-Change-Number: 279740
Gerrit-PatchSet: 14
Gerrit-Owner: Joshua Litt <joshu...@google.com>
Gerrit-Reviewer: Joshua Litt <joshu...@google.com>
Gerrit-Reviewer: Srujan Gaddam <sru...@google.com>
Gerrit-Attention: Srujan Gaddam <sru...@google.com>
Gerrit-Comment-Date: Tue, 07 Feb 2023 15:25:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment

Sigmund Cherem (Gerrit)

unread,
Feb 7, 2023, 11:52:00 AM2/7/23
to Joshua Litt, dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org, Sigmund Cherem, Srujan Gaddam, CBuild, Commit Queue

Attention is currently required from: Joshua Litt, Srujan Gaddam.

Patch set 14:Code-Review +1

View Change

3 comments:

  • Patchset:

    • Patch Set #14:

      🎉 very exciting!

      I know in the past we had crashes trying to move allowInterop, was that addressed by your other change to the impacts in dart2js?

  • File pkg/compiler/lib/src/common/elements.dart:

    • Patch Set #13, Line 1047:

        // From dart:_js_annotations;
      late final FunctionEntity? jsAllowInterop2 = _findLibraryMember(
      dartJsAnnotationsLibrary, 'allowInterop',
      required: false);

      Should we just delete this?

    • I assume the CFE canonicalize the reference and isJSAllowInterop only matched jsAllowInterop1? If so, I think it's safe to delete.

      It should be easy to validate this (and it clearly would affect flutter if this were an issue)

  • File sdk/lib/js_util/js_util.dart:

    • Patch Set #14, Line 274: /// using `package:js` JavaScript interop, passing JavaScript `this` as the first

      nit: line length

To view, visit change 279740. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Iea2f2e707c69c9082e158b48b50dcaf4a7b01067
Gerrit-Change-Number: 279740
Gerrit-PatchSet: 14
Gerrit-Owner: Joshua Litt <joshu...@google.com>
Gerrit-Reviewer: Joshua Litt <joshu...@google.com>
Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
Gerrit-Attention: Joshua Litt <joshu...@google.com>
Gerrit-Attention: Srujan Gaddam <sru...@google.com>
Gerrit-Comment-Date: Tue, 07 Feb 2023 16:51:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Joshua Litt <joshu...@google.com>
Gerrit-MessageType: comment

Joshua Litt (Gerrit)

unread,
Feb 7, 2023, 12:14:22 PM2/7/23
to dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org, Sigmund Cherem, Srujan Gaddam, CBuild, Commit Queue

Attention is currently required from: Srujan Gaddam.

Patch set 15:Commit-Queue +1

View Change

3 comments:

  • Patchset:

    • Patch Set #14:

      🎉 very exciting! […]

      There was a crash in our integration tests that was related to impacts, my earlier fix addressed that crash.

      Hopefully that fix will address all of the issues we've seen with this move.

  • File pkg/compiler/lib/src/common/elements.dart:

    • Patch Set #13, Line 1047:

        // From dart:_js_annotations;
      late final FunctionEntity? jsAllowInterop2 = _findLibraryMember(
      dartJsAnnotationsLibrary, 'allowInterop',
      required: false);

    • I assume the CFE canonicalize the reference and isJSAllowInterop only matched jsAllowInterop1? If s […]

      I'm a little afraid because I think this CL is working, and sometimes small changes have rippled effects in Dart2js. But, I've gone this far...

  • File sdk/lib/js_util/js_util.dart:

    • Patch Set #14, Line 274: /// using `package:js` JavaScript interop, passing JavaScript `this` as the first

      nit: line length

    • Done

To view, visit change 279740. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Iea2f2e707c69c9082e158b48b50dcaf4a7b01067
Gerrit-Change-Number: 279740
Gerrit-PatchSet: 15
Gerrit-Owner: Joshua Litt <joshu...@google.com>
Gerrit-Reviewer: Joshua Litt <joshu...@google.com>
Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
Gerrit-Reviewer: Srujan Gaddam <sru...@google.com>
Gerrit-Attention: Srujan Gaddam <sru...@google.com>
Gerrit-Comment-Date: Tue, 07 Feb 2023 17:14:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Joshua Litt <joshu...@google.com>
Comment-In-Reply-To: Sigmund Cherem <sig...@google.com>
Gerrit-MessageType: comment

CBuild (Gerrit)

unread,
Feb 7, 2023, 12:47:31 PM2/7/23
to Joshua Litt, dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org, Sigmund Cherem, Srujan Gaddam, Commit Queue

Attention is currently required from: Srujan Gaddam.

go/dart-cbuild result: FAILURE (NO REGRESSIONS DETECTED)

Details: https://goto.google.com/dart-cbuild/find/cd3afdb671677764fc067d991a28b0ec5dafa353

View Change

    To view, visit change 279740. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: sdk
    Gerrit-Branch: main
    Gerrit-Change-Id: Iea2f2e707c69c9082e158b48b50dcaf4a7b01067
    Gerrit-Change-Number: 279740
    Gerrit-PatchSet: 15
    Gerrit-Owner: Joshua Litt <joshu...@google.com>
    Gerrit-Reviewer: Joshua Litt <joshu...@google.com>
    Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
    Gerrit-Reviewer: Srujan Gaddam <sru...@google.com>
    Gerrit-Attention: Srujan Gaddam <sru...@google.com>
    Gerrit-Comment-Date: Tue, 07 Feb 2023 17:47:25 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    Gerrit-MessageType: comment

    Joshua Litt (Gerrit)

    unread,
    Feb 7, 2023, 1:03:22 PM2/7/23
    to dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org, Sigmund Cherem, Srujan Gaddam, CBuild, Commit Queue

    Attention is currently required from: Srujan Gaddam.

    Patch set 16:Commit-Queue +1

    View Change

    2 comments:

    • Patchset:

      • Patch Set #16:

        Whoops, still need a stub of `dart:js` for Wasm...good thing I ran the engine tests.

    • File pkg/compiler/lib/src/common/elements.dart:

      • Patch Set #13, Line 1047:

          // From dart:_js_annotations;
        late final FunctionEntity? jsAllowInterop2 = _findLibraryMember(
        dartJsAnnotationsLibrary, 'allowInterop',
        required: false);

      • Should we just delete this?

      • Done

    To view, visit change 279740. To unsubscribe, or for help writing mail filters, visit settings.

    Gerrit-Project: sdk
    Gerrit-Branch: main
    Gerrit-Change-Id: Iea2f2e707c69c9082e158b48b50dcaf4a7b01067
    Gerrit-Change-Number: 279740
    Gerrit-PatchSet: 16
    Gerrit-Owner: Joshua Litt <joshu...@google.com>
    Gerrit-Reviewer: Joshua Litt <joshu...@google.com>
    Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
    Gerrit-Reviewer: Srujan Gaddam <sru...@google.com>
    Gerrit-Attention: Srujan Gaddam <sru...@google.com>
    Gerrit-Comment-Date: Tue, 07 Feb 2023 18:03:16 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Joshua Litt <joshu...@google.com>
    Gerrit-MessageType: comment

    CBuild (Gerrit)

    unread,
    Feb 7, 2023, 1:34:28 PM2/7/23
    to Joshua Litt, dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org, Sigmund Cherem, Srujan Gaddam, Commit Queue

    Attention is currently required from: Srujan Gaddam.

    go/dart-cbuild result: FAILURE (NO REGRESSIONS DETECTED)

    Details: https://goto.google.com/dart-cbuild/find/6f7edfa877cd236ad1ae2c2019d60c0a4322c0d3

    View Change

      To view, visit change 279740. To unsubscribe, or for help writing mail filters, visit settings.

      Gerrit-Project: sdk
      Gerrit-Branch: main
      Gerrit-Change-Id: Iea2f2e707c69c9082e158b48b50dcaf4a7b01067
      Gerrit-Change-Number: 279740
      Gerrit-PatchSet: 16
      Gerrit-Owner: Joshua Litt <joshu...@google.com>
      Gerrit-Reviewer: Joshua Litt <joshu...@google.com>
      Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
      Gerrit-Reviewer: Srujan Gaddam <sru...@google.com>
      Gerrit-Attention: Srujan Gaddam <sru...@google.com>
      Gerrit-Comment-Date: Tue, 07 Feb 2023 18:34:22 +0000

      Srujan Gaddam (Gerrit)

      unread,
      Feb 7, 2023, 5:05:21 PM2/7/23
      to Joshua Litt, dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org, Sigmund Cherem, CBuild, Commit Queue

      Attention is currently required from: Joshua Litt.

      Patch set 16:Code-Review +1

      View Change

        To view, visit change 279740. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: sdk
        Gerrit-Branch: main
        Gerrit-Change-Id: Iea2f2e707c69c9082e158b48b50dcaf4a7b01067
        Gerrit-Change-Number: 279740
        Gerrit-PatchSet: 16
        Gerrit-Owner: Joshua Litt <joshu...@google.com>
        Gerrit-Reviewer: Joshua Litt <joshu...@google.com>
        Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
        Gerrit-Reviewer: Srujan Gaddam <sru...@google.com>
        Gerrit-Attention: Joshua Litt <joshu...@google.com>
        Gerrit-Comment-Date: Tue, 07 Feb 2023 22:05:16 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        Gerrit-MessageType: comment

        Joshua Litt (Gerrit)

        unread,
        Feb 8, 2023, 11:45:04 AM2/8/23
        to dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org, Srujan Gaddam, Sigmund Cherem, CBuild, Commit Queue

        Patch set 16:Commit-Queue +2

        View Change

        1 comment:

        To view, visit change 279740. To unsubscribe, or for help writing mail filters, visit settings.

        Gerrit-Project: sdk
        Gerrit-Branch: main
        Gerrit-Change-Id: Iea2f2e707c69c9082e158b48b50dcaf4a7b01067
        Gerrit-Change-Number: 279740
        Gerrit-PatchSet: 16
        Gerrit-Owner: Joshua Litt <joshu...@google.com>
        Gerrit-Reviewer: Joshua Litt <joshu...@google.com>
        Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
        Gerrit-Reviewer: Srujan Gaddam <sru...@google.com>
        Gerrit-Comment-Date: Wed, 08 Feb 2023 16:44:58 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        Gerrit-MessageType: comment

        Joshua Litt (Gerrit)

        unread,
        Feb 8, 2023, 11:56:04 AM2/8/23
        to dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org, Srujan Gaddam, Sigmund Cherem, CBuild, Commit Queue

        Patch set 16:Commit-Queue +2

        View Change

          To view, visit change 279740. To unsubscribe, or for help writing mail filters, visit settings.

          Gerrit-Project: sdk
          Gerrit-Branch: main
          Gerrit-Change-Id: Iea2f2e707c69c9082e158b48b50dcaf4a7b01067
          Gerrit-Change-Number: 279740
          Gerrit-PatchSet: 16
          Gerrit-Owner: Joshua Litt <joshu...@google.com>
          Gerrit-Reviewer: Joshua Litt <joshu...@google.com>
          Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
          Gerrit-Reviewer: Srujan Gaddam <sru...@google.com>
          Gerrit-Comment-Date: Wed, 08 Feb 2023 16:55:59 +0000

          Joshua Litt (Gerrit)

          unread,
          Feb 8, 2023, 11:58:14 AM2/8/23
          to dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org, Srujan Gaddam, Sigmund Cherem, CBuild, Commit Queue

          Patch set 16:Auto-Submit +1Commit-Queue +2

          View Change

            To view, visit change 279740. To unsubscribe, or for help writing mail filters, visit settings.

            Gerrit-Project: sdk
            Gerrit-Branch: main
            Gerrit-Change-Id: Iea2f2e707c69c9082e158b48b50dcaf4a7b01067
            Gerrit-Change-Number: 279740
            Gerrit-PatchSet: 16
            Gerrit-Owner: Joshua Litt <joshu...@google.com>
            Gerrit-Reviewer: Joshua Litt <joshu...@google.com>
            Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
            Gerrit-Reviewer: Srujan Gaddam <sru...@google.com>
            Gerrit-Comment-Date: Wed, 08 Feb 2023 16:58:10 +0000

            Joshua Litt (Gerrit)

            unread,
            Feb 8, 2023, 11:59:50 AM2/8/23
            to dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org, Srujan Gaddam, Sigmund Cherem, CBuild, Commit Queue

            Patch set 16:Code-Review +1

            View Change

              To view, visit change 279740. To unsubscribe, or for help writing mail filters, visit settings.

              Gerrit-Project: sdk
              Gerrit-Branch: main
              Gerrit-Change-Id: Iea2f2e707c69c9082e158b48b50dcaf4a7b01067
              Gerrit-Change-Number: 279740
              Gerrit-PatchSet: 16
              Gerrit-Owner: Joshua Litt <joshu...@google.com>
              Gerrit-Reviewer: Joshua Litt <joshu...@google.com>
              Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
              Gerrit-Reviewer: Srujan Gaddam <sru...@google.com>
              Gerrit-Comment-Date: Wed, 08 Feb 2023 16:59:45 +0000

              Joshua Litt (Gerrit)

              unread,
              Feb 8, 2023, 12:00:09 PM2/8/23
              to dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org, Srujan Gaddam, Sigmund Cherem, CBuild, Commit Queue

              Patch set 16:Commit-Queue +2

              View Change

                To view, visit change 279740. To unsubscribe, or for help writing mail filters, visit settings.

                Gerrit-Project: sdk
                Gerrit-Branch: main
                Gerrit-Change-Id: Iea2f2e707c69c9082e158b48b50dcaf4a7b01067
                Gerrit-Change-Number: 279740
                Gerrit-PatchSet: 16
                Gerrit-Owner: Joshua Litt <joshu...@google.com>
                Gerrit-Reviewer: Joshua Litt <joshu...@google.com>
                Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
                Gerrit-Reviewer: Srujan Gaddam <sru...@google.com>
                Gerrit-Comment-Date: Wed, 08 Feb 2023 17:00:04 +0000

                Joshua Litt (Gerrit)

                unread,
                Feb 8, 2023, 12:01:27 PM2/8/23
                to Aske Simon Christensen, Ömer Sinan Ağacan, dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org, Ömer Ağacan, Srujan Gaddam, Sigmund Cherem

                Attention is currently required from: Aske Simon Christensen, Ömer Sinan Ağacan.

                Joshua Litt would like Aske Simon Christensen and Ömer Sinan Ağacan to review this change.

                View Change

                [js] Move `allowInterop` functions to `dart:js_util`.

                Change-Id: Iea2f2e707c69c9082e158b48b50dcaf4a7b01067
                ---
                M pkg/_js_interop_checks/lib/src/transformations/export_creator.dart
                M pkg/_js_interop_checks/lib/src/transformations/js_util_optimizer.dart
                M pkg/compiler/lib/src/common/elements.dart
                M pkg/compiler/lib/src/common/names.dart
                M pkg/compiler/lib/src/js_backend/backend_impact.dart
                M pkg/compiler/lib/src/ssa/codegen.dart

                M pkg/compiler/test/impact/data/jsinterop.dart
                M pkg/dart2wasm/lib/js_runtime_generator.dart
                M pkg/dart2wasm/lib/target.dart
                M pkg/dev_compiler/lib/src/kernel/js_interop.dart
                M pkg/js/lib/js.dart
                A sdk/lib/_internal/js_dev_runtime/patch/js_allow_interop_patch.dart
                M sdk/lib/_internal/js_dev_runtime/patch/js_patch.dart
                A sdk/lib/_internal/js_runtime/lib/js_allow_interop_patch.dart
                M sdk/lib/_internal/js_runtime/lib/js_helper.dart
                M sdk/lib/_internal/js_runtime/lib/js_patch.dart
                M sdk/lib/_internal/js_shared/lib/js_util_patch.dart
                M sdk/lib/_internal/wasm/lib/js_patch.dart

                M sdk/lib/_internal/wasm/lib/js_util_patch.dart
                M sdk/lib/js/_js_annotations.dart
                M sdk/lib/js/js.dart
                M sdk/lib/js_util/js_util.dart
                M sdk/lib/libraries.json
                M sdk/lib/libraries.yaml
                24 files changed, 216 insertions(+), 195 deletions(-)

                index 1dbff8b..03475b4 100644

                --- a/pkg/compiler/lib/src/common/elements.dart
                +++ b/pkg/compiler/lib/src/common/elements.dart
                @@ -139,8 +139,9 @@
                late final LibraryEntity internalLibrary =
                _env.lookupLibrary(Uris.dart__internal, required: true)!;

                - /// The dart:js library.
                - late final LibraryEntity? dartJsLibrary = _env.lookupLibrary(Uris.dart_js);
                + /// The dart:js_util library.
                + late final LibraryEntity? dartJsUtilLibrary =
                + _env.lookupLibrary(Uris.dart_js_util);

                /// The package:js library.
                late final LibraryEntity? packageJsLibrary =
                @@ -1039,21 +1040,9 @@

                : objectClass;
                }

                - // From package:js
                -  late final FunctionEntity? jsAllowInterop1 =

                - _findLibraryMember(dartJsLibrary, 'allowInterop', required: false);
                -
                - // From dart:_js_annotations;
                - late final FunctionEntity? jsAllowInterop2 = _findLibraryMember(
                - dartJsAnnotationsLibrary, 'allowInterop',
                - required: false);
                -

                - /// Returns `true` if [function] is `allowInterop`.
                - ///
                - /// This function can come from either `package:js` or `dart:_js_annotations`.
                - bool isJsAllowInterop(FunctionEntity function) {
                - return function == jsAllowInterop1 || function == jsAllowInterop2;
                - }
                +  // From dart:js_util
                +  late final FunctionEntity? jsAllowInterop =

                + _findLibraryMember(dartJsUtilLibrary, 'allowInterop', required: false);

                   bool isCreateInvocationMirrorHelper(MemberEntity member) {
                return member.isTopLevel &&
                diff --git a/pkg/compiler/lib/src/common/names.dart b/pkg/compiler/lib/src/common/names.dart
                index abd2114..470f3f1 100644
                --- a/pkg/compiler/lib/src/common/names.dart
                +++ b/pkg/compiler/lib/src/common/names.dart
                @@ -255,8 +255,8 @@
                static final Uri dart__js_shared_embedded_names =
                Uri(scheme: 'dart', path: '_js_shared_embedded_names');

                - /// The URI for 'dart:js'.
                - static final Uri dart_js = Uri(scheme: 'dart', path: 'js');
                + /// The URI for 'dart:js_util'.
                + static final Uri dart_js_util = Uri(scheme: 'dart', path: 'js_util');

                /// The URI for 'package:js'.
                static final Uri package_js = Uri(scheme: 'package', path: 'js/js.dart');
                diff --git a/pkg/compiler/lib/src/js_backend/backend_impact.dart b/pkg/compiler/lib/src/js_backend/backend_impact.dart
                index 3b3d4d2..1b9ab7b 100644
                --- a/pkg/compiler/lib/src/js_backend/backend_impact.dart
                +++ b/pkg/compiler/lib/src/js_backend/backend_impact.dart
                @@ -399,8 +399,7 @@

                late final BackendImpact allowInterop = BackendImpact(
                staticUses: [
                - _commonElements.jsAllowInterop1!,
                - _commonElements.jsAllowInterop2!,
                + _commonElements.jsAllowInterop!,
                ],
                features: EnumSet<BackendFeature>.fromValues([
                BackendFeature.needToInitializeIsolateAffinityTag,
                diff --git a/pkg/compiler/lib/src/ssa/codegen.dart b/pkg/compiler/lib/src/ssa/codegen.dart
                index 690022e..9a089cf 100644
                --- a/pkg/compiler/lib/src/ssa/codegen.dart
                +++ b/pkg/compiler/lib/src/ssa/codegen.dart
                @@ -2066,8 +2066,7 @@

                List<js.Expression> arguments = visitArguments(node.inputs, start: 0);

                - if (element == _commonElements.jsAllowInterop1 ||
                - element == _commonElements.jsAllowInterop2) {
                + if (element == _commonElements.jsAllowInterop) {
                _nativeData.registerAllowInterop();
                index fde0468..d6aefad 100644
                --- a/sdk/lib/_internal/wasm/lib/js_patch.dart
                +++ b/sdk/lib/_internal/wasm/lib/js_patch.dart
                @@ -113,10 +113,3 @@
                @patch

                void sort([int compare(E a, E b)?]) => throw UnimplementedError();
                }
                -
                index 75c9cf0..513daaf 100644

                --- a/sdk/lib/js_util/js_util.dart
                +++ b/sdk/lib/js_util/js_util.dart
                @@ -256,3 +256,25 @@
                /// Expect.isTrue(counter.stringify(), export.stringify());
                /// ```
                external Object createDartExport<T extends Object>(T dartObject);
                +
                +/// Returns a wrapper around function [f] that can be called from JavaScript
                +/// using `package:js` JavaScript interop.
                +///
                +/// The calling conventions in Dart web backends differ from JavaScript and so,
                +/// by default, it is not possible to call a Dart function directly. Wrapping
                +/// with `allowInterop` creates a function that can be called from JavaScript or
                +/// Dart. The semantics of the wrapped function are still more strict than
                +/// JavaScript, and the function will throw if called with too many or too few
                +/// arguments.
                +///
                +/// Calling this method repeatedly on a function will return the same result.
                +external F allowInterop<F extends Function>(F f);
                +
                +/// Returns a wrapper around function [f] that can be called from JavaScript
                +/// using `package:js` JavaScript interop, passing JavaScript `this` as the
                +/// first argument.

                +///
                +/// See [allowInterop].
                +///
                +/// When called from Dart, `null` will be passed as the first argument.
                +external Function allowInteropCaptureThis(Function f);
                diff --git a/sdk/lib/libraries.json b/sdk/lib/libraries.json
                index b114c00..3829332 100644
                --- a/sdk/lib/libraries.json
                +++ b/sdk/lib/libraries.json
                @@ -334,7 +334,10 @@

                },
                "js_util": {
                "uri": "js_util/js_util.dart",
                - "patches": "_internal/js_shared/lib/js_util_patch.dart"
                + "patches": [
                + "_internal/js_shared/lib/js_util_patch.dart",
                + "_internal/js_runtime/lib/js_allow_interop_patch.dart"
                + ]
                },
                "math": {
                "uri": "math/math.dart",
                @@ -506,7 +509,10 @@

                },
                "js_util": {
                "uri": "js_util/js_util.dart",
                - "patches": "_internal/js_shared/lib/js_util_patch.dart"
                + "patches": [
                + "_internal/js_shared/lib/js_util_patch.dart",
                + "_internal/js_dev_runtime/patch/js_allow_interop_patch.dart"
                + ]
                },
                "svg": {
                "uri": "svg/dart2js/svg_dart2js.dart"
                diff --git a/sdk/lib/libraries.yaml b/sdk/lib/libraries.yaml
                index 474aa74..1f89f21 100644
                --- a/sdk/lib/libraries.yaml
                +++ b/sdk/lib/libraries.yaml
                @@ -287,7 +287,9 @@


                js_util:
                uri: "js_util/js_util.dart"
                - patches: "_internal/js_shared/lib/js_util_patch.dart"
                + patches:
                + - "_internal/js_shared/lib/js_util_patch.dart"
                + - "_internal/js_runtime/lib/js_allow_interop_patch.dart"

                math:
                uri: "math/math.dart"
                @@ -457,7 +459,9 @@


                js_util:
                uri: "js_util/js_util.dart"
                - patches: "_internal/js_shared/lib/js_util_patch.dart"
                + patches:
                + - "_internal/js_shared/lib/js_util_patch.dart"
                + - "_internal/js_dev_runtime/patch/js_allow_interop_patch.dart"

                svg:
                uri: "svg/dart2js/svg_dart2js.dart"

                To view, visit change 279740. To unsubscribe, or for help writing mail filters, visit settings.

                Gerrit-Project: sdk
                Gerrit-Branch: main
                Gerrit-Change-Id: Iea2f2e707c69c9082e158b48b50dcaf4a7b01067
                Gerrit-Change-Number: 279740
                Gerrit-PatchSet: 16
                Gerrit-Owner: Joshua Litt <joshu...@google.com>
                Gerrit-Reviewer: Aske Simon Christensen <ask...@google.com>
                Gerrit-Reviewer: Joshua Litt <joshu...@google.com>
                Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
                Gerrit-Reviewer: Srujan Gaddam <sru...@google.com>
                Gerrit-Reviewer: Ömer Sinan Ağacan <omera...@gmail.com>
                Gerrit-CC: Ömer Ağacan <ome...@google.com>
                Gerrit-Attention: Aske Simon Christensen <ask...@google.com>
                Gerrit-Attention: Ömer Sinan Ağacan <omera...@gmail.com>
                Gerrit-MessageType: newchange

                Joshua Litt (Gerrit)

                unread,
                Feb 8, 2023, 12:01:31 PM2/8/23
                to dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org, Aske Simon Christensen, Ömer Sinan Ağacan, Ömer Ağacan, Srujan Gaddam, Sigmund Cherem, CBuild, Commit Queue

                Attention is currently required from: Aske Simon Christensen, Ömer Sinan Ağacan.

                Patch set 16:-Auto-Submit-Code-Review

                View Change

                1 comment:

                To view, visit change 279740. To unsubscribe, or for help writing mail filters, visit settings.

                Gerrit-Project: sdk
                Gerrit-Branch: main
                Gerrit-Change-Id: Iea2f2e707c69c9082e158b48b50dcaf4a7b01067
                Gerrit-Change-Number: 279740
                Gerrit-PatchSet: 16
                Gerrit-Owner: Joshua Litt <joshu...@google.com>
                Gerrit-Reviewer: Aske Simon Christensen <ask...@google.com>
                Gerrit-Reviewer: Joshua Litt <joshu...@google.com>
                Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
                Gerrit-Reviewer: Srujan Gaddam <sru...@google.com>
                Gerrit-Reviewer: Ömer Sinan Ağacan <omera...@gmail.com>
                Gerrit-CC: Ömer Ağacan <ome...@google.com>
                Gerrit-Attention: Aske Simon Christensen <ask...@google.com>
                Gerrit-Attention: Ömer Sinan Ağacan <omera...@gmail.com>
                Gerrit-Comment-Date: Wed, 08 Feb 2023 17:01:24 +0000

                Ömer Ağacan (Gerrit)

                unread,
                Feb 8, 2023, 12:14:10 PM2/8/23
                to Joshua Litt, dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org, Aske Simon Christensen, Ömer Sinan Ağacan, Srujan Gaddam, Sigmund Cherem, CBuild, Commit Queue

                Attention is currently required from: Aske Simon Christensen, Joshua Litt, Ömer Sinan Ağacan.

                Patch set 16:Code-Review +1

                View Change

                  To view, visit change 279740. To unsubscribe, or for help writing mail filters, visit settings.

                  Gerrit-Project: sdk
                  Gerrit-Branch: main
                  Gerrit-Change-Id: Iea2f2e707c69c9082e158b48b50dcaf4a7b01067
                  Gerrit-Change-Number: 279740
                  Gerrit-PatchSet: 16
                  Gerrit-Owner: Joshua Litt <joshu...@google.com>
                  Gerrit-Reviewer: Aske Simon Christensen <ask...@google.com>
                  Gerrit-Reviewer: Joshua Litt <joshu...@google.com>
                  Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
                  Gerrit-Reviewer: Srujan Gaddam <sru...@google.com>
                  Gerrit-Reviewer: Ömer Ağacan <ome...@google.com>
                  Gerrit-Reviewer: Ömer Sinan Ağacan <omera...@gmail.com>
                  Gerrit-Attention: Aske Simon Christensen <ask...@google.com>
                  Gerrit-Attention: Joshua Litt <joshu...@google.com>
                  Gerrit-Attention: Ömer Sinan Ağacan <omera...@gmail.com>
                  Gerrit-Comment-Date: Wed, 08 Feb 2023 17:14:03 +0000

                  Joshua Litt (Gerrit)

                  unread,
                  Feb 8, 2023, 12:14:54 PM2/8/23
                  to dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org, Ömer Ağacan, Aske Simon Christensen, Ömer Sinan Ağacan, Srujan Gaddam, Sigmund Cherem, CBuild, Commit Queue

                  Attention is currently required from: Aske Simon Christensen, Ömer Sinan Ağacan.

                  Patch set 16:Commit-Queue +2

                  View Change

                  1 comment:

                  To view, visit change 279740. To unsubscribe, or for help writing mail filters, visit settings.

                  Gerrit-Project: sdk
                  Gerrit-Branch: main
                  Gerrit-Change-Id: Iea2f2e707c69c9082e158b48b50dcaf4a7b01067
                  Gerrit-Change-Number: 279740
                  Gerrit-PatchSet: 16
                  Gerrit-Owner: Joshua Litt <joshu...@google.com>
                  Gerrit-Reviewer: Aske Simon Christensen <ask...@google.com>
                  Gerrit-Reviewer: Joshua Litt <joshu...@google.com>
                  Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
                  Gerrit-Reviewer: Srujan Gaddam <sru...@google.com>
                  Gerrit-Reviewer: Ömer Ağacan <ome...@google.com>
                  Gerrit-Reviewer: Ömer Sinan Ağacan <omera...@gmail.com>
                  Gerrit-Attention: Aske Simon Christensen <ask...@google.com>
                  Gerrit-Attention: Ömer Sinan Ağacan <omera...@gmail.com>
                  Gerrit-Comment-Date: Wed, 08 Feb 2023 17:14:49 +0000

                  Joshua Litt (Gerrit)

                  unread,
                  Feb 8, 2023, 12:15:50 PM2/8/23
                  to dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org

                  Attention is currently required from: Aske Simon Christensen, Joshua Litt, Ömer Sinan Ağacan.

                  Joshua Litt uploaded patch set #17 to this change.

                  View Change

                  [js] Move `allowInterop` functions to `dart:js_util`.

                  CoreLibraryReviewExempt: Has core library owners approval.
                  24 files changed, 217 insertions(+), 195 deletions(-)

                  To view, visit change 279740. To unsubscribe, or for help writing mail filters, visit settings.

                  Gerrit-Project: sdk
                  Gerrit-Branch: main
                  Gerrit-Change-Id: Iea2f2e707c69c9082e158b48b50dcaf4a7b01067
                  Gerrit-Change-Number: 279740
                  Gerrit-PatchSet: 17
                  Gerrit-Owner: Joshua Litt <joshu...@google.com>
                  Gerrit-Reviewer: Aske Simon Christensen <ask...@google.com>
                  Gerrit-Reviewer: Joshua Litt <joshu...@google.com>
                  Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
                  Gerrit-Reviewer: Srujan Gaddam <sru...@google.com>
                  Gerrit-Reviewer: Ömer Ağacan <ome...@google.com>
                  Gerrit-Reviewer: Ömer Sinan Ağacan <omera...@gmail.com>
                  Gerrit-Attention: Aske Simon Christensen <ask...@google.com>
                  Gerrit-Attention: Joshua Litt <joshu...@google.com>
                  Gerrit-Attention: Ömer Sinan Ağacan <omera...@gmail.com>
                  Gerrit-MessageType: newpatchset

                  Joshua Litt (Gerrit)

                  unread,
                  Feb 8, 2023, 12:16:11 PM2/8/23
                  to dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org, Ömer Ağacan, Aske Simon Christensen, Ömer Sinan Ağacan, Srujan Gaddam, Sigmund Cherem, CBuild, Commit Queue

                  Attention is currently required from: Aske Simon Christensen, Ömer Sinan Ağacan.

                  Patch set 17:Commit-Queue +2

                  View Change

                  1 comment:

                  To view, visit change 279740. To unsubscribe, or for help writing mail filters, visit settings.

                  Gerrit-Project: sdk
                  Gerrit-Branch: main
                  Gerrit-Change-Id: Iea2f2e707c69c9082e158b48b50dcaf4a7b01067
                  Gerrit-Change-Number: 279740
                  Gerrit-PatchSet: 17
                  Gerrit-Owner: Joshua Litt <joshu...@google.com>
                  Gerrit-Reviewer: Aske Simon Christensen <ask...@google.com>
                  Gerrit-Reviewer: Joshua Litt <joshu...@google.com>
                  Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
                  Gerrit-Reviewer: Srujan Gaddam <sru...@google.com>
                  Gerrit-Reviewer: Ömer Ağacan <ome...@google.com>
                  Gerrit-Reviewer: Ömer Sinan Ağacan <omera...@gmail.com>
                  Gerrit-Attention: Aske Simon Christensen <ask...@google.com>
                  Gerrit-Attention: Ömer Sinan Ağacan <omera...@gmail.com>
                  Gerrit-Comment-Date: Wed, 08 Feb 2023 17:16:06 +0000

                  Commit Queue (Gerrit)

                  unread,
                  Feb 8, 2023, 12:16:25 PM2/8/23
                  to Joshua Litt, dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org, Ömer Ağacan, Aske Simon Christensen, Ömer Sinan Ağacan, Srujan Gaddam, Sigmund Cherem, CBuild

                  Commit Queue submitted this change.

                  View Change



                  16 is the latest approved patch-set.
                  No files were changed between the latest approved patch-set and the submitted one.

                  Approvals: Sigmund Cherem: Looks good to me, approved Ömer Ağacan: Looks good to me, approved Joshua Litt: Commit Srujan Gaddam: Looks good to me, approved
                  [js] Move `allowInterop` functions to `dart:js_util`.

                  CoreLibraryReviewExempt: Has core library owners approval.
                  Change-Id: Iea2f2e707c69c9082e158b48b50dcaf4a7b01067
                  Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279740
                  Reviewed-by: Ömer Ağacan <ome...@google.com>
                  Reviewed-by: Sigmund Cherem <sig...@google.com>
                  Reviewed-by: Srujan Gaddam <sru...@google.com>
                  Commit-Queue: Joshua Litt <joshu...@google.com>
                  24 files changed, 222 insertions(+), 195 deletions(-)

                  diff --git a/pkg/_js_interop_checks/lib/src/transformations/export_creator.dart b/pkg/_js_interop_checks/lib/src/transformations/export_creator.dart
                  index caade57..d49eaba 100644
                  --- a/pkg/_js_interop_checks/lib/src/transformations/export_creator.dart
                  +++ b/pkg/_js_interop_checks/lib/src/transformations/export_creator.dart
                  @@ -36,7 +36,7 @@
                  ExportCreator(
                  this._typeEnvironment, this._diagnosticReporter, this._exportChecker)
                  : _allowInterop = _typeEnvironment.coreTypes.index
                  - .getTopLevelProcedure('dart:js', 'allowInterop'),
                  + .getTopLevelProcedure('dart:js_util', 'allowInterop'),
                  _createDartExport = _typeEnvironment.coreTypes.index
                  .getTopLevelProcedure('dart:js_util', 'createDartExport'),
                  _createStaticInteropMock = _typeEnvironment.coreTypes.index
                  diff --git a/pkg/_js_interop_checks/lib/src/transformations/js_util_optimizer.dart b/pkg/_js_interop_checks/lib/src/transformations/js_util_optimizer.dart
                  index b75da78..eb49ccf 100644
                  index 2b85a30..fd8cd20 100644
                  --- a/pkg/dart2wasm/lib/js_runtime_generator.dart
                  +++ b/pkg/dart2wasm/lib/js_runtime_generator.dart
                  @@ -163,8 +163,8 @@

                  To view, visit change 279740. To unsubscribe, or for help writing mail filters, visit settings.

                  Gerrit-Project: sdk
                  Gerrit-Branch: main
                  Gerrit-Change-Id: Iea2f2e707c69c9082e158b48b50dcaf4a7b01067
                  Gerrit-Change-Number: 279740
                  Gerrit-PatchSet: 18
                  Gerrit-Owner: Joshua Litt <joshu...@google.com>
                  Gerrit-Reviewer: Aske Simon Christensen <ask...@google.com>
                  Gerrit-Reviewer: Joshua Litt <joshu...@google.com>
                  Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
                  Gerrit-Reviewer: Srujan Gaddam <sru...@google.com>
                  Gerrit-Reviewer: Ömer Ağacan <ome...@google.com>
                  Gerrit-Reviewer: Ömer Sinan Ağacan <omera...@gmail.com>
                  Gerrit-MessageType: merged

                  CBuild (Gerrit)

                  unread,
                  Feb 8, 2023, 12:54:32 PM2/8/23
                  to Joshua Litt, Commit Queue, dart-dc-te...@google.com, dart2js-te...@google.com, dart2wasm-t...@google.com, rev...@dartlang.org, Ömer Ağacan, Aske Simon Christensen, Ömer Sinan Ağacan, Srujan Gaddam, Sigmund Cherem

                  go/dart-cbuild result: SUCCESS

                  Details: https://goto.google.com/dart-cbuild/find/bd79be0e19717a7491742f3794492a22411d12a3

                  View Change

                    To view, visit change 279740. To unsubscribe, or for help writing mail filters, visit settings.

                    Gerrit-Project: sdk
                    Gerrit-Branch: main
                    Gerrit-Change-Id: Iea2f2e707c69c9082e158b48b50dcaf4a7b01067
                    Gerrit-Change-Number: 279740
                    Gerrit-PatchSet: 18
                    Gerrit-Owner: Joshua Litt <joshu...@google.com>
                    Gerrit-Reviewer: Aske Simon Christensen <ask...@google.com>
                    Gerrit-Reviewer: Joshua Litt <joshu...@google.com>
                    Gerrit-Reviewer: Sigmund Cherem <sig...@google.com>
                    Gerrit-Reviewer: Srujan Gaddam <sru...@google.com>
                    Gerrit-Reviewer: Ömer Ağacan <ome...@google.com>
                    Gerrit-Reviewer: Ömer Sinan Ağacan <omera...@gmail.com>
                    Gerrit-Comment-Date: Wed, 08 Feb 2023 17:54:29 +0000
                    Reply all
                    Reply to author
                    Forward
                    0 new messages