| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "src/x64/lithium-codegen-x64.h" | 9 #include "src/x64/lithium-codegen-x64.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 2220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2231 UNREACHABLE(); | 2231 UNREACHABLE(); |
| 2232 } | 2232 } |
| 2233 return cond; | 2233 return cond; |
| 2234 } | 2234 } |
| 2235 | 2235 |
| 2236 | 2236 |
| 2237 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) { | 2237 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) { |
| 2238 LOperand* left = instr->left(); | 2238 LOperand* left = instr->left(); |
| 2239 LOperand* right = instr->right(); | 2239 LOperand* right = instr->right(); |
| 2240 bool is_unsigned = | 2240 bool is_unsigned = |
| 2241 instr->is_double() || instr->hydrogen()->CheckFlag(HInstruction::kUint32); | 2241 instr->is_double() || |
| 2242 instr->hydrogen()->left()->CheckFlag(HInstruction::kUint32) || |
| 2243 instr->hydrogen()->right()->CheckFlag(HInstruction::kUint32); |
| 2242 Condition cc = TokenToCondition(instr->op(), is_unsigned); | 2244 Condition cc = TokenToCondition(instr->op(), is_unsigned); |
| 2243 | 2245 |
| 2244 if (left->IsConstantOperand() && right->IsConstantOperand()) { | 2246 if (left->IsConstantOperand() && right->IsConstantOperand()) { |
| 2245 // We can statically evaluate the comparison. | 2247 // We can statically evaluate the comparison. |
| 2246 double left_val = ToDouble(LConstantOperand::cast(left)); | 2248 double left_val = ToDouble(LConstantOperand::cast(left)); |
| 2247 double right_val = ToDouble(LConstantOperand::cast(right)); | 2249 double right_val = ToDouble(LConstantOperand::cast(right)); |
| 2248 int next_block = EvalComparison(instr->op(), left_val, right_val) ? | 2250 int next_block = EvalComparison(instr->op(), left_val, right_val) ? |
| 2249 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); | 2251 instr->TrueDestination(chunk_) : instr->FalseDestination(chunk_); |
| 2250 EmitGoto(next_block); | 2252 EmitGoto(next_block); |
| 2251 } else { | 2253 } else { |
| (...skipping 3483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5735 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr); | 5737 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr); |
| 5736 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5738 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5737 } | 5739 } |
| 5738 | 5740 |
| 5739 | 5741 |
| 5740 #undef __ | 5742 #undef __ |
| 5741 | 5743 |
| 5742 } } // namespace v8::internal | 5744 } } // namespace v8::internal |
| 5743 | 5745 |
| 5744 #endif // V8_TARGET_ARCH_X64 | 5746 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |