From d74dd1126b427b32ade04d83628227e5805472af Mon Sep 17 00:00:00 2001 From: vsavkin Date: Wed, 22 Apr 2015 14:48:53 -0700 Subject: [PATCH] cleanup(di): removed dead code --- .../angular2/src/core/compiler/element_injector.js | 12 ------------ modules/angular2/src/di/key.js | 2 -- 2 files changed, 14 deletions(-) diff --git a/modules/angular2/src/core/compiler/element_injector.js b/modules/angular2/src/core/compiler/element_injector.js index d996880c76..cb727c74bc 100644 --- a/modules/angular2/src/core/compiler/element_injector.js +++ b/modules/angular2/src/core/compiler/element_injector.js @@ -876,18 +876,6 @@ export class ElementInjector extends TreeNode { if (this._query2 == query) this._query2 = null; } - /* - * It is fairly easy to annotate keys with metadata. - * For example, key.metadata = 'directive'. - * - * This would allows to do the lookup more efficiently. - * - * for example - * we would lookup pre built objects only when metadata = 'preBuilt' - * we would lookup directives only when metadata = 'directive' - * - * Write benchmarks before doing this optimization. - */ _getByKey(key:Key, depth:number, optional:boolean, requestor:Key) { var ei = this; if (! this._shouldIncludeSelf(depth)) { diff --git a/modules/angular2/src/di/key.js b/modules/angular2/src/di/key.js index b7e7a79409..93038f8480 100644 --- a/modules/angular2/src/di/key.js +++ b/modules/angular2/src/di/key.js @@ -18,11 +18,9 @@ import {MapWrapper} from 'angular2/src/facade/collection'; export class Key { token; id/* :int */; - metadata:any; constructor(token, id/* :int */) { this.token = token; this.id = id; - this.metadata = null; } /**