| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 if (expr->is_compound()) { | 669 if (expr->is_compound()) { |
| 670 switch (assign_type) { | 670 switch (assign_type) { |
| 671 case VARIABLE: | 671 case VARIABLE: |
| 672 EmitVariableLoad(expr->target()->AsVariableProxy()->var(), | 672 EmitVariableLoad(expr->target()->AsVariableProxy()->var(), |
| 673 Expression::kValue); | 673 Expression::kValue); |
| 674 break; | 674 break; |
| 675 case NAMED_PROPERTY: | 675 case NAMED_PROPERTY: |
| 676 EmitNamedPropertyLoad(prop, Expression::kValue); | 676 EmitNamedPropertyLoad(prop, Expression::kValue); |
| 677 break; | 677 break; |
| 678 case KEYED_PROPERTY: | 678 case KEYED_PROPERTY: |
| 679 EmitKeyedPropertyLoad(Expression::kValue); | 679 EmitKeyedPropertyLoad(prop, Expression::kValue); |
| 680 break; | 680 break; |
| 681 } | 681 } |
| 682 } | 682 } |
| 683 | 683 |
| 684 // Evaluate RHS expression. | 684 // Evaluate RHS expression. |
| 685 Expression* rhs = expr->value(); | 685 Expression* rhs = expr->value(); |
| 686 ASSERT_EQ(Expression::kValue, rhs->context()); | 686 ASSERT_EQ(Expression::kValue, rhs->context()); |
| 687 Visit(rhs); | 687 Visit(rhs); |
| 688 | 688 |
| 689 // If we have a compount assignment: Apply operator. | 689 // If we have a compount assignment: Apply operator. |
| 690 if (expr->is_compound()) { | 690 if (expr->is_compound()) { |
| 691 EmitCompoundAssignmentOp(expr->binary_op(), Expression::kValue); | 691 EmitCompoundAssignmentOp(expr->binary_op(), Expression::kValue); |
| 692 } | 692 } |
| 693 | 693 |
| 694 // Store the value. | 694 // Store the value. |
| 695 switch (assign_type) { | 695 switch (assign_type) { |
| 696 case VARIABLE: | 696 case VARIABLE: |
| 697 EmitVariableAssignment(expr); | 697 EmitVariableAssignment(expr->target()->AsVariableProxy()->var(), |
| 698 expr->context()); |
| 698 break; | 699 break; |
| 699 case NAMED_PROPERTY: | 700 case NAMED_PROPERTY: |
| 700 EmitNamedPropertyAssignment(expr); | 701 EmitNamedPropertyAssignment(expr); |
| 701 break; | 702 break; |
| 702 case KEYED_PROPERTY: | 703 case KEYED_PROPERTY: |
| 703 EmitKeyedPropertyAssignment(expr); | 704 EmitKeyedPropertyAssignment(expr); |
| 704 break; | 705 break; |
| 705 } | 706 } |
| 706 } | 707 } |
| 707 | 708 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 747 __ Drop(stack_depth); | 748 __ Drop(stack_depth); |
| 748 __ PopTryHandler(); | 749 __ PopTryHandler(); |
| 749 return 0; | 750 return 0; |
| 750 } | 751 } |
| 751 | 752 |
| 752 | 753 |
| 753 #undef __ | 754 #undef __ |
| 754 | 755 |
| 755 | 756 |
| 756 } } // namespace v8::internal | 757 } } // namespace v8::internal |
| OLD | NEW |