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 #if V8_TARGET_ARCH_ARM | 5 #if V8_TARGET_ARCH_ARM |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
(...skipping 4950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4961 __ b(eq, if_true); | 4961 __ b(eq, if_true); |
4962 __ JumpIfSmi(r0, if_false); | 4962 __ JumpIfSmi(r0, if_false); |
4963 // Check for undetectable objects => true. | 4963 // Check for undetectable objects => true. |
4964 __ ldr(r0, FieldMemOperand(r0, HeapObject::kMapOffset)); | 4964 __ ldr(r0, FieldMemOperand(r0, HeapObject::kMapOffset)); |
4965 __ ldrb(r1, FieldMemOperand(r0, Map::kBitFieldOffset)); | 4965 __ ldrb(r1, FieldMemOperand(r0, Map::kBitFieldOffset)); |
4966 __ tst(r1, Operand(1 << Map::kIsUndetectable)); | 4966 __ tst(r1, Operand(1 << Map::kIsUndetectable)); |
4967 Split(ne, if_true, if_false, fall_through); | 4967 Split(ne, if_true, if_false, fall_through); |
4968 | 4968 |
4969 } else if (String::Equals(check, factory->function_string())) { | 4969 } else if (String::Equals(check, factory->function_string())) { |
4970 __ JumpIfSmi(r0, if_false); | 4970 __ JumpIfSmi(r0, if_false); |
4971 STATIC_ASSERT(NUM_OF_CALLABLE_SPEC_OBJECT_TYPES == 2); | 4971 __ ldr(r0, FieldMemOperand(r0, HeapObject::kMapOffset)); |
4972 __ CompareObjectType(r0, r0, r1, JS_FUNCTION_TYPE); | 4972 __ ldrb(r1, FieldMemOperand(r0, Map::kBitFieldOffset)); |
4973 __ b(eq, if_true); | 4973 __ and_(r1, r1, |
4974 __ cmp(r1, Operand(JS_FUNCTION_PROXY_TYPE)); | 4974 Operand((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable))); |
| 4975 __ cmp(r1, Operand(1 << Map::kIsCallable)); |
4975 Split(eq, if_true, if_false, fall_through); | 4976 Split(eq, if_true, if_false, fall_through); |
4976 } else if (String::Equals(check, factory->object_string())) { | 4977 } else if (String::Equals(check, factory->object_string())) { |
4977 __ JumpIfSmi(r0, if_false); | 4978 __ JumpIfSmi(r0, if_false); |
4978 __ CompareRoot(r0, Heap::kNullValueRootIndex); | 4979 __ CompareRoot(r0, Heap::kNullValueRootIndex); |
4979 __ b(eq, if_true); | 4980 __ b(eq, if_true); |
4980 // Check for JS objects => true. | 4981 STATIC_ASSERT(LAST_SPEC_OBJECT_TYPE == LAST_TYPE); |
4981 __ CompareObjectType(r0, r0, r1, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE); | 4982 __ CompareObjectType(r0, r0, r1, FIRST_SPEC_OBJECT_TYPE); |
4982 __ b(lt, if_false); | 4983 __ b(lt, if_false); |
4983 __ CompareInstanceType(r0, r1, LAST_NONCALLABLE_SPEC_OBJECT_TYPE); | 4984 // Check for callable or undetectable objects => false. |
4984 __ b(gt, if_false); | |
4985 // Check for undetectable objects => false. | |
4986 __ ldrb(r1, FieldMemOperand(r0, Map::kBitFieldOffset)); | 4985 __ ldrb(r1, FieldMemOperand(r0, Map::kBitFieldOffset)); |
4987 __ tst(r1, Operand(1 << Map::kIsUndetectable)); | 4986 __ tst(r1, Operand((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable))); |
4988 Split(eq, if_true, if_false, fall_through); | 4987 Split(eq, if_true, if_false, fall_through); |
4989 // clang-format off | 4988 // clang-format off |
4990 #define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \ | 4989 #define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \ |
4991 } else if (String::Equals(check, factory->type##_string())) { \ | 4990 } else if (String::Equals(check, factory->type##_string())) { \ |
4992 __ JumpIfSmi(r0, if_false); \ | 4991 __ JumpIfSmi(r0, if_false); \ |
4993 __ ldr(r0, FieldMemOperand(r0, HeapObject::kMapOffset)); \ | 4992 __ ldr(r0, FieldMemOperand(r0, HeapObject::kMapOffset)); \ |
4994 __ CompareRoot(r0, Heap::k##Type##MapRootIndex); \ | 4993 __ CompareRoot(r0, Heap::k##Type##MapRootIndex); \ |
4995 Split(eq, if_true, if_false, fall_through); | 4994 Split(eq, if_true, if_false, fall_through); |
4996 SIMD128_TYPES(SIMD128_TYPE) | 4995 SIMD128_TYPES(SIMD128_TYPE) |
4997 #undef SIMD128_TYPE | 4996 #undef SIMD128_TYPE |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5352 DCHECK(interrupt_address == | 5351 DCHECK(interrupt_address == |
5353 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5352 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5354 return OSR_AFTER_STACK_CHECK; | 5353 return OSR_AFTER_STACK_CHECK; |
5355 } | 5354 } |
5356 | 5355 |
5357 | 5356 |
5358 } // namespace internal | 5357 } // namespace internal |
5359 } // namespace v8 | 5358 } // namespace v8 |
5360 | 5359 |
5361 #endif // V8_TARGET_ARCH_ARM | 5360 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |