| 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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
| 6 | 6 |
| 7 #include "src/crankshaft/x64/lithium-codegen-x64.h" | 7 #include "src/crankshaft/x64/lithium-codegen-x64.h" |
| 8 | 8 |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 5301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5312 __ CmpObjectType(input, SYMBOL_TYPE, input); | 5312 __ CmpObjectType(input, SYMBOL_TYPE, input); |
| 5313 final_branch_condition = equal; | 5313 final_branch_condition = equal; |
| 5314 | 5314 |
| 5315 } else if (String::Equals(type_name, factory->boolean_string())) { | 5315 } else if (String::Equals(type_name, factory->boolean_string())) { |
| 5316 __ CompareRoot(input, Heap::kTrueValueRootIndex); | 5316 __ CompareRoot(input, Heap::kTrueValueRootIndex); |
| 5317 __ j(equal, true_label, true_distance); | 5317 __ j(equal, true_label, true_distance); |
| 5318 __ CompareRoot(input, Heap::kFalseValueRootIndex); | 5318 __ CompareRoot(input, Heap::kFalseValueRootIndex); |
| 5319 final_branch_condition = equal; | 5319 final_branch_condition = equal; |
| 5320 | 5320 |
| 5321 } else if (String::Equals(type_name, factory->undefined_string())) { | 5321 } else if (String::Equals(type_name, factory->undefined_string())) { |
| 5322 __ CompareRoot(input, Heap::kUndefinedValueRootIndex); | 5322 __ CompareRoot(input, Heap::kNullValueRootIndex); |
| 5323 __ j(equal, true_label, true_distance); | 5323 __ j(equal, false_label, false_distance); |
| 5324 __ JumpIfSmi(input, false_label, false_distance); | 5324 __ JumpIfSmi(input, false_label, false_distance); |
| 5325 // Check for undetectable objects => true. | 5325 // Check for undetectable objects => true. |
| 5326 __ movp(input, FieldOperand(input, HeapObject::kMapOffset)); | 5326 __ movp(input, FieldOperand(input, HeapObject::kMapOffset)); |
| 5327 __ testb(FieldOperand(input, Map::kBitFieldOffset), | 5327 __ testb(FieldOperand(input, Map::kBitFieldOffset), |
| 5328 Immediate(1 << Map::kIsUndetectable)); | 5328 Immediate(1 << Map::kIsUndetectable)); |
| 5329 final_branch_condition = not_zero; | 5329 final_branch_condition = not_zero; |
| 5330 | 5330 |
| 5331 } else if (String::Equals(type_name, factory->function_string())) { | 5331 } else if (String::Equals(type_name, factory->function_string())) { |
| 5332 __ JumpIfSmi(input, false_label, false_distance); | 5332 __ JumpIfSmi(input, false_label, false_distance); |
| 5333 // Check for callable and not undetectable objects => true. | 5333 // Check for callable and not undetectable objects => true. |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5619 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5619 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5620 } | 5620 } |
| 5621 | 5621 |
| 5622 | 5622 |
| 5623 #undef __ | 5623 #undef __ |
| 5624 | 5624 |
| 5625 } // namespace internal | 5625 } // namespace internal |
| 5626 } // namespace v8 | 5626 } // namespace v8 |
| 5627 | 5627 |
| 5628 #endif // V8_TARGET_ARCH_X64 | 5628 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |