| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
| 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 2259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2270 default: | 2270 default: |
| 2271 UNREACHABLE(); | 2271 UNREACHABLE(); |
| 2272 } | 2272 } |
| 2273 return cond; | 2273 return cond; |
| 2274 } | 2274 } |
| 2275 | 2275 |
| 2276 | 2276 |
| 2277 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) { | 2277 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) { |
| 2278 LOperand* left = instr->left(); | 2278 LOperand* left = instr->left(); |
| 2279 LOperand* right = instr->right(); | 2279 LOperand* right = instr->right(); |
| 2280 Condition cond = TokenToCondition(instr->op(), false); | 2280 bool is_unsigned = instr->hydrogen()->CheckFlag(HInstruction::kUint32); |
| 2281 Condition cc = TokenToCondition(instr->op(), is_unsigned); |
| 2281 | 2282 |
| 2282 if (left->IsConstantOperand() && right->IsConstantOperand()) { | 2283 if (left->IsConstantOperand() && right->IsConstantOperand()) { |
| 2283 // We can statically evaluate the comparison. | 2284 // We can statically evaluate the comparison. |
| 2284 double left_val = ToDouble(LConstantOperand::cast(left)); | 2285 double left_val = ToDouble(LConstantOperand::cast(left)); |
| 2285 double right_val = ToDouble(LConstantOperand::cast(right)); | 2286 double right_val = ToDouble(LConstantOperand::cast(right)); |
| 2286 int next_block = EvalComparison(instr->op(), left_val, right_val) ? | 2287 int next_block = EvalComparison(instr->op(), left_val, right_val) ? |
| 2287 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); | 2288 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); |
| 2288 EmitGoto(next_block); | 2289 EmitGoto(next_block); |
| 2289 } else { | 2290 } else { |
| 2290 if (instr->is_double()) { | 2291 if (instr->is_double()) { |
| (...skipping 3632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5923 __ lw(result, FieldMemOperand(scratch, | 5924 __ lw(result, FieldMemOperand(scratch, |
| 5924 FixedArray::kHeaderSize - kPointerSize)); | 5925 FixedArray::kHeaderSize - kPointerSize)); |
| 5925 __ bind(deferred->exit()); | 5926 __ bind(deferred->exit()); |
| 5926 __ bind(&done); | 5927 __ bind(&done); |
| 5927 } | 5928 } |
| 5928 | 5929 |
| 5929 | 5930 |
| 5930 #undef __ | 5931 #undef __ |
| 5931 | 5932 |
| 5932 } } // namespace v8::internal | 5933 } } // namespace v8::internal |
| OLD | NEW |