Skip to content

Commit 2da2ca0

Browse files
committed
perf: inline closure functions when possible
1 parent 56fb899 commit 2da2ca0

File tree

70 files changed

+202
-148
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+202
-148
lines changed

.changeset/lucky-carpets-vanish.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@marko/runtime-tags": patch
3+
---
4+
5+
Inline closures functions when single closure for section.

.sizes.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
{
88
"name": "*",
99
"total": {
10-
"min": 18972,
11-
"brotli": 7212
10+
"min": 18979,
11+
"brotli": 7217
1212
}
1313
},
1414
{
@@ -18,12 +18,12 @@
1818
"brotli": 145
1919
},
2020
"runtime": {
21-
"min": 3906,
22-
"brotli": 1723
21+
"min": 3913,
22+
"brotli": 1731
2323
},
2424
"total": {
25-
"min": 4096,
26-
"brotli": 1868
25+
"min": 4103,
26+
"brotli": 1876
2727
}
2828
},
2929
{
@@ -44,16 +44,16 @@
4444
{
4545
"name": "comments",
4646
"user": {
47-
"min": 929,
48-
"brotli": 476
47+
"min": 919,
48+
"brotli": 461
4949
},
5050
"runtime": {
51-
"min": 6990,
52-
"brotli": 2993
51+
"min": 6997,
52+
"brotli": 3003
5353
},
5454
"total": {
55-
"min": 7919,
56-
"brotli": 3469
55+
"min": 7916,
56+
"brotli": 3464
5757
}
5858
},
5959
{

.sizes/comments.csr/entry.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// size: 929 (min) 476 (brotli)
1+
// size: 919 (min) 461 (brotli)
22
const $setup$if$content = ($scope) => {
33
$scope[0];
44
},
@@ -77,7 +77,7 @@ const $setup$if$content = ($scope) => {
7777
" E l D l%",
7878
$setup$for$content,
7979
$params2$for$content,
80-
($scope) => $input_path$for$content._($scope),
80+
$input_path$for$content,
8181
),
8282
),
8383
$input_comments = value(3, ($scope, input_comments) =>

.sizes/dom.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// size: 18972 (min) 7212 (brotli)
1+
// size: 18979 (min) 7217 (brotli)
22
var empty = [],
33
rest = Symbol();
44
function attrTag(attrs2) {
@@ -907,7 +907,7 @@ function createContent(
907907
(walks = walks ? walks.replace(/[^\0-1]+$/, "") : ""),
908908
(setup ||= void 0),
909909
(params ||= void 0),
910-
(closures ||= void 0);
910+
(closures = closures ? closures._ || closures : void 0);
911911
let clone = template
912912
? (branch, ns) => {
913913
((cloneCache[ns] ||= {})[template] ||= (function (html2, ns) {
Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
11
{
22
"vars": {
33
"props": {
4-
"$_$": "t"
4+
"$_$": "t",
5+
"$$placeholder_content": "e",
6+
"$$setup$await$content": "a",
7+
"$$input_level$await$content": "r",
8+
"$$await_content": "n",
9+
"$$await$try$content": "l",
10+
"$$setup$try$content": "o",
11+
"$$try_content": "d",
12+
"$$input_level$if$content": "i",
13+
"$$try$if$content": "c",
14+
"$$setup$if$content": "m",
15+
"$$if_content": "s",
16+
"$$if": "D",
17+
"$$input_level_closure": "v",
18+
"$$input_level": "u",
19+
"$$input": "C"
520
}
621
}
722
}

packages/runtime-tags/src/__tests__/fixtures/async-deep-recursive/__snapshots__/dom.expected/tags/recurse.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const $setup$await$content = $scope => {
1111
const $input_level$await$content = /* @__PURE__ */_$.dynamicClosureRead("input_level", ($scope, input_level) => $input($scope["#childScope/0"], {
1212
level: input_level - 1
1313
}), $scope => $scope._._._);
14-
const $await_content = /* @__PURE__ */_$.createRenderer(`<!>${_recurse_template}<!>`, /* beginChild, _recurse_walks, endChild */`D/${_recurse_walks}&D`, $setup$await$content, 0, $scope => $input_level$await$content($scope));
14+
const $await_content = /* @__PURE__ */_$.createRenderer(`<!>${_recurse_template}<!>`, /* beginChild, _recurse_walks, endChild */`D/${_recurse_walks}&D`, $setup$await$content, 0, $input_level$await$content);
1515
const $await$try$content = /* @__PURE__ */_$.awaitTag("#text/0", $await_content);
1616
const $setup$try$content = $scope => {
1717
$await$try$content($scope, new Promise(setImmediate));
@@ -26,7 +26,7 @@ const $setup$if$content = $scope => {
2626
})
2727
});
2828
};
29-
const $if_content = /* @__PURE__ */_$.createRenderer("<div><!></div>", /* get, next(1), replace */" D%", $setup$if$content, 0, $scope => $input_level$if$content._($scope));
29+
const $if_content = /* @__PURE__ */_$.createRenderer("<div><!></div>", /* get, next(1), replace */" D%", $setup$if$content, 0, $input_level$if$content);
3030
const $if = /* @__PURE__ */_$.conditional("#text/0", $if_content);
3131
const $input_level_closure = /* @__PURE__ */_$.dynamicClosure($input_level$await$content);
3232
export const $input_level = /* @__PURE__ */_$.value("input_level", ($scope, input_level) => {

packages/runtime-tags/src/__tests__/fixtures/async-reorder-nested-batched-resolve/__snapshots__/dom.expected/template.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const $placeholder_content4 = _$.registerContent("__tests__/template.marko_11_re
1313
const $placeholder_content3 = _$.registerContent("__tests__/template.marko_10_renderer", "LOADING B1");
1414
const $await$try$content = /* @__PURE__ */_$.awaitTag("#text/0", $await_content4);
1515
const $promiseB$try$content = /* @__PURE__ */_$.dynamicClosureRead("promiseB", $await$try$content, $scope => $scope._._._);
16-
const $try_content4 = /* @__PURE__ */_$.createRenderer("<!><!><!>", /* replace */"D%D", 0, 0, $scope => $promiseB$try$content($scope));
16+
const $try_content4 = /* @__PURE__ */_$.createRenderer("<!><!><!>", /* replace */"D%D", 0, 0, $promiseB$try$content);
1717
const $value$await$content3 = /* @__PURE__ */_$.value("value", ($scope, value) => _$.classAttr($scope["#div/0"], value));
1818
const $try$await$content = /* @__PURE__ */_$.createTry("#text/1", $try_content4);
1919
const $setup$await$content2 = $scope => {
@@ -27,7 +27,7 @@ const $params4$await$content = /* @__PURE__ */_$.value("$params4", ($scope, $par
2727
const $await_content3 = /* @__PURE__ */_$.createRenderer("<div level=3><!></div>", /* get, next(1), replace */" D%", $setup$await$content2, $params4$await$content);
2828
const $await$try$content2 = /* @__PURE__ */_$.awaitTag("#text/0", $await_content3);
2929
const $promiseB$try$content2 = /* @__PURE__ */_$.dynamicClosureRead("promiseB", $await$try$content2);
30-
const $try_content3 = /* @__PURE__ */_$.createRenderer("<!><!><!>", /* replace */"D%D", 0, 0, $scope => $promiseB$try$content2($scope));
30+
const $try_content3 = /* @__PURE__ */_$.createRenderer("<!><!><!>", /* replace */"D%D", 0, 0, $promiseB$try$content2);
3131
const $value$await$content2 = /* @__PURE__ */_$.value("value", ($scope, value) => _$.classAttr($scope["#div/0"], value));
3232
const $promiseB$await$content = /* @__PURE__ */_$.value("promiseB");
3333
const $try$await$content2 = /* @__PURE__ */_$.createTry("#text/1", $try_content3);
@@ -45,7 +45,7 @@ const $placeholder_content2 = _$.registerContent("__tests__/template.marko_5_ren
4545
const $placeholder_content = _$.registerContent("__tests__/template.marko_4_renderer", "LOADING A1");
4646
const $await$try$content3 = /* @__PURE__ */_$.awaitTag("#text/0", $await_content2);
4747
const $promiseA$try$content = /* @__PURE__ */_$.dynamicClosureRead("promiseA", $await$try$content3, $scope => $scope._._._);
48-
const $try_content2 = /* @__PURE__ */_$.createRenderer("<!><!><!>", /* replace */"D%D", 0, 0, $scope => $promiseA$try$content($scope));
48+
const $try_content2 = /* @__PURE__ */_$.createRenderer("<!><!><!>", /* replace */"D%D", 0, 0, $promiseA$try$content);
4949
const $value$await$content = /* @__PURE__ */_$.value("value", ($scope, value) => _$.classAttr($scope["#div/0"], value));
5050
const $try$await$content3 = /* @__PURE__ */_$.createTry("#text/1", $try_content2);
5151
const $setup$await$content3 = $scope => {
@@ -59,7 +59,7 @@ const $params2$await$content = /* @__PURE__ */_$.value("$params2", ($scope, $par
5959
const $await_content = /* @__PURE__ */_$.createRenderer("<div level=1><!></div>", /* get, next(1), replace */" D%", $setup$await$content3, $params2$await$content);
6060
const $await$try$content4 = /* @__PURE__ */_$.awaitTag("#text/0", $await_content);
6161
const $promiseA$try$content2 = /* @__PURE__ */_$.dynamicClosureRead("promiseA", $await$try$content4);
62-
const $try_content = /* @__PURE__ */_$.createRenderer("<!><!><!>", /* replace */"D%D", 0, 0, $scope => $promiseA$try$content2($scope));
62+
const $try_content = /* @__PURE__ */_$.createRenderer("<!><!><!>", /* replace */"D%D", 0, 0, $promiseA$try$content2);
6363
const $promiseA = /* @__PURE__ */_$.value("promiseA");
6464
const $try = /* @__PURE__ */_$.createTry("#text/0", $try_content);
6565
export function $setup($scope) {

packages/runtime-tags/src/__tests__/fixtures/async-state/__snapshots__/dom.expected/template.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const $await_content = /* @__PURE__ */_$.createRenderer(" ", /* get */" ", 0, $p
99
const $placeholder_content = _$.registerContent("__tests__/template.marko_2_renderer", "LOADING...");
1010
const $await$try$content = /* @__PURE__ */_$.awaitTag("#text/0", $await_content);
1111
const $clickCount$try$content = /* @__PURE__ */_$.dynamicClosureRead("clickCount", ($scope, clickCount) => $await$try$content($scope, resolveAfter(clickCount, 1)));
12-
const $try_content = /* @__PURE__ */_$.createRenderer("<!><!><!>", /* replace */"D%D", 0, 0, $scope => $clickCount$try$content($scope));
12+
const $try_content = /* @__PURE__ */_$.createRenderer("<!><!><!>", /* replace */"D%D", 0, 0, $clickCount$try$content);
1313
const $clickCount_closure = /* @__PURE__ */_$.dynamicClosure($clickCount$try$content);
1414
const $clickCount_effect = _$.effect("__tests__/template.marko_0_clickCount", ($scope, {
1515
clickCount

packages/runtime-tags/src/__tests__/fixtures/await-tag/__snapshots__/dom.expected/template.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ import * as _$ from "@marko/runtime-tags/debug/dom";
55
const $value$await$content3 = /* @__PURE__ */_$.value("value", ($scope, value) => _$.data($scope["#text/0"], value));
66
const $count$await$content3 = /* @__PURE__ */_$.dynamicClosureRead("count", ($scope, count) => _$.data($scope["#text/1"], count));
77
const $params4$await$content = /* @__PURE__ */_$.value("$params4", ($scope, $params4) => $value$await$content3($scope, $params4[0]));
8-
const $await_content3 = /* @__PURE__ */_$.createRenderer("Got: <!> <!>", /* over(1), replace, over(2), replace */"b%c%", 0, $params4$await$content, $scope => $count$await$content3($scope));
8+
const $await_content3 = /* @__PURE__ */_$.createRenderer("Got: <!> <!>", /* over(1), replace, over(2), replace */"b%c%", 0, $params4$await$content, $count$await$content3);
99
const $value$await$content2 = /* @__PURE__ */_$.value("value", ($scope, value) => _$.data($scope["#text/0"], value));
1010
const $count$await$content2 = /* @__PURE__ */_$.dynamicClosureRead("count", ($scope, count) => _$.data($scope["#text/1"], count));
1111
const $params3$await$content = /* @__PURE__ */_$.value("$params3", ($scope, $params3) => $value$await$content2($scope, $params3[0]));
12-
const $await_content2 = /* @__PURE__ */_$.createRenderer("Got: <!> <!>", /* over(1), replace, over(2), replace */"b%c%", 0, $params3$await$content, $scope => $count$await$content2($scope));
12+
const $await_content2 = /* @__PURE__ */_$.createRenderer("Got: <!> <!>", /* over(1), replace, over(2), replace */"b%c%", 0, $params3$await$content, $count$await$content2);
1313
const $value$await$content = /* @__PURE__ */_$.value("value", ($scope, value) => _$.data($scope["#text/0"], value));
1414
const $count$await$content = /* @__PURE__ */_$.dynamicClosureRead("count", ($scope, count) => _$.data($scope["#text/1"], count));
1515
const $params2$await$content = /* @__PURE__ */_$.value("$params2", ($scope, $params2) => $value$await$content($scope, $params2[0]));
16-
const $await_content = /* @__PURE__ */_$.createRenderer("Got: <!> <!>", /* over(1), replace, over(2), replace */"b%c%", 0, $params2$await$content, $scope => $count$await$content($scope));
16+
const $await_content = /* @__PURE__ */_$.createRenderer("Got: <!> <!>", /* over(1), replace, over(2), replace */"b%c%", 0, $params2$await$content, $count$await$content);
1717
const $count_closure = /* @__PURE__ */_$.dynamicClosure($count$await$content, $count$await$content2, $count$await$content3);
1818
const $count_effect = _$.effect("__tests__/template.marko_0_count", ($scope, {
1919
count

packages/runtime-tags/src/__tests__/fixtures/basic-component-renderBody/__snapshots__/dom.expected/template.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export const $walks = /* beginChild, _myButton_walks, endChild */`/${_myButton_w
33
import * as _$ from "@marko/runtime-tags/debug/dom";
44
import { $setup as _myButton, $content as _myButton_input_content, $onClick as _myButton_input_onClick, $template as _myButton_template, $walks as _myButton_walks } from "./tags/my-button.marko";
55
const $clickCount$mybutton$content = /* @__PURE__ */_$.dynamicClosureRead("clickCount", ($scope, clickCount) => _$.data($scope["#text/0"], clickCount));
6-
const $mybutton_content = /* @__PURE__ */_$.createContent("__tests__/template.marko_1_renderer", " ", /* get */" ", 0, 0, $scope => $clickCount$mybutton$content($scope));
6+
const $mybutton_content = /* @__PURE__ */_$.createContent("__tests__/template.marko_1_renderer", " ", /* get */" ", 0, 0, $clickCount$mybutton$content);
77
const $clickCount_closure = /* @__PURE__ */_$.dynamicClosure($clickCount$mybutton$content);
88
const $clickCount = /* @__PURE__ */_$.state("clickCount/1", ($scope, clickCount) => {
99
_myButton_input_onClick($scope["#childScope/0"], $onClick($scope));

packages/runtime-tags/src/__tests__/fixtures/basic-conditional-counter-multiple-nodes/__snapshots__/dom.expected/template.hydrate.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
// size: 358 (min) 203 (brotli)
1+
// size: 348 (min) 193 (brotli)
22
const $count$if$content = _$.conditionalClosure(4, 2, 0, ($scope, count) =>
33
_$.data($scope[0], count),
44
),
5-
$if_content = _$.createRenderer("The count is <!>", "b%", 0, 0, ($scope) =>
6-
$count$if$content._($scope),
5+
$if_content = _$.createRenderer(
6+
"The count is <!>",
7+
"b%",
8+
0,
9+
0,
10+
$count$if$content,
711
),
812
$if = _$.conditional(2, $if_content),
913
$show_effect = _$.effect("a0", ($scope, { 3: show }) =>

packages/runtime-tags/src/__tests__/fixtures/basic-conditional-counter-multiple-nodes/__snapshots__/dom.expected/template.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export const $template = "<button class=inc></button><button class=toggle></butt
22
export const $walks = /* get, over(1), get, over(1), replace, over(1) */" b b%bD";
33
import * as _$ from "@marko/runtime-tags/debug/dom";
44
const $count$if$content = /* @__PURE__ */_$.conditionalClosure("count", "#text/2", 0, ($scope, count) => _$.data($scope["#text/0"], count));
5-
const $if_content = /* @__PURE__ */_$.createRenderer("The count is <!>", /* over(1), replace */"b%", 0, 0, $scope => $count$if$content._($scope));
5+
const $if_content = /* @__PURE__ */_$.createRenderer("The count is <!>", /* over(1), replace */"b%", 0, 0, $count$if$content);
66
const $if = /* @__PURE__ */_$.conditional("#text/2", $if_content);
77
const $show_effect = _$.effect("__tests__/template.marko_0_show", ($scope, {
88
show

packages/runtime-tags/src/__tests__/fixtures/basic-conditional-counter/__snapshots__/dom.expected/template.hydrate.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
// size: 356 (min) 199 (brotli)
1+
// size: 346 (min) 194 (brotli)
22
const $count$if$content = _$.conditionalClosure(4, 2, 0, ($scope, count) =>
33
_$.data($scope[0], count),
44
),
5-
$if_content = _$.createRenderer("<span> </span>", "D ", 0, 0, ($scope) =>
6-
$count$if$content._($scope),
5+
$if_content = _$.createRenderer(
6+
"<span> </span>",
7+
"D ",
8+
0,
9+
0,
10+
$count$if$content,
711
),
812
$if = _$.conditional(2, $if_content),
913
$show_effect = _$.effect("a0", ($scope, { 3: show }) =>

packages/runtime-tags/src/__tests__/fixtures/basic-conditional-counter/__snapshots__/dom.expected/template.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export const $template = "<button class=inc></button><button class=toggle></butt
22
export const $walks = /* get, over(1), get, over(1), replace, over(1) */" b b%bD";
33
import * as _$ from "@marko/runtime-tags/debug/dom";
44
const $count$if$content = /* @__PURE__ */_$.conditionalClosure("count", "#text/2", 0, ($scope, count) => _$.data($scope["#text/0"], count));
5-
const $if_content = /* @__PURE__ */_$.createRenderer("<span> </span>", /* next(1), get */"D ", 0, 0, $scope => $count$if$content._($scope));
5+
const $if_content = /* @__PURE__ */_$.createRenderer("<span> </span>", /* next(1), get */"D ", 0, 0, $count$if$content);
66
const $if = /* @__PURE__ */_$.conditional("#text/2", $if_content);
77
const $show_effect = _$.effect("__tests__/template.marko_0_show", ($scope, {
88
show

packages/runtime-tags/src/__tests__/fixtures/basic-execution-order/__snapshots__/dom.expected/template.hydrate.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
// size: 283 (min) 183 (brotli)
1+
// size: 273 (min) 182 (brotli)
22
const $message_text$if$content = _$.conditionalClosure(
33
3,
44
1,
55
0,
66
($scope, message_text) => _$.data($scope[0], message_text),
77
),
8-
$if_content = _$.createRenderer(" ", " ", 0, 0, ($scope) =>
9-
$message_text$if$content._($scope),
10-
),
8+
$if_content = _$.createRenderer(" ", " ", 0, 0, $message_text$if$content),
119
$message = _$.state(2, ($scope, message) =>
1210
$message_text($scope, message?.text),
1311
),

packages/runtime-tags/src/__tests__/fixtures/basic-execution-order/__snapshots__/dom.expected/template.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ export const $template = "<button>hide</button><!><!>";
22
export const $walks = /* get, over(1), replace, over(1) */" b%bD";
33
import * as _$ from "@marko/runtime-tags/debug/dom";
44
const $message_text$if$content = /* @__PURE__ */_$.conditionalClosure("message_text", "#text/1", 0, ($scope, message_text) => _$.data($scope["#text/0"], message_text));
5-
const $if_content = /* @__PURE__ */_$.createRenderer(" ", /* get */" ", 0, 0, $scope => $message_text$if$content._($scope));
5+
const $if_content = /* @__PURE__ */_$.createRenderer(" ", /* get */" ", 0, 0, $message_text$if$content);
66
const $message = /* @__PURE__ */_$.state("message/2", ($scope, message) => $message_text($scope, message?.text));
77
const $message_text = /* @__PURE__ */_$.value("message_text", $message_text$if$content);
88
const $if = /* @__PURE__ */_$.conditional("#text/1", $if_content);

packages/runtime-tags/src/__tests__/fixtures/basic-inert-collapsible-tree/__snapshots__/dom.expected/tags/comments.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const $comment$for$content = /* @__PURE__ */_$.value("comment", ($scope, comment
6666
$comment_text$for$content($scope, comment?.text);
6767
$comment_comments$for$content($scope, comment?.comments);
6868
});
69-
const $for_content = /* @__PURE__ */_$.createRenderer("<li><span> </span><button> </button><!></li>", /* get, next(2), get, out(1), get, next(1), get, out(1), replace */" E l D l%", $setup$for$content, $params2$for$content, $scope => $input_path$for$content._($scope));
69+
const $for_content = /* @__PURE__ */_$.createRenderer("<li><span> </span><button> </button><!></li>", /* get, next(2), get, out(1), get, next(1), get, out(1), replace */" E l D l%", $setup$for$content, $params2$for$content, $input_path$for$content);
7070
const $for = /* @__PURE__ */_$.loopOf("#ul/0", $for_content);
7171
export const $input_comments = /* @__PURE__ */_$.value("input_comments", ($scope, input_comments) => $for($scope, [input_comments]));
7272
export const $input = /* @__PURE__ */_$.value("input", ($scope, input) => {

packages/runtime-tags/src/__tests__/fixtures/basic-layout/__snapshots__/dom.expected/template.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export const $walks = /* beginChild, _layout_walks, endChild */`/${_layout_walks
33
import * as _$ from "@marko/runtime-tags/debug/dom";
44
import { $setup as _layout, $content as _layout_input_content, $template as _layout_template, $walks as _layout_walks } from "./tags/layout.marko";
55
const $name$layout$content = /* @__PURE__ */_$.dynamicClosureRead("name", ($scope, name) => _$.data($scope["#text/0"], name));
6-
const $layout_content = /* @__PURE__ */_$.createContent("__tests__/template.marko_1_renderer", "<h1>Hello <!></h1>", /* next(1), over(1), replace */"Db%", 0, 0, $scope => $name$layout$content($scope));
6+
const $layout_content = /* @__PURE__ */_$.createContent("__tests__/template.marko_1_renderer", "<h1>Hello <!></h1>", /* next(1), over(1), replace */"Db%", 0, 0, $name$layout$content);
77
export function $setup($scope) {
88
_layout($scope["#childScope/0"]);
99
_layout_input_content($scope["#childScope/0"], $layout_content($scope));

packages/runtime-tags/src/__tests__/fixtures/basic-nested-for/__snapshots__/dom.expected/template.hydrate.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// size: 555 (min) 327 (brotli)
1+
// size: 535 (min) 306 (brotli)
22
const $name = _$.value(3, ($scope, name) => _$.data($scope[0], name)),
33
$setup$for$content = ($scope) => {
44
$scope[0];
@@ -20,7 +20,7 @@ const $name = _$.value(3, ($scope, name) => _$.data($scope[0], name)),
2020
"/D l&",
2121
$setup$for$content,
2222
$params3$for$content,
23-
($scope) => $outer$for$content._($scope),
23+
$outer$for$content,
2424
),
2525
$for$for$content = _$.loopOf(0, $for_content2),
2626
$items$for$content = _$.loopClosure(2, 1, ($scope, items) =>
@@ -35,7 +35,7 @@ const $name = _$.value(3, ($scope, name) => _$.data($scope[0], name)),
3535
"D%D",
3636
0,
3737
$params2$for$content,
38-
($scope) => $items$for$content._($scope),
38+
$items$for$content,
3939
),
4040
$for = _$.loopOf(1, $for_content),
4141
$items_effect = _$.effect("b0", ($scope, { 2: items }) =>

0 commit comments

Comments
 (0)