refactor(ivy): prefix all generated instructions (#29692)

- Updates all instructions to be prefixed with the Greek delta symbol

PR Close #29692
This commit is contained in:
Ben Lesh
2019-04-04 11:41:52 -07:00
committed by Igor Minar
parent db62ccf9eb
commit 138ca5a246
149 changed files with 8266 additions and 7620 deletions

View File

@ -81,18 +81,18 @@ In `ngtsc` this is instead emitted as,
```js
const i0 = require("@angular/core");
class GreetComponent {}
GreetComponent.ngComponentDef = i0.ɵdefineComponent({
GreetComponent.ngComponentDef = i0.ΔdefineComponent({
type: GreetComponent,
tag: 'greet',
factory: () => new GreetComponent(),
template: function (rf, ctx) {
if (rf & RenderFlags.Create) {
i0.ɵelementStart(0, 'div');
i0.ɵtext(1);
i0.ɵelementEnd();
i0.ΔelementStart(0, 'div');
i0.Δtext(1);
i0.ΔelementEnd();
}
if (rf & RenderFlags.Update) {
i0.ɵtextBinding(1, i0.ɵinterpolation1('Hello ', ctx.name, '!'));
i0.ΔtextBinding(1, i0.Δinterpolation1('Hello ', ctx.name, '!'));
}
}
});
@ -104,14 +104,14 @@ and the `.d.ts` contains:
import * as i0 from '@angular/core';
export class GreetComponent {
static ngComponentDef: i0.NgComponentDef<
GreetComponent,
'greet',
GreetComponent,
'greet',
{input: 'input'}
>;
}
```
The information needed by reference inversion and type-checking is included in
The information needed by reference inversion and type-checking is included in
the type declaration of the `ngComponentDef` in the `.d.ts`.
#### TypeScript architecture
@ -127,18 +127,18 @@ The overall architecure of TypeScript is:
| TypeScript | -parse-> | AST | ->transform-> | AST | ->print-> | JavaScript |
| source | | |-----| | |-----| | source |
|------------| | | | |------------|
| type-check |
| | |
| v |
| |--------| |
|--> | errors | <---|
| type-check |
| | |
| v |
| |--------| |
|--> | errors | <---|
|--------|
The parse step is a traditional recursive descent parser, augmented to support incremental parsing, that emits an abstract syntax tree (AST).
The parse step is a traditional recursive descent parser, augmented to support incremental parsing, that emits an abstract syntax tree (AST).
The type-checker construct a symbol table and then performs type analysis of every expression in the file, reporting errors it finds. This process not extended or modified by `ngtsc`.
The transform step is a set of AST to AST transformations that perform various tasks such as, removing type declarations, lowering module and class declarations to ES5, converting `async` methods to state-machines, etc.
The transform step is a set of AST to AST transformations that perform various tasks such as, removing type declarations, lowering module and class declarations to ES5, converting `async` methods to state-machines, etc.
#### Extension points
@ -229,7 +229,7 @@ The `ngtsc` metadata evaluator will be built as a partial Typescript interpreter
A template is compiled in `TemplateCompiler` by performing the following:
1. Tokenizes the template
1. Tokenizes the template
2. Parses the tokens into an HTML AST
3. Converts the HTML AST into an Angular Template AST.
4. Translates the Angular Template AST to a template function
@ -244,7 +244,7 @@ As part of this conversion an exhaustive list of selector targets is also produc
The `TemplateCompiler` can produce a template function from a string without additional information. However, correct interpretation of that string requires a selector scope discussed below. The selector scope is built at runtime allowing the runtime to use a function built from just a string as long as it is given a selector scope (e.g. an NgModule) to use during instantiation.
#### The selector problem
#### The selector problem
To interpret the content of a template, the runtime needs to know what component and directives to apply to the element and what pipes are referenced by binding expressions. The list of candidate components, directives and pipes are determined by the `NgModule` in which the component is declared. Since the module and component are in separate source files, mapping which components, directives and pipes referenced is left to the runtime. Unfortunately, this leads to a tree-shaking problem. Since there no direct link between the component and types the component references then all components, directives and pipes declared in the module, and any module imported from the module, must be available at runtime or risk the template failing to be interpreted correctly. Including everything can lead to a very large program which contains many components the application doesn't actually use.

View File

@ -161,7 +161,7 @@ export class MyComponent {
```js
export class MyComponent {
name: string;
static ngComponentDef = defineComponent({...});
static ngComponentDef = ΔdefineComponent({...});
}
```
@ -213,7 +213,7 @@ export class MyDirective {
constructor() {
this.dirId = 'some id';
}
static ngDirectiveDef = defineDirective({...});
static ngDirectiveDef = ΔdefineDirective({...});
}
```
@ -256,7 +256,7 @@ export class MyPipe implements PipeTransform {
```js
export class MyPipe {
transform(...) ...
static ngPipeDef = definePipe({...});
static ngPipeDef = ΔdefinePipe({...});
}
```
@ -329,7 +329,7 @@ export class MyModule {}
*my.module.js*
```js
export class MyModule {
static ngInjectorDef = defineInjector(...);
static ngInjectorDef = ΔdefineInjector(...);
}
```
@ -389,7 +389,7 @@ manually written as:
```ts
export class MyModule {
static ngInjectorDef = defineInjector({
static ngInjectorDef = ΔdefineInjector({
providers: [{
provide: Service, useClass: ServiceImpl
}],
@ -411,7 +411,7 @@ export class MyModule {
}
```
except for the call to `defineInjector` would generate a `{ __symbolic: 'error' }`
except for the call to `ΔdefineInjector` would generate a `{ __symbolic: 'error' }`
value which is ignored by the ivy compiler. This allows the system to ignore
the difference between manually and mechanically created module definitions.
@ -440,7 +440,7 @@ properties by including a `// @__BUILD_OPTIMIZER_REMOVE_` comment:
```ts
export class MyModule {
static ngInjectorDef = defineInjector({
static ngInjectorDef = ΔdefineInjector({
providers: [{
provide: Service, useClass: ServiceImpl
}],

View File

@ -62,11 +62,11 @@ export class Identifiers {
moduleName: CORE,
};
static inject: o.ExternalReference = {name: 'inject', moduleName: CORE};
static inject: o.ExternalReference = {name: 'Δinject', moduleName: CORE};
static INJECTOR: o.ExternalReference = {name: 'INJECTOR', moduleName: CORE};
static Injector: o.ExternalReference = {name: 'Injector', moduleName: CORE};
static defineInjectable: o.ExternalReference = {name: 'defineInjectable', moduleName: CORE};
static InjectableDef: o.ExternalReference = {name: 'ɵInjectableDef', moduleName: CORE};
static ΔdefineInjectable: o.ExternalReference = {name: 'ΔdefineInjectable', moduleName: CORE};
static InjectableDef: o.ExternalReference = {name: 'ΔInjectableDef', moduleName: CORE};
static ViewEncapsulation: o.ExternalReference = {
name: 'ViewEncapsulation',
moduleName: CORE,
@ -92,7 +92,7 @@ export class Identifiers {
name: 'ɵinlineInterpolate',
moduleName: CORE,
};
static interpolate: o.ExternalReference = {name: 'ɵinterpolate', moduleName: CORE};
static interpolate: o.ExternalReference = {name: 'Δinterpolate', moduleName: CORE};
static EMPTY_ARRAY: o.ExternalReference = {name: 'ɵEMPTY_ARRAY', moduleName: CORE};
static EMPTY_MAP: o.ExternalReference = {name: 'ɵEMPTY_MAP', moduleName: CORE};
static Renderer: o.ExternalReference = {name: 'Renderer', moduleName: CORE};

View File

@ -116,7 +116,7 @@ export class InjectableCompiler {
mapEntry('token', ctx.importExpr(injectable.type.reference)),
mapEntry('providedIn', providedIn),
];
return o.importExpr(Identifiers.defineInjectable).callFn([o.literalMap(def)]);
return o.importExpr(Identifiers.ΔdefineInjectable).callFn([o.literalMap(def)]);
}
compile(injectable: CompileInjectableMetadata, ctx: OutputContext): void {

View File

@ -100,7 +100,7 @@ export function compileInjectable(meta: R3InjectableMetadata): InjectableDef {
const token = meta.type;
const providedIn = meta.providedIn;
const expression = o.importExpr(Identifiers.defineInjectable).callFn([mapToMapExpression(
const expression = o.importExpr(Identifiers.ΔdefineInjectable).callFn([mapToMapExpression(
{token, factory: result.factory, providedIn})]);
const type = new o.ExpressionType(o.importExpr(
Identifiers.InjectableDef, [typeWithParameters(meta.type, meta.typeArgumentCount)]));

View File

@ -17,226 +17,226 @@ export class Identifiers {
static PATCH_DEPS = 'patchedDeps';
/* Instructions */
static namespaceHTML: o.ExternalReference = {name: 'ɵnamespaceHTML', moduleName: CORE};
static namespaceHTML: o.ExternalReference = {name: 'ΔnamespaceHTML', moduleName: CORE};
static namespaceMathML: o.ExternalReference = {name: 'ɵnamespaceMathML', moduleName: CORE};
static namespaceMathML: o.ExternalReference = {name: 'ΔnamespaceMathML', moduleName: CORE};
static namespaceSVG: o.ExternalReference = {name: 'ɵnamespaceSVG', moduleName: CORE};
static namespaceSVG: o.ExternalReference = {name: 'ΔnamespaceSVG', moduleName: CORE};
static element: o.ExternalReference = {name: 'ɵelement', moduleName: CORE};
static element: o.ExternalReference = {name: 'Δelement', moduleName: CORE};
static elementStart: o.ExternalReference = {name: 'ɵelementStart', moduleName: CORE};
static elementStart: o.ExternalReference = {name: 'ΔelementStart', moduleName: CORE};
static elementEnd: o.ExternalReference = {name: 'ɵelementEnd', moduleName: CORE};
static elementEnd: o.ExternalReference = {name: 'ΔelementEnd', moduleName: CORE};
static elementProperty: o.ExternalReference = {name: 'ɵelementProperty', moduleName: CORE};
static elementProperty: o.ExternalReference = {name: 'ΔelementProperty', moduleName: CORE};
static select: o.ExternalReference = {name: 'ɵselect', moduleName: CORE};
static select: o.ExternalReference = {name: 'Δselect', moduleName: CORE};
static componentHostSyntheticProperty:
o.ExternalReference = {name: 'ɵcomponentHostSyntheticProperty', moduleName: CORE};
o.ExternalReference = {name: 'ΔcomponentHostSyntheticProperty', moduleName: CORE};
static componentHostSyntheticListener:
o.ExternalReference = {name: 'ɵcomponentHostSyntheticListener', moduleName: CORE};
o.ExternalReference = {name: 'ΔcomponentHostSyntheticListener', moduleName: CORE};
static elementAttribute: o.ExternalReference = {name: 'ɵelementAttribute', moduleName: CORE};
static elementAttribute: o.ExternalReference = {name: 'ΔelementAttribute', moduleName: CORE};
static elementClassProp: o.ExternalReference = {name: 'ɵelementClassProp', moduleName: CORE};
static elementClassProp: o.ExternalReference = {name: 'ΔelementClassProp', moduleName: CORE};
static elementContainerStart:
o.ExternalReference = {name: 'ɵelementContainerStart', moduleName: CORE};
o.ExternalReference = {name: 'ΔelementContainerStart', moduleName: CORE};
static elementContainerEnd:
o.ExternalReference = {name: 'ɵelementContainerEnd', moduleName: CORE};
o.ExternalReference = {name: 'ΔelementContainerEnd', moduleName: CORE};
static elementStyling: o.ExternalReference = {name: 'ɵelementStyling', moduleName: CORE};
static elementStyling: o.ExternalReference = {name: 'ΔelementStyling', moduleName: CORE};
static elementStylingMap: o.ExternalReference = {name: 'ɵelementStylingMap', moduleName: CORE};
static elementStylingMap: o.ExternalReference = {name: 'ΔelementStylingMap', moduleName: CORE};
static elementStyleProp: o.ExternalReference = {name: 'ɵelementStyleProp', moduleName: CORE};
static elementStyleProp: o.ExternalReference = {name: 'ΔelementStyleProp', moduleName: CORE};
static elementStylingApply:
o.ExternalReference = {name: 'ɵelementStylingApply', moduleName: CORE};
o.ExternalReference = {name: 'ΔelementStylingApply', moduleName: CORE};
static elementHostAttrs: o.ExternalReference = {name: 'ɵelementHostAttrs', moduleName: CORE};
static elementHostAttrs: o.ExternalReference = {name: 'ΔelementHostAttrs', moduleName: CORE};
static elementHostStyling: o.ExternalReference = {name: 'ɵelementHostStyling', moduleName: CORE};
static elementHostStyling: o.ExternalReference = {name: 'ΔelementHostStyling', moduleName: CORE};
static elementHostStylingMap:
o.ExternalReference = {name: 'ɵelementHostStylingMap', moduleName: CORE};
o.ExternalReference = {name: 'ΔelementHostStylingMap', moduleName: CORE};
static elementHostStyleProp:
o.ExternalReference = {name: 'ɵelementHostStyleProp', moduleName: CORE};
o.ExternalReference = {name: 'ΔelementHostStyleProp', moduleName: CORE};
static elementHostClassProp:
o.ExternalReference = {name: 'ɵelementHostClassProp', moduleName: CORE};
o.ExternalReference = {name: 'ΔelementHostClassProp', moduleName: CORE};
static elementHostStylingApply:
o.ExternalReference = {name: 'ɵelementHostStylingApply', moduleName: CORE};
o.ExternalReference = {name: 'ΔelementHostStylingApply', moduleName: CORE};
static containerCreate: o.ExternalReference = {name: 'ɵcontainer', moduleName: CORE};
static containerCreate: o.ExternalReference = {name: 'Δcontainer', moduleName: CORE};
static nextContext: o.ExternalReference = {name: 'ɵnextContext', moduleName: CORE};
static nextContext: o.ExternalReference = {name: 'ΔnextContext', moduleName: CORE};
static templateCreate: o.ExternalReference = {name: 'ɵtemplate', moduleName: CORE};
static templateCreate: o.ExternalReference = {name: 'Δtemplate', moduleName: CORE};
static text: o.ExternalReference = {name: 'ɵtext', moduleName: CORE};
static text: o.ExternalReference = {name: 'Δtext', moduleName: CORE};
static textBinding: o.ExternalReference = {name: 'ɵtextBinding', moduleName: CORE};
static textBinding: o.ExternalReference = {name: 'ΔtextBinding', moduleName: CORE};
static bind: o.ExternalReference = {name: 'ɵbind', moduleName: CORE};
static bind: o.ExternalReference = {name: 'Δbind', moduleName: CORE};
static enableBindings: o.ExternalReference = {name: 'ɵenableBindings', moduleName: CORE};
static enableBindings: o.ExternalReference = {name: 'ΔenableBindings', moduleName: CORE};
static disableBindings: o.ExternalReference = {name: 'ɵdisableBindings', moduleName: CORE};
static disableBindings: o.ExternalReference = {name: 'ΔdisableBindings', moduleName: CORE};
static allocHostVars: o.ExternalReference = {name: 'ɵallocHostVars', moduleName: CORE};
static allocHostVars: o.ExternalReference = {name: 'ΔallocHostVars', moduleName: CORE};
static getCurrentView: o.ExternalReference = {name: 'ɵgetCurrentView', moduleName: CORE};
static getCurrentView: o.ExternalReference = {name: 'ΔgetCurrentView', moduleName: CORE};
static restoreView: o.ExternalReference = {name: 'ɵrestoreView', moduleName: CORE};
static restoreView: o.ExternalReference = {name: 'ΔrestoreView', moduleName: CORE};
static interpolation1: o.ExternalReference = {name: 'ɵinterpolation1', moduleName: CORE};
static interpolation2: o.ExternalReference = {name: 'ɵinterpolation2', moduleName: CORE};
static interpolation3: o.ExternalReference = {name: 'ɵinterpolation3', moduleName: CORE};
static interpolation4: o.ExternalReference = {name: 'ɵinterpolation4', moduleName: CORE};
static interpolation5: o.ExternalReference = {name: 'ɵinterpolation5', moduleName: CORE};
static interpolation6: o.ExternalReference = {name: 'ɵinterpolation6', moduleName: CORE};
static interpolation7: o.ExternalReference = {name: 'ɵinterpolation7', moduleName: CORE};
static interpolation8: o.ExternalReference = {name: 'ɵinterpolation8', moduleName: CORE};
static interpolationV: o.ExternalReference = {name: 'ɵinterpolationV', moduleName: CORE};
static interpolation1: o.ExternalReference = {name: 'Δinterpolation1', moduleName: CORE};
static interpolation2: o.ExternalReference = {name: 'Δinterpolation2', moduleName: CORE};
static interpolation3: o.ExternalReference = {name: 'Δinterpolation3', moduleName: CORE};
static interpolation4: o.ExternalReference = {name: 'Δinterpolation4', moduleName: CORE};
static interpolation5: o.ExternalReference = {name: 'Δinterpolation5', moduleName: CORE};
static interpolation6: o.ExternalReference = {name: 'Δinterpolation6', moduleName: CORE};
static interpolation7: o.ExternalReference = {name: 'Δinterpolation7', moduleName: CORE};
static interpolation8: o.ExternalReference = {name: 'Δinterpolation8', moduleName: CORE};
static interpolationV: o.ExternalReference = {name: 'ΔinterpolationV', moduleName: CORE};
static pureFunction0: o.ExternalReference = {name: 'ɵpureFunction0', moduleName: CORE};
static pureFunction1: o.ExternalReference = {name: 'ɵpureFunction1', moduleName: CORE};
static pureFunction2: o.ExternalReference = {name: 'ɵpureFunction2', moduleName: CORE};
static pureFunction3: o.ExternalReference = {name: 'ɵpureFunction3', moduleName: CORE};
static pureFunction4: o.ExternalReference = {name: 'ɵpureFunction4', moduleName: CORE};
static pureFunction5: o.ExternalReference = {name: 'ɵpureFunction5', moduleName: CORE};
static pureFunction6: o.ExternalReference = {name: 'ɵpureFunction6', moduleName: CORE};
static pureFunction7: o.ExternalReference = {name: 'ɵpureFunction7', moduleName: CORE};
static pureFunction8: o.ExternalReference = {name: 'ɵpureFunction8', moduleName: CORE};
static pureFunctionV: o.ExternalReference = {name: 'ɵpureFunctionV', moduleName: CORE};
static pureFunction0: o.ExternalReference = {name: 'ΔpureFunction0', moduleName: CORE};
static pureFunction1: o.ExternalReference = {name: 'ΔpureFunction1', moduleName: CORE};
static pureFunction2: o.ExternalReference = {name: 'ΔpureFunction2', moduleName: CORE};
static pureFunction3: o.ExternalReference = {name: 'ΔpureFunction3', moduleName: CORE};
static pureFunction4: o.ExternalReference = {name: 'ΔpureFunction4', moduleName: CORE};
static pureFunction5: o.ExternalReference = {name: 'ΔpureFunction5', moduleName: CORE};
static pureFunction6: o.ExternalReference = {name: 'ΔpureFunction6', moduleName: CORE};
static pureFunction7: o.ExternalReference = {name: 'ΔpureFunction7', moduleName: CORE};
static pureFunction8: o.ExternalReference = {name: 'ΔpureFunction8', moduleName: CORE};
static pureFunctionV: o.ExternalReference = {name: 'ΔpureFunctionV', moduleName: CORE};
static pipeBind1: o.ExternalReference = {name: 'ɵpipeBind1', moduleName: CORE};
static pipeBind2: o.ExternalReference = {name: 'ɵpipeBind2', moduleName: CORE};
static pipeBind3: o.ExternalReference = {name: 'ɵpipeBind3', moduleName: CORE};
static pipeBind4: o.ExternalReference = {name: 'ɵpipeBind4', moduleName: CORE};
static pipeBindV: o.ExternalReference = {name: 'ɵpipeBindV', moduleName: CORE};
static pipeBind1: o.ExternalReference = {name: 'ΔpipeBind1', moduleName: CORE};
static pipeBind2: o.ExternalReference = {name: 'ΔpipeBind2', moduleName: CORE};
static pipeBind3: o.ExternalReference = {name: 'ΔpipeBind3', moduleName: CORE};
static pipeBind4: o.ExternalReference = {name: 'ΔpipeBind4', moduleName: CORE};
static pipeBindV: o.ExternalReference = {name: 'ΔpipeBindV', moduleName: CORE};
static i18n: o.ExternalReference = {name: 'ɵi18n', moduleName: CORE};
static i18nAttributes: o.ExternalReference = {name: 'ɵi18nAttributes', moduleName: CORE};
static i18nExp: o.ExternalReference = {name: 'ɵi18nExp', moduleName: CORE};
static i18nStart: o.ExternalReference = {name: 'ɵi18nStart', moduleName: CORE};
static i18nEnd: o.ExternalReference = {name: 'ɵi18nEnd', moduleName: CORE};
static i18nApply: o.ExternalReference = {name: 'ɵi18nApply', moduleName: CORE};
static i18nPostprocess: o.ExternalReference = {name: 'ɵi18nPostprocess', moduleName: CORE};
static i18n: o.ExternalReference = {name: 'Δi18n', moduleName: CORE};
static i18nAttributes: o.ExternalReference = {name: 'Δi18nAttributes', moduleName: CORE};
static i18nExp: o.ExternalReference = {name: 'Δi18nExp', moduleName: CORE};
static i18nStart: o.ExternalReference = {name: 'Δi18nStart', moduleName: CORE};
static i18nEnd: o.ExternalReference = {name: 'Δi18nEnd', moduleName: CORE};
static i18nApply: o.ExternalReference = {name: 'Δi18nApply', moduleName: CORE};
static i18nPostprocess: o.ExternalReference = {name: 'Δi18nPostprocess', moduleName: CORE};
static load: o.ExternalReference = {name: 'ɵload', moduleName: CORE};
static load: o.ExternalReference = {name: 'Δload', moduleName: CORE};
static pipe: o.ExternalReference = {name: 'ɵpipe', moduleName: CORE};
static pipe: o.ExternalReference = {name: 'Δpipe', moduleName: CORE};
static projection: o.ExternalReference = {name: 'ɵprojection', moduleName: CORE};
static projectionDef: o.ExternalReference = {name: 'ɵprojectionDef', moduleName: CORE};
static projection: o.ExternalReference = {name: 'Δprojection', moduleName: CORE};
static projectionDef: o.ExternalReference = {name: 'ΔprojectionDef', moduleName: CORE};
static reference: o.ExternalReference = {name: 'ɵreference', moduleName: CORE};
static reference: o.ExternalReference = {name: 'Δreference', moduleName: CORE};
static inject: o.ExternalReference = {name: 'inject', moduleName: CORE};
static inject: o.ExternalReference = {name: 'Δinject', moduleName: CORE};
static injectAttribute: o.ExternalReference = {name: 'ɵinjectAttribute', moduleName: CORE};
static injectAttribute: o.ExternalReference = {name: 'ΔinjectAttribute', moduleName: CORE};
static directiveInject: o.ExternalReference = {name: 'ɵdirectiveInject', moduleName: CORE};
static directiveInject: o.ExternalReference = {name: 'ΔdirectiveInject', moduleName: CORE};
static templateRefExtractor:
o.ExternalReference = {name: 'ɵtemplateRefExtractor', moduleName: CORE};
o.ExternalReference = {name: 'ΔtemplateRefExtractor', moduleName: CORE};
static resolveWindow: o.ExternalReference = {name: 'ɵresolveWindow', moduleName: CORE};
static resolveDocument: o.ExternalReference = {name: 'ɵresolveDocument', moduleName: CORE};
static resolveBody: o.ExternalReference = {name: 'ɵresolveBody', moduleName: CORE};
static resolveWindow: o.ExternalReference = {name: 'ΔresolveWindow', moduleName: CORE};
static resolveDocument: o.ExternalReference = {name: 'ΔresolveDocument', moduleName: CORE};
static resolveBody: o.ExternalReference = {name: 'ΔresolveBody', moduleName: CORE};
static defineBase: o.ExternalReference = {name: 'ɵdefineBase', moduleName: CORE};
static defineBase: o.ExternalReference = {name: 'ΔdefineBase', moduleName: CORE};
static BaseDef: o.ExternalReference = {
name: 'ɵBaseDef',
name: 'ΔBaseDef',
moduleName: CORE,
};
static defineComponent: o.ExternalReference = {name: 'ɵdefineComponent', moduleName: CORE};
static defineComponent: o.ExternalReference = {name: 'ΔdefineComponent', moduleName: CORE};
static setComponentScope: o.ExternalReference = {name: 'ɵsetComponentScope', moduleName: CORE};
static setComponentScope: o.ExternalReference = {name: 'ΔsetComponentScope', moduleName: CORE};
static ComponentDefWithMeta: o.ExternalReference = {
name: 'ɵComponentDefWithMeta',
name: 'ΔComponentDefWithMeta',
moduleName: CORE,
};
static defineDirective: o.ExternalReference = {
name: 'ɵdefineDirective',
name: 'ΔdefineDirective',
moduleName: CORE,
};
static DirectiveDefWithMeta: o.ExternalReference = {
name: 'ɵDirectiveDefWithMeta',
name: 'ΔDirectiveDefWithMeta',
moduleName: CORE,
};
static InjectorDef: o.ExternalReference = {
name: 'ɵInjectorDef',
name: 'ΔInjectorDef',
moduleName: CORE,
};
static defineInjector: o.ExternalReference = {
name: 'defineInjector',
name: 'ΔdefineInjector',
moduleName: CORE,
};
static NgModuleDefWithMeta: o.ExternalReference = {
name: 'ɵNgModuleDefWithMeta',
name: 'ΔNgModuleDefWithMeta',
moduleName: CORE,
};
static defineNgModule: o.ExternalReference = {name: 'ɵdefineNgModule', moduleName: CORE};
static setNgModuleScope: o.ExternalReference = {name: 'ɵsetNgModuleScope', moduleName: CORE};
static defineNgModule: o.ExternalReference = {name: 'ΔdefineNgModule', moduleName: CORE};
static setNgModuleScope: o.ExternalReference = {name: 'ΔsetNgModuleScope', moduleName: CORE};
static PipeDefWithMeta: o.ExternalReference = {name: 'ɵPipeDefWithMeta', moduleName: CORE};
static PipeDefWithMeta: o.ExternalReference = {name: 'ΔPipeDefWithMeta', moduleName: CORE};
static definePipe: o.ExternalReference = {name: 'ɵdefinePipe', moduleName: CORE};
static definePipe: o.ExternalReference = {name: 'ΔdefinePipe', moduleName: CORE};
static queryRefresh: o.ExternalReference = {name: 'ɵqueryRefresh', moduleName: CORE};
static viewQuery: o.ExternalReference = {name: 'ɵviewQuery', moduleName: CORE};
static staticViewQuery: o.ExternalReference = {name: 'ɵstaticViewQuery', moduleName: CORE};
static staticContentQuery: o.ExternalReference = {name: 'ɵstaticContentQuery', moduleName: CORE};
static loadViewQuery: o.ExternalReference = {name: 'ɵloadViewQuery', moduleName: CORE};
static contentQuery: o.ExternalReference = {name: 'ɵcontentQuery', moduleName: CORE};
static loadContentQuery: o.ExternalReference = {name: 'ɵloadContentQuery', moduleName: CORE};
static queryRefresh: o.ExternalReference = {name: 'ΔqueryRefresh', moduleName: CORE};
static viewQuery: o.ExternalReference = {name: 'ΔviewQuery', moduleName: CORE};
static staticViewQuery: o.ExternalReference = {name: 'ΔstaticViewQuery', moduleName: CORE};
static staticContentQuery: o.ExternalReference = {name: 'ΔstaticContentQuery', moduleName: CORE};
static loadViewQuery: o.ExternalReference = {name: 'ΔloadViewQuery', moduleName: CORE};
static contentQuery: o.ExternalReference = {name: 'ΔcontentQuery', moduleName: CORE};
static loadContentQuery: o.ExternalReference = {name: 'ΔloadContentQuery', moduleName: CORE};
static NgOnChangesFeature: o.ExternalReference = {name: 'ɵNgOnChangesFeature', moduleName: CORE};
static NgOnChangesFeature: o.ExternalReference = {name: 'ΔNgOnChangesFeature', moduleName: CORE};
static InheritDefinitionFeature:
o.ExternalReference = {name: 'ɵInheritDefinitionFeature', moduleName: CORE};
o.ExternalReference = {name: 'ΔInheritDefinitionFeature', moduleName: CORE};
static ProvidersFeature: o.ExternalReference = {name: 'ɵProvidersFeature', moduleName: CORE};
static ProvidersFeature: o.ExternalReference = {name: 'ΔProvidersFeature', moduleName: CORE};
static listener: o.ExternalReference = {name: 'ɵlistener', moduleName: CORE};
static listener: o.ExternalReference = {name: 'Δlistener', moduleName: CORE};
static getFactoryOf: o.ExternalReference = {
name: 'ɵgetFactoryOf',
name: 'ΔgetFactoryOf',
moduleName: CORE,
};
static getInheritedFactory: o.ExternalReference = {
name: 'ɵgetInheritedFactory',
name: 'ΔgetInheritedFactory',
moduleName: CORE,
};
// sanitization-related functions
static sanitizeHtml: o.ExternalReference = {name: 'ɵsanitizeHtml', moduleName: CORE};
static sanitizeStyle: o.ExternalReference = {name: 'ɵsanitizeStyle', moduleName: CORE};
static sanitizeHtml: o.ExternalReference = {name: 'ΔsanitizeHtml', moduleName: CORE};
static sanitizeStyle: o.ExternalReference = {name: 'ΔsanitizeStyle', moduleName: CORE};
static defaultStyleSanitizer:
o.ExternalReference = {name: 'ɵdefaultStyleSanitizer', moduleName: CORE};
o.ExternalReference = {name: 'ΔdefaultStyleSanitizer', moduleName: CORE};
static sanitizeResourceUrl:
o.ExternalReference = {name: 'ɵsanitizeResourceUrl', moduleName: CORE};
static sanitizeScript: o.ExternalReference = {name: 'ɵsanitizeScript', moduleName: CORE};
static sanitizeUrl: o.ExternalReference = {name: 'ɵsanitizeUrl', moduleName: CORE};
o.ExternalReference = {name: 'ΔsanitizeResourceUrl', moduleName: CORE};
static sanitizeScript: o.ExternalReference = {name: 'ΔsanitizeScript', moduleName: CORE};
static sanitizeUrl: o.ExternalReference = {name: 'ΔsanitizeUrl', moduleName: CORE};
static sanitizeUrlOrResourceUrl:
o.ExternalReference = {name: 'ɵsanitizeUrlOrResourceUrl', moduleName: CORE};
o.ExternalReference = {name: 'ΔsanitizeUrlOrResourceUrl', moduleName: CORE};
}

View File

@ -102,7 +102,7 @@ export function compileNgModule(meta: R3NgModuleMetadata): R3NgModuleDef {
}
// If requested to emit scope information inline, pass the declarations, imports and exports to
// the `defineNgModule` call. The JIT compilation uses this.
// the `ΔdefineNgModule` call. The JIT compilation uses this.
if (emitInline) {
if (declarations.length) {
definitionMap.declarations = refsToArray(declarations, containsForwardDecls);
@ -117,7 +117,7 @@ export function compileNgModule(meta: R3NgModuleMetadata): R3NgModuleDef {
}
}
// If not emitting inline, the scope information is not passed into `defineNgModule` as it would
// If not emitting inline, the scope information is not passed into `ΔdefineNgModule` as it would
// prevent tree-shaking of the declarations, imports and exports references.
else {
const setNgModuleScopeCall = generateSetNgModuleScopeCall(meta);
@ -141,7 +141,7 @@ export function compileNgModule(meta: R3NgModuleMetadata): R3NgModuleDef {
}
/**
* Generates a function call to `setNgModuleScope` with all necessary information so that the
* Generates a function call to `ΔsetNgModuleScope` with all necessary information so that the
* transitive module scope can be computed during runtime in JIT mode. This call is marked pure
* such that the references to declarations, imports and exports may be elided causing these
* symbols to become tree-shakeable.

View File

@ -840,7 +840,7 @@ export class TemplateDefinitionBuilder implements t.Visitor<void>, LocalResolver
return trimTrailingNulls(parameters);
});
// handle property bindings e.g. ɵelementProperty(1, 'ngForOf', ɵbind(ctx.items));
// handle property bindings e.g. ΔelementProperty(1, 'ngForOf', Δbind(ctx.items));
const context = o.variable(CONTEXT_NAME);
this.templatePropertyBindings(template, templateIndex, context, template.templateAttrs);