nikhilk / scriptsharp

Script# Project - a C# to JavaScript compiler, to power your HTML5 and Node.js web development.
http://scriptsharp.com
Other
658 stars 182 forks source link

Remove problematic optimization for local base class properties. #384

Closed mattjphillips closed 11 years ago

mattjphillips commented 11 years ago

Per discussion in #379, the optimization for property expression generation was too optimistic: it assumed that the base class implements the property, but that's not necessarily the case -- it could be in some ancestor that isn't the base. The optimization is therefore removed.

Ideally we'd walk up the inheritance chain at expression generation time to find the appropriate class and use that, but the penalty for prototype access should be minimal.