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

Side by Side Diff: src/arm/full-codegen-arm.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 | « no previous file | src/ast.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 1819 matching lines...) Expand 10 before | Expand all | Expand 10 after
1830 // variable/property load. 1830 // variable/property load.
1831 if (expr->is_compound()) { 1831 if (expr->is_compound()) {
1832 { AccumulatorValueContext context(this); 1832 { AccumulatorValueContext context(this);
1833 switch (assign_type) { 1833 switch (assign_type) {
1834 case VARIABLE: 1834 case VARIABLE:
1835 EmitVariableLoad(expr->target()->AsVariableProxy()); 1835 EmitVariableLoad(expr->target()->AsVariableProxy());
1836 PrepareForBailout(expr->target(), TOS_REG); 1836 PrepareForBailout(expr->target(), TOS_REG);
1837 break; 1837 break;
1838 case NAMED_PROPERTY: 1838 case NAMED_PROPERTY:
1839 EmitNamedPropertyLoad(property); 1839 EmitNamedPropertyLoad(property);
1840 PrepareForBailoutForId(expr->CompoundLoadId(), TOS_REG); 1840 PrepareForBailoutForId(property->LoadId(), TOS_REG);
1841 break; 1841 break;
1842 case KEYED_PROPERTY: 1842 case KEYED_PROPERTY:
1843 EmitKeyedPropertyLoad(property); 1843 EmitKeyedPropertyLoad(property);
1844 PrepareForBailoutForId(expr->CompoundLoadId(), TOS_REG); 1844 PrepareForBailoutForId(property->LoadId(), TOS_REG);
1845 break; 1845 break;
1846 } 1846 }
1847 } 1847 }
1848 1848
1849 Token::Value op = expr->binary_op(); 1849 Token::Value op = expr->binary_op();
1850 __ push(r0); // Left operand goes on the stack. 1850 __ push(r0); // Left operand goes on the stack.
1851 VisitForAccumulatorValue(expr->value()); 1851 VisitForAccumulatorValue(expr->value());
1852 1852
1853 OverwriteMode mode = expr->value()->ResultOverwriteAllowed() 1853 OverwriteMode mode = expr->value()->ResultOverwriteAllowed()
1854 ? OVERWRITE_RIGHT 1854 ? OVERWRITE_RIGHT
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
2270 } 2270 }
2271 2271
2272 2272
2273 void FullCodeGenerator::VisitProperty(Property* expr) { 2273 void FullCodeGenerator::VisitProperty(Property* expr) {
2274 Comment cmnt(masm_, "[ Property"); 2274 Comment cmnt(masm_, "[ Property");
2275 Expression* key = expr->key(); 2275 Expression* key = expr->key();
2276 2276
2277 if (key->IsPropertyName()) { 2277 if (key->IsPropertyName()) {
2278 VisitForAccumulatorValue(expr->obj()); 2278 VisitForAccumulatorValue(expr->obj());
2279 EmitNamedPropertyLoad(expr); 2279 EmitNamedPropertyLoad(expr);
2280 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); 2280 PrepareForBailoutForId(expr->LoadId(), TOS_REG);
2281 context()->Plug(r0); 2281 context()->Plug(r0);
2282 } else { 2282 } else {
2283 VisitForStackValue(expr->obj()); 2283 VisitForStackValue(expr->obj());
2284 VisitForAccumulatorValue(expr->key()); 2284 VisitForAccumulatorValue(expr->key());
2285 __ pop(r1); 2285 __ pop(r1);
2286 EmitKeyedPropertyLoad(expr); 2286 EmitKeyedPropertyLoad(expr);
2287 context()->Plug(r0); 2287 context()->Plug(r0);
2288 } 2288 }
2289 } 2289 }
2290 2290
(...skipping 1765 matching lines...) Expand 10 before | Expand all | Expand 10 after
4056 __ push(r0); 4056 __ push(r0);
4057 EmitKeyedPropertyLoad(prop); 4057 EmitKeyedPropertyLoad(prop);
4058 } 4058 }
4059 } 4059 }
4060 4060
4061 // We need a second deoptimization point after loading the value 4061 // We need a second deoptimization point after loading the value
4062 // in case evaluating the property load my have a side effect. 4062 // in case evaluating the property load my have a side effect.
4063 if (assign_type == VARIABLE) { 4063 if (assign_type == VARIABLE) {
4064 PrepareForBailout(expr->expression(), TOS_REG); 4064 PrepareForBailout(expr->expression(), TOS_REG);
4065 } else { 4065 } else {
4066 PrepareForBailoutForId(expr->CountId(), TOS_REG); 4066 PrepareForBailoutForId(prop->LoadId(), TOS_REG);
4067 } 4067 }
4068 4068
4069 // Call ToNumber only if operand is not a smi. 4069 // Call ToNumber only if operand is not a smi.
4070 Label no_conversion; 4070 Label no_conversion;
4071 __ JumpIfSmi(r0, &no_conversion); 4071 __ JumpIfSmi(r0, &no_conversion);
4072 ToNumberStub convert_stub; 4072 ToNumberStub convert_stub;
4073 __ CallStub(&convert_stub); 4073 __ CallStub(&convert_stub);
4074 __ bind(&no_conversion); 4074 __ bind(&no_conversion);
4075 4075
4076 // Save result for postfix expressions. 4076 // Save result for postfix expressions.
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
4573 *context_length = 0; 4573 *context_length = 0;
4574 return previous_; 4574 return previous_;
4575 } 4575 }
4576 4576
4577 4577
4578 #undef __ 4578 #undef __
4579 4579
4580 } } // namespace v8::internal 4580 } } // namespace v8::internal
4581 4581
4582 #endif // V8_TARGET_ARCH_ARM 4582 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/ast.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698