| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 4012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4023 __ CompareObjectType(r0, r0, r1, FIRST_NONSTRING_TYPE); | 4023 __ CompareObjectType(r0, r0, r1, FIRST_NONSTRING_TYPE); |
| 4024 __ b(ge, if_false); | 4024 __ b(ge, if_false); |
| 4025 __ ldrb(r1, FieldMemOperand(r0, Map::kBitFieldOffset)); | 4025 __ ldrb(r1, FieldMemOperand(r0, Map::kBitFieldOffset)); |
| 4026 __ tst(r1, Operand(1 << Map::kIsUndetectable)); | 4026 __ tst(r1, Operand(1 << Map::kIsUndetectable)); |
| 4027 Split(eq, if_true, if_false, fall_through); | 4027 Split(eq, if_true, if_false, fall_through); |
| 4028 } else if (check->Equals(isolate()->heap()->boolean_symbol())) { | 4028 } else if (check->Equals(isolate()->heap()->boolean_symbol())) { |
| 4029 __ CompareRoot(r0, Heap::kTrueValueRootIndex); | 4029 __ CompareRoot(r0, Heap::kTrueValueRootIndex); |
| 4030 __ b(eq, if_true); | 4030 __ b(eq, if_true); |
| 4031 __ CompareRoot(r0, Heap::kFalseValueRootIndex); | 4031 __ CompareRoot(r0, Heap::kFalseValueRootIndex); |
| 4032 Split(eq, if_true, if_false, fall_through); | 4032 Split(eq, if_true, if_false, fall_through); |
| 4033 } else if (FLAG_harmony_typeof && |
| 4034 check->Equals(isolate()->heap()->null_symbol())) { |
| 4035 __ CompareRoot(r0, Heap::kNullValueRootIndex); |
| 4036 Split(eq, if_true, if_false, fall_through); |
| 4033 } else if (check->Equals(isolate()->heap()->undefined_symbol())) { | 4037 } else if (check->Equals(isolate()->heap()->undefined_symbol())) { |
| 4034 __ CompareRoot(r0, Heap::kUndefinedValueRootIndex); | 4038 __ CompareRoot(r0, Heap::kUndefinedValueRootIndex); |
| 4035 __ b(eq, if_true); | 4039 __ b(eq, if_true); |
| 4036 __ JumpIfSmi(r0, if_false); | 4040 __ JumpIfSmi(r0, if_false); |
| 4037 // Check for undetectable objects => true. | 4041 // Check for undetectable objects => true. |
| 4038 __ ldr(r0, FieldMemOperand(r0, HeapObject::kMapOffset)); | 4042 __ ldr(r0, FieldMemOperand(r0, HeapObject::kMapOffset)); |
| 4039 __ ldrb(r1, FieldMemOperand(r0, Map::kBitFieldOffset)); | 4043 __ ldrb(r1, FieldMemOperand(r0, Map::kBitFieldOffset)); |
| 4040 __ tst(r1, Operand(1 << Map::kIsUndetectable)); | 4044 __ tst(r1, Operand(1 << Map::kIsUndetectable)); |
| 4041 Split(ne, if_true, if_false, fall_through); | 4045 Split(ne, if_true, if_false, fall_through); |
| 4042 | 4046 |
| 4043 } else if (check->Equals(isolate()->heap()->function_symbol())) { | 4047 } else if (check->Equals(isolate()->heap()->function_symbol())) { |
| 4044 __ JumpIfSmi(r0, if_false); | 4048 __ JumpIfSmi(r0, if_false); |
| 4045 __ CompareObjectType(r0, r1, r0, FIRST_CALLABLE_SPEC_OBJECT_TYPE); | 4049 __ CompareObjectType(r0, r1, r0, FIRST_CALLABLE_SPEC_OBJECT_TYPE); |
| 4046 Split(ge, if_true, if_false, fall_through); | 4050 Split(ge, if_true, if_false, fall_through); |
| 4047 | 4051 |
| 4048 } else if (check->Equals(isolate()->heap()->object_symbol())) { | 4052 } else if (check->Equals(isolate()->heap()->object_symbol())) { |
| 4049 __ JumpIfSmi(r0, if_false); | 4053 __ JumpIfSmi(r0, if_false); |
| 4050 __ CompareRoot(r0, Heap::kNullValueRootIndex); | 4054 if (!FLAG_harmony_typeof) { |
| 4051 __ b(eq, if_true); | 4055 __ CompareRoot(r0, Heap::kNullValueRootIndex); |
| 4056 __ b(eq, if_true); |
| 4057 } |
| 4052 // Check for JS objects => true. | 4058 // Check for JS objects => true. |
| 4053 __ CompareObjectType(r0, r0, r1, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE); | 4059 __ CompareObjectType(r0, r0, r1, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE); |
| 4054 __ b(lt, if_false); | 4060 __ b(lt, if_false); |
| 4055 __ CompareInstanceType(r0, r1, LAST_NONCALLABLE_SPEC_OBJECT_TYPE); | 4061 __ CompareInstanceType(r0, r1, LAST_NONCALLABLE_SPEC_OBJECT_TYPE); |
| 4056 __ b(gt, if_false); | 4062 __ b(gt, if_false); |
| 4057 // Check for undetectable objects => false. | 4063 // Check for undetectable objects => false. |
| 4058 __ ldrb(r1, FieldMemOperand(r0, Map::kBitFieldOffset)); | 4064 __ ldrb(r1, FieldMemOperand(r0, Map::kBitFieldOffset)); |
| 4059 __ tst(r1, Operand(1 << Map::kIsUndetectable)); | 4065 __ tst(r1, Operand(1 << Map::kIsUndetectable)); |
| 4060 Split(eq, if_true, if_false, fall_through); | 4066 Split(eq, if_true, if_false, fall_through); |
| 4061 } else { | 4067 } else { |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4292 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. | 4298 __ mov(r1, Operand(r1, ASR, 1)); // Un-smi-tag value. |
| 4293 __ add(pc, r1, Operand(masm_->CodeObject())); | 4299 __ add(pc, r1, Operand(masm_->CodeObject())); |
| 4294 } | 4300 } |
| 4295 | 4301 |
| 4296 | 4302 |
| 4297 #undef __ | 4303 #undef __ |
| 4298 | 4304 |
| 4299 } } // namespace v8::internal | 4305 } } // namespace v8::internal |
| 4300 | 4306 |
| 4301 #endif // V8_TARGET_ARCH_ARM | 4307 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |