| 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 2005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2016 } | 2016 } |
| 2017 | 2017 |
| 2018 | 2018 |
| 2019 inline Condition LCodeGen::TokenToCondition(Token::Value op, bool is_unsigned) { | 2019 inline Condition LCodeGen::TokenToCondition(Token::Value op, bool is_unsigned) { |
| 2020 Condition cond = no_condition; | 2020 Condition cond = no_condition; |
| 2021 switch (op) { | 2021 switch (op) { |
| 2022 case Token::EQ: | 2022 case Token::EQ: |
| 2023 case Token::EQ_STRICT: | 2023 case Token::EQ_STRICT: |
| 2024 cond = equal; | 2024 cond = equal; |
| 2025 break; | 2025 break; |
| 2026 case Token::NE: |
| 2027 cond = not_equal; |
| 2028 break; |
| 2026 case Token::LT: | 2029 case Token::LT: |
| 2027 cond = is_unsigned ? below : less; | 2030 cond = is_unsigned ? below : less; |
| 2028 break; | 2031 break; |
| 2029 case Token::GT: | 2032 case Token::GT: |
| 2030 cond = is_unsigned ? above : greater; | 2033 cond = is_unsigned ? above : greater; |
| 2031 break; | 2034 break; |
| 2032 case Token::LTE: | 2035 case Token::LTE: |
| 2033 cond = is_unsigned ? below_equal : less_equal; | 2036 cond = is_unsigned ? below_equal : less_equal; |
| 2034 break; | 2037 break; |
| 2035 case Token::GTE: | 2038 case Token::GTE: |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2098 } else { | 2101 } else { |
| 2099 __ cmpl(ToRegister(left), ToOperand(right)); | 2102 __ cmpl(ToRegister(left), ToOperand(right)); |
| 2100 } | 2103 } |
| 2101 } | 2104 } |
| 2102 } | 2105 } |
| 2103 EmitBranch(instr, cc); | 2106 EmitBranch(instr, cc); |
| 2104 } | 2107 } |
| 2105 } | 2108 } |
| 2106 | 2109 |
| 2107 | 2110 |
| 2108 void LCodeGen::DoCmpObjectEqAndBranch(LCmpObjectEqAndBranch* instr) { | 2111 void LCodeGen::DoCmpObjectAndBranch(LCmpObjectAndBranch* instr) { |
| 2109 Register left = ToRegister(instr->left()); | 2112 Register left = ToRegister(instr->left()); |
| 2110 | 2113 |
| 2111 if (instr->right()->IsConstantOperand()) { | 2114 if (instr->right()->IsConstantOperand()) { |
| 2112 Handle<Object> right = ToHandle(LConstantOperand::cast(instr->right())); | 2115 Handle<Object> right = ToHandle(LConstantOperand::cast(instr->right())); |
| 2113 __ CmpObject(left, right); | 2116 __ CmpObject(left, right); |
| 2114 } else { | 2117 } else { |
| 2115 Register right = ToRegister(instr->right()); | 2118 Register right = ToRegister(instr->right()); |
| 2116 __ cmpq(left, right); | 2119 __ cmpq(left, right); |
| 2117 } | 2120 } |
| 2118 EmitBranch(instr, equal); | 2121 if (instr->hydrogen()->is_equal()) { |
| 2122 EmitBranch(instr, equal); |
| 2123 } else { |
| 2124 EmitBranch(instr, not_equal); |
| 2125 } |
| 2119 } | 2126 } |
| 2120 | 2127 |
| 2121 | 2128 |
| 2122 Condition LCodeGen::EmitIsObject(Register input, | 2129 Condition LCodeGen::EmitIsObject(Register input, |
| 2123 Label* is_not_object, | 2130 Label* is_not_object, |
| 2124 Label* is_object) { | 2131 Label* is_object) { |
| 2125 ASSERT(!input.is(kScratchRegister)); | 2132 ASSERT(!input.is(kScratchRegister)); |
| 2126 | 2133 |
| 2127 __ JumpIfSmi(input, is_not_object); | 2134 __ JumpIfSmi(input, is_not_object); |
| 2128 | 2135 |
| (...skipping 3408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5537 FixedArray::kHeaderSize - kPointerSize)); | 5544 FixedArray::kHeaderSize - kPointerSize)); |
| 5538 __ bind(&done); | 5545 __ bind(&done); |
| 5539 } | 5546 } |
| 5540 | 5547 |
| 5541 | 5548 |
| 5542 #undef __ | 5549 #undef __ |
| 5543 | 5550 |
| 5544 } } // namespace v8::internal | 5551 } } // namespace v8::internal |
| 5545 | 5552 |
| 5546 #endif // V8_TARGET_ARCH_X64 | 5553 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |