diff --git a/src/compiler/compile/render_dom/Renderer.ts b/src/compiler/compile/render_dom/Renderer.ts index 058746d4e9..262297bd16 100644 --- a/src/compiler/compile/render_dom/Renderer.ts +++ b/src/compiler/compile/render_dom/Renderer.ts @@ -199,10 +199,10 @@ export default class Renderer { ? x`$$self.$$.dirty` : x`#dirty`) as Identifier | MemberExpression; - const get_bitmask = () => names.reduce((bits, name) => { + const get_bitmask = () => names.reduce((bitmask, name) => { const member = renderer.context_lookup.get(name); - if (!member) return bits; + if (!member) return bitmask; if (member.index.value === -1) { throw new Error(`unset index`); @@ -210,12 +210,15 @@ export default class Renderer { const value = member.index.value as number; const i = (value / 31) | 0; - const j = 1 << (value % 31); + const n = 1 << (value % 31); - bits[i] |= j; + if (!bitmask[i]) bitmask[i] = { n: 0, names: [] }; - return bits; - }, Array((this.context.length / 31) | 0).fill(0)); + bitmask[i].n |= n; + bitmask[i].names.push(name); + + return bitmask; + }, Array((this.context.length / 31) | 0).fill(null)); let operator; let left; @@ -233,14 +236,14 @@ export default class Renderer { if (renderer.context_overflow) { const expression = bitmask - .map((bits, i) => ({ bits, i })) - .filter(({ bits }) => bits) - .map(({ bits, i }) => x`${dirty}[${i}] & ${bits}`) + .map((b, i) => ({ b, i })) + .filter(({ b }) => b) + .map(({ b, i }) => x`${dirty}[${i}] & /* ${b.names.join(', ')} */ ${b.n}`) .reduce((lhs, rhs) => x`${lhs} | ${rhs}`); ({ operator, left, right } = expression); } else { - ({ operator, left, right } = x`${dirty} & ${bitmask[0] || 0}` as BinaryExpression); // TODO the `|| 0` case should never apply + ({ operator, left, right } = x`${dirty} & /* ${names.join(', ')} */ ${bitmask[0] ? bitmask[0].n : 0}` as BinaryExpression); // TODO the `: 0` case should never apply } return 'BinaryExpression'; diff --git a/test/js/samples/action-custom-event-handler/expected.js b/test/js/samples/action-custom-event-handler/expected.js index d21b16571d..2f863217b6 100644 --- a/test/js/samples/action-custom-event-handler/expected.js +++ b/test/js/samples/action-custom-event-handler/expected.js @@ -24,7 +24,7 @@ function create_fragment(ctx) { foo_action = foo.call(null, button, ctx[1]) || ({}); }, p(ctx, [dirty]) { - if (is_function(foo_action.update) && dirty & 1) foo_action.update.call(null, ctx[1]); + if (is_function(foo_action.update) && dirty & /* _id9uocqrtmw00_1_ */ 1) foo_action.update.call(null, ctx[1]); }, i: noop, o: noop, diff --git a/test/js/samples/bind-open/expected.js b/test/js/samples/bind-open/expected.js index e99c3bbd6b..a2bc78f5d9 100644 --- a/test/js/samples/bind-open/expected.js +++ b/test/js/samples/bind-open/expected.js @@ -28,7 +28,7 @@ function create_fragment(ctx) { details.open = ctx[0]; }, p(ctx, [dirty]) { - if (dirty & 1) { + if (dirty & /* _id9uocqrtmw00_1_ */ 1) { details.open = ctx[0]; } }, diff --git a/test/js/samples/capture-inject-dev-only/expected.js b/test/js/samples/capture-inject-dev-only/expected.js index d3b175862d..fd5ee97ce3 100644 --- a/test/js/samples/capture-inject-dev-only/expected.js +++ b/test/js/samples/capture-inject-dev-only/expected.js @@ -38,9 +38,9 @@ function create_fragment(ctx) { set_input_value(input, ctx[0]); }, p(ctx, [dirty]) { - if (dirty & 1) set_data(t0, ctx[0]); + if (dirty & /* _id9uocqrtmw00_1_ */ 1) set_data(t0, ctx[0]); - if (dirty & 1 && input.value !== ctx[0]) { + if (dirty & /* _id9uocqrtmw00_1_ */ 1 && input.value !== ctx[0]) { set_input_value(input, ctx[0]); } }, diff --git a/test/js/samples/collapses-text-around-comments/expected.js b/test/js/samples/collapses-text-around-comments/expected.js index 9f2ab90797..59bf38e900 100644 --- a/test/js/samples/collapses-text-around-comments/expected.js +++ b/test/js/samples/collapses-text-around-comments/expected.js @@ -35,7 +35,7 @@ function create_fragment(ctx) { append(p, t); }, p(ctx, [dirty]) { - if (dirty & 1) set_data(t, ctx[0]); + if (dirty & /* _id9uocqrtmw00_1_ */ 1) set_data(t, ctx[0]); }, i: noop, o: noop, diff --git a/test/js/samples/component-static-var/expected.js b/test/js/samples/component-static-var/expected.js index 4785fc9527..f5ec221c02 100644 --- a/test/js/samples/component-static-var/expected.js +++ b/test/js/samples/component-static-var/expected.js @@ -48,10 +48,10 @@ function create_fragment(ctx) { }, p(ctx, [dirty]) { const bar_changes = {}; - if (dirty & 1) bar_changes.x = ctx[0]; + if (dirty & /* _id9uocqrtmw00_1_ */ 1) bar_changes.x = ctx[0]; bar.$set(bar_changes); - if (dirty & 1 && input.value !== ctx[0]) { + if (dirty & /* _id9uocqrtmw00_1_ */ 1 && input.value !== ctx[0]) { set_input_value(input, ctx[0]); } }, diff --git a/test/js/samples/component-store-access-invalidate/expected.js b/test/js/samples/component-store-access-invalidate/expected.js index 639404b4bb..e1dae76e89 100644 --- a/test/js/samples/component-store-access-invalidate/expected.js +++ b/test/js/samples/component-store-access-invalidate/expected.js @@ -29,7 +29,7 @@ function create_fragment(ctx) { append(h1, t); }, p(ctx, [dirty]) { - if (dirty & 1) set_data(t, ctx[0]); + if (dirty & /* _id9uocqrtmw00_1_ */ 1) set_data(t, ctx[0]); }, i: noop, o: noop, diff --git a/test/js/samples/component-store-reassign-invalidate/expected.js b/test/js/samples/component-store-reassign-invalidate/expected.js index 9876626cf9..ff30f3a2a8 100644 --- a/test/js/samples/component-store-reassign-invalidate/expected.js +++ b/test/js/samples/component-store-reassign-invalidate/expected.js @@ -40,7 +40,7 @@ function create_fragment(ctx) { insert(target, button, anchor); }, p(ctx, [dirty]) { - if (dirty & 2) set_data(t0, ctx[1]); + if (dirty & /* _id9uocqrtmw00_1_ */ 2) set_data(t0, ctx[1]); }, i: noop, o: noop, diff --git a/test/js/samples/data-attribute/expected.js b/test/js/samples/data-attribute/expected.js index d7edc739e8..424799fdf3 100644 --- a/test/js/samples/data-attribute/expected.js +++ b/test/js/samples/data-attribute/expected.js @@ -30,7 +30,7 @@ function create_fragment(ctx) { insert(target, div1, anchor); }, p(ctx, [dirty]) { - if (dirty & 1) { + if (dirty & /* _id9uocqrtmw00_1_ */ 1) { attr(div1, "data-foo", ctx[0]); } }, diff --git a/test/js/samples/debug-empty/expected.js b/test/js/samples/debug-empty/expected.js index 0f55de4df9..8865fb332e 100644 --- a/test/js/samples/debug-empty/expected.js +++ b/test/js/samples/debug-empty/expected.js @@ -45,7 +45,7 @@ function create_fragment(ctx) { insert_dev(target, t3, anchor); }, p: function update(ctx, [dirty]) { - if (dirty & 1) set_data_dev(t1, ctx[0]); + if (dirty & /* _id9uocqrtmw00_1_ */ 1) set_data_dev(t1, ctx[0]); debugger; }, i: noop, diff --git a/test/js/samples/debug-foo-bar-baz-things/expected.js b/test/js/samples/debug-foo-bar-baz-things/expected.js index 11ff13bb46..0dfe1a0829 100644 --- a/test/js/samples/debug-foo-bar-baz-things/expected.js +++ b/test/js/samples/debug-foo-bar-baz-things/expected.js @@ -54,9 +54,9 @@ function create_each_block(ctx) { insert_dev(target, t1, anchor); }, p: function update(ctx, dirty) { - if (dirty & 1 && t0_value !== (t0_value = ctx[4].name + "")) set_data_dev(t0, t0_value); + if (dirty & /* _id9uocqrtmw00_1_ */ 1 && t0_value !== (t0_value = ctx[4].name + "")) set_data_dev(t0, t0_value); - if (dirty & 15) { + if (dirty & /* _id9uocqrtmw00_1_ */ 15) { const foo = ctx[1]; const bar = ctx[2]; const baz = ctx[3]; @@ -120,7 +120,7 @@ function create_fragment(ctx) { append_dev(p, t2); }, p: function update(ctx, [dirty]) { - if (dirty & 1) { + if (dirty & /* _id9uocqrtmw00_1_ */ 1) { each_value = ctx[0]; let i; @@ -143,7 +143,7 @@ function create_fragment(ctx) { each_blocks.length = each_value.length; } - if (dirty & 2) set_data_dev(t2, ctx[1]); + if (dirty & /* _id9uocqrtmw00_1_ */ 2) set_data_dev(t2, ctx[1]); }, i: noop, o: noop, diff --git a/test/js/samples/debug-foo/expected.js b/test/js/samples/debug-foo/expected.js index a2b19de8cd..21fe13073e 100644 --- a/test/js/samples/debug-foo/expected.js +++ b/test/js/samples/debug-foo/expected.js @@ -51,9 +51,9 @@ function create_each_block(ctx) { insert_dev(target, t1, anchor); }, p: function update(ctx, dirty) { - if (dirty & 1 && t0_value !== (t0_value = ctx[2].name + "")) set_data_dev(t0, t0_value); + if (dirty & /* _id9uocqrtmw00_1_ */ 1 && t0_value !== (t0_value = ctx[2].name + "")) set_data_dev(t0, t0_value); - if (dirty & 2) { + if (dirty & /* _id9uocqrtmw00_1_ */ 2) { const foo = ctx[1]; console.log({ foo }); debugger; @@ -114,7 +114,7 @@ function create_fragment(ctx) { append_dev(p, t2); }, p: function update(ctx, [dirty]) { - if (dirty & 1) { + if (dirty & /* _id9uocqrtmw00_1_ */ 1) { each_value = ctx[0]; let i; @@ -137,7 +137,7 @@ function create_fragment(ctx) { each_blocks.length = each_value.length; } - if (dirty & 2) set_data_dev(t2, ctx[1]); + if (dirty & /* _id9uocqrtmw00_1_ */ 2) set_data_dev(t2, ctx[1]); }, i: noop, o: noop, diff --git a/test/js/samples/debug-hoisted/expected.js b/test/js/samples/debug-hoisted/expected.js index 37b983c8cc..324c02e2c5 100644 --- a/test/js/samples/debug-hoisted/expected.js +++ b/test/js/samples/debug-hoisted/expected.js @@ -24,7 +24,7 @@ function create_fragment(ctx) { }, m: noop, p: function update(ctx, [dirty]) { - if (dirty & 3) { + if (dirty & /* _id9uocqrtmw00_1_ */ 3) { const obj = ctx[0]; const kobzol = ctx[1]; console.log({ obj, kobzol }); diff --git a/test/js/samples/debug-no-dependencies/expected.js b/test/js/samples/debug-no-dependencies/expected.js index 28c5b35dc5..1c1835292c 100644 --- a/test/js/samples/debug-no-dependencies/expected.js +++ b/test/js/samples/debug-no-dependencies/expected.js @@ -89,7 +89,7 @@ function create_fragment(ctx) { insert_dev(target, each_1_anchor, anchor); }, p: function update(ctx, [dirty]) { - if (dirty & 0) { + if (dirty & /* _id9uocqrtmw00_1_ */ 0) { each_value = things; let i; diff --git a/test/js/samples/deconflict-builtins/expected.js b/test/js/samples/deconflict-builtins/expected.js index 9e4763be65..5436bbefcf 100644 --- a/test/js/samples/deconflict-builtins/expected.js +++ b/test/js/samples/deconflict-builtins/expected.js @@ -36,7 +36,7 @@ function create_each_block(ctx) { append(span, t); }, p(ctx, dirty) { - if (dirty & 1 && t_value !== (t_value = ctx[1] + "")) set_data(t, t_value); + if (dirty & /* _id9uocqrtmw00_1_ */ 1 && t_value !== (t_value = ctx[1] + "")) set_data(t, t_value); }, d(detaching) { if (detaching) detach(span); @@ -69,7 +69,7 @@ function create_fragment(ctx) { insert(target, each_1_anchor, anchor); }, p(ctx, [dirty]) { - if (dirty & 1) { + if (dirty & /* _id9uocqrtmw00_1_ */ 1) { each_value = ctx[0]; let i; diff --git a/test/js/samples/dev-warning-missing-data-computed/expected.js b/test/js/samples/dev-warning-missing-data-computed/expected.js index c18817c812..c5050dc4b6 100644 --- a/test/js/samples/dev-warning-missing-data-computed/expected.js +++ b/test/js/samples/dev-warning-missing-data-computed/expected.js @@ -42,8 +42,8 @@ function create_fragment(ctx) { append_dev(p, t2); }, p: function update(ctx, [dirty]) { - if (dirty & 1 && t0_value !== (t0_value = Math.max(0, ctx[0]) + "")) set_data_dev(t0, t0_value); - if (dirty & 2) set_data_dev(t2, ctx[1]); + if (dirty & /* _id9uocqrtmw00_1_ */ 1 && t0_value !== (t0_value = Math.max(0, ctx[0]) + "")) set_data_dev(t0, t0_value); + if (dirty & /* _id9uocqrtmw00_1_ */ 2) set_data_dev(t2, ctx[1]); }, i: noop, o: noop, @@ -86,7 +86,7 @@ function instance($$self, $$props, $$invalidate) { }; $$self.$$.update = () => { - if ($$self.$$.dirty & 1) { + if ($$self.$$.dirty & /* _id9uocqrtmw00_1_ */ 1) { $: $$invalidate(1, bar = foo * 2); } }; diff --git a/test/js/samples/each-block-array-literal/expected.js b/test/js/samples/each-block-array-literal/expected.js index b47b1cca95..ee0c9a3b4e 100644 --- a/test/js/samples/each-block-array-literal/expected.js +++ b/test/js/samples/each-block-array-literal/expected.js @@ -36,7 +36,7 @@ function create_each_block(ctx) { append(span, t); }, p(ctx, dirty) { - if (dirty & 31 && t_value !== (t_value = ctx[5] + "")) set_data(t, t_value); + if (dirty & /* _id9uocqrtmw00_1_ */ 31 && t_value !== (t_value = ctx[5] + "")) set_data(t, t_value); }, d(detaching) { if (detaching) detach(span); @@ -69,7 +69,7 @@ function create_fragment(ctx) { insert(target, each_1_anchor, anchor); }, p(ctx, [dirty]) { - if (dirty & 31) { + if (dirty & /* _id9uocqrtmw00_1_ */ 31) { each_value = [ctx[0], ctx[1], ctx[2], ctx[3], ctx[4]]; let i; diff --git a/test/js/samples/each-block-changed-check/expected.js b/test/js/samples/each-block-changed-check/expected.js index f98c738203..aed0fae12a 100644 --- a/test/js/samples/each-block-changed-check/expected.js +++ b/test/js/samples/each-block-changed-check/expected.js @@ -70,9 +70,9 @@ function create_each_block(ctx) { html_tag.m(div); }, p(ctx, dirty) { - if (dirty & 1 && t2_value !== (t2_value = ctx[4].author + "")) set_data(t2, t2_value); - if (dirty & 7 && t4_value !== (t4_value = ctx[1](ctx[4].time, ctx[2]) + "")) set_data(t4, t4_value); - if (dirty & 1 && raw_value !== (raw_value = ctx[4].html + "")) html_tag.p(raw_value); + if (dirty & /* _id9uocqrtmw00_1_ */ 1 && t2_value !== (t2_value = ctx[4].author + "")) set_data(t2, t2_value); + if (dirty & /* _id9uocqrtmw00_1_ */ 7 && t4_value !== (t4_value = ctx[1](ctx[4].time, ctx[2]) + "")) set_data(t4, t4_value); + if (dirty & /* _id9uocqrtmw00_1_ */ 1 && raw_value !== (raw_value = ctx[4].html + "")) html_tag.p(raw_value); }, d(detaching) { if (detaching) detach(div); @@ -111,7 +111,7 @@ function create_fragment(ctx) { append(p, t1); }, p(ctx, [dirty]) { - if (dirty & 7) { + if (dirty & /* _id9uocqrtmw00_1_ */ 7) { each_value = ctx[0]; let i; @@ -134,7 +134,7 @@ function create_fragment(ctx) { each_blocks.length = each_value.length; } - if (dirty & 8) set_data(t1, ctx[3]); + if (dirty & /* _id9uocqrtmw00_1_ */ 8) set_data(t1, ctx[3]); }, i: noop, o: noop, diff --git a/test/js/samples/each-block-keyed-animated/expected.js b/test/js/samples/each-block-keyed-animated/expected.js index 4aa238963f..7ffde4a8b8 100644 --- a/test/js/samples/each-block-keyed-animated/expected.js +++ b/test/js/samples/each-block-keyed-animated/expected.js @@ -44,7 +44,7 @@ function create_each_block(key_1, ctx) { append(div, t); }, p(ctx, dirty) { - if (dirty & 1 && t_value !== (t_value = ctx[1].name + "")) set_data(t, t_value); + if (dirty & /* _id9uocqrtmw00_1_ */ 1 && t_value !== (t_value = ctx[1].name + "")) set_data(t, t_value); }, r() { rect = div.getBoundingClientRect(); diff --git a/test/js/samples/each-block-keyed/expected.js b/test/js/samples/each-block-keyed/expected.js index aa949e95b9..23b294afd9 100644 --- a/test/js/samples/each-block-keyed/expected.js +++ b/test/js/samples/each-block-keyed/expected.js @@ -40,7 +40,7 @@ function create_each_block(key_1, ctx) { append(div, t); }, p(ctx, dirty) { - if (dirty & 1 && t_value !== (t_value = ctx[1].name + "")) set_data(t, t_value); + if (dirty & /* _id9uocqrtmw00_1_ */ 1 && t_value !== (t_value = ctx[1].name + "")) set_data(t, t_value); }, d(detaching) { if (detaching) detach(div); diff --git a/test/js/samples/event-handler-dynamic/expected.js b/test/js/samples/event-handler-dynamic/expected.js index adf88c5e08..4d1e9eb6b6 100644 --- a/test/js/samples/event-handler-dynamic/expected.js +++ b/test/js/samples/event-handler-dynamic/expected.js @@ -63,7 +63,7 @@ function create_fragment(ctx) { }, p(new_ctx, [dirty]) { ctx = new_ctx; - if (dirty & 2) set_data(t4, ctx[1]); + if (dirty & /* _id9uocqrtmw00_1_ */ 2) set_data(t4, ctx[1]); }, i: noop, o: noop, diff --git a/test/js/samples/inline-style-optimized-multiple/expected.js b/test/js/samples/inline-style-optimized-multiple/expected.js index f9ff9721ba..6af193263a 100644 --- a/test/js/samples/inline-style-optimized-multiple/expected.js +++ b/test/js/samples/inline-style-optimized-multiple/expected.js @@ -23,11 +23,11 @@ function create_fragment(ctx) { insert(target, div, anchor); }, p(ctx, [dirty]) { - if (dirty & 1) { + if (dirty & /* _id9uocqrtmw00_1_ */ 1) { set_style(div, "color", ctx[0]); } - if (dirty & 6) { + if (dirty & /* _id9uocqrtmw00_1_ */ 6) { set_style(div, "transform", "translate(" + ctx[1] + "px," + ctx[2] + "px)"); } }, diff --git a/test/js/samples/inline-style-optimized-url/expected.js b/test/js/samples/inline-style-optimized-url/expected.js index 806ced193f..627f22d693 100644 --- a/test/js/samples/inline-style-optimized-url/expected.js +++ b/test/js/samples/inline-style-optimized-url/expected.js @@ -22,7 +22,7 @@ function create_fragment(ctx) { insert(target, div, anchor); }, p(ctx, [dirty]) { - if (dirty & 1) { + if (dirty & /* _id9uocqrtmw00_1_ */ 1) { set_style(div, "background", "url(data:image/png;base64," + ctx[0] + ")"); } }, diff --git a/test/js/samples/inline-style-optimized/expected.js b/test/js/samples/inline-style-optimized/expected.js index d3f8e789be..948735aace 100644 --- a/test/js/samples/inline-style-optimized/expected.js +++ b/test/js/samples/inline-style-optimized/expected.js @@ -22,7 +22,7 @@ function create_fragment(ctx) { insert(target, div, anchor); }, p(ctx, [dirty]) { - if (dirty & 1) { + if (dirty & /* _id9uocqrtmw00_1_ */ 1) { set_style(div, "color", ctx[0]); } }, diff --git a/test/js/samples/inline-style-unoptimized/expected.js b/test/js/samples/inline-style-unoptimized/expected.js index 48da85ede9..5d55aa84f2 100644 --- a/test/js/samples/inline-style-unoptimized/expected.js +++ b/test/js/samples/inline-style-unoptimized/expected.js @@ -31,11 +31,11 @@ function create_fragment(ctx) { insert(target, div1, anchor); }, p(ctx, [dirty]) { - if (dirty & 1) { + if (dirty & /* _id9uocqrtmw00_1_ */ 1) { attr(div0, "style", ctx[0]); } - if (dirty & 6 && div1_style_value !== (div1_style_value = "" + (ctx[1] + ": " + ctx[2]))) { + if (dirty & /* _id9uocqrtmw00_1_ */ 6 && div1_style_value !== (div1_style_value = "" + (ctx[1] + ": " + ctx[2]))) { attr(div1, "style", div1_style_value); } }, diff --git a/test/js/samples/input-no-initial-value/expected.js b/test/js/samples/input-no-initial-value/expected.js index 0ac875a15a..24e2ede21f 100644 --- a/test/js/samples/input-no-initial-value/expected.js +++ b/test/js/samples/input-no-initial-value/expected.js @@ -41,7 +41,7 @@ function create_fragment(ctx) { append(form, button); }, p(ctx, [dirty]) { - if (dirty & 1 && input.value !== ctx[0]) { + if (dirty & /* _id9uocqrtmw00_1_ */ 1 && input.value !== ctx[0]) { set_input_value(input, ctx[0]); } }, diff --git a/test/js/samples/input-range/expected.js b/test/js/samples/input-range/expected.js index 4693a0b707..38ce1087dc 100644 --- a/test/js/samples/input-range/expected.js +++ b/test/js/samples/input-range/expected.js @@ -29,7 +29,7 @@ function create_fragment(ctx) { set_input_value(input, ctx[0]); }, p(ctx, [dirty]) { - if (dirty & 1) { + if (dirty & /* _id9uocqrtmw00_1_ */ 1) { set_input_value(input, ctx[0]); } }, diff --git a/test/js/samples/input-without-blowback-guard/expected.js b/test/js/samples/input-without-blowback-guard/expected.js index 5a730a6973..02b3463be1 100644 --- a/test/js/samples/input-without-blowback-guard/expected.js +++ b/test/js/samples/input-without-blowback-guard/expected.js @@ -26,7 +26,7 @@ function create_fragment(ctx) { input.checked = ctx[0]; }, p(ctx, [dirty]) { - if (dirty & 1) { + if (dirty & /* _id9uocqrtmw00_1_ */ 1) { input.checked = ctx[0]; } }, diff --git a/test/js/samples/instrumentation-script-if-no-block/expected.js b/test/js/samples/instrumentation-script-if-no-block/expected.js index 74d9ab46b8..893c331b44 100644 --- a/test/js/samples/instrumentation-script-if-no-block/expected.js +++ b/test/js/samples/instrumentation-script-if-no-block/expected.js @@ -40,7 +40,7 @@ function create_fragment(ctx) { append(p, t3); }, p(ctx, [dirty]) { - if (dirty & 1) set_data(t3, ctx[0]); + if (dirty & /* _id9uocqrtmw00_1_ */ 1) set_data(t3, ctx[0]); }, i: noop, o: noop, diff --git a/test/js/samples/instrumentation-script-x-equals-x/expected.js b/test/js/samples/instrumentation-script-x-equals-x/expected.js index 0a1e271cbe..4b3f7a2c2d 100644 --- a/test/js/samples/instrumentation-script-x-equals-x/expected.js +++ b/test/js/samples/instrumentation-script-x-equals-x/expected.js @@ -41,7 +41,7 @@ function create_fragment(ctx) { append(p, t3); }, p(ctx, [dirty]) { - if (dirty & 1 && t3_value !== (t3_value = ctx[0].length + "")) set_data(t3, t3_value); + if (dirty & /* _id9uocqrtmw00_1_ */ 1 && t3_value !== (t3_value = ctx[0].length + "")) set_data(t3, t3_value); }, i: noop, o: noop, diff --git a/test/js/samples/instrumentation-template-if-no-block/expected.js b/test/js/samples/instrumentation-template-if-no-block/expected.js index 4452b54aac..291fc9aa33 100644 --- a/test/js/samples/instrumentation-template-if-no-block/expected.js +++ b/test/js/samples/instrumentation-template-if-no-block/expected.js @@ -40,7 +40,7 @@ function create_fragment(ctx) { append(p, t3); }, p(ctx, [dirty]) { - if (dirty & 1) set_data(t3, ctx[0]); + if (dirty & /* _id9uocqrtmw00_1_ */ 1) set_data(t3, ctx[0]); }, i: noop, o: noop, diff --git a/test/js/samples/instrumentation-template-x-equals-x/expected.js b/test/js/samples/instrumentation-template-x-equals-x/expected.js index 474d78ca7c..b3e5f59ea3 100644 --- a/test/js/samples/instrumentation-template-x-equals-x/expected.js +++ b/test/js/samples/instrumentation-template-x-equals-x/expected.js @@ -41,7 +41,7 @@ function create_fragment(ctx) { append(p, t3); }, p(ctx, [dirty]) { - if (dirty & 1 && t3_value !== (t3_value = ctx[0].length + "")) set_data(t3, t3_value); + if (dirty & /* _id9uocqrtmw00_1_ */ 1 && t3_value !== (t3_value = ctx[0].length + "")) set_data(t3, t3_value); }, i: noop, o: noop, diff --git a/test/js/samples/media-bindings/expected.js b/test/js/samples/media-bindings/expected.js index dcca20b248..b5b8450216 100644 --- a/test/js/samples/media-bindings/expected.js +++ b/test/js/samples/media-bindings/expected.js @@ -68,19 +68,19 @@ function create_fragment(ctx) { } }, p(ctx, [dirty]) { - if (!audio_updating && dirty & 8 && !isNaN(ctx[3])) { + if (!audio_updating && dirty & /* _id9uocqrtmw00_1_ */ 8 && !isNaN(ctx[3])) { audio.currentTime = ctx[3]; } - if (dirty & 32 && audio_is_paused !== (audio_is_paused = ctx[5])) { + if (dirty & /* _id9uocqrtmw00_1_ */ 32 && audio_is_paused !== (audio_is_paused = ctx[5])) { audio[audio_is_paused ? "pause" : "play"](); } - if (dirty & 64 && !isNaN(ctx[6])) { + if (dirty & /* _id9uocqrtmw00_1_ */ 64 && !isNaN(ctx[6])) { audio.volume = ctx[6]; } - if (dirty & 128 && !isNaN(ctx[7])) { + if (dirty & /* _id9uocqrtmw00_1_ */ 128 && !isNaN(ctx[7])) { audio.playbackRate = ctx[7]; } diff --git a/test/js/samples/reactive-values-non-topologically-ordered/expected.js b/test/js/samples/reactive-values-non-topologically-ordered/expected.js index a98e81293f..2c1f2ace9f 100644 --- a/test/js/samples/reactive-values-non-topologically-ordered/expected.js +++ b/test/js/samples/reactive-values-non-topologically-ordered/expected.js @@ -11,11 +11,11 @@ function instance($$self, $$props, $$invalidate) { }; $$self.$$.update = () => { - if ($$self.$$.dirty & 1) { + if ($$self.$$.dirty & /* _id9uocqrtmw00_1_ */ 1) { $: $$invalidate(2, b = x); } - if ($$self.$$.dirty & 4) { + if ($$self.$$.dirty & /* _id9uocqrtmw00_1_ */ 4) { $: a = b; } }; diff --git a/test/js/samples/reactive-values-non-writable-dependencies/expected.js b/test/js/samples/reactive-values-non-writable-dependencies/expected.js index 9c29f8510e..a12d9cb697 100644 --- a/test/js/samples/reactive-values-non-writable-dependencies/expected.js +++ b/test/js/samples/reactive-values-non-writable-dependencies/expected.js @@ -11,7 +11,7 @@ function instance($$self, $$props, $$invalidate) { }; $$self.$$.update = () => { - if ($$self.$$.dirty & 3) { + if ($$self.$$.dirty & /* _id9uocqrtmw00_1_ */ 3) { $: console.log("max", Math.max(a, b)); } }; diff --git a/test/js/samples/select-dynamic-value/expected.js b/test/js/samples/select-dynamic-value/expected.js index 8f309aaed2..44e343c5ef 100644 --- a/test/js/samples/select-dynamic-value/expected.js +++ b/test/js/samples/select-dynamic-value/expected.js @@ -44,7 +44,7 @@ function create_fragment(ctx) { } }, p(ctx, [dirty]) { - if (dirty & 1 && select_value_value !== (select_value_value = ctx[0])) { + if (dirty & /* _id9uocqrtmw00_1_ */ 1 && select_value_value !== (select_value_value = ctx[0])) { for (var i = 0; i < select.options.length; i += 1) { var option = select.options[i]; diff --git a/test/js/samples/src-attribute-check/expected.js b/test/js/samples/src-attribute-check/expected.js index ab73564ab3..7d04c4a350 100644 --- a/test/js/samples/src-attribute-check/expected.js +++ b/test/js/samples/src-attribute-check/expected.js @@ -45,11 +45,11 @@ function create_fragment(ctx) { insert(target, img1, anchor); }, p(ctx, [dirty]) { - if (dirty & 1 && img0.src !== (img0_src_value = ctx[0])) { + if (dirty & /* _id9uocqrtmw00_1_ */ 1 && img0.src !== (img0_src_value = ctx[0])) { attr(img0, "src", img0_src_value); } - if (dirty & 2 && img1.src !== (img1_src_value = "" + (ctx[1] + ".jpg"))) { + if (dirty & /* _id9uocqrtmw00_1_ */ 2 && img1.src !== (img1_src_value = "" + (ctx[1] + ".jpg"))) { attr(img1, "src", img1_src_value); } }, diff --git a/test/js/samples/title/expected.js b/test/js/samples/title/expected.js index 3d29c496a4..3bc02f60c6 100644 --- a/test/js/samples/title/expected.js +++ b/test/js/samples/title/expected.js @@ -9,7 +9,7 @@ function create_fragment(ctx) { c: noop, m: noop, p(ctx, [dirty]) { - if (dirty & 1 && title_value !== (title_value = "a " + ctx[0] + " title")) { + if (dirty & /* _id9uocqrtmw00_1_ */ 1 && title_value !== (title_value = "a " + ctx[0] + " title")) { document.title = title_value; } }, diff --git a/test/js/samples/unchanged-expression/expected.js b/test/js/samples/unchanged-expression/expected.js index eee0079a71..0c0b779270 100644 --- a/test/js/samples/unchanged-expression/expected.js +++ b/test/js/samples/unchanged-expression/expected.js @@ -57,7 +57,7 @@ function create_fragment(ctx) { append(p3, t9); }, p(ctx, [dirty]) { - if (dirty & 1) set_data(t9, ctx[0]); + if (dirty & /* _id9uocqrtmw00_1_ */ 1) set_data(t9, ctx[0]); }, i: noop, o: noop, diff --git a/test/js/samples/unreferenced-state-not-invalidated/expected.js b/test/js/samples/unreferenced-state-not-invalidated/expected.js index 5fa679aecf..c0f6da2928 100644 --- a/test/js/samples/unreferenced-state-not-invalidated/expected.js +++ b/test/js/samples/unreferenced-state-not-invalidated/expected.js @@ -28,7 +28,7 @@ function create_fragment(ctx) { append(p, t); }, p(ctx, [dirty]) { - if (dirty & 1) set_data(t, ctx[0]); + if (dirty & /* _id9uocqrtmw00_1_ */ 1) set_data(t, ctx[0]); }, i: noop, o: noop, @@ -58,7 +58,7 @@ function instance($$self, $$props, $$invalidate) { let y; $$self.$$.update = () => { - if ($$self.$$.dirty & 2) { + if ($$self.$$.dirty & /* _id9uocqrtmw00_1_ */ 2) { $: $$invalidate(0, y = b * 2); } }; diff --git a/test/js/samples/video-bindings/expected.js b/test/js/samples/video-bindings/expected.js index 4149d95059..71ab2c545d 100644 --- a/test/js/samples/video-bindings/expected.js +++ b/test/js/samples/video-bindings/expected.js @@ -48,7 +48,7 @@ function create_fragment(ctx) { video_resize_listener = add_resize_listener(video, ctx[4].bind(video)); }, p(ctx, [dirty]) { - if (!video_updating && dirty & 1 && !isNaN(ctx[0])) { + if (!video_updating && dirty & /* _id9uocqrtmw00_1_ */ 1 && !isNaN(ctx[0])) { video.currentTime = ctx[0]; } diff --git a/test/js/samples/window-binding-scroll/expected.js b/test/js/samples/window-binding-scroll/expected.js index 886c065333..11e7160646 100644 --- a/test/js/samples/window-binding-scroll/expected.js +++ b/test/js/samples/window-binding-scroll/expected.js @@ -47,14 +47,14 @@ function create_fragment(ctx) { append(p, t1); }, p(ctx, [dirty]) { - if (dirty & 1 && !scrolling) { + if (dirty & /* _id9uocqrtmw00_1_ */ 1 && !scrolling) { scrolling = true; clearTimeout(scrolling_timeout); scrollTo(window.pageXOffset, ctx[0]); scrolling_timeout = setTimeout(clear_scrolling, 100); } - if (dirty & 1) set_data(t1, ctx[0]); + if (dirty & /* _id9uocqrtmw00_1_ */ 1) set_data(t1, ctx[0]); }, i: noop, o: noop,