| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
| 8 | 8 |
| 9 #include "src/ia32/lithium-codegen-ia32.h" | 9 #include "src/ia32/lithium-codegen-ia32.h" |
| 10 #include "src/ic.h" | 10 #include "src/ic.h" |
| (...skipping 2229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2240 UNREACHABLE(); | 2240 UNREACHABLE(); |
| 2241 } | 2241 } |
| 2242 return cond; | 2242 return cond; |
| 2243 } | 2243 } |
| 2244 | 2244 |
| 2245 | 2245 |
| 2246 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) { | 2246 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) { |
| 2247 LOperand* left = instr->left(); | 2247 LOperand* left = instr->left(); |
| 2248 LOperand* right = instr->right(); | 2248 LOperand* right = instr->right(); |
| 2249 bool is_unsigned = | 2249 bool is_unsigned = |
| 2250 instr->is_double() || instr->hydrogen()->CheckFlag(HInstruction::kUint32); | 2250 instr->is_double() || |
| 2251 instr->hydrogen()->left()->CheckFlag(HInstruction::kUint32) || |
| 2252 instr->hydrogen()->right()->CheckFlag(HInstruction::kUint32); |
| 2251 Condition cc = TokenToCondition(instr->op(), is_unsigned); | 2253 Condition cc = TokenToCondition(instr->op(), is_unsigned); |
| 2252 | 2254 |
| 2253 if (left->IsConstantOperand() && right->IsConstantOperand()) { | 2255 if (left->IsConstantOperand() && right->IsConstantOperand()) { |
| 2254 // We can statically evaluate the comparison. | 2256 // We can statically evaluate the comparison. |
| 2255 double left_val = ToDouble(LConstantOperand::cast(left)); | 2257 double left_val = ToDouble(LConstantOperand::cast(left)); |
| 2256 double right_val = ToDouble(LConstantOperand::cast(right)); | 2258 double right_val = ToDouble(LConstantOperand::cast(right)); |
| 2257 int next_block = EvalComparison(instr->op(), left_val, right_val) ? | 2259 int next_block = EvalComparison(instr->op(), left_val, right_val) ? |
| 2258 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); | 2260 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); |
| 2259 EmitGoto(next_block); | 2261 EmitGoto(next_block); |
| 2260 } else { | 2262 } else { |
| (...skipping 3396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5657 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr); | 5659 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr); |
| 5658 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5660 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5659 } | 5661 } |
| 5660 | 5662 |
| 5661 | 5663 |
| 5662 #undef __ | 5664 #undef __ |
| 5663 | 5665 |
| 5664 } } // namespace v8::internal | 5666 } } // namespace v8::internal |
| 5665 | 5667 |
| 5666 #endif // V8_TARGET_ARCH_IA32 | 5668 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |