@@ -1264,8 +1264,8 @@ pub struct I18nStartOp<'a> {
12641264 pub slot : Option < SlotId > ,
12651265 /// I18n context.
12661266 pub context : Option < XrefId > ,
1267- /// Message.
1268- pub message : Option < XrefId > ,
1267+ /// Message instance ID for metadata lookup .
1268+ pub message : Option < u32 > ,
12691269 /// I18n placeholder data (start_name and close_name for i18n blocks).
12701270 pub i18n_placeholder : Option < I18nPlaceholder < ' a > > ,
12711271 /// Sub-template index for nested templates inside i18n blocks.
@@ -1289,8 +1289,8 @@ pub struct I18nOp<'a> {
12891289 pub slot : Option < SlotId > ,
12901290 /// I18n context.
12911291 pub context : Option < XrefId > ,
1292- /// Message.
1293- pub message : Option < XrefId > ,
1292+ /// Message instance ID for metadata lookup .
1293+ pub message : Option < u32 > ,
12941294 /// I18n placeholder data (start_name and close_name for i18n blocks).
12951295 pub i18n_placeholder : Option < I18nPlaceholder < ' a > > ,
12961296 /// Sub-template index for nested templates inside i18n blocks.
@@ -1321,8 +1321,8 @@ pub struct IcuStartOp<'a> {
13211321 pub xref : XrefId ,
13221322 /// I18n context.
13231323 pub context : Option < XrefId > ,
1324- /// Message.
1325- pub message : Option < XrefId > ,
1324+ /// Message instance ID for metadata lookup .
1325+ pub message : Option < u32 > ,
13261326 /// ICU placeholder.
13271327 pub icu_placeholder : Option < Atom < ' a > > ,
13281328}
@@ -1365,8 +1365,11 @@ pub struct I18nContextOp<'a> {
13651365 /// Maps ICU placeholder names to their formatted string values.
13661366 /// These are string literals like "Hello ${�0�}!" generated from IcuPlaceholderOp.
13671367 pub icu_placeholder_literals : oxc_allocator:: HashMap < ' a , Atom < ' a > , Atom < ' a > > ,
1368- /// Message reference.
1369- pub message : Option < XrefId > ,
1368+ /// Message instance ID reference (for metadata lookup).
1369+ ///
1370+ /// Stores the i18n message's instance_id (not an XrefId) to look up metadata
1371+ /// in the job's i18n_message_metadata map.
1372+ pub message : Option < u32 > ,
13701373}
13711374
13721375/// I18n attributes on an element.
@@ -1439,8 +1442,13 @@ pub struct ExtractedAttributeOp<'a> {
14391442 pub security_context : SecurityContext ,
14401443 /// Whether expression is truthy.
14411444 pub truthy_expression : bool ,
1442- /// i18n message (for i18n attributes).
1443- pub i18n_message : Option < XrefId > ,
1445+ /// i18n message instance ID (for i18n attributes).
1446+ ///
1447+ /// This stores the i18n message's instance_id rather than an XrefId to avoid
1448+ /// allocating xrefs during ingest. Angular TS stores a direct object reference
1449+ /// to the i18n.Message; we use the instance_id as a dedup key instead.
1450+ /// The actual xref for the i18n context is allocated later in create_i18n_contexts.
1451+ pub i18n_message : Option < u32 > ,
14441452 /// i18n context.
14451453 pub i18n_context : Option < XrefId > ,
14461454 /// Trusted value function for security-sensitive constant attributes.
@@ -1522,8 +1530,10 @@ pub struct PropertyOp<'a> {
15221530 pub is_structural : bool ,
15231531 /// I18n context.
15241532 pub i18n_context : Option < XrefId > ,
1525- /// I18n message.
1526- pub i18n_message : Option < XrefId > ,
1533+ /// I18n message instance ID.
1534+ ///
1535+ /// Stores the i18n message's instance_id for dedup, not an XrefId.
1536+ pub i18n_message : Option < u32 > ,
15271537 /// Binding kind (for DomOnly mode and animation handling).
15281538 pub binding_kind : BindingKind ,
15291539}
@@ -1608,8 +1618,10 @@ pub struct AttributeOp<'a> {
16081618 pub sanitizer : Option < Atom < ' a > > ,
16091619 /// I18n context.
16101620 pub i18n_context : Option < XrefId > ,
1611- /// I18n message.
1612- pub i18n_message : Option < XrefId > ,
1621+ /// I18n message instance ID.
1622+ ///
1623+ /// Stores the i18n message's instance_id for dedup, not an XrefId.
1624+ pub i18n_message : Option < u32 > ,
16131625 /// Whether this is a text attribute (static attribute from template).
16141626 ///
16151627 /// Text attributes are extractable to the consts array and don't need
@@ -1811,8 +1823,10 @@ pub struct BindingOp<'a> {
18111823 pub unit : Option < Atom < ' a > > ,
18121824 /// Security context.
18131825 pub security_context : SecurityContext ,
1814- /// I18n message.
1815- pub i18n_message : Option < XrefId > ,
1826+ /// I18n message instance ID.
1827+ ///
1828+ /// Stores the i18n message's instance_id for dedup, not an XrefId.
1829+ pub i18n_message : Option < u32 > ,
18161830 /// Whether this binding came from a text attribute (e.g., `class="cls"` vs `[class]="expr"`).
18171831 ///
18181832 /// This is used for compatibility with TemplateDefinitionBuilder which treats
@@ -1843,8 +1857,10 @@ pub struct AnimationOp<'a> {
18431857 pub handler_ops : Vec < ' a , UpdateOp < ' a > > ,
18441858 /// Function name for the handler.
18451859 pub handler_fn_name : Option < Atom < ' a > > ,
1846- /// I18n message.
1847- pub i18n_message : Option < XrefId > ,
1860+ /// I18n message instance ID.
1861+ ///
1862+ /// Stores the i18n message's instance_id for dedup, not an XrefId.
1863+ pub i18n_message : Option < u32 > ,
18481864 /// Security context.
18491865 pub security_context : SecurityContext ,
18501866 /// Sanitizer function.
0 commit comments