OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
6 | 6 |
7 #include "src/ast/compile-time-value.h" | 7 #include "src/ast/compile-time-value.h" |
8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
9 #include "src/builtins/builtins-constructor.h" | 9 #include "src/builtins/builtins-constructor.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 2560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2571 } else if (String::Equals(check, factory->object_string())) { | 2571 } else if (String::Equals(check, factory->object_string())) { |
2572 ASM_LOCATION("FullCodeGenerator::EmitLiteralCompareTypeof object_string"); | 2572 ASM_LOCATION("FullCodeGenerator::EmitLiteralCompareTypeof object_string"); |
2573 __ JumpIfSmi(x0, if_false); | 2573 __ JumpIfSmi(x0, if_false); |
2574 __ JumpIfRoot(x0, Heap::kNullValueRootIndex, if_true); | 2574 __ JumpIfRoot(x0, Heap::kNullValueRootIndex, if_true); |
2575 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); | 2575 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); |
2576 __ JumpIfObjectType(x0, x10, x11, FIRST_JS_RECEIVER_TYPE, if_false, lt); | 2576 __ JumpIfObjectType(x0, x10, x11, FIRST_JS_RECEIVER_TYPE, if_false, lt); |
2577 // Check for callable or undetectable objects => false. | 2577 // Check for callable or undetectable objects => false. |
2578 __ Ldrb(x10, FieldMemOperand(x10, Map::kBitFieldOffset)); | 2578 __ Ldrb(x10, FieldMemOperand(x10, Map::kBitFieldOffset)); |
2579 __ TestAndSplit(x10, (1 << Map::kIsCallable) | (1 << Map::kIsUndetectable), | 2579 __ TestAndSplit(x10, (1 << Map::kIsCallable) | (1 << Map::kIsUndetectable), |
2580 if_true, if_false, fall_through); | 2580 if_true, if_false, fall_through); |
2581 // clang-format off | |
2582 #define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \ | |
2583 } else if (String::Equals(check, factory->type##_string())) { \ | |
2584 ASM_LOCATION("FullCodeGenerator::EmitLiteralCompareTypeof " \ | |
2585 #type "_string"); \ | |
2586 __ JumpIfSmi(x0, if_true); \ | |
2587 __ Ldr(x0, FieldMemOperand(x0, HeapObject::kMapOffset)); \ | |
2588 __ CompareRoot(x0, Heap::k##Type##MapRootIndex); \ | |
2589 Split(eq, if_true, if_false, fall_through); | |
2590 SIMD128_TYPES(SIMD128_TYPE) | |
2591 #undef SIMD128_TYPE | |
2592 // clang-format on | |
2593 } else { | 2581 } else { |
2594 ASM_LOCATION("FullCodeGenerator::EmitLiteralCompareTypeof other"); | 2582 ASM_LOCATION("FullCodeGenerator::EmitLiteralCompareTypeof other"); |
2595 if (if_false != fall_through) __ B(if_false); | 2583 if (if_false != fall_through) __ B(if_false); |
2596 } | 2584 } |
2597 context()->Plug(if_true, if_false); | 2585 context()->Plug(if_true, if_false); |
2598 } | 2586 } |
2599 | 2587 |
2600 | 2588 |
2601 void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) { | 2589 void FullCodeGenerator::VisitCompareOperation(CompareOperation* expr) { |
2602 Comment cmnt(masm_, "[ CompareOperation"); | 2590 Comment cmnt(masm_, "[ CompareOperation"); |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2910 } | 2898 } |
2911 | 2899 |
2912 return INTERRUPT; | 2900 return INTERRUPT; |
2913 } | 2901 } |
2914 | 2902 |
2915 | 2903 |
2916 } // namespace internal | 2904 } // namespace internal |
2917 } // namespace v8 | 2905 } // namespace v8 |
2918 | 2906 |
2919 #endif // V8_TARGET_ARCH_ARM64 | 2907 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |