| 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 1875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4335 break; | 4335 break; |
| 4336 } | 4336 } |
| 4337 | 4337 |
| 4338 default: | 4338 default: |
| 4339 UNREACHABLE(); | 4339 UNREACHABLE(); |
| 4340 } | 4340 } |
| 4341 } | 4341 } |
| 4342 | 4342 |
| 4343 | 4343 |
| 4344 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { | 4344 void FullCodeGenerator::VisitCountOperation(CountOperation* expr) { |
| 4345 ASSERT(expr->expression()->IsValidLeftHandSide()); | 4345 ASSERT(expr->expression()->IsValidReferenceExpression()); |
| 4346 | 4346 |
| 4347 Comment cmnt(masm_, "[ CountOperation"); | 4347 Comment cmnt(masm_, "[ CountOperation"); |
| 4348 SetSourcePosition(expr->position()); | 4348 SetSourcePosition(expr->position()); |
| 4349 | 4349 |
| 4350 // Expression can only be a property, a global or a (parameter or local) | 4350 // Expression can only be a property, a global or a (parameter or local) |
| 4351 // slot. | 4351 // slot. |
| 4352 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; | 4352 enum LhsKind { VARIABLE, NAMED_PROPERTY, KEYED_PROPERTY }; |
| 4353 LhsKind assign_type = VARIABLE; | 4353 LhsKind assign_type = VARIABLE; |
| 4354 Property* prop = expr->expression()->AsProperty(); | 4354 Property* prop = expr->expression()->AsProperty(); |
| 4355 // In case of a property we use the uninitialized expression context | 4355 // In case of a property we use the uninitialized expression context |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4961 Assembler::target_address_at(pc_immediate_load_address)) == | 4961 Assembler::target_address_at(pc_immediate_load_address)) == |
| 4962 reinterpret_cast<uint32_t>( | 4962 reinterpret_cast<uint32_t>( |
| 4963 isolate->builtins()->OsrAfterStackCheck()->entry())); | 4963 isolate->builtins()->OsrAfterStackCheck()->entry())); |
| 4964 return OSR_AFTER_STACK_CHECK; | 4964 return OSR_AFTER_STACK_CHECK; |
| 4965 } | 4965 } |
| 4966 | 4966 |
| 4967 | 4967 |
| 4968 } } // namespace v8::internal | 4968 } } // namespace v8::internal |
| 4969 | 4969 |
| 4970 #endif // V8_TARGET_ARCH_MIPS | 4970 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |