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/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 5475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5486 Condition final_branch_condition = no_condition; | 5486 Condition final_branch_condition = no_condition; |
5487 if (String::Equals(type_name, factory()->number_string())) { | 5487 if (String::Equals(type_name, factory()->number_string())) { |
5488 __ JumpIfSmi(input, true_label, true_distance); | 5488 __ JumpIfSmi(input, true_label, true_distance); |
5489 __ cmp(FieldOperand(input, HeapObject::kMapOffset), | 5489 __ cmp(FieldOperand(input, HeapObject::kMapOffset), |
5490 factory()->heap_number_map()); | 5490 factory()->heap_number_map()); |
5491 final_branch_condition = equal; | 5491 final_branch_condition = equal; |
5492 | 5492 |
5493 } else if (String::Equals(type_name, factory()->string_string())) { | 5493 } else if (String::Equals(type_name, factory()->string_string())) { |
5494 __ JumpIfSmi(input, false_label, false_distance); | 5494 __ JumpIfSmi(input, false_label, false_distance); |
5495 __ CmpObjectType(input, FIRST_NONSTRING_TYPE, input); | 5495 __ CmpObjectType(input, FIRST_NONSTRING_TYPE, input); |
5496 __ j(above_equal, false_label, false_distance); | 5496 final_branch_condition = below; |
5497 __ test_b(FieldOperand(input, Map::kBitFieldOffset), | |
5498 1 << Map::kIsUndetectable); | |
5499 final_branch_condition = zero; | |
5500 | 5497 |
5501 } else if (String::Equals(type_name, factory()->symbol_string())) { | 5498 } else if (String::Equals(type_name, factory()->symbol_string())) { |
5502 __ JumpIfSmi(input, false_label, false_distance); | 5499 __ JumpIfSmi(input, false_label, false_distance); |
5503 __ CmpObjectType(input, SYMBOL_TYPE, input); | 5500 __ CmpObjectType(input, SYMBOL_TYPE, input); |
5504 final_branch_condition = equal; | 5501 final_branch_condition = equal; |
5505 | 5502 |
5506 } else if (String::Equals(type_name, factory()->boolean_string())) { | 5503 } else if (String::Equals(type_name, factory()->boolean_string())) { |
5507 __ cmp(input, factory()->true_value()); | 5504 __ cmp(input, factory()->true_value()); |
5508 __ j(equal, true_label, true_distance); | 5505 __ j(equal, true_label, true_distance); |
5509 __ cmp(input, factory()->false_value()); | 5506 __ cmp(input, factory()->false_value()); |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5849 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5846 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5850 } | 5847 } |
5851 | 5848 |
5852 | 5849 |
5853 #undef __ | 5850 #undef __ |
5854 | 5851 |
5855 } // namespace internal | 5852 } // namespace internal |
5856 } // namespace v8 | 5853 } // namespace v8 |
5857 | 5854 |
5858 #endif // V8_TARGET_ARCH_IA32 | 5855 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |