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

Side by Side Diff: src/arm/full-codegen-arm.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 | « no previous file | src/arm64/full-codegen-arm64.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 __ pop(); // literal index 1884 __ pop(); // literal index
1885 context()->PlugTOS(); 1885 context()->PlugTOS();
1886 } else { 1886 } else {
1887 context()->Plug(r0); 1887 context()->Plug(r0);
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 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
2425 __ pop(r1); 2425 __ pop(r1);
2426 BinaryOpICStub stub(op, mode); 2426 BinaryOpICStub stub(op, mode);
2427 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. 2427 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code.
2428 CallIC(stub.GetCode(isolate()), expr->BinaryOperationFeedbackId()); 2428 CallIC(stub.GetCode(isolate()), expr->BinaryOperationFeedbackId());
2429 patch_site.EmitPatchInfo(); 2429 patch_site.EmitPatchInfo();
2430 context()->Plug(r0); 2430 context()->Plug(r0);
2431 } 2431 }
2432 2432
2433 2433
2434 void FullCodeGenerator::EmitAssignment(Expression* expr) { 2434 void FullCodeGenerator::EmitAssignment(Expression* expr) {
2435 ASSERT(expr->IsValidLeftHandSide()); 2435 ASSERT(expr->IsValidReferenceExpression());
2436 2436
2437 // Left-hand side can only be a property, a global or a (parameter or local) 2437 // Left-hand side can only be a property, a global or a (parameter or local)
2438 // slot. 2438 // slot.
2439 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; 2439 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY };
2440 LhsKind assign_type = VARIABLE; 2440 LhsKind assign_type = VARIABLE;
2441 Property* prop = expr->AsProperty(); 2441 Property* prop = expr->AsProperty();
2442 if (prop != NULL) { 2442 if (prop != NULL) {
2443 assign_type = (prop->key()->IsPropertyName()) 2443 assign_type = (prop->key()->IsPropertyName())
2444 ? NAMED_PROPERTY 2444 ? NAMED_PROPERTY
2445 : KEYED_PROPERTY; 2445 : KEYED_PROPERTY;
(...skipping 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after
4287 break; 4287 break;
4288 } 4288 }
4289 4289
4290 default: 4290 default:
4291 UNREACHABLE(); 4291 UNREACHABLE();
4292 } 4292 }
4293 } 4293 }
4294 4294
4295 4295
4296 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { 4296 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
4297 ASSERT(expr->expression()->IsValidLeftHandSide()); 4297 ASSERT(expr->expression()->IsValidReferenceExpression());
4298 4298
4299 Comment cmnt(masm_, "[ CountOperation"); 4299 Comment cmnt(masm_, "[ CountOperation");
4300 SetSourcePosition(expr->position()); 4300 SetSourcePosition(expr->position());
4301 4301
4302 // Expression can only be a property, a global or a (parameter or local) 4302 // Expression can only be a property, a global or a (parameter or local)
4303 // slot. 4303 // slot.
4304 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; 4304 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY };
4305 LhsKind assign_type = VARIABLE; 4305 LhsKind assign_type = VARIABLE;
4306 Property* prop = expr->expression()->AsProperty(); 4306 Property* prop = expr->expression()->AsProperty();
4307 // In case of a property we use the uninitialized expression context 4307 // In case of a property we use the uninitialized expression context
(...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after
4927 4927
4928 ASSERT(interrupt_address == 4928 ASSERT(interrupt_address ==
4929 isolate->builtins()->OsrAfterStackCheck()->entry()); 4929 isolate->builtins()->OsrAfterStackCheck()->entry());
4930 return OSR_AFTER_STACK_CHECK; 4930 return OSR_AFTER_STACK_CHECK;
4931 } 4931 }
4932 4932
4933 4933
4934 } } // namespace v8::internal 4934 } } // namespace v8::internal
4935 4935
4936 #endif // V8_TARGET_ARCH_ARM 4936 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698