| OLD | NEW |
| 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 Loading... |
| 1830 // Store the value. | 1830 // Store the value. |
| 1831 switch (assign_type) { | 1831 switch (assign_type) { |
| 1832 case VARIABLE: | 1832 case VARIABLE: |
| 1833 EmitVariableAssignment(expr->target()->AsVariableProxy()->var(), | 1833 EmitVariableAssignment(expr->target()->AsVariableProxy()->var(), |
| 1834 expr->op()); | 1834 expr->op()); |
| 1835 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); | 1835 PrepareForBailoutForId(expr->AssignmentId(), TOS_REG); |
| 1836 context()->Plug(eax); | 1836 context()->Plug(eax); |
| 1837 break; | 1837 break; |
| 1838 case NAMED_PROPERTY: | 1838 case NAMED_PROPERTY: |
| 1839 EmitNamedPropertyAssignment(expr); | 1839 EmitNamedPropertyAssignment(expr); |
| 1840 PrepareForBailoutForId(property->ReturnId(), TOS_REG); |
| 1840 break; | 1841 break; |
| 1841 case KEYED_PROPERTY: | 1842 case KEYED_PROPERTY: |
| 1842 EmitKeyedPropertyAssignment(expr); | 1843 EmitKeyedPropertyAssignment(expr); |
| 1843 break; | 1844 break; |
| 1844 } | 1845 } |
| 1845 } | 1846 } |
| 1846 | 1847 |
| 1847 | 1848 |
| 1848 void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { | 1849 void FullCodeGenerator::EmitNamedPropertyLoad(Property* prop) { |
| 1849 SetSourcePosition(prop->position()); | 1850 SetSourcePosition(prop->position()); |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2207 | 2208 |
| 2208 | 2209 |
| 2209 void FullCodeGenerator::VisitProperty(Property* expr) { | 2210 void FullCodeGenerator::VisitProperty(Property* expr) { |
| 2210 Comment cmnt(masm_, "[ Property"); | 2211 Comment cmnt(masm_, "[ Property"); |
| 2211 Expression* key = expr->key(); | 2212 Expression* key = expr->key(); |
| 2212 | 2213 |
| 2213 if (key->IsPropertyName()) { | 2214 if (key->IsPropertyName()) { |
| 2214 VisitForAccumulatorValue(expr->obj()); | 2215 VisitForAccumulatorValue(expr->obj()); |
| 2215 __ mov(edx, result_register()); | 2216 __ mov(edx, result_register()); |
| 2216 EmitNamedPropertyLoad(expr); | 2217 EmitNamedPropertyLoad(expr); |
| 2218 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); |
| 2217 context()->Plug(eax); | 2219 context()->Plug(eax); |
| 2218 } else { | 2220 } else { |
| 2219 VisitForStackValue(expr->obj()); | 2221 VisitForStackValue(expr->obj()); |
| 2220 VisitForAccumulatorValue(expr->key()); | 2222 VisitForAccumulatorValue(expr->key()); |
| 2221 __ pop(edx); // Object. | 2223 __ pop(edx); // Object. |
| 2222 __ mov(ecx, result_register()); // Key. | 2224 __ mov(ecx, result_register()); // Key. |
| 2223 EmitKeyedPropertyLoad(expr); | 2225 EmitKeyedPropertyLoad(expr); |
| 2224 context()->Plug(eax); | 2226 context()->Plug(eax); |
| 2225 } | 2227 } |
| 2226 } | 2228 } |
| (...skipping 2321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4548 *stack_depth = 0; | 4550 *stack_depth = 0; |
| 4549 *context_length = 0; | 4551 *context_length = 0; |
| 4550 return previous_; | 4552 return previous_; |
| 4551 } | 4553 } |
| 4552 | 4554 |
| 4553 #undef __ | 4555 #undef __ |
| 4554 | 4556 |
| 4555 } } // namespace v8::internal | 4557 } } // namespace v8::internal |
| 4556 | 4558 |
| 4557 #endif // V8_TARGET_ARCH_IA32 | 4559 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |