Skip to content

Commit bfe3efa

Browse files
committed
chore(compiler): dead code clean-up.
Dead code that uglifyJS found. Closes angular#4907
1 parent ea6b316 commit bfe3efa

6 files changed

Lines changed: 0 additions & 28 deletions

File tree

modules/angular2/src/core/change_detection/dynamic_change_detector.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,10 +391,7 @@ export class DynamicChangeDetector extends AbstractChangeDetector<any> {
391391
_readContext(proto: ProtoRecord, values: any[]) {
392392
if (proto.contextIndex == -1) {
393393
return this._getDirectiveFor(proto.directiveIndex);
394-
} else {
395-
return values[proto.contextIndex];
396394
}
397-
398395
return values[proto.contextIndex];
399396
}
400397

modules/angular2/src/core/compiler/html_parser.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ import {
1919
import {escapeDoubleQuoteString} from './util';
2020
import {Injectable} from 'angular2/src/core/di';
2121

22-
const NG_NON_BINDABLE = 'ng-non-bindable';
23-
2422
@Injectable()
2523
export class HtmlParser {
2624
parse(template: string, sourceInfo: string): HtmlAst[] {

modules/angular2/src/core/compiler/runtime_metadata.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ import {reflector} from 'angular2/src/core/reflection/reflection';
2020
import {Injectable} from 'angular2/src/core/di';
2121
import {MODULE_SUFFIX} from './util';
2222

23-
// group 1: "property" from "[property]"
24-
// group 2: "event" from "(event)"
25-
var HOST_REG_EXP = /^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))$/g;
26-
2723
@Injectable()
2824
export class RuntimeMetadataResolver {
2925
private _cache = new Map<Type, cpl.CompileDirectiveMetadata>();

modules/angular2/src/core/compiler/template_parser.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -628,10 +628,6 @@ class BoundElementOrDirectiveProperty {
628628
public sourceInfo: string) {}
629629
}
630630

631-
class ParseError {
632-
constructor(public message: string, public sourceInfo: string) {}
633-
}
634-
635631
export function splitClasses(classAttrValue: string): string[] {
636632
return StringWrapper.split(classAttrValue.trim(), /\s+/g);
637633
}

modules/angular2/src/core/render/dom/dom_renderer.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -322,15 +322,6 @@ function moveNodesAfterSibling(sibling, nodes) {
322322
}
323323
}
324324

325-
function moveChildNodes(source: Node, target: Node) {
326-
var currChild = DOM.firstChild(source);
327-
while (isPresent(currChild)) {
328-
var nextChild = DOM.nextSibling(currChild);
329-
DOM.appendChild(target, currChild);
330-
currChild = nextChild;
331-
}
332-
}
333-
334325
function decoratePreventDefault(eventHandler: Function): Function {
335326
return (event) => {
336327
var allowDefaultBehavior = eventHandler(event);

modules/angular2/src/core/render/view_factory.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,3 @@ class Component<N> {
252252
[];
253253
}
254254
}
255-
256-
function addAll(source: any[], target: any[]) {
257-
for (var i = 0; i < source.length; i++) {
258-
target.push(source[i]);
259-
}
260-
}

0 commit comments

Comments
 (0)