| 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 2253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2264 UNREACHABLE(); | 2264 UNREACHABLE(); |
| 2265 } | 2265 } |
| 2266 return cond; | 2266 return cond; |
| 2267 } | 2267 } |
| 2268 | 2268 |
| 2269 | 2269 |
| 2270 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) { | 2270 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) { |
| 2271 LOperand* left = instr->left(); | 2271 LOperand* left = instr->left(); |
| 2272 LOperand* right = instr->right(); | 2272 LOperand* right = instr->right(); |
| 2273 bool is_unsigned = instr->hydrogen()->CheckFlag(HInstruction::kUint32); | 2273 bool is_unsigned = instr->hydrogen()->CheckFlag(HInstruction::kUint32); |
| 2274 Condition cc = TokenToCondition(instr->op(), is_unsigned); | 2274 Condition cond = TokenToCondition(instr->op(), is_unsigned); |
| 2275 | 2275 |
| 2276 if (left->IsConstantOperand() && right->IsConstantOperand()) { | 2276 if (left->IsConstantOperand() && right->IsConstantOperand()) { |
| 2277 // We can statically evaluate the comparison. | 2277 // We can statically evaluate the comparison. |
| 2278 double left_val = ToDouble(LConstantOperand::cast(left)); | 2278 double left_val = ToDouble(LConstantOperand::cast(left)); |
| 2279 double right_val = ToDouble(LConstantOperand::cast(right)); | 2279 double right_val = ToDouble(LConstantOperand::cast(right)); |
| 2280 int next_block = EvalComparison(instr->op(), left_val, right_val) ? | 2280 int next_block = EvalComparison(instr->op(), left_val, right_val) ? |
| 2281 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); | 2281 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); |
| 2282 EmitGoto(next_block); | 2282 EmitGoto(next_block); |
| 2283 } else { | 2283 } else { |
| 2284 if (instr->is_double()) { | 2284 if (instr->is_double()) { |
| (...skipping 3632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5917 __ lw(result, FieldMemOperand(scratch, | 5917 __ lw(result, FieldMemOperand(scratch, |
| 5918 FixedArray::kHeaderSize - kPointerSize)); | 5918 FixedArray::kHeaderSize - kPointerSize)); |
| 5919 __ bind(deferred->exit()); | 5919 __ bind(deferred->exit()); |
| 5920 __ bind(&done); | 5920 __ bind(&done); |
| 5921 } | 5921 } |
| 5922 | 5922 |
| 5923 | 5923 |
| 5924 #undef __ | 5924 #undef __ |
| 5925 | 5925 |
| 5926 } } // namespace v8::internal | 5926 } } // namespace v8::internal |
| OLD | NEW |