| 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 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1067       __ Cmp(x1, x0); |  1067       __ Cmp(x1, x0); | 
|  1068       __ B(ne, &next_test); |  1068       __ B(ne, &next_test); | 
|  1069       __ Drop(1);  // Switch value is no longer needed. |  1069       __ Drop(1);  // Switch value is no longer needed. | 
|  1070       __ B(clause->body_target()); |  1070       __ B(clause->body_target()); | 
|  1071       __ Bind(&slow_case); |  1071       __ Bind(&slow_case); | 
|  1072     } |  1072     } | 
|  1073  |  1073  | 
|  1074     // Record position before stub call for type feedback. |  1074     // Record position before stub call for type feedback. | 
|  1075     SetSourcePosition(clause->position()); |  1075     SetSourcePosition(clause->position()); | 
|  1076     Handle<Code> ic = CodeFactory::CompareIC(isolate(), Token::EQ_STRICT, |  1076     Handle<Code> ic = CodeFactory::CompareIC(isolate(), Token::EQ_STRICT, | 
|  1077                                              language_mode()).code(); |  1077                                              strength(language_mode())).code(); | 
|  1078     CallIC(ic, clause->CompareId()); |  1078     CallIC(ic, clause->CompareId()); | 
|  1079     patch_site.EmitPatchInfo(); |  1079     patch_site.EmitPatchInfo(); | 
|  1080  |  1080  | 
|  1081     Label skip; |  1081     Label skip; | 
|  1082     __ B(&skip); |  1082     __ B(&skip); | 
|  1083     PrepareForBailout(clause, TOS_REG); |  1083     PrepareForBailout(clause, TOS_REG); | 
|  1084     __ JumpIfNotRoot(x0, Heap::kTrueValueRootIndex, &next_test); |  1084     __ JumpIfNotRoot(x0, Heap::kTrueValueRootIndex, &next_test); | 
|  1085     __ Drop(1); |  1085     __ Drop(1); | 
|  1086     __ B(clause->body_target()); |  1086     __ B(clause->body_target()); | 
|  1087     __ Bind(&skip); |  1087     __ Bind(&skip); | 
| (...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2141   Register result = x0; |  2141   Register result = x0; | 
|  2142   __ Pop(left); |  2142   __ Pop(left); | 
|  2143  |  2143  | 
|  2144   // Perform combined smi check on both operands. |  2144   // Perform combined smi check on both operands. | 
|  2145   __ Orr(x10, left, right); |  2145   __ Orr(x10, left, right); | 
|  2146   JumpPatchSite patch_site(masm_); |  2146   JumpPatchSite patch_site(masm_); | 
|  2147   patch_site.EmitJumpIfSmi(x10, &both_smis); |  2147   patch_site.EmitJumpIfSmi(x10, &both_smis); | 
|  2148  |  2148  | 
|  2149   __ Bind(&stub_call); |  2149   __ Bind(&stub_call); | 
|  2150  |  2150  | 
|  2151   Handle<Code> code = CodeFactory::BinaryOpIC( |  2151   Handle<Code> code = | 
|  2152       isolate(), op, language_mode()).code(); |  2152       CodeFactory::BinaryOpIC(isolate(), op, strength(language_mode())).code(); | 
|  2153   { |  2153   { | 
|  2154     Assembler::BlockPoolsScope scope(masm_); |  2154     Assembler::BlockPoolsScope scope(masm_); | 
|  2155     CallIC(code, expr->BinaryOperationFeedbackId()); |  2155     CallIC(code, expr->BinaryOperationFeedbackId()); | 
|  2156     patch_site.EmitPatchInfo(); |  2156     patch_site.EmitPatchInfo(); | 
|  2157   } |  2157   } | 
|  2158   __ B(&done); |  2158   __ B(&done); | 
|  2159  |  2159  | 
|  2160   __ Bind(&both_smis); |  2160   __ Bind(&both_smis); | 
|  2161   // Smi case. This code works in the same way as the smi-smi case in the type |  2161   // Smi case. This code works in the same way as the smi-smi case in the type | 
|  2162   // recording binary operation stub, see |  2162   // recording binary operation stub, see | 
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  2224       UNREACHABLE(); |  2224       UNREACHABLE(); | 
|  2225   } |  2225   } | 
|  2226  |  2226  | 
|  2227   __ Bind(&done); |  2227   __ Bind(&done); | 
|  2228   context()->Plug(x0); |  2228   context()->Plug(x0); | 
|  2229 } |  2229 } | 
|  2230  |  2230  | 
|  2231  |  2231  | 
|  2232 void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) { |  2232 void FullCodeGenerator::EmitBinaryOp(BinaryOperation* expr, Token::Value op) { | 
|  2233   __ Pop(x1); |  2233   __ Pop(x1); | 
|  2234   Handle<Code> code = CodeFactory::BinaryOpIC( |  2234   Handle<Code> code = | 
|  2235       isolate(), op, language_mode()).code(); |  2235       CodeFactory::BinaryOpIC(isolate(), op, strength(language_mode())).code(); | 
|  2236   JumpPatchSite patch_site(masm_);    // Unbound, signals no inlined smi code. |  2236   JumpPatchSite patch_site(masm_);    // Unbound, signals no inlined smi code. | 
|  2237   { |  2237   { | 
|  2238     Assembler::BlockPoolsScope scope(masm_); |  2238     Assembler::BlockPoolsScope scope(masm_); | 
|  2239     CallIC(code, expr->BinaryOperationFeedbackId()); |  2239     CallIC(code, expr->BinaryOperationFeedbackId()); | 
|  2240     patch_site.EmitPatchInfo(); |  2240     patch_site.EmitPatchInfo(); | 
|  2241   } |  2241   } | 
|  2242   context()->Plug(x0); |  2242   context()->Plug(x0); | 
|  2243 } |  2243 } | 
|  2244  |  2244  | 
|  2245  |  2245  | 
| (...skipping 2460 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  4706  |  4706  | 
|  4707   __ Bind(&stub_call); |  4707   __ Bind(&stub_call); | 
|  4708   __ Mov(x1, x0); |  4708   __ Mov(x1, x0); | 
|  4709   __ Mov(x0, Smi::FromInt(count_value)); |  4709   __ Mov(x0, Smi::FromInt(count_value)); | 
|  4710  |  4710  | 
|  4711   // Record position before stub call. |  4711   // Record position before stub call. | 
|  4712   SetSourcePosition(expr->position()); |  4712   SetSourcePosition(expr->position()); | 
|  4713  |  4713  | 
|  4714   { |  4714   { | 
|  4715     Assembler::BlockPoolsScope scope(masm_); |  4715     Assembler::BlockPoolsScope scope(masm_); | 
|  4716     Handle<Code> code = CodeFactory::BinaryOpIC( |  4716     Handle<Code> code = | 
|  4717         isolate(), Token::ADD, language_mode()).code(); |  4717         CodeFactory::BinaryOpIC(isolate(), Token::ADD, | 
 |  4718                                 strength(language_mode())).code(); | 
|  4718     CallIC(code, expr->CountBinOpFeedbackId()); |  4719     CallIC(code, expr->CountBinOpFeedbackId()); | 
|  4719     patch_site.EmitPatchInfo(); |  4720     patch_site.EmitPatchInfo(); | 
|  4720   } |  4721   } | 
|  4721   __ Bind(&done); |  4722   __ Bind(&done); | 
|  4722  |  4723  | 
|  4723   // Store the value returned in x0. |  4724   // Store the value returned in x0. | 
|  4724   switch (assign_type) { |  4725   switch (assign_type) { | 
|  4725     case VARIABLE: |  4726     case VARIABLE: | 
|  4726       if (expr->is_postfix()) { |  4727       if (expr->is_postfix()) { | 
|  4727         { EffectContext context(this); |  4728         { EffectContext context(this); | 
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  4982       if (ShouldInlineSmiCase(op)) { |  4983       if (ShouldInlineSmiCase(op)) { | 
|  4983         Label slow_case; |  4984         Label slow_case; | 
|  4984         patch_site.EmitJumpIfEitherNotSmi(x0, x1, &slow_case); |  4985         patch_site.EmitJumpIfEitherNotSmi(x0, x1, &slow_case); | 
|  4985         __ Cmp(x1, x0); |  4986         __ Cmp(x1, x0); | 
|  4986         Split(cond, if_true, if_false, NULL); |  4987         Split(cond, if_true, if_false, NULL); | 
|  4987         __ Bind(&slow_case); |  4988         __ Bind(&slow_case); | 
|  4988       } |  4989       } | 
|  4989  |  4990  | 
|  4990       // Record position and call the compare IC. |  4991       // Record position and call the compare IC. | 
|  4991       SetSourcePosition(expr->position()); |  4992       SetSourcePosition(expr->position()); | 
|  4992       Handle<Code> ic = |  4993       Handle<Code> ic = CodeFactory::CompareIC( | 
|  4993           CodeFactory::CompareIC(isolate(), op, language_mode()).code(); |  4994                             isolate(), op, strength(language_mode())).code(); | 
|  4994       CallIC(ic, expr->CompareOperationFeedbackId()); |  4995       CallIC(ic, expr->CompareOperationFeedbackId()); | 
|  4995       patch_site.EmitPatchInfo(); |  4996       patch_site.EmitPatchInfo(); | 
|  4996       PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |  4997       PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 
|  4997       __ CompareAndSplit(x0, 0, cond, if_true, if_false, fall_through); |  4998       __ CompareAndSplit(x0, 0, cond, if_true, if_false, fall_through); | 
|  4998     } |  4999     } | 
|  4999   } |  5000   } | 
|  5000  |  5001  | 
|  5001   // Convert the result of the comparison into one expected for this |  5002   // Convert the result of the comparison into one expected for this | 
|  5002   // expression's context. |  5003   // expression's context. | 
|  5003   context()->Plug(if_true, if_false); |  5004   context()->Plug(if_true, if_false); | 
| (...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  5561   } |  5562   } | 
|  5562  |  5563  | 
|  5563   return INTERRUPT; |  5564   return INTERRUPT; | 
|  5564 } |  5565 } | 
|  5565  |  5566  | 
|  5566  |  5567  | 
|  5567 }  // namespace internal |  5568 }  // namespace internal | 
|  5568 }  // namespace v8 |  5569 }  // namespace v8 | 
|  5569  |  5570  | 
|  5570 #endif  // V8_TARGET_ARCH_ARM64 |  5571 #endif  // V8_TARGET_ARCH_ARM64 | 
| OLD | NEW |