| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 1872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1883 if (result_saved) { | 1883 if (result_saved) { |
| 1884 __ Drop(1); // literal index | 1884 __ Drop(1); // literal index |
| 1885 context()->PlugTOS(); | 1885 context()->PlugTOS(); |
| 1886 } else { | 1886 } else { |
| 1887 context()->Plug(x0); | 1887 context()->Plug(x0); |
| 1888 } | 1888 } |
| 1889 } | 1889 } |
| 1890 | 1890 |
| 1891 | 1891 |
| 1892 void FullCodeGenerator::VisitAssignment(Assignment* expr) { | 1892 void FullCodeGenerator::VisitAssignment(Assignment* expr) { |
| 1893 ASSERT(expr->target()->IsValidLeftHandSide()); | 1893 ASSERT(expr->target()->IsValidReferenceExpression()); |
| 1894 | 1894 |
| 1895 Comment cmnt(masm_, "[ Assignment"); | 1895 Comment cmnt(masm_, "[ Assignment"); |
| 1896 | 1896 |
| 1897 // Left-hand side can only be a property, a global or a (parameter or local) | 1897 // Left-hand side can only be a property, a global or a (parameter or local) |
| 1898 // slot. | 1898 // slot. |
| 1899 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; | 1899 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; |
| 1900 LhsKind assign_type = VARIABLE; | 1900 LhsKind assign_type = VARIABLE; |
| 1901 Property* property = expr->target()->AsProperty(); | 1901 Property* property = expr->target()->AsProperty(); |
| 1902 if (property != NULL) { | 1902 if (property != NULL) { |
| 1903 assign_type = (property->key()->IsPropertyName()) | 1903 assign_type = (property->key()->IsPropertyName()) |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2124 { | 2124 { |
| 2125 Assembler::BlockPoolsScope scope(masm_); | 2125 Assembler::BlockPoolsScope scope(masm_); |
| 2126 CallIC(stub.GetCode(isolate()), expr->BinaryOperationFeedbackId()); | 2126 CallIC(stub.GetCode(isolate()), expr->BinaryOperationFeedbackId()); |
| 2127 patch_site.EmitPatchInfo(); | 2127 patch_site.EmitPatchInfo(); |
| 2128 } | 2128 } |
| 2129 context()->Plug(x0); | 2129 context()->Plug(x0); |
| 2130 } | 2130 } |
| 2131 | 2131 |
| 2132 | 2132 |
| 2133 void FullCodeGenerator::EmitAssignment(Expression* expr) { | 2133 void FullCodeGenerator::EmitAssignment(Expression* expr) { |
| 2134 ASSERT(expr->IsValidLeftHandSide()); | 2134 ASSERT(expr->IsValidReferenceExpression()); |
| 2135 | 2135 |
| 2136 // Left-hand side can only be a property, a global or a (parameter or local) | 2136 // Left-hand side can only be a property, a global or a (parameter or local) |
| 2137 // slot. | 2137 // slot. |
| 2138 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; | 2138 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; |
| 2139 LhsKind assign_type = VARIABLE; | 2139 LhsKind assign_type = VARIABLE; |
| 2140 Property* prop = expr->AsProperty(); | 2140 Property* prop = expr->AsProperty(); |
| 2141 if (prop != NULL) { | 2141 if (prop != NULL) { |
| 2142 assign_type = (prop->key()->IsPropertyName()) | 2142 assign_type = (prop->key()->IsPropertyName()) |
| 2143 ? NAMED_PROPERTY | 2143 ? NAMED_PROPERTY |
| 2144 : KEYED_PROPERTY; | 2144 : KEYED_PROPERTY; |
| (...skipping 1873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4018 context()->Plug(x0); | 4018 context()->Plug(x0); |
| 4019 break; | 4019 break; |
| 4020 } | 4020 } |
| 4021 default: | 4021 default: |
| 4022 UNREACHABLE(); | 4022 UNREACHABLE(); |
| 4023 } | 4023 } |
| 4024 } | 4024 } |
| 4025 | 4025 |
| 4026 | 4026 |
| 4027 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { | 4027 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
| 4028 ASSERT(expr->expression()->IsValidLeftHandSide()); | 4028 ASSERT(expr->expression()->IsValidReferenceExpression()); |
| 4029 | 4029 |
| 4030 Comment cmnt(masm_, "[ CountOperation"); | 4030 Comment cmnt(masm_, "[ CountOperation"); |
| 4031 SetSourcePosition(expr->position()); | 4031 SetSourcePosition(expr->position()); |
| 4032 | 4032 |
| 4033 // Expression can only be a property, a global or a (parameter or local) | 4033 // Expression can only be a property, a global or a (parameter or local) |
| 4034 // slot. | 4034 // slot. |
| 4035 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; | 4035 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; |
| 4036 LhsKind assign_type = VARIABLE; | 4036 LhsKind assign_type = VARIABLE; |
| 4037 Property* prop = expr->expression()->AsProperty(); | 4037 Property* prop = expr->expression()->AsProperty(); |
| 4038 // In case of a property we use the uninitialized expression context | 4038 // In case of a property we use the uninitialized expression context |
| (...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5010 return previous_; | 5010 return previous_; |
| 5011 } | 5011 } |
| 5012 | 5012 |
| 5013 | 5013 |
| 5014 #undef __ | 5014 #undef __ |
| 5015 | 5015 |
| 5016 | 5016 |
| 5017 } } // namespace v8::internal | 5017 } } // namespace v8::internal |
| 5018 | 5018 |
| 5019 #endif // V8_TARGET_ARCH_ARM64 | 5019 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |