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 #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/cpu-profiler.h" | 9 #include "src/cpu-profiler.h" |
10 #include "src/hydrogen-osr.h" | 10 #include "src/hydrogen-osr.h" |
(...skipping 5840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5851 __ JumpIfSmi(input, true_label); | 5851 __ JumpIfSmi(input, true_label); |
5852 __ ld(input, FieldMemOperand(input, HeapObject::kMapOffset)); | 5852 __ ld(input, FieldMemOperand(input, HeapObject::kMapOffset)); |
5853 __ LoadRoot(at, Heap::kHeapNumberMapRootIndex); | 5853 __ LoadRoot(at, Heap::kHeapNumberMapRootIndex); |
5854 *cmp1 = input; | 5854 *cmp1 = input; |
5855 *cmp2 = Operand(at); | 5855 *cmp2 = Operand(at); |
5856 final_branch_condition = eq; | 5856 final_branch_condition = eq; |
5857 | 5857 |
5858 } else if (String::Equals(type_name, factory->string_string())) { | 5858 } else if (String::Equals(type_name, factory->string_string())) { |
5859 __ JumpIfSmi(input, false_label); | 5859 __ JumpIfSmi(input, false_label); |
5860 __ GetObjectType(input, input, scratch); | 5860 __ GetObjectType(input, input, scratch); |
5861 __ Branch(USE_DELAY_SLOT, false_label, | 5861 *cmp1 = scratch; |
5862 ge, scratch, Operand(FIRST_NONSTRING_TYPE)); | 5862 *cmp2 = Operand(FIRST_NONSTRING_TYPE); |
5863 // input is an object so we can load the BitFieldOffset even if we take the | 5863 final_branch_condition = lt; |
5864 // other branch. | |
5865 __ lbu(at, FieldMemOperand(input, Map::kBitFieldOffset)); | |
5866 __ And(at, at, 1 << Map::kIsUndetectable); | |
5867 *cmp1 = at; | |
5868 *cmp2 = Operand(zero_reg); | |
5869 final_branch_condition = eq; | |
5870 | 5864 |
5871 } else if (String::Equals(type_name, factory->symbol_string())) { | 5865 } else if (String::Equals(type_name, factory->symbol_string())) { |
5872 __ JumpIfSmi(input, false_label); | 5866 __ JumpIfSmi(input, false_label); |
5873 __ GetObjectType(input, input, scratch); | 5867 __ GetObjectType(input, input, scratch); |
5874 *cmp1 = scratch; | 5868 *cmp1 = scratch; |
5875 *cmp2 = Operand(SYMBOL_TYPE); | 5869 *cmp2 = Operand(SYMBOL_TYPE); |
5876 final_branch_condition = eq; | 5870 final_branch_condition = eq; |
5877 | 5871 |
5878 } else if (String::Equals(type_name, factory->boolean_string())) { | 5872 } else if (String::Equals(type_name, factory->boolean_string())) { |
5879 __ LoadRoot(at, Heap::kTrueValueRootIndex); | 5873 __ LoadRoot(at, Heap::kTrueValueRootIndex); |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6248 __ Push(at, ToRegister(instr->function())); | 6242 __ Push(at, ToRegister(instr->function())); |
6249 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6243 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6250 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6244 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6251 } | 6245 } |
6252 | 6246 |
6253 | 6247 |
6254 #undef __ | 6248 #undef __ |
6255 | 6249 |
6256 } // namespace internal | 6250 } // namespace internal |
6257 } // namespace v8 | 6251 } // namespace v8 |
OLD | NEW |