OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 5766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5777 cmp1 = input; | 5777 cmp1 = input; |
5778 cmp2 = Operand(JS_FUNCTION_PROXY_TYPE); | 5778 cmp2 = Operand(JS_FUNCTION_PROXY_TYPE); |
5779 final_branch_condition = eq; | 5779 final_branch_condition = eq; |
5780 | 5780 |
5781 } else if (type_name->Equals(heap()->object_string())) { | 5781 } else if (type_name->Equals(heap()->object_string())) { |
5782 __ JumpIfSmi(input, false_label); | 5782 __ JumpIfSmi(input, false_label); |
5783 if (!FLAG_harmony_typeof) { | 5783 if (!FLAG_harmony_typeof) { |
5784 __ LoadRoot(at, Heap::kNullValueRootIndex); | 5784 __ LoadRoot(at, Heap::kNullValueRootIndex); |
5785 __ Branch(USE_DELAY_SLOT, true_label, eq, at, Operand(input)); | 5785 __ Branch(USE_DELAY_SLOT, true_label, eq, at, Operand(input)); |
5786 } | 5786 } |
5787 // input is an object, it is safe to use GetObjectType in the delay slot. | 5787 if (FLAG_harmony_symbols) { |
5788 __ GetObjectType(input, input, scratch); | 5788 // input is an object, it is safe to use GetObjectType in the delay slot. |
5789 __ Branch(USE_DELAY_SLOT, false_label, | 5789 __ GetObjectType(input, input, scratch); |
5790 lt, scratch, Operand(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); | 5790 __ Branch(USE_DELAY_SLOT, true_label, eq, scratch, Operand(SYMBOL_TYPE)); |
| 5791 // Still an object, so the InstanceType can be loaded. |
| 5792 __ lbu(scratch, FieldMemOperand(input, Map::kInstanceTypeOffset)); |
| 5793 __ Branch(USE_DELAY_SLOT, false_label, |
| 5794 lt, scratch, Operand(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); |
| 5795 } else { |
| 5796 // input is an object, it is safe to use GetObjectType in the delay slot. |
| 5797 __ GetObjectType(input, input, scratch); |
| 5798 __ Branch(USE_DELAY_SLOT, false_label, |
| 5799 lt, scratch, Operand(FIRST_NONCALLABLE_SPEC_OBJECT_TYPE)); |
| 5800 } |
5791 // Still an object, so the InstanceType can be loaded. | 5801 // Still an object, so the InstanceType can be loaded. |
5792 __ lbu(scratch, FieldMemOperand(input, Map::kInstanceTypeOffset)); | 5802 __ lbu(scratch, FieldMemOperand(input, Map::kInstanceTypeOffset)); |
5793 __ Branch(USE_DELAY_SLOT, false_label, | 5803 __ Branch(USE_DELAY_SLOT, false_label, |
5794 gt, scratch, Operand(LAST_NONCALLABLE_SPEC_OBJECT_TYPE)); | 5804 gt, scratch, Operand(LAST_NONCALLABLE_SPEC_OBJECT_TYPE)); |
5795 // Still an object, so the BitField can be loaded. | 5805 // Still an object, so the BitField can be loaded. |
5796 // Check for undetectable objects => false. | 5806 // Check for undetectable objects => false. |
5797 __ lbu(at, FieldMemOperand(input, Map::kBitFieldOffset)); | 5807 __ lbu(at, FieldMemOperand(input, Map::kBitFieldOffset)); |
5798 __ And(at, at, 1 << Map::kIsUndetectable); | 5808 __ And(at, at, 1 << Map::kIsUndetectable); |
5799 cmp1 = at; | 5809 cmp1 = at; |
5800 cmp2 = Operand(zero_reg); | 5810 cmp2 = Operand(zero_reg); |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6064 __ Subu(scratch, result, scratch); | 6074 __ Subu(scratch, result, scratch); |
6065 __ lw(result, FieldMemOperand(scratch, | 6075 __ lw(result, FieldMemOperand(scratch, |
6066 FixedArray::kHeaderSize - kPointerSize)); | 6076 FixedArray::kHeaderSize - kPointerSize)); |
6067 __ bind(&done); | 6077 __ bind(&done); |
6068 } | 6078 } |
6069 | 6079 |
6070 | 6080 |
6071 #undef __ | 6081 #undef __ |
6072 | 6082 |
6073 } } // namespace v8::internal | 6083 } } // namespace v8::internal |
OLD | NEW |