OLD | NEW |
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1683 // Find and mark all assignments to named properties in this (this.x =) | 1683 // Find and mark all assignments to named properties in this (this.x =) |
1684 if (top_scope_->is_function_scope()) { | 1684 if (top_scope_->is_function_scope()) { |
1685 this_property_assignment_finder.Update(top_scope_, stat); | 1685 this_property_assignment_finder.Update(top_scope_, stat); |
1686 } | 1686 } |
1687 processor->Add(stat); | 1687 processor->Add(stat); |
1688 } | 1688 } |
1689 | 1689 |
1690 // Propagate the collected information on this property assignments. | 1690 // Propagate the collected information on this property assignments. |
1691 if (top_scope_->is_function_scope()) { | 1691 if (top_scope_->is_function_scope()) { |
1692 bool only_simple_this_property_assignments = | 1692 bool only_simple_this_property_assignments = |
1693 this_property_assignment_finder.only_simple_this_property_assignments(); | 1693 this_property_assignment_finder.only_simple_this_property_assignments() |
| 1694 && top_scope_->declarations()->length() == 0; |
1694 if (only_simple_this_property_assignments) { | 1695 if (only_simple_this_property_assignments) { |
1695 temp_scope_->SetThisPropertyAssignmentInfo( | 1696 temp_scope_->SetThisPropertyAssignmentInfo( |
1696 only_simple_this_property_assignments, | 1697 only_simple_this_property_assignments, |
1697 this_property_assignment_finder.GetThisPropertyAssignments()); | 1698 this_property_assignment_finder.GetThisPropertyAssignments()); |
1698 } | 1699 } |
1699 } | 1700 } |
1700 return 0; | 1701 return 0; |
1701 } | 1702 } |
1702 | 1703 |
1703 | 1704 |
(...skipping 3389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5093 start_position, | 5094 start_position, |
5094 is_expression); | 5095 is_expression); |
5095 return result; | 5096 return result; |
5096 } | 5097 } |
5097 | 5098 |
5098 | 5099 |
5099 #undef NEW | 5100 #undef NEW |
5100 | 5101 |
5101 | 5102 |
5102 } } // namespace v8::internal | 5103 } } // namespace v8::internal |
OLD | NEW |