| 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 1888 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1899 if (result_saved) { | 1899 if (result_saved) { |
| 1900 __ Pop(); // literal index | 1900 __ Pop(); // literal index |
| 1901 context()->PlugTOS(); | 1901 context()->PlugTOS(); |
| 1902 } else { | 1902 } else { |
| 1903 context()->Plug(v0); | 1903 context()->Plug(v0); |
| 1904 } | 1904 } |
| 1905 } | 1905 } |
| 1906 | 1906 |
| 1907 | 1907 |
| 1908 void FullCodeGenerator::VisitAssignment(Assignment* expr) { | 1908 void FullCodeGenerator::VisitAssignment(Assignment* expr) { |
| 1909 ASSERT(expr->target()->IsValidLeftHandSide()); | 1909 ASSERT(expr->target()->IsValidReferenceExpression()); |
| 1910 | 1910 |
| 1911 Comment cmnt(masm_, "[ Assignment"); | 1911 Comment cmnt(masm_, "[ Assignment"); |
| 1912 | 1912 |
| 1913 // Left-hand side can only be a property, a global or a (parameter or local) | 1913 // Left-hand side can only be a property, a global or a (parameter or local) |
| 1914 // slot. | 1914 // slot. |
| 1915 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; | 1915 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; |
| 1916 LhsKind assign_type = VARIABLE; | 1916 LhsKind assign_type = VARIABLE; |
| 1917 Property* property = expr->target()->AsProperty(); | 1917 Property* property = expr->target()->AsProperty(); |
| 1918 if (property != NULL) { | 1918 if (property != NULL) { |
| 1919 assign_type = (property->key()->IsPropertyName()) | 1919 assign_type = (property->key()->IsPropertyName()) |
| (...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2439 __ pop(a1); | 2439 __ pop(a1); |
| 2440 BinaryOpICStub stub(op, mode); | 2440 BinaryOpICStub stub(op, mode); |
| 2441 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. | 2441 JumpPatchSite patch_site(masm_); // unbound, signals no inlined smi code. |
| 2442 CallIC(stub.GetCode(isolate()), expr->BinaryOperationFeedbackId()); | 2442 CallIC(stub.GetCode(isolate()), expr->BinaryOperationFeedbackId()); |
| 2443 patch_site.EmitPatchInfo(); | 2443 patch_site.EmitPatchInfo(); |
| 2444 context()->Plug(v0); | 2444 context()->Plug(v0); |
| 2445 } | 2445 } |
| 2446 | 2446 |
| 2447 | 2447 |
| 2448 void FullCodeGenerator::EmitAssignment(Expression* expr) { | 2448 void FullCodeGenerator::EmitAssignment(Expression* expr) { |
| 2449 ASSERT(expr->IsValidLeftHandSide()); | 2449 ASSERT(expr->IsValidReferenceExpression()); |
| 2450 | 2450 |
| 2451 // Left-hand side can only be a property, a global or a (parameter or local) | 2451 // Left-hand side can only be a property, a global or a (parameter or local) |
| 2452 // slot. | 2452 // slot. |
| 2453 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; | 2453 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; |
| 2454 LhsKind assign_type = VARIABLE; | 2454 LhsKind assign_type = VARIABLE; |
| 2455 Property* prop = expr->AsProperty(); | 2455 Property* prop = expr->AsProperty(); |
| 2456 if (prop != NULL) { | 2456 if (prop != NULL) { |
| 2457 assign_type = (prop->key()->IsPropertyName()) | 2457 assign_type = (prop->key()->IsPropertyName()) |
| 2458 ? NAMED_PROPERTY | 2458 ? NAMED_PROPERTY |
| 2459 : KEYED_PROPERTY; | 2459 : KEYED_PROPERTY; |
| (...skipping 1895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4355 break; | 4355 break; |
| 4356 } | 4356 } |
| 4357 | 4357 |
| 4358 default: | 4358 default: |
| 4359 UNREACHABLE(); | 4359 UNREACHABLE(); |
| 4360 } | 4360 } |
| 4361 } | 4361 } |
| 4362 | 4362 |
| 4363 | 4363 |
| 4364 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { | 4364 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
| 4365 ASSERT(expr->expression()->IsValidLeftHandSide()); | 4365 ASSERT(expr->expression()->IsValidReferenceExpression()); |
| 4366 | 4366 |
| 4367 Comment cmnt(masm_, "[ CountOperation"); | 4367 Comment cmnt(masm_, "[ CountOperation"); |
| 4368 SetSourcePosition(expr->position()); | 4368 SetSourcePosition(expr->position()); |
| 4369 | 4369 |
| 4370 // Expression can only be a property, a global or a (parameter or local) | 4370 // Expression can only be a property, a global or a (parameter or local) |
| 4371 // slot. | 4371 // slot. |
| 4372 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; | 4372 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; |
| 4373 LhsKind assign_type = VARIABLE; | 4373 LhsKind assign_type = VARIABLE; |
| 4374 Property* prop = expr->expression()->AsProperty(); | 4374 Property* prop = expr->expression()->AsProperty(); |
| 4375 // In case of a property we use the uninitialized expression context | 4375 // In case of a property we use the uninitialized expression context |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4981 Assembler::target_address_at(pc_immediate_load_address)) == | 4981 Assembler::target_address_at(pc_immediate_load_address)) == |
| 4982 reinterpret_cast<uint32_t>( | 4982 reinterpret_cast<uint32_t>( |
| 4983 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4983 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 4984 return OSR_AFTER_STACK_CHECK; | 4984 return OSR_AFTER_STACK_CHECK; |
| 4985 } | 4985 } |
| 4986 | 4986 |
| 4987 | 4987 |
| 4988 } } // namespace v8::internal | 4988 } } // namespace v8::internal |
| 4989 | 4989 |
| 4990 #endif // V8_TARGET_ARCH_MIPS | 4990 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |