Skip to content

Commit 6e39019

Browse files
9c106f4 refactor(core): introduce domProperty instruction (#60608)
1 parent d953ac8 commit 6e39019

File tree

5 files changed

+37
-37
lines changed

5 files changed

+37
-37
lines changed

BUILD_INFO

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Fri Mar 28 18:51:28 UTC 2025
2-
cbd6ec8c6a3c632089cc8668d621aa597627af16
1+
Mon Mar 31 13:23:10 UTC 2025
2+
9c106f440146199eaaab9e28cc4e3ffe006e6e91

fesm2022/compiler.mjs

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license Angular v20.0.0-next.4+sha-cbd6ec8
2+
* @license Angular v20.0.0-next.4+sha-9c106f4
33
* (c) 2010-2025 Google LLC. https://angular.io/
44
* License: MIT
55
*/
@@ -2942,7 +2942,7 @@ class Identifiers {
29422942
static pipeBind3 = { name: 'ɵɵpipeBind3', moduleName: CORE };
29432943
static pipeBind4 = { name: 'ɵɵpipeBind4', moduleName: CORE };
29442944
static pipeBindV = { name: 'ɵɵpipeBindV', moduleName: CORE };
2945-
static hostProperty = { name: 'ɵɵhostProperty', moduleName: CORE };
2945+
static domProperty = { name: 'ɵɵdomProperty', moduleName: CORE };
29462946
static property = { name: 'ɵɵproperty', moduleName: CORE };
29472947
static propertyInterpolate = {
29482948
name: 'ɵɵpropertyInterpolate',
@@ -8819,9 +8819,9 @@ var OpKind;
88198819
*/
88208820
OpKind[OpKind["I18nMessage"] = 31] = "I18nMessage";
88218821
/**
8822-
* A host binding property.
8822+
* A binding to a native DOM property.
88238823
*/
8824-
OpKind[OpKind["HostProperty"] = 32] = "HostProperty";
8824+
OpKind[OpKind["DomProperty"] = 32] = "DomProperty";
88258825
/**
88268826
* A namespace change, which causes the subsequent elements to be processed as either HTML or SVG.
88278827
*/
@@ -10328,7 +10328,7 @@ function transformExpressionsInOp(op, transform, flags) {
1032810328
}
1032910329
break;
1033010330
case OpKind.Property:
10331-
case OpKind.HostProperty:
10331+
case OpKind.DomProperty:
1033210332
case OpKind.Attribute:
1033310333
if (op.expression instanceof Interpolation) {
1033410334
transformExpressionsInInterpolation(op.expression, transform, flags);
@@ -11306,9 +11306,9 @@ function createSourceLocationOp(templatePath, locations) {
1130611306
};
1130711307
}
1130811308

11309-
function createHostPropertyOp(name, expression, isAnimationTrigger, i18nContext, securityContext, sourceSpan) {
11309+
function createDomPropertyOp(name, expression, isAnimationTrigger, i18nContext, securityContext, sourceSpan) {
1131011310
return {
11311-
kind: OpKind.HostProperty,
11311+
kind: OpKind.DomProperty,
1131211312
name,
1131311313
expression,
1131411314
isAnimationTrigger,
@@ -11886,7 +11886,7 @@ function specializeBindings(job) {
1188611886
case BindingKind.Property:
1188711887
case BindingKind.Animation:
1188811888
if (job.kind === CompilationJobKind.Host) {
11889-
OpList.replace(op, createHostPropertyOp(op.name, op.expression, op.bindingKind === BindingKind.Animation, op.i18nContext, op.securityContext, op.sourceSpan));
11889+
OpList.replace(op, createDomPropertyOp(op.name, op.expression, op.bindingKind === BindingKind.Animation, op.i18nContext, op.securityContext, op.sourceSpan));
1189011890
}
1189111891
else {
1189211892
OpList.replace(op, createPropertyOp(op.target, op.name, op.expression, op.bindingKind === BindingKind.Animation, op.securityContext, op.isStructuralTemplateAttribute, op.templateKind, op.i18nContext, op.i18nMessage, op.sourceSpan));
@@ -11919,7 +11919,7 @@ const CHAIN_COMPATIBILITY = new Map([
1191911919
[Identifiers.elementContainerStart, Identifiers.elementContainerStart],
1192011920
[Identifiers.elementEnd, Identifiers.elementEnd],
1192111921
[Identifiers.elementStart, Identifiers.elementStart],
11922-
[Identifiers.hostProperty, Identifiers.hostProperty],
11922+
[Identifiers.domProperty, Identifiers.domProperty],
1192311923
[Identifiers.i18nExp, Identifiers.i18nExp],
1192411924
[Identifiers.listener, Identifiers.listener],
1192511925
[Identifiers.listener, Identifiers.listener],
@@ -22003,7 +22003,7 @@ function addNamesToView(unit, baseName, state, compatibility) {
2200322003
for (const op of unit.ops()) {
2200422004
switch (op.kind) {
2200522005
case OpKind.Property:
22006-
case OpKind.HostProperty:
22006+
case OpKind.DomProperty:
2200722007
if (op.isAnimationTrigger) {
2200822008
op.name = '@' + op.name;
2200922009
}
@@ -22319,8 +22319,8 @@ const UPDATE_ORDERING = [
2231922319
* Host bindings have their own update ordering.
2232022320
*/
2232122321
const UPDATE_HOST_ORDERING = [
22322-
{ test: kindWithInterpolationTest(OpKind.HostProperty, true) },
22323-
{ test: kindWithInterpolationTest(OpKind.HostProperty, false) },
22322+
{ test: kindWithInterpolationTest(OpKind.DomProperty, true) },
22323+
{ test: kindWithInterpolationTest(OpKind.DomProperty, false) },
2232422324
{ test: kindTest(OpKind.Attribute) },
2232522325
{ test: kindTest(OpKind.StyleMap), transform: keepLast },
2232622326
{ test: kindTest(OpKind.ClassMap), transform: keepLast },
@@ -22339,7 +22339,7 @@ const handledOpKinds = new Set([
2233922339
OpKind.ClassProp,
2234022340
OpKind.Property,
2234122341
OpKind.TwoWayProperty,
22342-
OpKind.HostProperty,
22342+
OpKind.DomProperty,
2234322343
OpKind.Attribute,
2234422344
]);
2234522345
/**
@@ -23113,12 +23113,12 @@ function classMapInterpolate(strings, expressions, sourceSpan) {
2311323113
const interpolationArgs = collateInterpolationArgs(strings, expressions);
2311423114
return callVariadicInstruction(CLASS_MAP_INTERPOLATE_CONFIG, [], interpolationArgs, [], sourceSpan);
2311523115
}
23116-
function hostProperty(name, expression, sanitizer, sourceSpan) {
23116+
function domProperty(name, expression, sanitizer, sourceSpan) {
2311723117
const args = [literal(name), expression];
2311823118
if (sanitizer !== null) {
2311923119
args.push(sanitizer);
2312023120
}
23121-
return call(Identifiers.hostProperty, args, sourceSpan);
23121+
return call(Identifiers.domProperty, args, sourceSpan);
2312223122
}
2312323123
function syntheticHostProperty(name, expression, sourceSpan) {
2312423124
return call(Identifiers.syntheticHostProperty, [literal(name), expression], sourceSpan);
@@ -23657,7 +23657,7 @@ function reifyUpdateOperations(_unit, ops) {
2365723657
OpList.replace(op, attribute(op.name, op.expression, op.sanitizer, op.namespace));
2365823658
}
2365923659
break;
23660-
case OpKind.HostProperty:
23660+
case OpKind.DomProperty:
2366123661
if (op.expression instanceof Interpolation) {
2366223662
throw new Error('not yet handled');
2366323663
}
@@ -23666,7 +23666,7 @@ function reifyUpdateOperations(_unit, ops) {
2366623666
OpList.replace(op, syntheticHostProperty(op.name, op.expression, op.sourceSpan));
2366723667
}
2366823668
else {
23669-
OpList.replace(op, hostProperty(op.name, op.expression, op.sanitizer, op.sourceSpan));
23669+
OpList.replace(op, domProperty(op.name, op.expression, op.sanitizer, op.sourceSpan));
2367023670
}
2367123671
}
2367223672
break;
@@ -24500,7 +24500,7 @@ function resolveSanitizers(job) {
2450024500
switch (op.kind) {
2450124501
case OpKind.Property:
2450224502
case OpKind.Attribute:
24503-
case OpKind.HostProperty:
24503+
case OpKind.DomProperty:
2450424504
let sanitizerFn = null;
2450524505
if (Array.isArray(op.securityContext) &&
2450624506
op.securityContext.length === 2 &&
@@ -24522,7 +24522,7 @@ function resolveSanitizers(job) {
2452224522
// <iframe>).
2452324523
if (op.sanitizer === null) {
2452424524
let isIframe = false;
24525-
if (job.kind === CompilationJobKind.Host || op.kind === OpKind.HostProperty) {
24525+
if (job.kind === CompilationJobKind.Host || op.kind === OpKind.DomProperty) {
2452624526
// Note: for host bindings defined on a directive, we do not try to find all
2452724527
// possible places where it can be matched, so we can not determine whether
2452824528
// the host element is an <iframe>. In this case, we just assume it is and append a
@@ -25129,7 +25129,7 @@ function varsUsedByOp(op) {
2512925129
let slots;
2513025130
switch (op.kind) {
2513125131
case OpKind.Property:
25132-
case OpKind.HostProperty:
25132+
case OpKind.DomProperty:
2513325133
case OpKind.Attribute:
2513425134
// All of these bindings use 1 variable slot, plus 1 slot for every interpolated expression,
2513525135
// if any.
@@ -25858,7 +25858,7 @@ function ingestHostBinding(input, bindingParser, constantPool) {
2585825858
const securityContexts = bindingParser
2585925859
.calcPossibleSecurityContexts(input.componentSelector, property.name, bindingKind === BindingKind.Attribute)
2586025860
.filter((context) => context !== SecurityContext.NONE);
25861-
ingestHostProperty(job, property, bindingKind, securityContexts);
25861+
ingestDomProperty(job, property, bindingKind, securityContexts);
2586225862
}
2586325863
for (const [name, expr] of Object.entries(input.attributes) ?? []) {
2586425864
const securityContexts = bindingParser
@@ -25873,7 +25873,7 @@ function ingestHostBinding(input, bindingParser, constantPool) {
2587325873
}
2587425874
// TODO: We should refactor the parser to use the same types and structures for host bindings as
2587525875
// with ordinary components. This would allow us to share a lot more ingestion code.
25876-
function ingestHostProperty(job, property, bindingKind, securityContexts) {
25876+
function ingestDomProperty(job, property, bindingKind, securityContexts) {
2587725877
let expression;
2587825878
const ast = property.expression.ast;
2587925879
if (ast instanceof Interpolation$1) {
@@ -33067,7 +33067,7 @@ const MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION = '18.0.0';
3306733067
function compileDeclareClassMetadata(metadata) {
3306833068
const definitionMap = new DefinitionMap();
3306933069
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$5));
33070-
definitionMap.set('version', literal('20.0.0-next.4+sha-cbd6ec8'));
33070+
definitionMap.set('version', literal('20.0.0-next.4+sha-9c106f4'));
3307133071
definitionMap.set('ngImport', importExpr(Identifiers.core));
3307233072
definitionMap.set('type', metadata.type);
3307333073
definitionMap.set('decorators', metadata.decorators);
@@ -33085,7 +33085,7 @@ function compileComponentDeclareClassMetadata(metadata, dependencies) {
3308533085
callbackReturnDefinitionMap.set('ctorParameters', metadata.ctorParameters ?? literal(null));
3308633086
callbackReturnDefinitionMap.set('propDecorators', metadata.propDecorators ?? literal(null));
3308733087
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_DEFER_SUPPORT_VERSION));
33088-
definitionMap.set('version', literal('20.0.0-next.4+sha-cbd6ec8'));
33088+
definitionMap.set('version', literal('20.0.0-next.4+sha-9c106f4'));
3308933089
definitionMap.set('ngImport', importExpr(Identifiers.core));
3309033090
definitionMap.set('type', metadata.type);
3309133091
definitionMap.set('resolveDeferredDeps', compileComponentMetadataAsyncResolver(dependencies));
@@ -33180,7 +33180,7 @@ function createDirectiveDefinitionMap(meta) {
3318033180
const definitionMap = new DefinitionMap();
3318133181
const minVersion = getMinimumVersionForPartialOutput(meta);
3318233182
definitionMap.set('minVersion', literal(minVersion));
33183-
definitionMap.set('version', literal('20.0.0-next.4+sha-cbd6ec8'));
33183+
definitionMap.set('version', literal('20.0.0-next.4+sha-9c106f4'));
3318433184
// e.g. `type: MyDirective`
3318533185
definitionMap.set('type', meta.type.value);
3318633186
if (meta.isStandalone !== undefined) {
@@ -33596,7 +33596,7 @@ const MINIMUM_PARTIAL_LINKER_VERSION$4 = '12.0.0';
3359633596
function compileDeclareFactoryFunction(meta) {
3359733597
const definitionMap = new DefinitionMap();
3359833598
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$4));
33599-
definitionMap.set('version', literal('20.0.0-next.4+sha-cbd6ec8'));
33599+
definitionMap.set('version', literal('20.0.0-next.4+sha-9c106f4'));
3360033600
definitionMap.set('ngImport', importExpr(Identifiers.core));
3360133601
definitionMap.set('type', meta.type.value);
3360233602
definitionMap.set('deps', compileDependencies(meta.deps));
@@ -33631,7 +33631,7 @@ function compileDeclareInjectableFromMetadata(meta) {
3363133631
function createInjectableDefinitionMap(meta) {
3363233632
const definitionMap = new DefinitionMap();
3363333633
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$3));
33634-
definitionMap.set('version', literal('20.0.0-next.4+sha-cbd6ec8'));
33634+
definitionMap.set('version', literal('20.0.0-next.4+sha-9c106f4'));
3363533635
definitionMap.set('ngImport', importExpr(Identifiers.core));
3363633636
definitionMap.set('type', meta.type.value);
3363733637
// Only generate providedIn property if it has a non-null value
@@ -33682,7 +33682,7 @@ function compileDeclareInjectorFromMetadata(meta) {
3368233682
function createInjectorDefinitionMap(meta) {
3368333683
const definitionMap = new DefinitionMap();
3368433684
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$2));
33685-
definitionMap.set('version', literal('20.0.0-next.4+sha-cbd6ec8'));
33685+
definitionMap.set('version', literal('20.0.0-next.4+sha-9c106f4'));
3368633686
definitionMap.set('ngImport', importExpr(Identifiers.core));
3368733687
definitionMap.set('type', meta.type.value);
3368833688
definitionMap.set('providers', meta.providers);
@@ -33715,7 +33715,7 @@ function createNgModuleDefinitionMap(meta) {
3371533715
throw new Error('Invalid path! Local compilation mode should not get into the partial compilation path');
3371633716
}
3371733717
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION$1));
33718-
definitionMap.set('version', literal('20.0.0-next.4+sha-cbd6ec8'));
33718+
definitionMap.set('version', literal('20.0.0-next.4+sha-9c106f4'));
3371933719
definitionMap.set('ngImport', importExpr(Identifiers.core));
3372033720
definitionMap.set('type', meta.type.value);
3372133721
// We only generate the keys in the metadata if the arrays contain values.
@@ -33766,7 +33766,7 @@ function compileDeclarePipeFromMetadata(meta) {
3376633766
function createPipeDefinitionMap(meta) {
3376733767
const definitionMap = new DefinitionMap();
3376833768
definitionMap.set('minVersion', literal(MINIMUM_PARTIAL_LINKER_VERSION));
33769-
definitionMap.set('version', literal('20.0.0-next.4+sha-cbd6ec8'));
33769+
definitionMap.set('version', literal('20.0.0-next.4+sha-9c106f4'));
3377033770
definitionMap.set('ngImport', importExpr(Identifiers.core));
3377133771
// e.g. `type: MyPipe`
3377233772
definitionMap.set('type', meta.type.value);
@@ -33924,7 +33924,7 @@ function compileHmrUpdateCallback(definitions, constantStatements, meta) {
3392433924
* @description
3392533925
* Entry point for all public APIs of the compiler package.
3392633926
*/
33927-
const VERSION = new Version('20.0.0-next.4+sha-cbd6ec8');
33927+
const VERSION = new Version('20.0.0-next.4+sha-9c106f4');
3392833928

3392933929
//////////////////////////////////////
3393033930
// THIS FILE HAS GLOBAL SIDE EFFECT //

fesm2022/compiler.mjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @license Angular v20.0.0-next.4+sha-cbd6ec8
2+
* @license Angular v20.0.0-next.4+sha-9c106f4
33
* (c) 2010-2025 Google LLC. https://angular.io/
44
* License: MIT
55
*/
@@ -4869,7 +4869,7 @@ declare class Identifiers {
48694869
static pipeBind3: ExternalReference;
48704870
static pipeBind4: ExternalReference;
48714871
static pipeBindV: ExternalReference;
4872-
static hostProperty: ExternalReference;
4872+
static domProperty: ExternalReference;
48734873
static property: ExternalReference;
48744874
static propertyInterpolate: ExternalReference;
48754875
static propertyInterpolate1: ExternalReference;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@angular/compiler",
3-
"version": "20.0.0-next.4+sha-cbd6ec8",
3+
"version": "20.0.0-next.4+sha-9c106f4",
44
"description": "Angular - the compiler library",
55
"author": "angular",
66
"license": "MIT",

0 commit comments

Comments
 (0)