UNPKG

angular2

Version:

Angular 2 - a web framework for modern web apps

61 lines 3.55 kB
'use strict';(function (RecordType) { RecordType[RecordType["Self"] = 0] = "Self"; RecordType[RecordType["Const"] = 1] = "Const"; RecordType[RecordType["PrimitiveOp"] = 2] = "PrimitiveOp"; RecordType[RecordType["PropertyRead"] = 3] = "PropertyRead"; RecordType[RecordType["PropertyWrite"] = 4] = "PropertyWrite"; RecordType[RecordType["Local"] = 5] = "Local"; RecordType[RecordType["InvokeMethod"] = 6] = "InvokeMethod"; RecordType[RecordType["InvokeClosure"] = 7] = "InvokeClosure"; RecordType[RecordType["KeyedRead"] = 8] = "KeyedRead"; RecordType[RecordType["KeyedWrite"] = 9] = "KeyedWrite"; RecordType[RecordType["Pipe"] = 10] = "Pipe"; RecordType[RecordType["Interpolate"] = 11] = "Interpolate"; RecordType[RecordType["SafeProperty"] = 12] = "SafeProperty"; RecordType[RecordType["CollectionLiteral"] = 13] = "CollectionLiteral"; RecordType[RecordType["SafeMethodInvoke"] = 14] = "SafeMethodInvoke"; RecordType[RecordType["DirectiveLifecycle"] = 15] = "DirectiveLifecycle"; RecordType[RecordType["Chain"] = 16] = "Chain"; RecordType[RecordType["SkipRecordsIf"] = 17] = "SkipRecordsIf"; RecordType[RecordType["SkipRecordsIfNot"] = 18] = "SkipRecordsIfNot"; RecordType[RecordType["SkipRecords"] = 19] = "SkipRecords"; // Skip records unconditionally })(exports.RecordType || (exports.RecordType = {})); var RecordType = exports.RecordType; var ProtoRecord = (function () { function ProtoRecord(mode, name, funcOrValue, args, fixedArgs, contextIndex, directiveIndex, selfIndex, bindingRecord, lastInBinding, lastInDirective, argumentToPureFunction, referencedBySelf, propertyBindingIndex) { this.mode = mode; this.name = name; this.funcOrValue = funcOrValue; this.args = args; this.fixedArgs = fixedArgs; this.contextIndex = contextIndex; this.directiveIndex = directiveIndex; this.selfIndex = selfIndex; this.bindingRecord = bindingRecord; this.lastInBinding = lastInBinding; this.lastInDirective = lastInDirective; this.argumentToPureFunction = argumentToPureFunction; this.referencedBySelf = referencedBySelf; this.propertyBindingIndex = propertyBindingIndex; } ProtoRecord.prototype.isPureFunction = function () { return this.mode === RecordType.Interpolate || this.mode === RecordType.CollectionLiteral; }; ProtoRecord.prototype.isUsedByOtherRecord = function () { return !this.lastInBinding || this.referencedBySelf; }; ProtoRecord.prototype.shouldBeChecked = function () { return this.argumentToPureFunction || this.lastInBinding || this.isPureFunction() || this.isPipeRecord(); }; ProtoRecord.prototype.isPipeRecord = function () { return this.mode === RecordType.Pipe; }; ProtoRecord.prototype.isConditionalSkipRecord = function () { return this.mode === RecordType.SkipRecordsIfNot || this.mode === RecordType.SkipRecordsIf; }; ProtoRecord.prototype.isUnconditionalSkipRecord = function () { return this.mode === RecordType.SkipRecords; }; ProtoRecord.prototype.isSkipRecord = function () { return this.isConditionalSkipRecord() || this.isUnconditionalSkipRecord(); }; ProtoRecord.prototype.isLifeCycleRecord = function () { return this.mode === RecordType.DirectiveLifecycle; }; return ProtoRecord; })(); exports.ProtoRecord = ProtoRecord; //# sourceMappingURL=proto_record.js.map