| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 3979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3990 break; | 3990 break; |
| 3991 } | 3991 } |
| 3992 | 3992 |
| 3993 default: { | 3993 default: { |
| 3994 VisitForAccumulatorValue(expr->right()); | 3994 VisitForAccumulatorValue(expr->right()); |
| 3995 Condition cc = no_condition; | 3995 Condition cc = no_condition; |
| 3996 switch (op) { | 3996 switch (op) { |
| 3997 case Token::EQ_STRICT: | 3997 case Token::EQ_STRICT: |
| 3998 case Token::EQ: | 3998 case Token::EQ: |
| 3999 cc = equal; | 3999 cc = equal; |
| 4000 __ pop(rdx); | |
| 4001 break; | 4000 break; |
| 4002 case Token::LT: | 4001 case Token::LT: |
| 4003 cc = less; | 4002 cc = less; |
| 4004 __ pop(rdx); | |
| 4005 break; | 4003 break; |
| 4006 case Token::GT: | 4004 case Token::GT: |
| 4007 // Reverse left and right sizes to obtain ECMA-262 conversion order. | 4005 cc = greater; |
| 4008 cc = less; | |
| 4009 __ movq(rdx, result_register()); | |
| 4010 __ pop(rax); | |
| 4011 break; | 4006 break; |
| 4012 case Token::LTE: | 4007 case Token::LTE: |
| 4013 // Reverse left and right sizes to obtain ECMA-262 conversion order. | 4008 cc = less_equal; |
| 4014 cc = greater_equal; | |
| 4015 __ movq(rdx, result_register()); | |
| 4016 __ pop(rax); | |
| 4017 break; | 4009 break; |
| 4018 case Token::GTE: | 4010 case Token::GTE: |
| 4019 cc = greater_equal; | 4011 cc = greater_equal; |
| 4020 __ pop(rdx); | |
| 4021 break; | 4012 break; |
| 4022 case Token::IN: | 4013 case Token::IN: |
| 4023 case Token::INSTANCEOF: | 4014 case Token::INSTANCEOF: |
| 4024 default: | 4015 default: |
| 4025 UNREACHABLE(); | 4016 UNREACHABLE(); |
| 4026 } | 4017 } |
| 4018 __ pop(rdx); |
| 4027 | 4019 |
| 4028 bool inline_smi_code = ShouldInlineSmiCase(op); | 4020 bool inline_smi_code = ShouldInlineSmiCase(op); |
| 4029 JumpPatchSite patch_site(masm_); | 4021 JumpPatchSite patch_site(masm_); |
| 4030 if (inline_smi_code) { | 4022 if (inline_smi_code) { |
| 4031 Label slow_case; | 4023 Label slow_case; |
| 4032 __ movq(rcx, rdx); | 4024 __ movq(rcx, rdx); |
| 4033 __ or_(rcx, rax); | 4025 __ or_(rcx, rax); |
| 4034 patch_site.EmitJumpIfNotSmi(rcx, &slow_case, Label::kNear); | 4026 patch_site.EmitJumpIfNotSmi(rcx, &slow_case, Label::kNear); |
| 4035 __ cmpq(rdx, rax); | 4027 __ cmpq(rdx, rax); |
| 4036 Split(cc, if_true, if_false, NULL); | 4028 Split(cc, if_true, if_false, NULL); |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4195 *context_length = 0; | 4187 *context_length = 0; |
| 4196 return previous_; | 4188 return previous_; |
| 4197 } | 4189 } |
| 4198 | 4190 |
| 4199 | 4191 |
| 4200 #undef __ | 4192 #undef __ |
| 4201 | 4193 |
| 4202 } } // namespace v8::internal | 4194 } } // namespace v8::internal |
| 4203 | 4195 |
| 4204 #endif // V8_TARGET_ARCH_X64 | 4196 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |