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 2016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2027 break; | 2027 break; |
2028 case Token::IN: | 2028 case Token::IN: |
2029 case Token::INSTANCEOF: | 2029 case Token::INSTANCEOF: |
2030 default: | 2030 default: |
2031 UNREACHABLE(); | 2031 UNREACHABLE(); |
2032 } | 2032 } |
2033 return cond; | 2033 return cond; |
2034 } | 2034 } |
2035 | 2035 |
2036 | 2036 |
2037 void LCodeGen::DoCmpIDAndBranch(LCmpIDAndBranch* instr) { | 2037 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) { |
2038 LOperand* left = instr->left(); | 2038 LOperand* left = instr->left(); |
2039 LOperand* right = instr->right(); | 2039 LOperand* right = instr->right(); |
2040 Condition cc = TokenToCondition(instr->op(), instr->is_double()); | 2040 Condition cc = TokenToCondition(instr->op(), instr->is_double()); |
2041 | 2041 |
2042 if (left->IsConstantOperand() && right->IsConstantOperand()) { | 2042 if (left->IsConstantOperand() && right->IsConstantOperand()) { |
2043 // We can statically evaluate the comparison. | 2043 // We can statically evaluate the comparison. |
2044 double left_val = ToDouble(LConstantOperand::cast(left)); | 2044 double left_val = ToDouble(LConstantOperand::cast(left)); |
2045 double right_val = ToDouble(LConstantOperand::cast(right)); | 2045 double right_val = ToDouble(LConstantOperand::cast(right)); |
2046 int next_block = EvalComparison(instr->op(), left_val, right_val) ? | 2046 int next_block = EvalComparison(instr->op(), left_val, right_val) ? |
2047 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); | 2047 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); |
(...skipping 3605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5653 FixedArray::kHeaderSize - kPointerSize)); | 5653 FixedArray::kHeaderSize - kPointerSize)); |
5654 __ bind(&done); | 5654 __ bind(&done); |
5655 } | 5655 } |
5656 | 5656 |
5657 | 5657 |
5658 #undef __ | 5658 #undef __ |
5659 | 5659 |
5660 } } // namespace v8::internal | 5660 } } // namespace v8::internal |
5661 | 5661 |
5662 #endif // V8_TARGET_ARCH_X64 | 5662 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |