| 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 4963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4974 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); | 4974 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); |
| 4975 | 4975 |
| 4976 Factory* factory = isolate()->factory(); | 4976 Factory* factory = isolate()->factory(); |
| 4977 if (String::Equals(check, factory->number_string())) { | 4977 if (String::Equals(check, factory->number_string())) { |
| 4978 __ JumpIfSmi(rax, if_true); | 4978 __ JumpIfSmi(rax, if_true); |
| 4979 __ movp(rax, FieldOperand(rax, HeapObject::kMapOffset)); | 4979 __ movp(rax, FieldOperand(rax, HeapObject::kMapOffset)); |
| 4980 __ CompareRoot(rax, Heap::kHeapNumberMapRootIndex); | 4980 __ CompareRoot(rax, Heap::kHeapNumberMapRootIndex); |
| 4981 Split(equal, if_true, if_false, fall_through); | 4981 Split(equal, if_true, if_false, fall_through); |
| 4982 } else if (String::Equals(check, factory->string_string())) { | 4982 } else if (String::Equals(check, factory->string_string())) { |
| 4983 __ JumpIfSmi(rax, if_false); | 4983 __ JumpIfSmi(rax, if_false); |
| 4984 // Check for undetectable objects => false. | |
| 4985 __ CmpObjectType(rax, FIRST_NONSTRING_TYPE, rdx); | 4984 __ CmpObjectType(rax, FIRST_NONSTRING_TYPE, rdx); |
| 4986 __ j(above_equal, if_false); | 4985 Split(below, if_true, if_false, fall_through); |
| 4987 __ testb(FieldOperand(rdx, Map::kBitFieldOffset), | |
| 4988 Immediate(1 << Map::kIsUndetectable)); | |
| 4989 Split(zero, if_true, if_false, fall_through); | |
| 4990 } else if (String::Equals(check, factory->symbol_string())) { | 4986 } else if (String::Equals(check, factory->symbol_string())) { |
| 4991 __ JumpIfSmi(rax, if_false); | 4987 __ JumpIfSmi(rax, if_false); |
| 4992 __ CmpObjectType(rax, SYMBOL_TYPE, rdx); | 4988 __ CmpObjectType(rax, SYMBOL_TYPE, rdx); |
| 4993 Split(equal, if_true, if_false, fall_through); | 4989 Split(equal, if_true, if_false, fall_through); |
| 4994 } else if (String::Equals(check, factory->boolean_string())) { | 4990 } else if (String::Equals(check, factory->boolean_string())) { |
| 4995 __ CompareRoot(rax, Heap::kTrueValueRootIndex); | 4991 __ CompareRoot(rax, Heap::kTrueValueRootIndex); |
| 4996 __ j(equal, if_true); | 4992 __ j(equal, if_true); |
| 4997 __ CompareRoot(rax, Heap::kFalseValueRootIndex); | 4993 __ CompareRoot(rax, Heap::kFalseValueRootIndex); |
| 4998 Split(equal, if_true, if_false, fall_through); | 4994 Split(equal, if_true, if_false, fall_through); |
| 4999 } else if (String::Equals(check, factory->undefined_string())) { | 4995 } else if (String::Equals(check, factory->undefined_string())) { |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5330 Assembler::target_address_at(call_target_address, | 5326 Assembler::target_address_at(call_target_address, |
| 5331 unoptimized_code)); | 5327 unoptimized_code)); |
| 5332 return OSR_AFTER_STACK_CHECK; | 5328 return OSR_AFTER_STACK_CHECK; |
| 5333 } | 5329 } |
| 5334 | 5330 |
| 5335 | 5331 |
| 5336 } // namespace internal | 5332 } // namespace internal |
| 5337 } // namespace v8 | 5333 } // namespace v8 |
| 5338 | 5334 |
| 5339 #endif // V8_TARGET_ARCH_X64 | 5335 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |