OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
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 5520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5531 final_branch_condition = equal; | 5531 final_branch_condition = equal; |
5532 | 5532 |
5533 } else if (type_name->Equals(heap()->string_string())) { | 5533 } else if (type_name->Equals(heap()->string_string())) { |
5534 __ JumpIfSmi(input, false_label); | 5534 __ JumpIfSmi(input, false_label); |
5535 __ CmpObjectType(input, FIRST_NONSTRING_TYPE, input); | 5535 __ CmpObjectType(input, FIRST_NONSTRING_TYPE, input); |
5536 __ j(above_equal, false_label); | 5536 __ j(above_equal, false_label); |
5537 __ testb(FieldOperand(input, Map::kBitFieldOffset), | 5537 __ testb(FieldOperand(input, Map::kBitFieldOffset), |
5538 Immediate(1 << Map::kIsUndetectable)); | 5538 Immediate(1 << Map::kIsUndetectable)); |
5539 final_branch_condition = zero; | 5539 final_branch_condition = zero; |
5540 | 5540 |
| 5541 } else if (type_name->Equals(heap()->symbol_string())) { |
| 5542 __ JumpIfSmi(input, false_label); |
| 5543 __ CmpObjectType(input, SYMBOL_TYPE, input); |
| 5544 final_branch_condition = equal; |
| 5545 |
5541 } else if (type_name->Equals(heap()->boolean_string())) { | 5546 } else if (type_name->Equals(heap()->boolean_string())) { |
5542 __ CompareRoot(input, Heap::kTrueValueRootIndex); | 5547 __ CompareRoot(input, Heap::kTrueValueRootIndex); |
5543 __ j(equal, true_label); | 5548 __ j(equal, true_label); |
5544 __ CompareRoot(input, Heap::kFalseValueRootIndex); | 5549 __ CompareRoot(input, Heap::kFalseValueRootIndex); |
5545 final_branch_condition = equal; | 5550 final_branch_condition = equal; |
5546 | 5551 |
5547 } else if (FLAG_harmony_typeof && type_name->Equals(heap()->null_string())) { | 5552 } else if (FLAG_harmony_typeof && type_name->Equals(heap()->null_string())) { |
5548 __ CompareRoot(input, Heap::kNullValueRootIndex); | 5553 __ CompareRoot(input, Heap::kNullValueRootIndex); |
5549 final_branch_condition = equal; | 5554 final_branch_condition = equal; |
5550 | 5555 |
(...skipping 14 matching lines...) Expand all Loading... |
5565 __ j(equal, true_label); | 5570 __ j(equal, true_label); |
5566 __ CmpInstanceType(input, JS_FUNCTION_PROXY_TYPE); | 5571 __ CmpInstanceType(input, JS_FUNCTION_PROXY_TYPE); |
5567 final_branch_condition = equal; | 5572 final_branch_condition = equal; |
5568 | 5573 |
5569 } else if (type_name->Equals(heap()->object_string())) { | 5574 } else if (type_name->Equals(heap()->object_string())) { |
5570 __ JumpIfSmi(input, false_label); | 5575 __ JumpIfSmi(input, false_label); |
5571 if (!FLAG_harmony_typeof) { | 5576 if (!FLAG_harmony_typeof) { |
5572 __ CompareRoot(input, Heap::kNullValueRootIndex); | 5577 __ CompareRoot(input, Heap::kNullValueRootIndex); |
5573 __ j(equal, true_label); | 5578 __ j(equal, true_label); |
5574 } | 5579 } |
5575 if (FLAG_harmony_symbols) { | 5580 __ CmpObjectType(input, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, input); |
5576 __ CmpObjectType(input, SYMBOL_TYPE, input); | |
5577 __ j(equal, true_label); | |
5578 __ CmpInstanceType(input, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE); | |
5579 } else { | |
5580 __ CmpObjectType(input, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, input); | |
5581 } | |
5582 __ j(below, false_label); | 5581 __ j(below, false_label); |
5583 __ CmpInstanceType(input, LAST_NONCALLABLE_SPEC_OBJECT_TYPE); | 5582 __ CmpInstanceType(input, LAST_NONCALLABLE_SPEC_OBJECT_TYPE); |
5584 __ j(above, false_label); | 5583 __ j(above, false_label); |
5585 // Check for undetectable objects => false. | 5584 // Check for undetectable objects => false. |
5586 __ testb(FieldOperand(input, Map::kBitFieldOffset), | 5585 __ testb(FieldOperand(input, Map::kBitFieldOffset), |
5587 Immediate(1 << Map::kIsUndetectable)); | 5586 Immediate(1 << Map::kIsUndetectable)); |
5588 final_branch_condition = zero; | 5587 final_branch_condition = zero; |
5589 | 5588 |
5590 } else { | 5589 } else { |
5591 __ jmp(false_label); | 5590 __ jmp(false_label); |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5848 FixedArray::kHeaderSize - kPointerSize)); | 5847 FixedArray::kHeaderSize - kPointerSize)); |
5849 __ bind(&done); | 5848 __ bind(&done); |
5850 } | 5849 } |
5851 | 5850 |
5852 | 5851 |
5853 #undef __ | 5852 #undef __ |
5854 | 5853 |
5855 } } // namespace v8::internal | 5854 } } // namespace v8::internal |
5856 | 5855 |
5857 #endif // V8_TARGET_ARCH_X64 | 5856 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |