feat(RecordRange): Set context for implicit receivers only

This commit is contained in:
Victor Berchet
2014-11-24 15:32:25 +01:00
parent 69af7ea2c0
commit ab961b327e
2 changed files with 25 additions and 7 deletions

View File

@ -42,7 +42,7 @@ export class ProtoRecord {
dest) {
this.recordRange = recordRange;
this.mode = mode;
this._mode = mode;
this.funcOrValue = funcOrValue;
this.arity = arity;
this.dest = dest;
@ -52,6 +52,10 @@ export class ProtoRecord {
// The concrete Record instantiated from this ProtoRecord
this.recordInConstruction = null;
}
setIsImplicitReceiver() {
this._mode |= RECORD_FLAG_IMPLICIT_RECEIVER;
}
}
@ -117,7 +121,7 @@ export class Record {
return;
}
this._mode = protoRecord.mode;
this._mode = protoRecord._mode;
var type = this.type;
@ -160,6 +164,10 @@ export class Record {
}
}
get isImplicitReceiver() {
return (this._mode & RECORD_FLAG_IMPLICIT_RECEIVER) === RECORD_FLAG_IMPLICIT_RECEIVER;
}
static createMarker(rr:RecordRange) {
return new Record(rr, null, null);
}