| 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 1872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1883 if (result_saved) { | 1883 if (result_saved) { |
| 1884 __ pop(); // literal index | 1884 __ pop(); // literal index |
| 1885 context()->PlugTOS(); | 1885 context()->PlugTOS(); |
| 1886 } else { | 1886 } else { |
| 1887 context()->Plug(r0); | 1887 context()->Plug(r0); |
| 1888 } | 1888 } |
| 1889 } | 1889 } |
| 1890 | 1890 |
| 1891 | 1891 |
| 1892 void FullCodeGenerator::VisitAssignment(Assignment* expr) { | 1892 void FullCodeGenerator::VisitAssignment(Assignment* expr) { |
| 1893 ASSERT(expr->target()->IsValidLeftHandSide()); | 1893 ASSERT(expr->target()->IsValidReferenceExpression()); |
| 1894 | 1894 |
| 1895 Comment cmnt(masm_, "[ Assignment"); | 1895 Comment cmnt(masm_, "[ Assignment"); |
| 1896 | 1896 |
| 1897 // Left-hand side can only be a property, a global or a (parameter or local) | 1897 // Left-hand side can only be a property, a global or a (parameter or local) |
| 1898 // slot. | 1898 // slot. |
| 1899 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; | 1899 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; |
| 1900 LhsKind assign_type = VARIABLE; | 1900 LhsKind assign_type = VARIABLE; |
| 1901 Property* property = expr->target()->AsProperty(); | 1901 Property* property = expr->target()->AsProperty(); |
| 1902 if (property != NULL) { | 1902 if (property != NULL) { |
| 1903 assign_type = (property->key()->IsPropertyName()) | 1903 assign_type = (property->key()->IsPropertyName()) |
| (...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2425 __ pop(r1); | 2425 __ pop(r1); |
| 2426 BinaryOpICStub stub(op, mode); | 2426 BinaryOpICStub stub(op, mode); |
| 2427 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. | 2427 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. |
| 2428 CallIC(stub.GetCode(isolate()), expr->BinaryOperationFeedbackId()); | 2428 CallIC(stub.GetCode(isolate()), expr->BinaryOperationFeedbackId()); |
| 2429 patch_site.EmitPatchInfo(); | 2429 patch_site.EmitPatchInfo(); |
| 2430 context()->Plug(r0); | 2430 context()->Plug(r0); |
| 2431 } | 2431 } |
| 2432 | 2432 |
| 2433 | 2433 |
| 2434 void FullCodeGenerator::EmitAssignment(Expression* expr) { | 2434 void FullCodeGenerator::EmitAssignment(Expression* expr) { |
| 2435 ASSERT(expr->IsValidLeftHandSide()); | 2435 ASSERT(expr->IsValidReferenceExpression()); |
| 2436 | 2436 |
| 2437 // Left-hand side can only be a property, a global or a (parameter or local) | 2437 // Left-hand side can only be a property, a global or a (parameter or local) |
| 2438 // slot. | 2438 // slot. |
| 2439 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; | 2439 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; |
| 2440 LhsKind assign_type = VARIABLE; | 2440 LhsKind assign_type = VARIABLE; |
| 2441 Property* prop = expr->AsProperty(); | 2441 Property* prop = expr->AsProperty(); |
| 2442 if (prop != NULL) { | 2442 if (prop != NULL) { |
| 2443 assign_type = (prop->key()->IsPropertyName()) | 2443 assign_type = (prop->key()->IsPropertyName()) |
| 2444 ? NAMED_PROPERTY | 2444 ? NAMED_PROPERTY |
| 2445 : KEYED_PROPERTY; | 2445 : KEYED_PROPERTY; |
| (...skipping 1841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4287 break; | 4287 break; |
| 4288 } | 4288 } |
| 4289 | 4289 |
| 4290 default: | 4290 default: |
| 4291 UNREACHABLE(); | 4291 UNREACHABLE(); |
| 4292 } | 4292 } |
| 4293 } | 4293 } |
| 4294 | 4294 |
| 4295 | 4295 |
| 4296 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { | 4296 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
| 4297 ASSERT(expr->expression()->IsValidLeftHandSide()); | 4297 ASSERT(expr->expression()->IsValidReferenceExpression()); |
| 4298 | 4298 |
| 4299 Comment cmnt(masm_, "[ CountOperation"); | 4299 Comment cmnt(masm_, "[ CountOperation"); |
| 4300 SetSourcePosition(expr->position()); | 4300 SetSourcePosition(expr->position()); |
| 4301 | 4301 |
| 4302 // Expression can only be a property, a global or a (parameter or local) | 4302 // Expression can only be a property, a global or a (parameter or local) |
| 4303 // slot. | 4303 // slot. |
| 4304 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; | 4304 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; |
| 4305 LhsKind assign_type = VARIABLE; | 4305 LhsKind assign_type = VARIABLE; |
| 4306 Property* prop = expr->expression()->AsProperty(); | 4306 Property* prop = expr->expression()->AsProperty(); |
| 4307 // In case of a property we use the uninitialized expression context | 4307 // In case of a property we use the uninitialized expression context |
| (...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4927 | 4927 |
| 4928 ASSERT(interrupt_address == | 4928 ASSERT(interrupt_address == |
| 4929 isolate->builtins()->OsrAfterStackCheck()->entry()); | 4929 isolate->builtins()->OsrAfterStackCheck()->entry()); |
| 4930 return OSR_AFTER_STACK_CHECK; | 4930 return OSR_AFTER_STACK_CHECK; |
| 4931 } | 4931 } |
| 4932 | 4932 |
| 4933 | 4933 |
| 4934 } } // namespace v8::internal | 4934 } } // namespace v8::internal |
| 4935 | 4935 |
| 4936 #endif // V8_TARGET_ARCH_ARM | 4936 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |