refactor(compiler): move static_reflector
into @angular/compiler
and rename files
- `src/runtime_compiler.ts` -> `src/jit/compiler.ts` - `src/compiler.ts` -> `src/jit/compiler_factory.ts` - `src/offline_compiler` -> `src/aot/compiler.ts` Part of #12867
This commit is contained in:

committed by
Chuck Jazdzewski

parent
030facc66a
commit
8f295287a2
@ -20,18 +20,16 @@ import * as ts from 'typescript';
|
||||
|
||||
import {extractProgramSymbols} from './codegen';
|
||||
import {ReflectorHost} from './reflector_host';
|
||||
import {StaticAndDynamicReflectionCapabilities} from './static_reflection_capabilities';
|
||||
import {StaticReflector, StaticSymbol} from './static_reflector';
|
||||
|
||||
export class Extractor {
|
||||
constructor(
|
||||
private options: tsc.AngularCompilerOptions, private program: ts.Program,
|
||||
public host: ts.CompilerHost, private staticReflector: StaticReflector,
|
||||
public host: ts.CompilerHost, private staticReflector: compiler.StaticReflector,
|
||||
private messageBundle: compiler.MessageBundle, private reflectorHost: ReflectorHost,
|
||||
private metadataResolver: compiler.CompileMetadataResolver) {}
|
||||
|
||||
extract(): Promise<compiler.MessageBundle> {
|
||||
const programSymbols: StaticSymbol[] =
|
||||
const programSymbols: compiler.StaticSymbol[] =
|
||||
extractProgramSymbols(this.program, this.staticReflector, this.reflectorHost, this.options);
|
||||
|
||||
const {ngModules, files} = compiler.analyzeAndValidateNgModules(
|
||||
@ -72,8 +70,8 @@ export class Extractor {
|
||||
|
||||
const urlResolver: compiler.UrlResolver = compiler.createOfflineCompileUrlResolver();
|
||||
if (!reflectorHost) reflectorHost = new ReflectorHost(program, compilerHost, options);
|
||||
const staticReflector = new StaticReflector(reflectorHost);
|
||||
StaticAndDynamicReflectionCapabilities.install(staticReflector);
|
||||
const staticReflector = new compiler.StaticReflector(reflectorHost);
|
||||
compiler.StaticAndDynamicReflectionCapabilities.install(staticReflector);
|
||||
|
||||
const config = new compiler.CompilerConfig({
|
||||
genDebugInfo: options.debug === true,
|
||||
|
Reference in New Issue
Block a user