| 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/arm/lithium-codegen-arm.h" | 7 #include "src/arm/lithium-codegen-arm.h" |
| 8 #include "src/arm/lithium-gap-resolver-arm.h" | 8 #include "src/arm/lithium-gap-resolver-arm.h" |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 2250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2261 __ b(instr->FalseLabel(chunk_)); | 2261 __ b(instr->FalseLabel(chunk_)); |
| 2262 __ bind(¬_string); | 2262 __ bind(¬_string); |
| 2263 } | 2263 } |
| 2264 | 2264 |
| 2265 if (expected.Contains(ToBooleanStub::SYMBOL)) { | 2265 if (expected.Contains(ToBooleanStub::SYMBOL)) { |
| 2266 // Symbol value -> true. | 2266 // Symbol value -> true. |
| 2267 __ CompareInstanceType(map, ip, SYMBOL_TYPE); | 2267 __ CompareInstanceType(map, ip, SYMBOL_TYPE); |
| 2268 __ b(eq, instr->TrueLabel(chunk_)); | 2268 __ b(eq, instr->TrueLabel(chunk_)); |
| 2269 } | 2269 } |
| 2270 | 2270 |
| 2271 if (expected.Contains(ToBooleanStub::SIMD_VALUE)) { |
| 2272 // SIMD value -> true. |
| 2273 __ CompareInstanceType(map, ip, FLOAT32X4_TYPE); |
| 2274 __ b(eq, instr->TrueLabel(chunk_)); |
| 2275 } |
| 2276 |
| 2271 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) { | 2277 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) { |
| 2272 // heap number -> false iff +0, -0, or NaN. | 2278 // heap number -> false iff +0, -0, or NaN. |
| 2273 DwVfpRegister dbl_scratch = double_scratch0(); | 2279 DwVfpRegister dbl_scratch = double_scratch0(); |
| 2274 Label not_heap_number; | 2280 Label not_heap_number; |
| 2275 __ CompareRoot(map, Heap::kHeapNumberMapRootIndex); | 2281 __ CompareRoot(map, Heap::kHeapNumberMapRootIndex); |
| 2276 __ b(ne, ¬_heap_number); | 2282 __ b(ne, ¬_heap_number); |
| 2277 __ vldr(dbl_scratch, FieldMemOperand(reg, HeapNumber::kValueOffset)); | 2283 __ vldr(dbl_scratch, FieldMemOperand(reg, HeapNumber::kValueOffset)); |
| 2278 __ VFPCompareAndSetFlags(dbl_scratch, 0.0); | 2284 __ VFPCompareAndSetFlags(dbl_scratch, 0.0); |
| 2279 __ cmp(r0, r0, vs); // NaN -> false. | 2285 __ cmp(r0, r0, vs); // NaN -> false. |
| 2280 __ b(eq, instr->FalseLabel(chunk_)); // +0, -0 -> false. | 2286 __ b(eq, instr->FalseLabel(chunk_)); // +0, -0 -> false. |
| (...skipping 3393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5674 __ CheckObjectTypeRange(input, | 5680 __ CheckObjectTypeRange(input, |
| 5675 map, | 5681 map, |
| 5676 FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, | 5682 FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, |
| 5677 LAST_NONCALLABLE_SPEC_OBJECT_TYPE, | 5683 LAST_NONCALLABLE_SPEC_OBJECT_TYPE, |
| 5678 false_label); | 5684 false_label); |
| 5679 // Check for undetectable objects => false. | 5685 // Check for undetectable objects => false. |
| 5680 __ ldrb(scratch, FieldMemOperand(map, Map::kBitFieldOffset)); | 5686 __ ldrb(scratch, FieldMemOperand(map, Map::kBitFieldOffset)); |
| 5681 __ tst(scratch, Operand(1 << Map::kIsUndetectable)); | 5687 __ tst(scratch, Operand(1 << Map::kIsUndetectable)); |
| 5682 final_branch_condition = eq; | 5688 final_branch_condition = eq; |
| 5683 | 5689 |
| 5690 } else if (String::Equals(type_name, factory->float32x4_string())) { |
| 5691 __ JumpIfSmi(input, false_label); |
| 5692 __ CompareObjectType(input, scratch, no_reg, FLOAT32X4_TYPE); |
| 5693 final_branch_condition = eq; |
| 5694 |
| 5684 } else { | 5695 } else { |
| 5685 __ b(false_label); | 5696 __ b(false_label); |
| 5686 } | 5697 } |
| 5687 | 5698 |
| 5688 return final_branch_condition; | 5699 return final_branch_condition; |
| 5689 } | 5700 } |
| 5690 | 5701 |
| 5691 | 5702 |
| 5692 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) { | 5703 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) { |
| 5693 Register temp1 = ToRegister(instr->temp()); | 5704 Register temp1 = ToRegister(instr->temp()); |
| (...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5990 __ push(ToRegister(instr->function())); | 6001 __ push(ToRegister(instr->function())); |
| 5991 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6002 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5992 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6003 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5993 } | 6004 } |
| 5994 | 6005 |
| 5995 | 6006 |
| 5996 #undef __ | 6007 #undef __ |
| 5997 | 6008 |
| 5998 } // namespace internal | 6009 } // namespace internal |
| 5999 } // namespace v8 | 6010 } // namespace v8 |
| OLD | NEW |