Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Side by Side Diff: src/arm64/full-codegen-arm64.cc

Issue 217823003: Make invalid LHSs that are calls late errors (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comments Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/ast.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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
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
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/ast.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698