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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 4711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4722 Factory* factory = isolate()->factory(); | 4722 Factory* factory = isolate()->factory(); |
4723 if (String::Equals(check, factory->number_string())) { | 4723 if (String::Equals(check, factory->number_string())) { |
4724 ASM_LOCATION("FullCodeGenerator::EmitLiteralCompareTypeof number_string"); | 4724 ASM_LOCATION("FullCodeGenerator::EmitLiteralCompareTypeof number_string"); |
4725 __ JumpIfSmi(x0, if_true); | 4725 __ JumpIfSmi(x0, if_true); |
4726 __ Ldr(x0, FieldMemOperand(x0, HeapObject::kMapOffset)); | 4726 __ Ldr(x0, FieldMemOperand(x0, HeapObject::kMapOffset)); |
4727 __ CompareRoot(x0, Heap::kHeapNumberMapRootIndex); | 4727 __ CompareRoot(x0, Heap::kHeapNumberMapRootIndex); |
4728 Split(eq, if_true, if_false, fall_through); | 4728 Split(eq, if_true, if_false, fall_through); |
4729 } else if (String::Equals(check, factory->string_string())) { | 4729 } else if (String::Equals(check, factory->string_string())) { |
4730 ASM_LOCATION("FullCodeGenerator::EmitLiteralCompareTypeof string_string"); | 4730 ASM_LOCATION("FullCodeGenerator::EmitLiteralCompareTypeof string_string"); |
4731 __ JumpIfSmi(x0, if_false); | 4731 __ JumpIfSmi(x0, if_false); |
4732 // Check for undetectable objects => false. | 4732 __ CompareObjectType(x0, x0, x1, FIRST_NONSTRING_TYPE); |
4733 __ JumpIfObjectType(x0, x0, x1, FIRST_NONSTRING_TYPE, if_false, ge); | 4733 Split(lt, if_true, if_false, fall_through); |
4734 __ Ldrb(x1, FieldMemOperand(x0, Map::kBitFieldOffset)); | |
4735 __ TestAndSplit(x1, 1 << Map::kIsUndetectable, if_true, if_false, | |
4736 fall_through); | |
4737 } else if (String::Equals(check, factory->symbol_string())) { | 4734 } else if (String::Equals(check, factory->symbol_string())) { |
4738 ASM_LOCATION("FullCodeGenerator::EmitLiteralCompareTypeof symbol_string"); | 4735 ASM_LOCATION("FullCodeGenerator::EmitLiteralCompareTypeof symbol_string"); |
4739 __ JumpIfSmi(x0, if_false); | 4736 __ JumpIfSmi(x0, if_false); |
4740 __ CompareObjectType(x0, x0, x1, SYMBOL_TYPE); | 4737 __ CompareObjectType(x0, x0, x1, SYMBOL_TYPE); |
4741 Split(eq, if_true, if_false, fall_through); | 4738 Split(eq, if_true, if_false, fall_through); |
4742 } else if (String::Equals(check, factory->boolean_string())) { | 4739 } else if (String::Equals(check, factory->boolean_string())) { |
4743 ASM_LOCATION("FullCodeGenerator::EmitLiteralCompareTypeof boolean_string"); | 4740 ASM_LOCATION("FullCodeGenerator::EmitLiteralCompareTypeof boolean_string"); |
4744 __ JumpIfRoot(x0, Heap::kTrueValueRootIndex, if_true); | 4741 __ JumpIfRoot(x0, Heap::kTrueValueRootIndex, if_true); |
4745 __ CompareRoot(x0, Heap::kFalseValueRootIndex); | 4742 __ CompareRoot(x0, Heap::kFalseValueRootIndex); |
4746 Split(eq, if_true, if_false, fall_through); | 4743 Split(eq, if_true, if_false, fall_through); |
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5430 } | 5427 } |
5431 | 5428 |
5432 return INTERRUPT; | 5429 return INTERRUPT; |
5433 } | 5430 } |
5434 | 5431 |
5435 | 5432 |
5436 } // namespace internal | 5433 } // namespace internal |
5437 } // namespace v8 | 5434 } // namespace v8 |
5438 | 5435 |
5439 #endif // V8_TARGET_ARCH_ARM64 | 5436 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |