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

Side by Side Diff: src/ia32/full-codegen-ia32.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/heap.h ('k') | src/parser.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 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 1833 matching lines...) Expand 10 before | Expand all | Expand 10 after
1844 if (result_saved) { 1844 if (result_saved) {
1845 __ add(esp, Immediate(kPointerSize)); // literal index 1845 __ add(esp, Immediate(kPointerSize)); // literal index
1846 context()->PlugTOS(); 1846 context()->PlugTOS();
1847 } else { 1847 } else {
1848 context()->Plug(eax); 1848 context()->Plug(eax);
1849 } 1849 }
1850 } 1850 }
1851 1851
1852 1852
1853 void FullCodeGenerator::VisitAssignment(Assignment* expr) { 1853 void FullCodeGenerator::VisitAssignment(Assignment* expr) {
1854 ASSERT(expr->target()->IsValidLeftHandSide()); 1854 ASSERT(expr->target()->IsValidReferenceExpression());
1855 1855
1856 Comment cmnt(masm_, "[ Assignment"); 1856 Comment cmnt(masm_, "[ Assignment");
1857 1857
1858 // Left-hand side can only be a property, a global or a (parameter or local) 1858 // Left-hand side can only be a property, a global or a (parameter or local)
1859 // slot. 1859 // slot.
1860 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; 1860 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY };
1861 LhsKind assign_type = VARIABLE; 1861 LhsKind assign_type = VARIABLE;
1862 Property* property = expr->target()->AsProperty(); 1862 Property* property = expr->target()->AsProperty();
1863 if (property != NULL) { 1863 if (property != NULL) {
1864 assign_type = (property->key()->IsPropertyName()) 1864 assign_type = (property->key()->IsPropertyName())
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
2375 __ pop(edx); 2375 __ pop(edx);
2376 BinaryOpICStub stub(op, mode); 2376 BinaryOpICStub stub(op, mode);
2377 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. 2377 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code.
2378 CallIC(stub.GetCode(isolate()), expr->BinaryOperationFeedbackId()); 2378 CallIC(stub.GetCode(isolate()), expr->BinaryOperationFeedbackId());
2379 patch_site.EmitPatchInfo(); 2379 patch_site.EmitPatchInfo();
2380 context()->Plug(eax); 2380 context()->Plug(eax);
2381 } 2381 }
2382 2382
2383 2383
2384 void FullCodeGenerator::EmitAssignment(Expression* expr) { 2384 void FullCodeGenerator::EmitAssignment(Expression* expr) {
2385 ASSERT(expr->IsValidLeftHandSide()); 2385 ASSERT(expr->IsValidReferenceExpression());
2386 2386
2387 // Left-hand side can only be a property, a global or a (parameter or local) 2387 // Left-hand side can only be a property, a global or a (parameter or local)
2388 // slot. 2388 // slot.
2389 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; 2389 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY };
2390 LhsKind assign_type = VARIABLE; 2390 LhsKind assign_type = VARIABLE;
2391 Property* prop = expr->AsProperty(); 2391 Property* prop = expr->AsProperty();
2392 if (prop != NULL) { 2392 if (prop != NULL) {
2393 assign_type = (prop->key()->IsPropertyName()) 2393 assign_type = (prop->key()->IsPropertyName())
2394 ? NAMED_PROPERTY 2394 ? NAMED_PROPERTY
2395 : KEYED_PROPERTY; 2395 : KEYED_PROPERTY;
(...skipping 1894 matching lines...) Expand 10 before | Expand all | Expand 10 after
4290 break; 4290 break;
4291 } 4291 }
4292 4292
4293 default: 4293 default:
4294 UNREACHABLE(); 4294 UNREACHABLE();
4295 } 4295 }
4296 } 4296 }
4297 4297
4298 4298
4299 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { 4299 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
4300 ASSERT(expr->expression()->IsValidLeftHandSide()); 4300 ASSERT(expr->expression()->IsValidReferenceExpression());
4301 4301
4302 Comment cmnt(masm_, "[ CountOperation"); 4302 Comment cmnt(masm_, "[ CountOperation");
4303 SetSourcePosition(expr->position()); 4303 SetSourcePosition(expr->position());
4304 4304
4305 // Expression can only be a property, a global or a (parameter or local) 4305 // Expression can only be a property, a global or a (parameter or local)
4306 // slot. 4306 // slot.
4307 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; 4307 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY };
4308 LhsKind assign_type = VARIABLE; 4308 LhsKind assign_type = VARIABLE;
4309 Property* prop = expr->expression()->AsProperty(); 4309 Property* prop = expr->expression()->AsProperty();
4310 // In case of a property we use the uninitialized expression context 4310 // In case of a property we use the uninitialized expression context
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
4918 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 4918 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
4919 Assembler::target_address_at(call_target_address, 4919 Assembler::target_address_at(call_target_address,
4920 unoptimized_code)); 4920 unoptimized_code));
4921 return OSR_AFTER_STACK_CHECK; 4921 return OSR_AFTER_STACK_CHECK;
4922 } 4922 }
4923 4923
4924 4924
4925 } } // namespace v8::internal 4925 } } // namespace v8::internal
4926 4926
4927 #endif // V8_TARGET_ARCH_IA32 4927 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/heap.h ('k') | src/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698