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 2028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2039 break; | 2039 break; |
2040 case Token::IN: | 2040 case Token::IN: |
2041 case Token::INSTANCEOF: | 2041 case Token::INSTANCEOF: |
2042 default: | 2042 default: |
2043 UNREACHABLE(); | 2043 UNREACHABLE(); |
2044 } | 2044 } |
2045 return cond; | 2045 return cond; |
2046 } | 2046 } |
2047 | 2047 |
2048 | 2048 |
2049 void LCodeGen::DoCmpIDAndBranch(LCmpIDAndBranch* instr) { | 2049 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) { |
2050 LOperand* left = instr->left(); | 2050 LOperand* left = instr->left(); |
2051 LOperand* right = instr->right(); | 2051 LOperand* right = instr->right(); |
2052 Condition cc = TokenToCondition(instr->op(), instr->is_double()); | 2052 Condition cc = TokenToCondition(instr->op(), instr->is_double()); |
2053 | 2053 |
2054 if (left->IsConstantOperand() && right->IsConstantOperand()) { | 2054 if (left->IsConstantOperand() && right->IsConstantOperand()) { |
2055 // We can statically evaluate the comparison. | 2055 // We can statically evaluate the comparison. |
2056 double left_val = ToDouble(LConstantOperand::cast(left)); | 2056 double left_val = ToDouble(LConstantOperand::cast(left)); |
2057 double right_val = ToDouble(LConstantOperand::cast(right)); | 2057 double right_val = ToDouble(LConstantOperand::cast(right)); |
2058 int next_block = EvalComparison(instr->op(), left_val, right_val) ? | 2058 int next_block = EvalComparison(instr->op(), left_val, right_val) ? |
2059 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); | 2059 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); |
(...skipping 3605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5665 FixedArray::kHeaderSize - kPointerSize)); | 5665 FixedArray::kHeaderSize - kPointerSize)); |
5666 __ bind(&done); | 5666 __ bind(&done); |
5667 } | 5667 } |
5668 | 5668 |
5669 | 5669 |
5670 #undef __ | 5670 #undef __ |
5671 | 5671 |
5672 } } // namespace v8::internal | 5672 } } // namespace v8::internal |
5673 | 5673 |
5674 #endif // V8_TARGET_ARCH_X64 | 5674 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |