feat(transpiler): constructor and typed field semantics
fixes #11 (constructor and typed field semantics) fixes #42 (Should we infer class property types from ctor args ?) fixes #17 (number (js) should map to num (dart)) Closes #45
This commit is contained in:

committed by
Misko Hevery

parent
fd0c2d8063
commit
089a2f1b62
@ -12,7 +12,7 @@ export class ChangeDetection {
|
||||
}
|
||||
|
||||
detectChanges():int {
|
||||
var current:Record = _rootWatchGroup._headRecord;
|
||||
var current:Record = _rootWatchGroup.headRecord;
|
||||
var count:number = 0;
|
||||
while (current != null) {
|
||||
if (current.check()) {
|
||||
|
@ -2,11 +2,11 @@ import {ProtoRecord, Record} from './record';
|
||||
import {FIELD} from 'facade/lang';
|
||||
|
||||
export class ProtoWatchGroup {
|
||||
@FIELD('final _headRecord:ProtoRecord')
|
||||
@FIELD('final _tailRecord:ProtoRecord')
|
||||
@FIELD('final headRecord:ProtoRecord')
|
||||
@FIELD('final tailRecord:ProtoRecord')
|
||||
constructor() {
|
||||
this._headRecord = null;
|
||||
this._tailRecord = null;
|
||||
this.headRecord = null;
|
||||
this.tailRecord = null;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -29,7 +29,7 @@ export class ProtoWatchGroup {
|
||||
var watchGroup:WatchGroup = new WatchGroup(this, dispatcher);
|
||||
var head:Record = null;
|
||||
var tail:Record = null;
|
||||
var proto:ProtoRecord = this._headRecord;
|
||||
var proto:ProtoRecord = this.headRecord;
|
||||
|
||||
while(proto != null) {
|
||||
tail = proto.instantiate(watchGroup);
|
||||
@ -37,14 +37,14 @@ export class ProtoWatchGroup {
|
||||
proto = proto.next;
|
||||
}
|
||||
|
||||
proto = this._headRecord;
|
||||
proto = this.headRecord;
|
||||
while(proto != null) {
|
||||
proto.instantiateComplete();
|
||||
proto = proto.next;
|
||||
}
|
||||
|
||||
watchGroup._headRecord = head;
|
||||
watchGroup._tailRecord = tail;
|
||||
watchGroup.headRecord = head;
|
||||
watchGroup.tailRecord = tail;
|
||||
return watchGroup;
|
||||
}
|
||||
|
||||
@ -53,13 +53,13 @@ export class ProtoWatchGroup {
|
||||
export class WatchGroup {
|
||||
@FIELD('final protoWatchGroup:ProtoWatchGroup')
|
||||
@FIELD('final dispatcher:WatchGroupDispatcher')
|
||||
@FIELD('final _headRecord:Record')
|
||||
@FIELD('final _tailRecord:Record')
|
||||
@FIELD('final headRecord:Record')
|
||||
@FIELD('final tailRecord:Record')
|
||||
constructor(protoWatchGroup:ProtoWatchGroup, dispatcher:WatchGroupDispatcher) {
|
||||
this.protoWatchGroup = protoWatchGroup;
|
||||
this.dispatcher = dispatcher;
|
||||
this._headRecord = null;
|
||||
this._tailRecord = null;
|
||||
this.headRecord = null;
|
||||
this.tailRecord = null;
|
||||
}
|
||||
|
||||
insertChildGroup(newChild:WatchGroup, insertAfter:WatchGroup) {
|
||||
|
Reference in New Issue
Block a user