Skip to content

Conversation

@greglittlefield-wf
Copy link
Contributor

@greglittlefield-wf greglittlefield-wf commented Dec 2, 2025

Motivation

As part of implementing #989, I put together some "benchmarks" of dart2js code output that made it easier to inspect dart2js output and compare sizes.

These benchmarks will be helpful in future work when optimizing dart2js, so let's add them to the repo.

Changes

  • Add benchmark/dart2js_output.dart with various sub-commands:

    $ dart run benchmark/dart2js_output.dart --help
    Runs various dart2js output benchmarks and comparisons. Useful for debugging/validating how changes to over_react affect dart2js output.
    
    Usage: benchmark-dart2js-output <command> [arguments]
    
    Global options:
    -h, --help    Print this usage information.
    
    Available commands:
      compare-code   Compares the optimized, non-minified dart2js output for a benchmark React component between two over_react versions.
      compare-size   Compares the optimized, minified size of dart2js output for a benchmark React component between two over_react versions.
      get-code       Displays the optimized, non-minified dart2js output for a benchmark React component.
    
    Run "benchmark-dart2js-output help <command>" for more information about a command.
  • Remove redendant _benchmark from existing benchmark/builder_parsing_benchmark.dart

Example output of commands:

% dart run benchmark/dart2js_output.dart compare-size --no-verbose --base '"5.4.6"'
Base size: 2520 bytes
Head size: 1943 bytes
(Head size) - (base size): -577 bytes
dart run benchmark/dart2js_output.dart get-code --no-verbose
diff --git a/var/folders/nk/glvqy_wn3_l5q0zdbh74xjxc0000gs/T/JtW6BU/build_output/web/baseline.dart.js.normalized.js b/var/folders/nk/glvqy_wn3_l5q0zdbh74xjxc0000gs/T/JtW6BU/build_output/web/additional.dart.js.normalized.js
index 5c998b70f..c10bff211 100644
--- a/var/folders/nk/glvqy_wn3_l5q0zdbh74xjxc0000gs/T/JtW6BU/build_output/web/baseline.dart.js.normalized.js
+++ b/var/folders/nk/glvqy_wn3_l5q0zdbh74xjxc0000gs/T/JtW6BU/build_output/web/additional.dart.js.normalized.js
@@ -4690,2 +4690,9 @@
       t#.call$###();
+      t# = $.$get$Foo2().call$###();
+      t# = t#.props;
+      t# = J.getInterceptor$ax(t#);
+      t#.$indexSet(t#, "Foo2Props.foo0", "");
+      t#.$indexSet(t#, "Foo2Props.foo1", "");
+      t#.$indexSet(t#, "Foo2Props.foo2", "");
+      t#.call$###();
     },
@@ -4697,2 +4704,5 @@
     },
+    _$$Foo2Props$(backingMap) {
+      return new A._$$Foo2Props(backingMap, $, $, $);
+    },
     Foo0Props: function Foo0Props() {},
@@ -4701,2 +4711,4 @@
     Foo1_closure: function Foo1_closure() {},
+    Foo2Props: function Foo2Props() {},
+    Foo2_closure: function Foo2_closure() {},
     main_closure: function main_closure() {},
@@ -4704,2 +4716,3 @@
     $Foo1Props: function $Foo1Props() {},
+    $Foo2Props: function $Foo2Props() {},
     _$Foo0Config_closure0: function _$Foo0Config_closure0() {},
@@ -4724,2 +4737,12 @@
     },
+    _$Foo2Config_closure0: function _$Foo2Config_closure0() {},
+    _$Foo2Config_closure: function _$Foo2Config_closure() {},
+    _$$Foo2Props: function _$$Foo2Props(t#, t#, t#, t#) {
+      var _ = this;
+      _.props = t#;
+      _.Foo2Props___Foo2Props_foo0_A = t#;
+      _.Foo2Props___Foo2Props_foo1_A = t#;
+      _.Foo2Props___Foo2Props_foo2_A = t#;
+      _.componentFactory = null;
+    },
     __$$Foo0Props_UiProps_Foo0Props: function __$$Foo0Props_UiProps_Foo0Props() {},
@@ -4728,2 +4751,4 @@
     __$$Foo1Props_UiProps_Foo1Props_$Foo1Props: function __$$Foo1Props_UiProps_Foo1Props_$Foo1Props() {},
+    __$$Foo2Props_UiProps_Foo2Props: function __$$Foo2Props_UiProps_Foo2Props() {},
+    __$$Foo2Props_UiProps_Foo2Props_$Foo2Props: function __$$Foo2Props_UiProps_Foo2Props_$Foo2Props() {},
     printString(string) {
@@ -10396,2 +10421,22 @@
   };
+  A.Foo2Props.prototype = {$isMap: ###};
+  A.Foo2_closure.prototype = {
+    call$###(props) {
+      var t#, _null = null,
+        t# = props.props,
+        t# = J.getInterceptor$asx(t#),
+        t# = t#.$index(t#, "Foo2Props.foo0");
+      t# = A._asString(t# == null ? _null : t#);
+      t# = t#.$index(t#, "Foo2Props.foo1");
+      t# = A._asString(t# == null ? _null : t#);
+      t# = t#.$index(t#, "Foo2Props.foo2");
+      A.print(A._setArrayType([t#, t#, A._asString(t# == null ? _null : t#)], type$.JSArray_String));
+      t# = A.LinkedHashSet_LinkedHashSet$_literal([B.Type_Foo2Props_####], type$.Type);
+      t# = A.DomProps$($.$get$div(), _null);
+      t#.addUnconsumedProps$###(props, new A.EfficientLengthMappedIterable(t#, B.PropsMetaCollection_Map_####.get$forMixin(), t#.$ti._eval$###("@<###>")._bind$###(type$.PropsMetaCollection._eval$###("_AccessorMetaCollection.U"))._eval$###("EfficientLengthMappedIterable<###,###>")));
+      t#.modifyProps$###(A.PropsToForward_addPropsToForward(props, type$.Foo2Props));
+      return t#.call$###();
+    },
+    $signature: ###
+  };
   A.main_closure.prototype = {
@@ -10405,2 +10450,3 @@
   A.$Foo1Props.prototype = {};
+  A.$Foo2Props.prototype = {};
   A._$Foo0Config_closure0.prototype = {
@@ -10445,2 +10491,22 @@
   };
+  A._$Foo2Config_closure0.prototype = {
+    call$###(map) {
+      return A._$$Foo2Props$(map);
+    },
+    $signature: ###
+  };
+  A._$Foo2Config_closure.prototype = {
+    call$###(map) {
+      return A._$$Foo2Props$(map);
+    },
+    $signature: ###
+  };
+  A._$$Foo2Props.prototype = {
+    get$staticMeta() {
+      return B.PropsMetaCollection_Map_####;
+    },
+    get$props(receiver) {
+      return this.props;
+    }
+  };
   A.__$$Foo0Props_UiProps_Foo0Props.prototype = {};
@@ -10449,2 +10515,4 @@
   A.__$$Foo1Props_UiProps_Foo1Props_$Foo1Props.prototype = {};
+  A.__$$Foo2Props_UiProps_Foo2Props.prototype = {};
+  A.__$$Foo2Props_UiProps_Foo2Props_$Foo2Props.prototype = {};
   (function aliases() {
@@ -10637,4 +10705,6 @@
       A.Foo1Props,
+      A.Foo2Props,
       A.$Foo0Props,
       A.$Foo1Props,
+      A.$Foo2Props,
     ]);
@@ -10804,2 +10874,3 @@
       A.Foo1_closure,
+      A.Foo2_closure,
       A.main_closure,
@@ -10809,2 +10880,4 @@
       A._$Foo1Config_closure,
+      A._$Foo2Config_closure0,
+      A._$Foo2Config_closure,
     ]);
@@ -11029,2 +11102,3 @@
       A.__$$Foo1Props_UiProps_Foo1Props,
+      A.__$$Foo2Props_UiProps_Foo2Props,
     ]);
@@ -11081,2 +11155,4 @@
     _inherit(A._$$Foo1Props, A.__$$Foo1Props_UiProps_Foo1Props_$Foo1Props);
+    _inherit(A.__$$Foo2Props_UiProps_Foo2Props_$Foo2Props, A.__$$Foo2Props_UiProps_Foo2Props);
+    _inherit(A._$$Foo2Props, A.__$$Foo2Props_UiProps_Foo2Props_$Foo2Props);
     _mixin(A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin, A.ListMixin);
@@ -11155,2 +11231,4 @@
     _mixin(A.__$$Foo1Props_UiProps_Foo1Props_$Foo1Props, A.$Foo1Props);
+    _mixin(A.__$$Foo2Props_UiProps_Foo2Props, A.Foo2Props);
+    _mixin(A.__$$Foo2Props_UiProps_Foo2Props_$Foo2Props, A.$Foo2Props);
   })();
@@ -11193,2 +11271,3 @@
   "ReactElement(Foo1Props)",
+  "ReactElement(Foo2Props)",
   "String()",
@@ -11206,2 +11285,4 @@
   "_$$Foo1Props(Map<@,@>)",
+  "_$$Foo2Props(JsBackedMap)",
+  "_$$Foo2Props(Map<@,@>)",
   "_$$ResizeSensorProps(Map<@,@>)",
@@ -11467,2 +11548,8 @@
  },
+ "Foo2Props": {
+  "Map": [
+   "@",
+   "@"
+  ]
+ },
  "FormElement": {
@@ -12284,2 +12371,15 @@
  },
+ "_$$Foo2Props": {
+  "Foo2Props": [],
+  "Map": [
+   "@",
+   "@"
+  ],
+  "MapMixin": [
+   "@",
+   "@"
+  ],
+  "MapMixin.K": "@",
+  "MapMixin.V": "@"
+ },
  "_$$ResizeSensorProps": {
@@ -12606,2 +12706,3 @@
       Foo1Props: findType("Foo1Props"),
+      Foo2Props: findType("Foo2Props"),
       Function: findType("Function"),
@@ -12825,10 +12926,10 @@
     B.Map_#### = new A.ConstantStringMap(###, {position: "absolute", top: "###", left: "###", visibility: "hidden", width: ###, height: ###, opacity: "###"}, B.List_####, type$.ConstantStringMap_String_dynamic);
-    B.Type_Foo0Props_#### = A.typeLiteral("Foo0Props");
-    B.PropDescriptor_#### = new A.PropDescriptor("Foo0Props.foo0", true, true, true);
-    B.PropDescriptor_#### = new A.PropDescriptor("Foo0Props.foo1", true, true, true);
-    B.PropDescriptor_#### = new A.PropDescriptor("Foo0Props.foo2", true, true, true);
+    B.Type_Foo2Props_#### = A.typeLiteral("Foo2Props");
+    B.PropDescriptor_#### = new A.PropDescriptor("Foo2Props.foo0", true, true, true);
+    B.PropDescriptor_#### = new A.PropDescriptor("Foo2Props.foo1", true, true, true);
+    B.PropDescriptor_#### = new A.PropDescriptor("Foo2Props.foo2", true, true, true);
     B.List_#### = A._setArrayType(makeConstList([B.PropDescriptor_####, B.PropDescriptor_####, B.PropDescriptor_####]), type$.JSArray_PropDescriptor);
-    B.List_#### = A._setArrayType(makeConstList(["Foo0Props.foo0", "Foo0Props.foo1", "Foo0Props.foo2"]), type$.JSArray_String);
+    B.List_#### = A._setArrayType(makeConstList(["Foo2Props.foo0", "Foo2Props.foo1", "Foo2Props.foo2"]), type$.JSArray_String);
     B.PropsMeta_#### = new A.PropsMeta(B.List_####, B.List_####);
-    B.Map_#### = new A.GeneralConstantMap([B.Type_Foo0Props_####, B.PropsMeta_####], type$.GeneralConstantMap_Type_PropsMeta);
+    B.Map_#### = new A.GeneralConstantMap([B.Type_Foo2Props_####, B.PropsMeta_####], type$.GeneralConstantMap_Type_PropsMeta);
     B.PropsMetaCollection_Map_#### = new A.PropsMetaCollection(B.Map_####);
@@ -12843,2 +12944,11 @@
     B.PropsMetaCollection_Map_#### = new A.PropsMetaCollection(B.Map_####);
+    B.Type_Foo0Props_#### = A.typeLiteral("Foo0Props");
+    B.PropDescriptor_#### = new A.PropDescriptor("Foo0Props.foo0", true, true, true);
+    B.PropDescriptor_#### = new A.PropDescriptor("Foo0Props.foo1", true, true, true);
+    B.PropDescriptor_#### = new A.PropDescriptor("Foo0Props.foo2", true, true, true);
+    B.List_#### = A._setArrayType(makeConstList([B.PropDescriptor_####, B.PropDescriptor_####, B.PropDescriptor_####]), type$.JSArray_PropDescriptor);
+    B.List_#### = A._setArrayType(makeConstList(["Foo0Props.foo0", "Foo0Props.foo1", "Foo0Props.foo2"]), type$.JSArray_String);
+    B.PropsMeta_#### = new A.PropsMeta(B.List_####, B.List_####);
+    B.Map_#### = new A.GeneralConstantMap([B.Type_Foo0Props_####, B.PropsMeta_####], type$.GeneralConstantMap_Type_PropsMeta);
+    B.PropsMetaCollection_Map_#### = new A.PropsMetaCollection(B.Map_####);
     B.Symbol_#### = new A.Symbol("call");
@@ -12967,2 +13077,3 @@
     _lazy($, "Foo1", "$get$Foo1", () => A.uiFunction(new A.Foo1_closure(), $.$get$_$Foo1Config(), type$.Foo1Props));
+    _lazy($, "Foo2", "$get$Foo2", () => A.uiFunction(new A.Foo2_closure(), $.$get$_$Foo2Config(), type$.Foo2Props));
     _lazyFinal($, "_$Foo0Config", "$get$_$Foo0Config", () => {
@@ -12975,2 +13086,6 @@
     });
+    _lazyFinal($, "_$Foo2Config", "$get$_$Foo2Config", () => {
+      var t# = A.findType("_$$Foo2Props");
+      return A.UiFactoryConfig$("Foo2", A.PropsFactory$(new A._$Foo2Config_closure(), new A._$Foo2Config_closure0(), t#), t#);
+    });
   })();
@@ -13063,2 +13178,2 @@

-//# sourceMappingURL=baseline.dart.js.map
+//# sourceMappingURL=additional.dart.js.map
dart run benchmark/dart2js_output.dart compare-code --no-verbose --base '"5.4.6"' (comparing 5.4.6 to HEAD)
diff --git a/var/folders/nk/glvqy_wn3_l5q0zdbh74xjxc0000gs/T/K9bTGN/build_output/web/main.dart.js.normalized.js b/var/folders/nk/glvqy_wn3_l5q0zdbh74xjxc0000gs/T/RhJjAj/build_output/web/main.dart.js.normalized.js
index f31a9b226..08655d8d6 100644
--- a/var/folders/nk/glvqy_wn3_l5q0zdbh74xjxc0000gs/T/K9bTGN/build_output/web/main.dart.js.normalized.js
+++ b/var/folders/nk/glvqy_wn3_l5q0zdbh74xjxc0000gs/T/RhJjAj/build_output/web/main.dart.js.normalized.js
@@ -459,3 +459,3 @@
       t#.names = "";
-      if (namedArguments != null && namedArguments.__js_helper$_length !== ###)
+      if (namedArguments != null && namedArguments._length !== ###)
         namedArguments.forEach$###(###, new A.Primitives_functionNoSuchMethod_closure(t#, namedArgumentList, $arguments));
@@ -466,3 +466,3 @@
       if (Array.isArray(positionalArguments))
-        t# = namedArguments == null || namedArguments.__js_helper$_length === ###;
+        t# = namedArguments == null || namedArguments._length === ###;
       else
@@ -510,3 +510,3 @@
       if (t#) {
-        if (namedArguments != null && namedArguments.__js_helper$_length !== ###)
+        if (namedArguments != null && namedArguments._length !== ###)
           return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments);
@@ -517,3 +517,3 @@
       if (Array.isArray(defaultValues)) {
-        if (namedArguments != null && namedArguments.__js_helper$_length !== ###)
+        if (namedArguments != null && namedArguments._length !== ###)
           return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments);
@@ -555,3 +555,3 @@
           }
-          if (used !== namedArguments.__js_helper$_length)
+          if (used !== namedArguments._length)
             return A.Primitives_functionNoSuchMethod($function, $arguments, namedArguments);
@@ -1213,3 +1213,3 @@
       var _ = this;
-      _.__js_helper$_length = t#;
+      _._length = t#;
       _._jsObject = t#;
@@ -1288,3 +1288,3 @@
       var _ = this;
-      _.__js_helper$_length = ###;
+      _._length = ###;
       _._last = _._first = _.__js_helper$_rest = _._nums = _._strings = null;
@@ -3266,3 +3266,3 @@
       var _ = this;
-      _.__js_helper$_length = ###;
+      _._length = ###;
       _._last = _._first = _.__js_helper$_rest = _._nums = _._strings = null;
@@ -3276,3 +3276,3 @@
       _._validKey = t#;
-      _.__js_helper$_length = ###;
+      _._length = ###;
       _._last = _._first = _.__js_helper$_rest = _._nums = _._strings = null;
@@ -3672,3 +3672,3 @@
       _._array = t#;
-      _._length = t#;
+      _._html$_length = t#;
       _._position = -###;
@@ -3746,21 +3746,6 @@
     _$ResizeSensor(backingProps) {
-      return backingProps == null ? A._$$ResizeSensorProps$JsMap$(new A.JsBackedMap({})) : A._$$ResizeSensorProps__$$ResizeSensorProps(backingProps);
+      return A._$$ResizeSensorProps$(backingProps);
     },
-    _$$ResizeSensorProps__$$ResizeSensorProps(backingMap) {
-      var t#;
-      if (backingMap instanceof A.JsBackedMap)
-        return A._$$ResizeSensorProps$JsMap$(type$.nullable_JsBackedMap._as(backingMap));
-      else {
-        t# = type$.dynamic;
-        t# = new A._$$ResizeSensorProps$PlainMap(A.LinkedHashMap_LinkedHashMap$_empty(t#, t#), $, $);
-        t#.get$$$isClassGenerated();
-        t#._props = backingMap;
-        return t#;
-      }
-    },
-    _$$ResizeSensorProps$JsMap$(backingMap) {
-      var t# = new A._$$ResizeSensorProps$JsMap(new A.JsBackedMap({}), $, $);
-      t#.get$$$isClassGenerated();
-      t#._props = backingMap == null ? new A.JsBackedMap({}) : backingMap;
-      return t#;
+    _$$ResizeSensorProps$(backingMap) {
+      return new A._$$ResizeSensorProps(backingMap == null ? new A.JsBackedMap({}) : backingMap);
     },
@@ -3776,18 +3761,7 @@
     _$ResizeSensorPropsAccessorsMixin: function _$ResizeSensorPropsAccessorsMixin() {},
-    _$$ResizeSensorProps: function _$$ResizeSensorProps() {},
-    _$$ResizeSensorProps_$getPropKey_closure: function _$$ResizeSensorProps_$getPropKey_closure() {},
-    _$$ResizeSensorProps$PlainMap: function _$$ResizeSensorProps$PlainMap(t#, t#, t#) {
-      var _ = this;
-      _._props = t#;
-      _.componentFactory = null;
-      _.UbiquitousDomPropsMixin___UbiquitousDomPropsMixin_aria_FI = t#;
-      _.UbiquitousDomPropsMixin___UbiquitousDomPropsMixin_dom_FI = t#;
-    },
-    _$$ResizeSensorProps$JsMap: function _$$ResizeSensorProps$JsMap(t#, t#, t#) {
-      var _ = this;
-      _._props = t#;
-      _.componentFactory = null;
-      _.UbiquitousDomPropsMixin___UbiquitousDomPropsMixin_aria_FI = t#;
-      _.UbiquitousDomPropsMixin___UbiquitousDomPropsMixin_dom_FI = t#;
+    _$$ResizeSensorProps: function _$$ResizeSensorProps(t#) {
+      this.props = t#;
+      this.componentFactory = null;
     },
+    _$$ResizeSensorProps_$getPropKey_closure: function _$$ResizeSensorProps_$getPropKey_closure() {},
     _$ResizeSensorComponent: function _$ResizeSensorComponent(t#, t#, t#, t#) {
@@ -3808,13 +3782,8 @@
     DomProps$(componentFactory, props) {
-      var t# = new A.DomProps(componentFactory, props == null ? new A.JsBackedMap({}) : props, $, $);
-      t#.get$$$isClassGenerated();
-      return t#;
+      return new A.DomProps(componentFactory, props == null ? new A.JsBackedMap({}) : props);
     },
-    DomProps: function DomProps(t#, t#, t#, t#) {
-      var _ = this;
-      _.DomProps_componentFactory = t#;
-      _.props = t#;
-      _.componentFactory = null;
-      _.UbiquitousDomPropsMixin___UbiquitousDomPropsMixin_aria_FI = t#;
-      _.UbiquitousDomPropsMixin___UbiquitousDomPropsMixin_dom_FI = t#;
+    DomProps: function DomProps(t#, t#) {
+      this.DomProps_componentFactory = t#;
+      this.props = t#;
+      this.componentFactory = null;
     },
@@ -3873,3 +3842,3 @@
       t# = consumedProps;
-      A.forwardUnconsumedPropsV2(_this.get$props(_this), new A.MappedListIterable(t#, new A.PropsToForward__propsToForward_closure(), A.instanceType(t#)._eval$###("MappedListIterable<###,List<String>>")), false, propsToUpdate);
+      A.forwardUnconsumedPropsV2(_this.props, new A.MappedListIterable(t#, new A.PropsToForward__propsToForward_closure(), A.instanceType(t#)._eval$###("MappedListIterable<###,List<String>>")), false, propsToUpdate);
       return propsToUpdate;
@@ -3969,8 +3938,5 @@
     },
-    GenericUiProps: function GenericUiProps(t#, t#, t#) {
-      var _ = this;
-      _.props = t#;
-      _.componentFactory = null;
-      _.UbiquitousDomPropsMixin___UbiquitousDomPropsMixin_aria_FI = t#;
-      _.UbiquitousDomPropsMixin___UbiquitousDomPropsMixin_dom_FI = t#;
+    GenericUiProps: function GenericUiProps(t#) {
+      this.props = t#;
+      this.componentFactory = null;
     },
@@ -4695,3 +4661,3 @@
     main() {
-      var t#,
+      var t#, t#,
         t# = A.DomProps$($.$get$div(), null);
@@ -4702,27 +4668,13 @@
       t# = $.$get$Foo0().call$###();
-      t# = J.getInterceptor$x(t#);
-      J.$indexSet$ax(t#.get$props(t#), "Foo0Props.foo0", "");
-      J.$indexSet$ax(t#.get$props(t#), "Foo0Props.foo1", "");
-      J.$indexSet$ax(t#.get$props(t#), "Foo0Props.foo2", "");
-      J.$indexSet$ax(t#.get$props(t#), "Foo0Props.foo3", "");
-      J.$indexSet$ax(t#.get$props(t#), "Foo0Props.foo4", "");
+      t# = t#.props;
+      t# = J.getInterceptor$ax(t#);
+      t#.$indexSet(t#, "Foo0Props.foo0", "");
+      t#.$indexSet(t#, "Foo0Props.foo1", "");
+      t#.$indexSet(t#, "Foo0Props.foo2", "");
+      t#.$indexSet(t#, "Foo0Props.foo3", "");
+      t#.$indexSet(t#, "Foo0Props.foo4", "");
       t#.call$###();
     },
-    _$$Foo0Props__$$Foo0Props(backingMap) {
-      var t#;
-      if (backingMap instanceof A.JsBackedMap)
-        return A._$$Foo0Props$JsMap$(type$.nullable_JsBackedMap._as(backingMap));
-      else {
-        t# = type$.dynamic;
-        t# = new A._$$Foo0Props$PlainMap(A.LinkedHashMap_LinkedHashMap$_empty(t#, t#), $, $, $, $, $, $, $);
-        t#.get$$$isClassGenerated();
-        t#._main$_props = backingMap;
-        return t#;
-      }
-    },
-    _$$Foo0Props$JsMap$(backingMap) {
-      var t# = new A._$$Foo0Props$JsMap(new A.JsBackedMap({}), $, $, $, $, $, $, $);
-      t#.get$$$isClassGenerated();
-      t#._main$_props = backingMap == null ? new A.JsBackedMap({}) : backingMap;
-      return t#;
+    _$$Foo0Props$(backingMap) {
+      return new A._$$Foo0Props(backingMap, $, $, $, $, $);
     },
@@ -4734,18 +4686,5 @@
     _$Foo0Config_closure0: function _$Foo0Config_closure0() {},
-    _$$Foo0Props: function _$$Foo0Props() {},
-    _$$Foo0Props$PlainMap: function _$$Foo0Props$PlainMap(t#, t#, t#, t#, t#, t#, t#, t#) {
+    _$$Foo0Props: function _$$Foo0Props(t#, t#, t#, t#, t#, t#) {
       var _ = this;
-      _._main$_props = t#;
-      _.Foo0Props___Foo0Props_foo0_A = t#;
-      _.Foo0Props___Foo0Props_foo1_A = t#;
-      _.Foo0Props___Foo0Props_foo2_A = t#;
-      _.Foo0Props___Foo0Props_foo3_A = t#;
-      _.Foo0Props___Foo0Props_foo4_A = t#;
-      _.componentFactory = null;
-      _.UbiquitousDomPropsMixin___UbiquitousDomPropsMixin_aria_FI = t#;
-      _.UbiquitousDomPropsMixin___UbiquitousDomPropsMixin_dom_FI = t#;
-    },
-    _$$Foo0Props$JsMap: function _$$Foo0Props$JsMap(t#, t#, t#, t#, t#, t#, t#, t#) {
-      var _ = this;
-      _._main$_props = t#;
+      _.props = t#;
       _.Foo0Props___Foo0Props_foo0_A = t#;
@@ -4756,4 +4695,2 @@
       _.componentFactory = null;
-      _.UbiquitousDomPropsMixin___UbiquitousDomPropsMixin_aria_FI = t#;
-      _.UbiquitousDomPropsMixin___UbiquitousDomPropsMixin_dom_FI = t#;
     },
@@ -4858,4 +4795,4 @@
     forwardUnconsumedProps(props, keySetsToOmit, onlyCopyDomProps, propsToUpdate) {
-      var t#, key, t#;
-      for (t# = props.get$props(props), t# = J.get$iterator$ax(t#.get$keys(t#)); t#.moveNext$###();) {
+      var t#, t#, t#, key, t#;
+      for (t# = props.props, t# = J.getInterceptor$x(t#), t# = J.get$iterator$ax(t#.get$keys(t#)); t#.moveNext$###();) {
         key = t#.get$current(t#);
@@ -4866,3 +4803,3 @@
         if (t# || $.$get$_validDomProps().contains$###(###, key)) {
-          t# = props.get$props(props).$index(###, key);
+          t# = t#.$index(t#, key);
           J.$indexSet$ax(propsToUpdate.get$props(propsToUpdate), key, t#);
@@ -6035,3 +5972,3 @@
     get$length(_) {
-      return this.__js_helper$_length;
+      return this._length;
     },
@@ -6114,3 +6051,3 @@
     get$length(_) {
-      return this._getMap$###().__js_helper$_length;
+      return this._getMap$###()._length;
     }
@@ -6299,6 +6236,6 @@
     get$length(_) {
-      return this.__js_helper$_length;
+      return this._length;
     },
     get$isEmpty(_) {
-      return this.__js_helper$_length === ###;
+      return this._length === ###;
     },
@@ -6428,3 +6365,3 @@
         _this._last = _this._last._next = cell;
-      ++_this.__js_helper$_length;
+      ++_this._length;
       _this._modifications = _this._modifications + ### & ###;
@@ -6476,6 +6413,6 @@
     get$length(_) {
-      return this._map.__js_helper$_length;
+      return this._map._length;
     },
     get$isEmpty(_) {
-      return this._map.__js_helper$_length === ###;
+      return this._map._length === ###;
     },
@@ -8920,3 +8857,3 @@
         nextPosition = _this._position + ###,
-        t# = _this._length;
+        t# = _this._html$_length;
       if (nextPosition < t#) {
@@ -9265,3 +9202,3 @@
     get$defaultProps(_) {
-      var t# = A._$$ResizeSensorProps$JsMap$(new A.JsBackedMap({}));
+      var t# = A._$$ResizeSensorProps$(new A.JsBackedMap({}));
       t#.addProps$###($.$get$ResizeSensorPropsMixin_defaultProps());
@@ -9280,3 +9217,3 @@
       t# === $ && A.throwUnnamedLateFieldNI();
-      t# = t#.get$props(t#).$index(###, "ResizeSensorPropsMixin.quickMount");
+      t# = J.$index$asx(t#.props, "ResizeSensorPropsMixin.quickMount");
       t# = A._asBoolQ(t# == null ? null : t#);
@@ -9323,4 +9260,3 @@
       resizeSensor = t#.call$###(expandSensor, collapseSensor);
-      t# = _this.___$ResizeSensorComponent__cachedTypedProps_A;
-      t# = t#.get$props(t#).$index(###, "ResizeSensorPropsMixin.isFlexChild");
+      t# = J.$index$asx(_this.___$ResizeSensorComponent__cachedTypedProps_A.props, "ResizeSensorPropsMixin.isFlexChild");
       t# = A._asBoolQ(t# == null ? _null : t#);
@@ -9330,4 +9266,3 @@
       else {
-        t# = _this.___$ResizeSensorComponent__cachedTypedProps_A;
-        t# = t#.get$props(t#).$index(###, "ResizeSensorPropsMixin.isFlexContainer");
+        t# = J.$index$asx(_this.___$ResizeSensorComponent__cachedTypedProps_A.props, "ResizeSensorPropsMixin.isFlexContainer");
         t# = A._asBoolQ(t# == null ? _null : t#);
@@ -9396,3 +9331,3 @@
       t# === $ && A.throwUnnamedLateFieldNI();
-      t# = t#.get$props(t#).$index(###, "ResizeSensorPropsMixin.onDidReset");
+      t# = J.$index$asx(t#.props, "ResizeSensorPropsMixin.onDidReset");
       if (t# == null)
@@ -9446,5 +9381,2 @@
   A._$$ResizeSensorProps.prototype = {
-    get$$$isClassGenerated() {
-      return true;
-    },
     get$componentFactory() {
@@ -9456,3 +9388,6 @@
     },
-    $isResizeSensorProps: ###
+    $isResizeSensorProps: ###,
+    get$props(receiver) {
+      return this.props;
+    }
   };
@@ -9460,3 +9395,3 @@
     call$###(map) {
-      return A._$$ResizeSensorProps__$$ResizeSensorProps(map);
+      return A._$$ResizeSensorProps$(map);
     },
@@ -9464,12 +9399,2 @@
   };
-  A._$$ResizeSensorProps$PlainMap.prototype = {
-    get$props(_) {
-      return this._props;
-    }
-  };
-  A._$$ResizeSensorProps$JsMap.prototype = {
-    get$props(_) {
-      return this._props;
-    }
-  };
   A._$ResizeSensorComponent.prototype = {
@@ -9477,3 +9402,3 @@
       this.super$Component2$props(###, value);
-      this.___$ResizeSensorComponent__cachedTypedProps_A = A._$$ResizeSensorProps$JsMap$(A.getBackingMap(value));
+      this.___$ResizeSensorComponent__cachedTypedProps_A = A._$$ResizeSensorProps$(A.getBackingMap(value));
     },
@@ -9512,5 +9437,2 @@
   A.DomProps.prototype = {
-    get$$$isClassGenerated() {
-      return true;
-    },
     get$componentFactory() {
@@ -9778,4 +9700,3 @@
     call$###(backingMap) {
-      var t# = new A.GenericUiProps(backingMap == null ? new A.JsBackedMap({}) : backingMap, $, $);
-      t#.get$$$isClassGenerated();
+      var t# = new A.GenericUiProps(backingMap == null ? new A.JsBackedMap({}) : backingMap);
       t#.componentFactory = this.factory;
@@ -9818,5 +9739,2 @@
   A.GenericUiProps.prototype = {
-    get$$$isClassGenerated() {
-      return true;
-    },
     get$props(receiver) {
@@ -10410,12 +10328,14 @@
     call$###(props) {
-      var t#, t#, t#, t#, _null = null,
-        t# = J.$index$asx(props.get$props(props), "Foo0Props.foo0");
+      var t#, t#, t#, _null = null,
+        t# = props.props,
+        t# = J.getInterceptor$asx(t#),
+        t# = t#.$index(t#, "Foo0Props.foo0");
       t# = A._asString(t# == null ? _null : t#);
-      t# = J.$index$asx(props.get$props(props), "Foo0Props.foo1");
+      t# = t#.$index(t#, "Foo0Props.foo1");
       t# = A._asString(t# == null ? _null : t#);
-      t# = J.$index$asx(props.get$props(props), "Foo0Props.foo2");
+      t# = t#.$index(t#, "Foo0Props.foo2");
       t# = A._asString(t# == null ? _null : t#);
-      t# = J.$index$asx(props.get$props(props), "Foo0Props.foo3");
+      t# = t#.$index(t#, "Foo0Props.foo3");
       t# = A._asString(t# == null ? _null : t#);
-      t# = J.$index$asx(props.get$props(props), "Foo0Props.foo4");
+      t# = t#.$index(t#, "Foo0Props.foo4");
       A.print(A._setArrayType([t#, t#, t#, t#, A._asString(t# == null ? _null : t#)], type$.JSArray_String));
@@ -10431,3 +10351,3 @@
     call$###(p) {
-      var t# = J.$index$asx(p.get$props(p), "id");
+      var t# = J.$index$asx(p.props, "id");
       return A._asStringQ(t# == null ? null : t#);
@@ -10439,3 +10359,3 @@
     call$###(map) {
-      return A._$$Foo0Props__$$Foo0Props(map);
+      return A._$$Foo0Props$(map);
     },
@@ -10445,3 +10365,3 @@
     call$###(map) {
-      return A._$$Foo0Props$JsMap$(map);
+      return A._$$Foo0Props$(map);
     },
@@ -10450,14 +10370,4 @@
   A._$$Foo0Props.prototype = {
-    get$$$isClassGenerated() {
-      return true;
-    }
-  };
-  A._$$Foo0Props$PlainMap.prototype = {
-    get$props(_) {
-      return this._main$_props;
-    }
-  };
-  A._$$Foo0Props$JsMap.prototype = {
-    get$props(_) {
-      return this._main$_props;
+    get$props(receiver) {
+      return this.props;
     }
@@ -11053,6 +10963,2 @@
     _inherit(A._$$ResizeSensorProps, A.__$$ResizeSensorProps__$ResizeSensorProps__$ResizeSensorPropsAccessorsMixin);
-    _inheritMany(A._$$ResizeSensorProps,
-      [A._$$ResizeSensorProps$PlainMap,
-      A._$$ResizeSensorProps$JsMap,
-    ]);
     _inherit(A._$ResizeSensorComponent, A.ResizeSensorComponent);
@@ -11094,6 +11000,2 @@
     _inherit(A._$$Foo0Props, A.__$$Foo0Props_UiProps_Foo0Props_$Foo0Props);
-    _inheritMany(A._$$Foo0Props,
-      [A._$$Foo0Props$PlainMap,
-      A._$$Foo0Props$JsMap,
-    ]);
     _mixin(A._NativeTypedArrayOfDouble_NativeTypedArray_ListMixin, A.ListMixin);
@@ -11216,3 +11118,3 @@
   "Version(NavigatorProvider{namePrefix:String})",
-  "_$$Foo0Props$JsMap(JsBackedMap)",
+  "_$$Foo0Props(JsBackedMap)",
   "_$$Foo0Props(Map<@,@>)",
@@ -12265,26 +12167,2 @@
  "_$$Foo0Props": {
-  "Foo0Props": [],
-  "Map": [
-   "@",
-   "@"
-  ],
-  "MapMixin": [
-   "@",
-   "@"
-  ]
- },
- "_$$Foo0Props$JsMap": {
-  "Foo0Props": [],
-  "Map": [
-   "@",
-   "@"
-  ],
-  "MapMixin": [
-   "@",
-   "@"
-  ],
-  "MapMixin.K": "@",
-  "MapMixin.V": "@"
- },
- "_$$Foo0Props$PlainMap": {
   "Foo0Props": [],
@@ -12302,26 +12180,2 @@
  "_$$ResizeSensorProps": {
-  "Map": [
-   "@",
-   "@"
-  ],
-  "MapMixin": [
-   "@",
-   "@"
-  ],
-  "ResizeSensorProps": []
- },
- "_$$ResizeSensorProps$JsMap": {
-  "Map": [
-   "@",
-   "@"
-  ],
-  "MapMixin": [
-   "@",
-   "@"
-  ],
-  "MapMixin.K": "@",
-  "MapMixin.V": "@",
-  "ResizeSensorProps": []
- },
- "_$$ResizeSensorProps$PlainMap": {
   "Map": [
@@ -12692,3 +12546,2 @@
       nullable_Future_Null: findType("Future<Null>?"),
-      nullable_JsBackedMap: findType("JsBackedMap?"),
       nullable_Object: findType("Object?"),
@@ -13044,6 +12897,6 @@
   };
-  Function.prototype.call$###$### = function(a) {
+  Function.prototype.call$### = function(a) {
     return this(a);
   };
-  Function.prototype.call$### = function(a) {
+  Function.prototype.call$###$### = function(a) {
     return this(a);

Release Notes

Review

See CONTRIBUTING.md for more details on review types (+1 / QA +1 / +10) and code review process.

Please review:

QA Checklist

  • Tests were updated and provide good coverage of the changeset and other affected code
  • Manual testing was performed if needed
    • Steps from PR author:
      • Run commands locally (can use commands from Changes section, without --verbose) and verify they work and have good --help output
    • Anything falling under manual testing criteria outlined in CONTRIBUTING.md

Merge Checklist

While we perform many automated checks before auto-merging, some manual checks are needed:

  • A Frontend Frameworks Design member has reviewed these changes
  • There are no unaddressed comments - this check can be automated if reviewers use the "Request Changes" feature
  • For release PRs - Version metadata in Rosie comment is correct

This reverts commit 57e39e3.

This didn't actually affect the size diff, since we
compare the size of a single component, and not the size of the
test case as a whole. As a result, all other code outside of
the component is not factored into that size difference.
@btr-rmconsole-1 btr-rmconsole-1 bot changed the title Add dart2js output benchmarks FED-4308 Add dart2js output benchmarks Dec 11, 2025
@greglittlefield-wf greglittlefield-wf added the ignore release notes Suppresses the check-release-notes GHA check in PRs that shouldn't have release notes. label Jan 6, 2026
@greglittlefield-wf greglittlefield-wf marked this pull request as ready for review February 2, 2026 20:26
@annawatson-wk annawatson-wk self-assigned this Feb 11, 2026
Copy link
Contributor

@sydneyjodon-wk sydneyjodon-wk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+10 this is awesome!

  • smoke tested all the different variations of commands with different dependencies both versions and git references and it all looked great! (also help output was clear too)

import 'dart2js_output/logging.dart';
import 'dart2js_output/source.dart' as source;

Future<void> main(List<String> args) async {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be mentioned somewhere in the readme or wherever so we remember we have this debugging tool or do we not care that much?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mm good thought, but yeah I don't care that much haha. This and the other benchmark are pretty niche and on aspects of the code that don't get worked on much

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay cool!

@greglittlefield-wf
Copy link
Contributor Author

@Workiva/release-management-p

Copy link

@rmconsole-wf rmconsole-wf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 from RM

@btr-rmconsole-6 btr-rmconsole-6 bot merged commit 01c7870 into master Feb 12, 2026
19 of 34 checks passed
@btr-rmconsole-6 btr-rmconsole-6 bot deleted the dart2js-output-benchmark branch February 12, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ignore release notes Suppresses the check-release-notes GHA check in PRs that shouldn't have release notes. Merge Requirements Met RM Ready

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants