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

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

Issue 10832157: Unify handling of bailout IDs for property loads. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Incorporated review comments. Created 8 years, 4 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/mips/full-codegen-mips.cc ('k') | no next file » | 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 1791 matching lines...) Expand 10 before | Expand all | Expand 10 after
1802 // variable/property load. 1802 // variable/property load.
1803 if (expr->is_compound()) { 1803 if (expr->is_compound()) {
1804 { AccumulatorValueContext context(this); 1804 { AccumulatorValueContext context(this);
1805 switch (assign_type) { 1805 switch (assign_type) {
1806 case VARIABLE: 1806 case VARIABLE:
1807 EmitVariableLoad(expr->target()->AsVariableProxy()); 1807 EmitVariableLoad(expr->target()->AsVariableProxy());
1808 PrepareForBailout(expr->target(), TOS_REG); 1808 PrepareForBailout(expr->target(), TOS_REG);
1809 break; 1809 break;
1810 case NAMED_PROPERTY: 1810 case NAMED_PROPERTY:
1811 EmitNamedPropertyLoad(property); 1811 EmitNamedPropertyLoad(property);
1812 PrepareForBailoutForId(expr->CompoundLoadId(), TOS_REG); 1812 PrepareForBailoutForId(property->LoadId(), TOS_REG);
1813 break; 1813 break;
1814 case KEYED_PROPERTY: 1814 case KEYED_PROPERTY:
1815 EmitKeyedPropertyLoad(property); 1815 EmitKeyedPropertyLoad(property);
1816 PrepareForBailoutForId(expr->CompoundLoadId(), TOS_REG); 1816 PrepareForBailoutForId(property->LoadId(), TOS_REG);
1817 break; 1817 break;
1818 } 1818 }
1819 } 1819 }
1820 1820
1821 Token::Value op = expr->binary_op(); 1821 Token::Value op = expr->binary_op();
1822 __ push(rax); // Left operand goes on the stack. 1822 __ push(rax); // Left operand goes on the stack.
1823 VisitForAccumulatorValue(expr->value()); 1823 VisitForAccumulatorValue(expr->value());
1824 1824
1825 OverwriteMode mode = expr->value()->ResultOverwriteAllowed() 1825 OverwriteMode mode = expr->value()->ResultOverwriteAllowed()
1826 ? OVERWRITE_RIGHT 1826 ? OVERWRITE_RIGHT
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
2183 } 2183 }
2184 2184
2185 2185
2186 void FullCodeGenerator::VisitProperty(Property* expr) { 2186 void FullCodeGenerator::VisitProperty(Property* expr) {
2187 Comment cmnt(masm_, "[ Property"); 2187 Comment cmnt(masm_, "[ Property");
2188 Expression* key = expr->key(); 2188 Expression* key = expr->key();
2189 2189
2190 if (key->IsPropertyName()) { 2190 if (key->IsPropertyName()) {
2191 VisitForAccumulatorValue(expr->obj()); 2191 VisitForAccumulatorValue(expr->obj());
2192 EmitNamedPropertyLoad(expr); 2192 EmitNamedPropertyLoad(expr);
2193 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); 2193 PrepareForBailoutForId(expr->LoadId(), TOS_REG);
2194 context()->Plug(rax); 2194 context()->Plug(rax);
2195 } else { 2195 } else {
2196 VisitForStackValue(expr->obj()); 2196 VisitForStackValue(expr->obj());
2197 VisitForAccumulatorValue(expr->key()); 2197 VisitForAccumulatorValue(expr->key());
2198 __ pop(rdx); 2198 __ pop(rdx);
2199 EmitKeyedPropertyLoad(expr); 2199 EmitKeyedPropertyLoad(expr);
2200 context()->Plug(rax); 2200 context()->Plug(rax);
2201 } 2201 }
2202 } 2202 }
2203 2203
(...skipping 1812 matching lines...) Expand 10 before | Expand all | Expand 10 after
4016 __ push(rax); // Copy of key, needed for later store. 4016 __ push(rax); // Copy of key, needed for later store.
4017 EmitKeyedPropertyLoad(prop); 4017 EmitKeyedPropertyLoad(prop);
4018 } 4018 }
4019 } 4019 }
4020 4020
4021 // We need a second deoptimization point after loading the value 4021 // We need a second deoptimization point after loading the value
4022 // in case evaluating the property load my have a side effect. 4022 // in case evaluating the property load my have a side effect.
4023 if (assign_type == VARIABLE) { 4023 if (assign_type == VARIABLE) {
4024 PrepareForBailout(expr->expression(), TOS_REG); 4024 PrepareForBailout(expr->expression(), TOS_REG);
4025 } else { 4025 } else {
4026 PrepareForBailoutForId(expr->CountId(), TOS_REG); 4026 PrepareForBailoutForId(prop->LoadId(), TOS_REG);
4027 } 4027 }
4028 4028
4029 // Call ToNumber only if operand is not a smi. 4029 // Call ToNumber only if operand is not a smi.
4030 Label no_conversion; 4030 Label no_conversion;
4031 __ JumpIfSmi(rax, &no_conversion, Label::kNear); 4031 __ JumpIfSmi(rax, &no_conversion, Label::kNear);
4032 ToNumberStub convert_stub; 4032 ToNumberStub convert_stub;
4033 __ CallStub(&convert_stub); 4033 __ CallStub(&convert_stub);
4034 __ bind(&no_conversion); 4034 __ bind(&no_conversion);
4035 4035
4036 // Save result for postfix expressions. 4036 // Save result for postfix expressions.
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
4539 *context_length = 0; 4539 *context_length = 0;
4540 return previous_; 4540 return previous_;
4541 } 4541 }
4542 4542
4543 4543
4544 #undef __ 4544 #undef __
4545 4545
4546 } } // namespace v8::internal 4546 } } // namespace v8::internal
4547 4547
4548 #endif // V8_TARGET_ARCH_X64 4548 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/mips/full-codegen-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698