OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 2267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2278 break; | 2278 break; |
2279 case Token::IN: | 2279 case Token::IN: |
2280 case Token::INSTANCEOF: | 2280 case Token::INSTANCEOF: |
2281 default: | 2281 default: |
2282 UNREACHABLE(); | 2282 UNREACHABLE(); |
2283 } | 2283 } |
2284 return cond; | 2284 return cond; |
2285 } | 2285 } |
2286 | 2286 |
2287 | 2287 |
2288 void LCodeGen::DoCmpIDAndBranch(LCmpIDAndBranch* instr) { | 2288 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) { |
2289 LOperand* left = instr->left(); | 2289 LOperand* left = instr->left(); |
2290 LOperand* right = instr->right(); | 2290 LOperand* right = instr->right(); |
2291 Condition cc = TokenToCondition(instr->op(), instr->is_double()); | 2291 Condition cc = TokenToCondition(instr->op(), instr->is_double()); |
2292 | 2292 |
2293 if (left->IsConstantOperand() && right->IsConstantOperand()) { | 2293 if (left->IsConstantOperand() && right->IsConstantOperand()) { |
2294 // We can statically evaluate the comparison. | 2294 // We can statically evaluate the comparison. |
2295 double left_val = ToDouble(LConstantOperand::cast(left)); | 2295 double left_val = ToDouble(LConstantOperand::cast(left)); |
2296 double right_val = ToDouble(LConstantOperand::cast(right)); | 2296 double right_val = ToDouble(LConstantOperand::cast(right)); |
2297 int next_block = EvalComparison(instr->op(), left_val, right_val) ? | 2297 int next_block = EvalComparison(instr->op(), left_val, right_val) ? |
2298 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); | 2298 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); |
(...skipping 4274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6573 FixedArray::kHeaderSize - kPointerSize)); | 6573 FixedArray::kHeaderSize - kPointerSize)); |
6574 __ bind(&done); | 6574 __ bind(&done); |
6575 } | 6575 } |
6576 | 6576 |
6577 | 6577 |
6578 #undef __ | 6578 #undef __ |
6579 | 6579 |
6580 } } // namespace v8::internal | 6580 } } // namespace v8::internal |
6581 | 6581 |
6582 #endif // V8_TARGET_ARCH_IA32 | 6582 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |