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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
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 5013 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5024 Immediate(1 << Map::kIsUndetectable)); | 5024 Immediate(1 << Map::kIsUndetectable)); |
5025 Split(zero, if_true, if_false, fall_through); | 5025 Split(zero, if_true, if_false, fall_through); |
5026 } else if (String::Equals(check, factory->symbol_string())) { | 5026 } else if (String::Equals(check, factory->symbol_string())) { |
5027 __ JumpIfSmi(rax, if_false); | 5027 __ JumpIfSmi(rax, if_false); |
5028 __ CmpObjectType(rax, SYMBOL_TYPE, rdx); | 5028 __ CmpObjectType(rax, SYMBOL_TYPE, rdx); |
5029 Split(equal, if_true, if_false, fall_through); | 5029 Split(equal, if_true, if_false, fall_through); |
5030 } else if (String::Equals(check, factory->float32x4_string())) { | 5030 } else if (String::Equals(check, factory->float32x4_string())) { |
5031 __ JumpIfSmi(rax, if_false); | 5031 __ JumpIfSmi(rax, if_false); |
5032 __ CmpObjectType(rax, FLOAT32X4_TYPE, rdx); | 5032 __ CmpObjectType(rax, FLOAT32X4_TYPE, rdx); |
5033 Split(equal, if_true, if_false, fall_through); | 5033 Split(equal, if_true, if_false, fall_through); |
| 5034 } else if (String::Equals(check, factory->int32x4_string())) { |
| 5035 __ JumpIfSmi(rax, if_false); |
| 5036 __ CmpObjectType(rax, INT32X4_TYPE, rdx); |
| 5037 Split(equal, if_true, if_false, fall_through); |
| 5038 } else if (String::Equals(check, factory->bool32x4_string())) { |
| 5039 __ JumpIfSmi(rax, if_false); |
| 5040 __ CmpObjectType(rax, BOOL32X4_TYPE, rdx); |
| 5041 Split(equal, if_true, if_false, fall_through); |
| 5042 } else if (String::Equals(check, factory->int16x8_string())) { |
| 5043 __ JumpIfSmi(rax, if_false); |
| 5044 __ CmpObjectType(rax, INT16X8_TYPE, rdx); |
| 5045 Split(equal, if_true, if_false, fall_through); |
| 5046 } else if (String::Equals(check, factory->bool16x8_string())) { |
| 5047 __ JumpIfSmi(rax, if_false); |
| 5048 __ CmpObjectType(rax, BOOL16X8_TYPE, rdx); |
| 5049 Split(equal, if_true, if_false, fall_through); |
| 5050 } else if (String::Equals(check, factory->int8x16_string())) { |
| 5051 __ JumpIfSmi(rax, if_false); |
| 5052 __ CmpObjectType(rax, INT8X16_TYPE, rdx); |
| 5053 Split(equal, if_true, if_false, fall_through); |
| 5054 } else if (String::Equals(check, factory->bool8x16_string())) { |
| 5055 __ JumpIfSmi(rax, if_false); |
| 5056 __ CmpObjectType(rax, BOOL8X16_TYPE, rdx); |
| 5057 Split(equal, if_true, if_false, fall_through); |
5034 } else if (String::Equals(check, factory->boolean_string())) { | 5058 } else if (String::Equals(check, factory->boolean_string())) { |
5035 __ CompareRoot(rax, Heap::kTrueValueRootIndex); | 5059 __ CompareRoot(rax, Heap::kTrueValueRootIndex); |
5036 __ j(equal, if_true); | 5060 __ j(equal, if_true); |
5037 __ CompareRoot(rax, Heap::kFalseValueRootIndex); | 5061 __ CompareRoot(rax, Heap::kFalseValueRootIndex); |
5038 Split(equal, if_true, if_false, fall_through); | 5062 Split(equal, if_true, if_false, fall_through); |
5039 } else if (String::Equals(check, factory->undefined_string())) { | 5063 } else if (String::Equals(check, factory->undefined_string())) { |
5040 __ CompareRoot(rax, Heap::kUndefinedValueRootIndex); | 5064 __ CompareRoot(rax, Heap::kUndefinedValueRootIndex); |
5041 __ j(equal, if_true); | 5065 __ j(equal, if_true); |
5042 __ JumpIfSmi(rax, if_false); | 5066 __ JumpIfSmi(rax, if_false); |
5043 // Check for undetectable objects => true. | 5067 // Check for undetectable objects => true. |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5360 Assembler::target_address_at(call_target_address, | 5384 Assembler::target_address_at(call_target_address, |
5361 unoptimized_code)); | 5385 unoptimized_code)); |
5362 return OSR_AFTER_STACK_CHECK; | 5386 return OSR_AFTER_STACK_CHECK; |
5363 } | 5387 } |
5364 | 5388 |
5365 | 5389 |
5366 } // namespace internal | 5390 } // namespace internal |
5367 } // namespace v8 | 5391 } // namespace v8 |
5368 | 5392 |
5369 #endif // V8_TARGET_ARCH_X64 | 5393 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |