OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 2134 matching lines...) Loading... |
2145 Register result = x0; | 2145 Register result = x0; |
2146 __ Pop(left); | 2146 __ Pop(left); |
2147 | 2147 |
2148 // Perform combined smi check on both operands. | 2148 // Perform combined smi check on both operands. |
2149 __ Orr(x10, left, right); | 2149 __ Orr(x10, left, right); |
2150 JumpPatchSite patch_site(masm_); | 2150 JumpPatchSite patch_site(masm_); |
2151 patch_site.EmitJumpIfSmi(x10, &both_smis); | 2151 patch_site.EmitJumpIfSmi(x10, &both_smis); |
2152 | 2152 |
2153 __ Bind(&stub_call); | 2153 __ Bind(&stub_call); |
2154 | 2154 |
2155 Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op).code(); | 2155 Handle<Code> code = CodeFactory::BinaryOpIC( |
| 2156 isolate(), op, language_mode()).code(); |
2156 { | 2157 { |
2157 Assembler::BlockPoolsScope scope(masm_); | 2158 Assembler::BlockPoolsScope scope(masm_); |
2158 CallIC(code, expr->BinaryOperationFeedbackId()); | 2159 CallIC(code, expr->BinaryOperationFeedbackId()); |
2159 patch_site.EmitPatchInfo(); | 2160 patch_site.EmitPatchInfo(); |
2160 } | 2161 } |
2161 __ B(&done); | 2162 __ B(&done); |
2162 | 2163 |
2163 __ Bind(&both_smis); | 2164 __ Bind(&both_smis); |
2164 // Smi case. This code works in the same way as the smi-smi case in the type | 2165 // Smi case. This code works in the same way as the smi-smi case in the type |
2165 // recording binary operation stub, see | 2166 // recording binary operation stub, see |
(...skipping 61 matching lines...) Loading... |
2227 UNREACHABLE(); | 2228 UNREACHABLE(); |
2228 } | 2229 } |
2229 | 2230 |
2230 __ Bind(&done); | 2231 __ Bind(&done); |
2231 context()->Plug(x0); | 2232 context()->Plug(x0); |
2232 } | 2233 } |
2233 | 2234 |
2234 | 2235 |
2235 void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) { | 2236 void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) { |
2236 __ Pop(x1); | 2237 __ Pop(x1); |
2237 Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), op).code(); | 2238 Handle<Code> code = CodeFactory::BinaryOpIC( |
| 2239 isolate(), op, language_mode()).code(); |
2238 JumpPatchSite patch_site(masm_); // Unbound, signals no inlined smi code. | 2240 JumpPatchSite patch_site(masm_); // Unbound, signals no inlined smi code. |
2239 { | 2241 { |
2240 Assembler::BlockPoolsScope scope(masm_); | 2242 Assembler::BlockPoolsScope scope(masm_); |
2241 CallIC(code, expr->BinaryOperationFeedbackId()); | 2243 CallIC(code, expr->BinaryOperationFeedbackId()); |
2242 patch_site.EmitPatchInfo(); | 2244 patch_site.EmitPatchInfo(); |
2243 } | 2245 } |
2244 context()->Plug(x0); | 2246 context()->Plug(x0); |
2245 } | 2247 } |
2246 | 2248 |
2247 | 2249 |
(...skipping 2428 matching lines...) Loading... |
4676 | 4678 |
4677 __ Bind(&stub_call); | 4679 __ Bind(&stub_call); |
4678 __ Mov(x1, x0); | 4680 __ Mov(x1, x0); |
4679 __ Mov(x0, Smi::FromInt(count_value)); | 4681 __ Mov(x0, Smi::FromInt(count_value)); |
4680 | 4682 |
4681 // Record position before stub call. | 4683 // Record position before stub call. |
4682 SetSourcePosition(expr->position()); | 4684 SetSourcePosition(expr->position()); |
4683 | 4685 |
4684 { | 4686 { |
4685 Assembler::BlockPoolsScope scope(masm_); | 4687 Assembler::BlockPoolsScope scope(masm_); |
4686 Handle<Code> code = CodeFactory::BinaryOpIC(isolate(), Token::ADD).code(); | 4688 Handle<Code> code = CodeFactory::BinaryOpIC( |
| 4689 isolate(), Token::ADD, language_mode()).code(); |
4687 CallIC(code, expr->CountBinOpFeedbackId()); | 4690 CallIC(code, expr->CountBinOpFeedbackId()); |
4688 patch_site.EmitPatchInfo(); | 4691 patch_site.EmitPatchInfo(); |
4689 } | 4692 } |
4690 __ Bind(&done); | 4693 __ Bind(&done); |
4691 | 4694 |
4692 // Store the value returned in x0. | 4695 // Store the value returned in x0. |
4693 switch (assign_type) { | 4696 switch (assign_type) { |
4694 case VARIABLE: | 4697 case VARIABLE: |
4695 if (expr->is_postfix()) { | 4698 if (expr->is_postfix()) { |
4696 { EffectContext context(this); | 4699 { EffectContext context(this); |
(...skipping 811 matching lines...) Loading... |
5508 } | 5511 } |
5509 } | 5512 } |
5510 | 5513 |
5511 return INTERRUPT; | 5514 return INTERRUPT; |
5512 } | 5515 } |
5513 | 5516 |
5514 | 5517 |
5515 } } // namespace v8::internal | 5518 } } // namespace v8::internal |
5516 | 5519 |
5517 #endif // V8_TARGET_ARCH_ARM64 | 5520 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |