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 2141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2152 LOperand* right = instr->right(); | 2152 LOperand* right = instr->right(); |
2153 bool is_unsigned = | 2153 bool is_unsigned = |
2154 instr->hydrogen()->left()->CheckFlag(HInstruction::kUint32) || | 2154 instr->hydrogen()->left()->CheckFlag(HInstruction::kUint32) || |
2155 instr->hydrogen()->right()->CheckFlag(HInstruction::kUint32); | 2155 instr->hydrogen()->right()->CheckFlag(HInstruction::kUint32); |
2156 Condition cond = TokenToCondition(instr->op(), is_unsigned); | 2156 Condition cond = TokenToCondition(instr->op(), is_unsigned); |
2157 | 2157 |
2158 if (left->IsConstantOperand() && right->IsConstantOperand()) { | 2158 if (left->IsConstantOperand() && right->IsConstantOperand()) { |
2159 // We can statically evaluate the comparison. | 2159 // We can statically evaluate the comparison. |
2160 double left_val = ToDouble(LConstantOperand::cast(left)); | 2160 double left_val = ToDouble(LConstantOperand::cast(left)); |
2161 double right_val = ToDouble(LConstantOperand::cast(right)); | 2161 double right_val = ToDouble(LConstantOperand::cast(right)); |
2162 int next_block = EvalComparison(instr->op(), left_val, right_val) ? | 2162 int next_block = Token::EvalComparison(instr->op(), left_val, right_val) |
2163 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); | 2163 ? instr->TrueDestination(chunk_) |
| 2164 : instr->FalseDestination(chunk_); |
2164 EmitGoto(next_block); | 2165 EmitGoto(next_block); |
2165 } else { | 2166 } else { |
2166 if (instr->is_double()) { | 2167 if (instr->is_double()) { |
2167 // Compare left and right as doubles and load the | 2168 // Compare left and right as doubles and load the |
2168 // resulting flags into the normal status register. | 2169 // resulting flags into the normal status register. |
2169 FPURegister left_reg = ToDoubleRegister(left); | 2170 FPURegister left_reg = ToDoubleRegister(left); |
2170 FPURegister right_reg = ToDoubleRegister(right); | 2171 FPURegister right_reg = ToDoubleRegister(right); |
2171 | 2172 |
2172 // If a NaN is involved, i.e. the result is unordered, | 2173 // If a NaN is involved, i.e. the result is unordered, |
2173 // jump to false block label. | 2174 // jump to false block label. |
(...skipping 3454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5628 __ Push(at, ToRegister(instr->function())); | 5629 __ Push(at, ToRegister(instr->function())); |
5629 CallRuntime(Runtime::kPushBlockContext, instr); | 5630 CallRuntime(Runtime::kPushBlockContext, instr); |
5630 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5631 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5631 } | 5632 } |
5632 | 5633 |
5633 | 5634 |
5634 #undef __ | 5635 #undef __ |
5635 | 5636 |
5636 } // namespace internal | 5637 } // namespace internal |
5637 } // namespace v8 | 5638 } // namespace v8 |
OLD | NEW |