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 1853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3998 context()->Plug(x0); | 3998 context()->Plug(x0); |
3999 break; | 3999 break; |
4000 } | 4000 } |
4001 default: | 4001 default: |
4002 UNREACHABLE(); | 4002 UNREACHABLE(); |
4003 } | 4003 } |
4004 } | 4004 } |
4005 | 4005 |
4006 | 4006 |
4007 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { | 4007 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
4008 ASSERT(expr->expression()->IsValidLeftHandSide()); | 4008 ASSERT(expr->expression()->IsValidReferenceExpression()); |
4009 | 4009 |
4010 Comment cmnt(masm_, "[ CountOperation"); | 4010 Comment cmnt(masm_, "[ CountOperation"); |
4011 SetSourcePosition(expr->position()); | 4011 SetSourcePosition(expr->position()); |
4012 | 4012 |
4013 // Expression can only be a property, a global or a (parameter or local) | 4013 // Expression can only be a property, a global or a (parameter or local) |
4014 // slot. | 4014 // slot. |
4015 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; | 4015 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; |
4016 LhsKind assign_type = VARIABLE; | 4016 LhsKind assign_type = VARIABLE; |
4017 Property* prop = expr->expression()->AsProperty(); | 4017 Property* prop = expr->expression()->AsProperty(); |
4018 // In case of a property we use the uninitialized expression context | 4018 // In case of a property we use the uninitialized expression context |
(...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4991 return previous_; | 4991 return previous_; |
4992 } | 4992 } |
4993 | 4993 |
4994 | 4994 |
4995 #undef __ | 4995 #undef __ |
4996 | 4996 |
4997 | 4997 |
4998 } } // namespace v8::internal | 4998 } } // namespace v8::internal |
4999 | 4999 |
5000 #endif // V8_TARGET_ARCH_ARM64 | 5000 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |