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

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

Issue 11607016: Simplify implementation of assignment-to-const checks (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comment Created 8 years 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/ia32/full-codegen-ia32.cc ('k') | src/parser.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 2029 matching lines...) Expand 10 before | Expand all | Expand 10 after
2040 BinaryOpStub stub(op, mode); 2040 BinaryOpStub stub(op, mode);
2041 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. 2041 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code.
2042 CallIC(stub.GetCode(), RelocInfo::CODE_TARGET, 2042 CallIC(stub.GetCode(), RelocInfo::CODE_TARGET,
2043 expr->BinaryOperationFeedbackId()); 2043 expr->BinaryOperationFeedbackId());
2044 patch_site.EmitPatchInfo(); 2044 patch_site.EmitPatchInfo();
2045 context()->Plug(v0); 2045 context()->Plug(v0);
2046 } 2046 }
2047 2047
2048 2048
2049 void FullCodeGenerator::EmitAssignment(Expression* expr) { 2049 void FullCodeGenerator::EmitAssignment(Expression* expr) {
2050 // Invalid left-hand sides are rewritten to have a 'throw 2050 // Invalid left-hand sides are rewritten by the parser to have a 'throw
2051 // ReferenceError' on the left-hand side. 2051 // ReferenceError' on the left-hand side.
2052 if (!expr->IsValidLeftHandSide()) { 2052 if (!expr->IsValidLeftHandSide()) {
2053 VisitForEffect(expr); 2053 VisitForEffect(expr);
2054 return; 2054 return;
2055 } 2055 }
2056 2056
2057 // Left-hand side can only be a property, a global or a (parameter or local) 2057 // Left-hand side can only be a property, a global or a (parameter or local)
2058 // slot. 2058 // slot.
2059 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; 2059 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY };
2060 LhsKind assign_type = VARIABLE; 2060 LhsKind assign_type = VARIABLE;
(...skipping 2483 matching lines...) Expand 10 before | Expand all | Expand 10 after
4544 *context_length = 0; 4544 *context_length = 0;
4545 return previous_; 4545 return previous_;
4546 } 4546 }
4547 4547
4548 4548
4549 #undef __ 4549 #undef __
4550 4550
4551 } } // namespace v8::internal 4551 } } // namespace v8::internal
4552 4552
4553 #endif // V8_TARGET_ARCH_MIPS 4553 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698