| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 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 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1011 | 1011 |
| 1012 __ cmpp(rdx, rax); | 1012 __ cmpp(rdx, rax); |
| 1013 __ j(not_equal, &next_test); | 1013 __ j(not_equal, &next_test); |
| 1014 __ Drop(1); // Switch value is no longer needed. | 1014 __ Drop(1); // Switch value is no longer needed. |
| 1015 __ jmp(clause->body_target()); | 1015 __ jmp(clause->body_target()); |
| 1016 __ bind(&slow_case); | 1016 __ bind(&slow_case); |
| 1017 } | 1017 } |
| 1018 | 1018 |
| 1019 // Record position before stub call for type feedback. | 1019 // Record position before stub call for type feedback. |
| 1020 SetSourcePosition(clause->position()); | 1020 SetSourcePosition(clause->position()); |
| 1021 Handle<Code> ic = | 1021 Handle<Code> ic = CodeFactory::CompareIC(isolate(), Token::EQ_STRICT, |
| 1022 CodeFactory::CompareIC(isolate(), Token::EQ_STRICT).code(); | 1022 language_mode()).code(); |
| 1023 CallIC(ic, clause->CompareId()); | 1023 CallIC(ic, clause->CompareId()); |
| 1024 patch_site.EmitPatchInfo(); | 1024 patch_site.EmitPatchInfo(); |
| 1025 | 1025 |
| 1026 Label skip; | 1026 Label skip; |
| 1027 __ jmp(&skip, Label::kNear); | 1027 __ jmp(&skip, Label::kNear); |
| 1028 PrepareForBailout(clause, TOS_REG); | 1028 PrepareForBailout(clause, TOS_REG); |
| 1029 __ CompareRoot(rax, Heap::kTrueValueRootIndex); | 1029 __ CompareRoot(rax, Heap::kTrueValueRootIndex); |
| 1030 __ j(not_equal, &next_test); | 1030 __ j(not_equal, &next_test); |
| 1031 __ Drop(1); | 1031 __ Drop(1); |
| 1032 __ jmp(clause->body_target()); | 1032 __ jmp(clause->body_target()); |
| (...skipping 4138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5171 __ movp(rcx, rdx); | 5171 __ movp(rcx, rdx); |
| 5172 __ orp(rcx, rax); | 5172 __ orp(rcx, rax); |
| 5173 patch_site.EmitJumpIfNotSmi(rcx, &slow_case, Label::kNear); | 5173 patch_site.EmitJumpIfNotSmi(rcx, &slow_case, Label::kNear); |
| 5174 __ cmpp(rdx, rax); | 5174 __ cmpp(rdx, rax); |
| 5175 Split(cc, if_true, if_false, NULL); | 5175 Split(cc, if_true, if_false, NULL); |
| 5176 __ bind(&slow_case); | 5176 __ bind(&slow_case); |
| 5177 } | 5177 } |
| 5178 | 5178 |
| 5179 // Record position and call the compare IC. | 5179 // Record position and call the compare IC. |
| 5180 SetSourcePosition(expr->position()); | 5180 SetSourcePosition(expr->position()); |
| 5181 Handle<Code> ic = CodeFactory::CompareIC(isolate(), op).code(); | 5181 Handle<Code> ic = |
| 5182 CodeFactory::CompareIC(isolate(), op, language_mode()).code(); |
| 5182 CallIC(ic, expr->CompareOperationFeedbackId()); | 5183 CallIC(ic, expr->CompareOperationFeedbackId()); |
| 5183 patch_site.EmitPatchInfo(); | 5184 patch_site.EmitPatchInfo(); |
| 5184 | 5185 |
| 5185 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 5186 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 5186 __ testp(rax, rax); | 5187 __ testp(rax, rax); |
| 5187 Split(cc, if_true, if_false, fall_through); | 5188 Split(cc, if_true, if_false, fall_through); |
| 5188 } | 5189 } |
| 5189 } | 5190 } |
| 5190 | 5191 |
| 5191 // Convert the result of the comparison into one expected for this | 5192 // Convert the result of the comparison into one expected for this |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5392 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5393 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 5393 Assembler::target_address_at(call_target_address, | 5394 Assembler::target_address_at(call_target_address, |
| 5394 unoptimized_code)); | 5395 unoptimized_code)); |
| 5395 return OSR_AFTER_STACK_CHECK; | 5396 return OSR_AFTER_STACK_CHECK; |
| 5396 } | 5397 } |
| 5397 | 5398 |
| 5398 | 5399 |
| 5399 } } // namespace v8::internal | 5400 } } // namespace v8::internal |
| 5400 | 5401 |
| 5401 #endif // V8_TARGET_ARCH_X64 | 5402 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |