From 81c13e2f86b27166acf502b3dbe88e88407273b6 Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Thu, 31 May 2018 14:18:24 -0700 Subject: [PATCH] refactor(ivy): remove references to Ivy (#24234) PR Close #24234 --- packages/core/src/render3/jit/directive.ts | 6 +++--- packages/core/src/render3/jit/injectable.ts | 4 ++-- packages/core/src/render3/jit/module.ts | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/core/src/render3/jit/directive.ts b/packages/core/src/render3/jit/directive.ts index c3551ed9cc..704edd26bc 100644 --- a/packages/core/src/render3/jit/directive.ts +++ b/packages/core/src/render3/jit/directive.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {ConstantPool, R3DirectiveMetadata, WrappedNodeExpr, compileComponentFromMetadata as compileIvyComponent, compileDirectiveFromMetadata as compileIvyDirective, jitExpression, makeBindingParser, parseTemplate} from '@angular/compiler'; +import {ConstantPool, R3DirectiveMetadata, WrappedNodeExpr, compileComponentFromMetadata as compileR3Component, compileDirectiveFromMetadata as compileR3Directive, jitExpression, makeBindingParser, parseTemplate} from '@angular/compiler'; import {Component, Directive, HostBinding, Input, Output} from '../../metadata/directives'; import {ReflectionCapabilities} from '../../reflection/reflection_capabilities'; @@ -49,7 +49,7 @@ export function compileComponent(type: Type, metadata: Component): Promise< // Compile the component metadata, including template, into an expression. // TODO(alxhub): implement inputs, outputs, queries, etc. - const res = compileIvyComponent( + const res = compileR3Component( { ...directiveMetadata(type, metadata), template, @@ -83,7 +83,7 @@ export function compileDirective(type: Type, directive: Directive): Promise if (def === null) { const constantPool = new ConstantPool(); const sourceMapUrl = `ng://${type && type.name}/ngDirectiveDef.js`; - const res = compileIvyDirective( + const res = compileR3Directive( directiveMetadata(type, directive), constantPool, makeBindingParser()); def = jitExpression(res.expression, angularCoreEnv, sourceMapUrl, constantPool); } diff --git a/packages/core/src/render3/jit/injectable.ts b/packages/core/src/render3/jit/injectable.ts index eaf199c6a5..0b0b132421 100644 --- a/packages/core/src/render3/jit/injectable.ts +++ b/packages/core/src/render3/jit/injectable.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {Expression, LiteralExpr, R3DependencyMetadata, WrappedNodeExpr, compileInjectable as compileIvyInjectable, jitExpression} from '@angular/compiler'; +import {Expression, LiteralExpr, R3DependencyMetadata, WrappedNodeExpr, compileInjectable as compileR3Injectable, jitExpression} from '@angular/compiler'; import {Injectable} from '../../di/injectable'; import {ClassSansProvider, ExistingSansProvider, FactorySansProvider, StaticClassSansProvider, ValueProvider, ValueSansProvider} from '../../di/provider'; @@ -74,7 +74,7 @@ export function compileInjectable(type: Type, meta?: Injectable): void { throw new Error(`Unreachable state.`); } - const {expression} = compileIvyInjectable({ + const {expression} = compileR3Injectable({ name: type.name, type: new WrappedNodeExpr(type), providedIn: computeProvidedIn(meta.providedIn), diff --git a/packages/core/src/render3/jit/module.ts b/packages/core/src/render3/jit/module.ts index 51df46a86b..0f633d77ba 100644 --- a/packages/core/src/render3/jit/module.ts +++ b/packages/core/src/render3/jit/module.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import {Expression, R3NgModuleMetadata, WrappedNodeExpr, compileNgModule as compileIvyNgModule, jitExpression} from '@angular/compiler'; +import {Expression, R3NgModuleMetadata, WrappedNodeExpr, compileNgModule as compileR3NgModule, jitExpression} from '@angular/compiler'; import {ModuleWithProviders, NgModule, NgModuleDef} from '../../metadata/ng_module'; import {Type} from '../../type'; @@ -76,7 +76,7 @@ export function compileNgModule(type: Type, ngModule: NgModule): void { flatten(ngModule.exports || EMPTY_ARRAY).map(expandModuleWithProviders).map(wrap), emitInline: true, }; - const res = compileIvyNgModule(meta); + const res = compileR3NgModule(meta); def = jitExpression(res.expression, angularCoreEnv, `ng://${type.name}/ngModuleDef.js`); def.transitiveCompileScope = transitiveCompileScope; }