OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
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/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
(...skipping 4974 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4985 | 4985 |
4986 Factory* factory = isolate()->factory(); | 4986 Factory* factory = isolate()->factory(); |
4987 if (String::Equals(check, factory->number_string())) { | 4987 if (String::Equals(check, factory->number_string())) { |
4988 __ JumpIfSmi(r3, if_true); | 4988 __ JumpIfSmi(r3, if_true); |
4989 __ LoadP(r3, FieldMemOperand(r3, HeapObject::kMapOffset)); | 4989 __ LoadP(r3, FieldMemOperand(r3, HeapObject::kMapOffset)); |
4990 __ LoadRoot(ip, Heap::kHeapNumberMapRootIndex); | 4990 __ LoadRoot(ip, Heap::kHeapNumberMapRootIndex); |
4991 __ cmp(r3, ip); | 4991 __ cmp(r3, ip); |
4992 Split(eq, if_true, if_false, fall_through); | 4992 Split(eq, if_true, if_false, fall_through); |
4993 } else if (String::Equals(check, factory->string_string())) { | 4993 } else if (String::Equals(check, factory->string_string())) { |
4994 __ JumpIfSmi(r3, if_false); | 4994 __ JumpIfSmi(r3, if_false); |
4995 // Check for undetectable objects => false. | |
4996 __ CompareObjectType(r3, r3, r4, FIRST_NONSTRING_TYPE); | 4995 __ CompareObjectType(r3, r3, r4, FIRST_NONSTRING_TYPE); |
4997 __ bge(if_false); | 4996 Split(lt, if_true, if_false, fall_through); |
4998 __ lbz(r4, FieldMemOperand(r3, Map::kBitFieldOffset)); | |
4999 STATIC_ASSERT((1 << Map::kIsUndetectable) < 0x8000); | |
5000 __ andi(r0, r4, Operand(1 << Map::kIsUndetectable)); | |
5001 Split(eq, if_true, if_false, fall_through, cr0); | |
5002 } else if (String::Equals(check, factory->symbol_string())) { | 4997 } else if (String::Equals(check, factory->symbol_string())) { |
5003 __ JumpIfSmi(r3, if_false); | 4998 __ JumpIfSmi(r3, if_false); |
5004 __ CompareObjectType(r3, r3, r4, SYMBOL_TYPE); | 4999 __ CompareObjectType(r3, r3, r4, SYMBOL_TYPE); |
5005 Split(eq, if_true, if_false, fall_through); | 5000 Split(eq, if_true, if_false, fall_through); |
5006 } else if (String::Equals(check, factory->float32x4_string())) { | 5001 } else if (String::Equals(check, factory->float32x4_string())) { |
5007 __ JumpIfSmi(r3, if_false); | 5002 __ JumpIfSmi(r3, if_false); |
5008 __ CompareObjectType(r3, r3, r4, FLOAT32X4_TYPE); | 5003 __ CompareObjectType(r3, r3, r4, FLOAT32X4_TYPE); |
5009 Split(eq, if_true, if_false, fall_through); | 5004 Split(eq, if_true, if_false, fall_through); |
5010 } else if (String::Equals(check, factory->int32x4_string())) { | 5005 } else if (String::Equals(check, factory->int32x4_string())) { |
5011 __ JumpIfSmi(r3, if_false); | 5006 __ JumpIfSmi(r3, if_false); |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5352 return ON_STACK_REPLACEMENT; | 5347 return ON_STACK_REPLACEMENT; |
5353 } | 5348 } |
5354 | 5349 |
5355 DCHECK(interrupt_address == | 5350 DCHECK(interrupt_address == |
5356 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5351 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5357 return OSR_AFTER_STACK_CHECK; | 5352 return OSR_AFTER_STACK_CHECK; |
5358 } | 5353 } |
5359 } // namespace internal | 5354 } // namespace internal |
5360 } // namespace v8 | 5355 } // namespace v8 |
5361 #endif // V8_TARGET_ARCH_PPC | 5356 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |