Skip to content

Commit

Permalink
Merge pull request #384 from mattjphillips/remove_app_optimization
Browse files Browse the repository at this point in the history
Remove problematic optimization for local base class properties.
  • Loading branch information
nikhilk committed Jun 19, 2013
2 parents 28cdf6f + 87cc02e commit 4bf7585
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
8 changes: 1 addition & 7 deletions src/Core/Compiler/Generator/ExpressionGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -860,13 +860,7 @@ private static void GeneratePropertyExpression(ScriptGenerator generator, Member
Debug.Assert(baseClass != null);

writer.Write(baseClass.FullGeneratedName);
if (baseClass.IsApplicationType) {
writer.Write("$.");
}
else {
writer.Write(".prototype.");
}
writer.Write("get_");
writer.Write(".prototype.get_");
writer.Write(expression.Property.GeneratedName);
writer.Write(".call(");
writer.Write(generator.CurrentImplementation.ThisIdentifier);
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCases/Expression/Members/Baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ define('test', ['ss'], function(ss) {
test2: function() {
var n = this.get_XYZ();
n = this.get_XYZ();
n = App$.get_XYZ.call(this);
n = App.prototype.get_XYZ.call(this);
this.set_XYZ(n);
this.set_XYZ(n);
ss.base(this, 'set_XYZ').call(this, n);
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCases/Member/Properties/Baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ define('test', ['ss'], function(ss) {

function Test2() {
Test.call(this);
var n = Test$.get_XYZ.call(this);
var n = Test.prototype.get_XYZ.call(this);
if (n === this.get_XYZ()) {
}
if (this.get_XYZ() === n) {
Expand Down

0 comments on commit 4bf7585

Please sign in to comment.