Commit 58b466d
perf: inline references to constant primitive
In the transform phase, replace every reference to a `<const>` whose value
is a compile-time primitive (string, number, bigint, boolean, null, or
undefined) with the literal value. Downstream evaluation can then fold
larger expressions and bake the result into the static template output,
and the now-unreferenced binding is pruned entirely.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G1bgkqJCLUsEz3xsossMCN<const> tags1 parent bc20394 commit 58b466d
127 files changed
Lines changed: 561 additions & 500 deletions
File tree
- .changeset
- packages/runtime-tags/src
- __tests__
- fixtures-interop
- ambiguous-tags-and-components-dir
- class
- custom-tag-parameters-from-args
- interop-basic-class-to-tags
- interop-basic-tags-to-class
- interop-class-in-components-in-tags-dir
- interop-class-to-tags-import
- interop-event-handler-render-body-tags-to-class
- interop-events-tags-to-class
- interop-nested-attr-tags-class-to-tags
- interop-nested-class-to-tags
- interop-nested-tags-to-class
- interop-stateless-tags-to-class
- interop-tag-params-class-to-tags
- interop-tag-params-tags-to-class
- lazy-class-child-event
- lazy-class-child-idle
- lazy-class-child-ssr-toggle
- lazy-class-child-ssr
- lazy-class-child-unmount-before-load
- lazy-class-child-visible
- let
- fixtures
- assign-to-owner-closure
- attr-class-delimited-shapes
- __snapshots__
- basic-unused-ref/__snapshots__
- bound-attr-computed-key/__snapshots__
- const-tag-fold
- __snapshots__
- const-tag-hoist-error/__snapshots__
- const-tag/__snapshots__
- controllable-select-dynamic-spread
- __snapshots__
- debug-tag
- __snapshots__
- declared-alias-closure
- __snapshots__
- destructure-and-reference-input/__snapshots__
- destructure-and-reference-unprovided-input/__snapshots__
- destructure-input/__snapshots__
- dynamic-closure-with-function/__snapshots__
- dynamic-closures
- __snapshots__
- dynamic-tag-name/__snapshots__
- hoist-only/__snapshots__
- import-types/__snapshots__
- known-define-tag-empty-section-closure
- __snapshots__
- log-tag/__snapshots__
- pure-signal-resume-function
- __snapshots__
- return-tag-no-state/__snapshots__
- tag-param-if-closure
- __snapshots__
- try-tag-closure/__snapshots__
- translator/core
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
0 commit comments