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

Side by Side Diff: src/mips/full-codegen-mips.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/ia32/full-codegen-ia32.cc ('k') | src/x64/full-codegen-x64.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 1832 matching lines...) Expand 10 before | Expand all | Expand 10 after
1843 // variable/property load. 1843 // variable/property load.
1844 if (expr->is_compound()) { 1844 if (expr->is_compound()) {
1845 { AccumulatorValueContext context(this); 1845 { AccumulatorValueContext context(this);
1846 switch (assign_type) { 1846 switch (assign_type) {
1847 case VARIABLE: 1847 case VARIABLE:
1848 EmitVariableLoad(expr->target()->AsVariableProxy()); 1848 EmitVariableLoad(expr->target()->AsVariableProxy());
1849 PrepareForBailout(expr->target(), TOS_REG); 1849 PrepareForBailout(expr->target(), TOS_REG);
1850 break; 1850 break;
1851 case NAMED_PROPERTY: 1851 case NAMED_PROPERTY:
1852 EmitNamedPropertyLoad(property); 1852 EmitNamedPropertyLoad(property);
1853 PrepareForBailoutForId(expr->CompoundLoadId(), TOS_REG); 1853 PrepareForBailoutForId(property->LoadId(), TOS_REG);
1854 break; 1854 break;
1855 case KEYED_PROPERTY: 1855 case KEYED_PROPERTY:
1856 EmitKeyedPropertyLoad(property); 1856 EmitKeyedPropertyLoad(property);
1857 PrepareForBailoutForId(expr->CompoundLoadId(), TOS_REG); 1857 PrepareForBailoutForId(property->LoadId(), TOS_REG);
1858 break; 1858 break;
1859 } 1859 }
1860 } 1860 }
1861 1861
1862 Token::Value op = expr->binary_op(); 1862 Token::Value op = expr->binary_op();
1863 __ push(v0); // Left operand goes on the stack. 1863 __ push(v0); // Left operand goes on the stack.
1864 VisitForAccumulatorValue(expr->value()); 1864 VisitForAccumulatorValue(expr->value());
1865 1865
1866 OverwriteMode mode = expr->value()->ResultOverwriteAllowed() 1866 OverwriteMode mode = expr->value()->ResultOverwriteAllowed()
1867 ? OVERWRITE_RIGHT 1867 ? OVERWRITE_RIGHT
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
2294 } 2294 }
2295 2295
2296 2296
2297 void FullCodeGenerator::VisitProperty(Property* expr) { 2297 void FullCodeGenerator::VisitProperty(Property* expr) {
2298 Comment cmnt(masm_, "[ Property"); 2298 Comment cmnt(masm_, "[ Property");
2299 Expression* key = expr->key(); 2299 Expression* key = expr->key();
2300 2300
2301 if (key->IsPropertyName()) { 2301 if (key->IsPropertyName()) {
2302 VisitForAccumulatorValue(expr->obj()); 2302 VisitForAccumulatorValue(expr->obj());
2303 EmitNamedPropertyLoad(expr); 2303 EmitNamedPropertyLoad(expr);
2304 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); 2304 PrepareForBailoutForId(expr->LoadId(), TOS_REG);
2305 context()->Plug(v0); 2305 context()->Plug(v0);
2306 } else { 2306 } else {
2307 VisitForStackValue(expr->obj()); 2307 VisitForStackValue(expr->obj());
2308 VisitForAccumulatorValue(expr->key()); 2308 VisitForAccumulatorValue(expr->key());
2309 __ pop(a1); 2309 __ pop(a1);
2310 EmitKeyedPropertyLoad(expr); 2310 EmitKeyedPropertyLoad(expr);
2311 context()->Plug(v0); 2311 context()->Plug(v0);
2312 } 2312 }
2313 } 2313 }
2314 2314
(...skipping 1783 matching lines...) Expand 10 before | Expand all | Expand 10 after
4098 __ push(v0); 4098 __ push(v0);
4099 EmitKeyedPropertyLoad(prop); 4099 EmitKeyedPropertyLoad(prop);
4100 } 4100 }
4101 } 4101 }
4102 4102
4103 // We need a second deoptimization point after loading the value 4103 // We need a second deoptimization point after loading the value
4104 // in case evaluating the property load my have a side effect. 4104 // in case evaluating the property load my have a side effect.
4105 if (assign_type == VARIABLE) { 4105 if (assign_type == VARIABLE) {
4106 PrepareForBailout(expr->expression(), TOS_REG); 4106 PrepareForBailout(expr->expression(), TOS_REG);
4107 } else { 4107 } else {
4108 PrepareForBailoutForId(expr->CountId(), TOS_REG); 4108 PrepareForBailoutForId(prop->LoadId(), TOS_REG);
4109 } 4109 }
4110 4110
4111 // Call ToNumber only if operand is not a smi. 4111 // Call ToNumber only if operand is not a smi.
4112 Label no_conversion; 4112 Label no_conversion;
4113 __ JumpIfSmi(v0, &no_conversion); 4113 __ JumpIfSmi(v0, &no_conversion);
4114 __ mov(a0, v0); 4114 __ mov(a0, v0);
4115 ToNumberStub convert_stub; 4115 ToNumberStub convert_stub;
4116 __ CallStub(&convert_stub); 4116 __ CallStub(&convert_stub);
4117 __ bind(&no_conversion); 4117 __ bind(&no_conversion);
4118 4118
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
4610 *context_length = 0; 4610 *context_length = 0;
4611 return previous_; 4611 return previous_;
4612 } 4612 }
4613 4613
4614 4614
4615 #undef __ 4615 #undef __
4616 4616
4617 } } // namespace v8::internal 4617 } } // namespace v8::internal
4618 4618
4619 #endif // V8_TARGET_ARCH_MIPS 4619 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698