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

Side by Side Diff: src/ia32/full-codegen-ia32.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/arm/full-codegen-arm.cc ('k') | src/mips/full-codegen-mips.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 1959 matching lines...) Expand 10 before | Expand all | Expand 10 after
1970 BinaryOpStub stub(op, mode); 1970 BinaryOpStub stub(op, mode);
1971 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. 1971 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code.
1972 CallIC(stub.GetCode(), RelocInfo::CODE_TARGET, 1972 CallIC(stub.GetCode(), RelocInfo::CODE_TARGET,
1973 expr->BinaryOperationFeedbackId()); 1973 expr->BinaryOperationFeedbackId());
1974 patch_site.EmitPatchInfo(); 1974 patch_site.EmitPatchInfo();
1975 context()->Plug(eax); 1975 context()->Plug(eax);
1976 } 1976 }
1977 1977
1978 1978
1979 void FullCodeGenerator::EmitAssignment(Expression* expr) { 1979 void FullCodeGenerator::EmitAssignment(Expression* expr) {
1980 // Invalid left-hand sides are rewritten to have a 'throw 1980 // Invalid left-hand sides are rewritten by the parser to have a 'throw
1981 // ReferenceError' on the left-hand side. 1981 // ReferenceError' on the left-hand side.
1982 if (!expr->IsValidLeftHandSide()) { 1982 if (!expr->IsValidLeftHandSide()) {
1983 VisitForEffect(expr); 1983 VisitForEffect(expr);
1984 return; 1984 return;
1985 } 1985 }
1986 1986
1987 // Left-hand side can only be a property, a global or a (parameter or local) 1987 // Left-hand side can only be a property, a global or a (parameter or local)
1988 // slot. 1988 // slot.
1989 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; 1989 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY };
1990 LhsKind assign_type = VARIABLE; 1990 LhsKind assign_type = VARIABLE;
(...skipping 2528 matching lines...) Expand 10 before | Expand all | Expand 10 after
4519 *stack_depth = 0; 4519 *stack_depth = 0;
4520 *context_length = 0; 4520 *context_length = 0;
4521 return previous_; 4521 return previous_;
4522 } 4522 }
4523 4523
4524 #undef __ 4524 #undef __
4525 4525
4526 } } // namespace v8::internal 4526 } } // namespace v8::internal
4527 4527
4528 #endif // V8_TARGET_ARCH_IA32 4528 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698