angular-cn/modules/@angular/upgrade
Tobias Bosch db49d422f2 refactor(compiler): generate less code for bindings to DOM elements
Detailed changes:
- remove `UNINITIALIZED`, initialize change detection fields with `undefined`.
  * we use `view.numberOfChecks === 0` now everywhere
    as indicator whether we are in the first change detection cycle
    (previously we used this only in a couple of places).
  * we keep the initialization itself as change detection get slower without it.
- remove passing around `throwOnChange` in various generated calls,
  and store it on the view as property instead.
- change generated code for bindings to DOM elements as follows:
  Before:
  ```
  var currVal_10 = self.context.bgColor;
  if (jit_checkBinding15(self.throwOnChange,self._expr_10,currVal_10)) {
    self.renderer.setElementStyle(self._el_0,'backgroundColor',((self.viewUtils.sanitizer.sanitize(jit_21,currVal_10) == null)? null: self.viewUtils.sanitizer.sanitize(jit_21,currVal_10).toString()));
    self._expr_10 = currVal_10;
  }
  var currVal_11 = jit_inlineInterpolate16(1,' ',self.context.data.value,' ');
  if (jit_checkBinding15(self.throwOnChange,self._expr_11,currVal_11)) {
    self.renderer.setText(self._text_1,currVal_11);
    self._expr_11 = currVal_11;
  }
  ```,
  After:
  ```
  var currVal_10 = self.context.bgColor;
  jit_checkRenderStyle14(self,self._el_0,'backgroundColor',null,self._expr_10,self._expr_10=currVal_10,false,jit_21);
  var currVal_11 = jit_inlineInterpolate15(1,' ',self.context.data.value,' ');
  jit_checkRenderText16(self,self._text_1,self._expr_11,self._expr_11=currVal_11,false);
  ```

Performance impact:
- None seen (checked against internal latency lab)

Part of #13651
2017-01-03 13:05:05 -08:00
..
src refactor(compiler): generate less code for bindings to DOM elements 2017-01-03 13:05:05 -08:00
test fix(upgrade): fix/improve support for lifecycle hooks (#13020) 2016-12-27 14:42:53 -08:00
index.ts fix: display framework version on bootstrapped component (#13252) 2016-12-06 16:21:07 -08:00
package.json docs: update descriptions in package.jsons 2016-09-14 16:44:39 -07:00
rollup-static.config.js refactor(upgrade): re-export the new static upgrade APIs on new entry 2016-10-26 15:14:22 -07:00
rollup.config.js refactor: add license header to JS files & format files (#12081) 2016-10-04 20:39:20 -07:00
static.ts refactor(upgrade): re-export the new static upgrade APIs on new entry 2016-10-26 15:14:22 -07:00
tsconfig-build.json feature(tsc-wrapped): add option for closure compiler JSDoc annotations 2016-11-18 09:37:40 -08:00