From f45572e95f93edb89b6750a4f36ad8ed7c0a2560 Mon Sep 17 00:00:00 2001 From: Dan Field Date: Tue, 19 Feb 2019 16:14:31 -0800 Subject: [PATCH] Revert "Remove unnecessary entry-point closurization. (#7827)" (#7876) This reverts commit 3a1b9b3d85cc5521b8da85a019cb260e27c6576b. --- lib/stub_ui/natives.dart | 2 +- lib/ui/hooks.dart | 24 ++++++++++++------------ lib/ui/natives.dart | 6 +++--- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/stub_ui/natives.dart b/lib/stub_ui/natives.dart index b4325ff35..d8388a864 100644 --- a/lib/stub_ui/natives.dart +++ b/lib/stub_ui/natives.dart @@ -20,7 +20,7 @@ Future _scheduleFrame( })); } -@pragma('vm:entry-point', 'call') +@pragma('vm:entry-point') void _setupHooks() { // ignore: unused_element assert(() { // In debug mode, register the schedule frame extension. diff --git a/lib/ui/hooks.dart b/lib/ui/hooks.dart index 7386663ee..b1550bf90 100644 --- a/lib/ui/hooks.dart +++ b/lib/ui/hooks.dart @@ -16,7 +16,7 @@ dynamic _decodeJSON(String message) { return message != null ? json.decode(message) : null; } -@pragma('vm:entry-point', 'call') +@pragma('vm:entry-point') // ignore: unused_element void _updateWindowMetrics(double devicePixelRatio, double width, @@ -54,11 +54,11 @@ String _localeClosure() { return window.locale.toString(); } -@pragma('vm:entry-point', 'call') +@pragma('vm:entry-point') // ignore: unused_element _LocaleClosure _getLocaleClosure() => _localeClosure; -@pragma('vm:entry-point', 'call') +@pragma('vm:entry-point') // ignore: unused_element void _updateLocales(List locales) { const int stringsPerLocale = 4; @@ -77,7 +77,7 @@ void _updateLocales(List locales) { _invoke(window.onLocaleChanged, window._onLocaleChangedZone); } -@pragma('vm:entry-point', 'call') +@pragma('vm:entry-point') // ignore: unused_element void _updateUserSettingsData(String jsonData) { final Map data = json.decode(jsonData); @@ -103,14 +103,14 @@ void _updatePlatformBrightness(String brightnessName) { _invoke(window.onPlatformBrightnessChanged, window._onPlatformBrightnessChangedZone); } -@pragma('vm:entry-point', 'call') +@pragma('vm:entry-point') // ignore: unused_element void _updateSemanticsEnabled(bool enabled) { window._semanticsEnabled = enabled; _invoke(window.onSemanticsEnabledChanged, window._onSemanticsEnabledChangedZone); } -@pragma('vm:entry-point', 'call') +@pragma('vm:entry-point') // ignore: unused_element void _updateAccessibilityFeatures(int values) { final AccessibilityFeatures newFeatures = new AccessibilityFeatures._(values); @@ -120,7 +120,7 @@ void _updateAccessibilityFeatures(int values) { _invoke(window.onAccessibilityFeaturesChanged, window._onAccessibilityFlagsChangedZone); } -@pragma('vm:entry-point', 'call') +@pragma('vm:entry-point') void _dispatchPlatformMessage(String name, ByteData data, int responseId) { if (window.onPlatformMessage != null) { _invoke3( @@ -137,14 +137,14 @@ void _dispatchPlatformMessage(String name, ByteData data, int responseId) { } } -@pragma('vm:entry-point', 'call') +@pragma('vm:entry-point') // ignore: unused_element void _dispatchPointerDataPacket(ByteData packet) { if (window.onPointerDataPacket != null) _invoke1(window.onPointerDataPacket, window._onPointerDataPacketZone, _unpackPointerDataPacket(packet)); } -@pragma('vm:entry-point', 'call') +@pragma('vm:entry-point') // ignore: unused_element void _dispatchSemanticsAction(int id, int action, ByteData args) { _invoke3( @@ -156,13 +156,13 @@ void _dispatchSemanticsAction(int id, int action, ByteData args) { ); } -@pragma('vm:entry-point', 'call') +@pragma('vm:entry-point') // ignore: unused_element void _beginFrame(int microseconds) { _invoke1(window.onBeginFrame, window._onBeginFrameZone, new Duration(microseconds: microseconds)); } -@pragma('vm:entry-point', 'call') +@pragma('vm:entry-point') // ignore: unused_element void _drawFrame() { _invoke(window.onDrawFrame, window._onDrawFrameZone); @@ -173,7 +173,7 @@ typedef _UnaryFunction(Null args); // ignore: always_declare_return_types, prefer_generic_function_type_aliases typedef _BinaryFunction(Null args, Null message); -@pragma('vm:entry-point', 'call') +@pragma('vm:entry-point') // ignore: unused_element void _runMainZoned(Function startMainIsolateFunction, Function userMainFunction) { startMainIsolateFunction((){ diff --git a/lib/ui/natives.dart b/lib/ui/natives.dart index ed83b92e4..1e9a0798f 100644 --- a/lib/ui/natives.dart +++ b/lib/ui/natives.dart @@ -29,7 +29,7 @@ Future _scheduleFrame( })); } -@pragma('vm:entry-point', 'call') +@pragma('vm:entry-point') void _setupHooks() { // ignore: unused_element assert(() { // In debug mode, register the schedule frame extension. @@ -71,7 +71,7 @@ Function _getCallbackFromHandle(int handle) native 'GetCallbackFromHandle'; // Required for gen_snapshot to work correctly. int _isolateId; // ignore: unused_element -@pragma('vm:entry-point', 'call') +@pragma('vm:entry-point') Function _getPrintClosure() => _print; // ignore: unused_element -@pragma('vm:entry-point', 'call') +@pragma('vm:entry-point') Function _getScheduleMicrotaskClosure() => _scheduleMicrotask; // ignore: unused_element -- GitLab