| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2036 | 2036 |
| 2037 // Perform combined smi check on both operands. | 2037 // Perform combined smi check on both operands. |
| 2038 __ Orr(x10, left, right); | 2038 __ Orr(x10, left, right); |
| 2039 JumpPatchSite patch_site(masm_); | 2039 JumpPatchSite patch_site(masm_); |
| 2040 patch_site.EmitJumpIfSmi(x10, &both_smis); | 2040 patch_site.EmitJumpIfSmi(x10, &both_smis); |
| 2041 | 2041 |
| 2042 __ Bind(&stub_call); | 2042 __ Bind(&stub_call); |
| 2043 BinaryOpICStub stub(isolate(), op, mode); | 2043 BinaryOpICStub stub(isolate(), op, mode); |
| 2044 { | 2044 { |
| 2045 Assembler::BlockPoolsScope scope(masm_); | 2045 Assembler::BlockPoolsScope scope(masm_); |
| 2046 CallIC(stub.GetCode(isolate()), expr->BinaryOperationFeedbackId()); | 2046 CallIC(stub.GetCode(), expr->BinaryOperationFeedbackId()); |
| 2047 patch_site.EmitPatchInfo(); | 2047 patch_site.EmitPatchInfo(); |
| 2048 } | 2048 } |
| 2049 __ B(&done); | 2049 __ B(&done); |
| 2050 | 2050 |
| 2051 __ Bind(&both_smis); | 2051 __ Bind(&both_smis); |
| 2052 // Smi case. This code works in the same way as the smi-smi case in the type | 2052 // Smi case. This code works in the same way as the smi-smi case in the type |
| 2053 // recording binary operation stub, see | 2053 // recording binary operation stub, see |
| 2054 // BinaryOpStub::GenerateSmiSmiOperation for comments. | 2054 // BinaryOpStub::GenerateSmiSmiOperation for comments. |
| 2055 // TODO(all): That doesn't exist any more. Where are the comments? | 2055 // TODO(all): That doesn't exist any more. Where are the comments? |
| 2056 // | 2056 // |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2122 | 2122 |
| 2123 | 2123 |
| 2124 void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, | 2124 void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, |
| 2125 Token::Value op, | 2125 Token::Value op, |
| 2126 OverwriteMode mode) { | 2126 OverwriteMode mode) { |
| 2127 __ Pop(x1); | 2127 __ Pop(x1); |
| 2128 BinaryOpICStub stub(isolate(), op, mode); | 2128 BinaryOpICStub stub(isolate(), op, mode); |
| 2129 JumpPatchSite patch_site(masm_); // Unbound, signals no inlined smi code. | 2129 JumpPatchSite patch_site(masm_); // Unbound, signals no inlined smi code. |
| 2130 { | 2130 { |
| 2131 Assembler::BlockPoolsScope scope(masm_); | 2131 Assembler::BlockPoolsScope scope(masm_); |
| 2132 CallIC(stub.GetCode(isolate()), expr->BinaryOperationFeedbackId()); | 2132 CallIC(stub.GetCode(), expr->BinaryOperationFeedbackId()); |
| 2133 patch_site.EmitPatchInfo(); | 2133 patch_site.EmitPatchInfo(); |
| 2134 } | 2134 } |
| 2135 context()->Plug(x0); | 2135 context()->Plug(x0); |
| 2136 } | 2136 } |
| 2137 | 2137 |
| 2138 | 2138 |
| 2139 void FullCodeGenerator::EmitAssignment(Expression* expr) { | 2139 void FullCodeGenerator::EmitAssignment(Expression* expr) { |
| 2140 ASSERT(expr->IsValidReferenceExpression()); | 2140 ASSERT(expr->IsValidReferenceExpression()); |
| 2141 | 2141 |
| 2142 // Left-hand side can only be a property, a global or a (parameter or local) | 2142 // Left-hand side can only be a property, a global or a (parameter or local) |
| (...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2653 StoreFeedbackVectorSlot(expr->AllocationSiteFeedbackSlot(), | 2653 StoreFeedbackVectorSlot(expr->AllocationSiteFeedbackSlot(), |
| 2654 isolate()->factory()->NewAllocationSite()); | 2654 isolate()->factory()->NewAllocationSite()); |
| 2655 ASSERT(expr->AllocationSiteFeedbackSlot() == | 2655 ASSERT(expr->AllocationSiteFeedbackSlot() == |
| 2656 expr->CallNewFeedbackSlot() + 1); | 2656 expr->CallNewFeedbackSlot() + 1); |
| 2657 } | 2657 } |
| 2658 | 2658 |
| 2659 __ LoadObject(x2, FeedbackVector()); | 2659 __ LoadObject(x2, FeedbackVector()); |
| 2660 __ Mov(x3, Smi::FromInt(expr->CallNewFeedbackSlot())); | 2660 __ Mov(x3, Smi::FromInt(expr->CallNewFeedbackSlot())); |
| 2661 | 2661 |
| 2662 CallConstructStub stub(isolate(), RECORD_CALL_TARGET); | 2662 CallConstructStub stub(isolate(), RECORD_CALL_TARGET); |
| 2663 __ Call(stub.GetCode(isolate()), RelocInfo::CONSTRUCT_CALL); | 2663 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
| 2664 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); | 2664 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); |
| 2665 context()->Plug(x0); | 2665 context()->Plug(x0); |
| 2666 } | 2666 } |
| 2667 | 2667 |
| 2668 | 2668 |
| 2669 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { | 2669 void FullCodeGenerator::EmitIsSmi(CallRuntime* expr) { |
| 2670 ZoneList<Expression*>* args = expr->arguments(); | 2670 ZoneList<Expression*>* args = expr->arguments(); |
| 2671 ASSERT(args->length() == 1); | 2671 ASSERT(args->length() == 1); |
| 2672 | 2672 |
| 2673 VisitForAccumulatorValue(args->at(0)); | 2673 VisitForAccumulatorValue(args->at(0)); |
| (...skipping 1449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4123 __ Bind(&stub_call); | 4123 __ Bind(&stub_call); |
| 4124 __ Mov(x1, x0); | 4124 __ Mov(x1, x0); |
| 4125 __ Mov(x0, Smi::FromInt(count_value)); | 4125 __ Mov(x0, Smi::FromInt(count_value)); |
| 4126 | 4126 |
| 4127 // Record position before stub call. | 4127 // Record position before stub call. |
| 4128 SetSourcePosition(expr->position()); | 4128 SetSourcePosition(expr->position()); |
| 4129 | 4129 |
| 4130 { | 4130 { |
| 4131 Assembler::BlockPoolsScope scope(masm_); | 4131 Assembler::BlockPoolsScope scope(masm_); |
| 4132 BinaryOpICStub stub(isolate(), Token::ADD, NO_OVERWRITE); | 4132 BinaryOpICStub stub(isolate(), Token::ADD, NO_OVERWRITE); |
| 4133 CallIC(stub.GetCode(isolate()), expr->CountBinOpFeedbackId()); | 4133 CallIC(stub.GetCode(), expr->CountBinOpFeedbackId()); |
| 4134 patch_site.EmitPatchInfo(); | 4134 patch_site.EmitPatchInfo(); |
| 4135 } | 4135 } |
| 4136 __ Bind(&done); | 4136 __ Bind(&done); |
| 4137 | 4137 |
| 4138 // Store the value returned in x0. | 4138 // Store the value returned in x0. |
| 4139 switch (assign_type) { | 4139 switch (assign_type) { |
| 4140 case VARIABLE: | 4140 case VARIABLE: |
| 4141 if (expr->is_postfix()) { | 4141 if (expr->is_postfix()) { |
| 4142 { EffectContext context(this); | 4142 { EffectContext context(this); |
| 4143 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), | 4143 EmitVariableAssignment(expr->expression()->AsVariableProxy()->var(), |
| (...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5000 return previous_; | 5000 return previous_; |
| 5001 } | 5001 } |
| 5002 | 5002 |
| 5003 | 5003 |
| 5004 #undef __ | 5004 #undef __ |
| 5005 | 5005 |
| 5006 | 5006 |
| 5007 } } // namespace v8::internal | 5007 } } // namespace v8::internal |
| 5008 | 5008 |
| 5009 #endif // V8_TARGET_ARCH_ARM64 | 5009 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |