| 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 2263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2274 __ bind(¬_string); | 2274 __ bind(¬_string); |
| 2275 } | 2275 } |
| 2276 | 2276 |
| 2277 if (expected.Contains(ToBooleanStub::SYMBOL)) { | 2277 if (expected.Contains(ToBooleanStub::SYMBOL)) { |
| 2278 // Symbol value -> true. | 2278 // Symbol value -> true. |
| 2279 const Register scratch = scratch1(); | 2279 const Register scratch = scratch1(); |
| 2280 __ lbu(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset)); | 2280 __ lbu(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset)); |
| 2281 __ Branch(instr->TrueLabel(chunk_), eq, scratch, Operand(SYMBOL_TYPE)); | 2281 __ Branch(instr->TrueLabel(chunk_), eq, scratch, Operand(SYMBOL_TYPE)); |
| 2282 } | 2282 } |
| 2283 | 2283 |
| 2284 if (expected.Contains(ToBooleanStub::SIMD_TYPE)) { |
| 2285 // Symbol value -> true. |
| 2286 const Register scratch = scratch1(); |
| 2287 __ lbu(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset)); |
| 2288 __ Branch(instr->TrueLabel(chunk_), eq, scratch, |
| 2289 Operand(FLOAT32X4_TYPE)); |
| 2290 } |
| 2291 |
| 2284 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) { | 2292 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) { |
| 2285 // heap number -> false iff +0, -0, or NaN. | 2293 // heap number -> false iff +0, -0, or NaN. |
| 2286 DoubleRegister dbl_scratch = double_scratch0(); | 2294 DoubleRegister dbl_scratch = double_scratch0(); |
| 2287 Label not_heap_number; | 2295 Label not_heap_number; |
| 2288 __ LoadRoot(at, Heap::kHeapNumberMapRootIndex); | 2296 __ LoadRoot(at, Heap::kHeapNumberMapRootIndex); |
| 2289 __ Branch(¬_heap_number, ne, map, Operand(at)); | 2297 __ Branch(¬_heap_number, ne, map, Operand(at)); |
| 2290 __ ldc1(dbl_scratch, FieldMemOperand(reg, HeapNumber::kValueOffset)); | 2298 __ ldc1(dbl_scratch, FieldMemOperand(reg, HeapNumber::kValueOffset)); |
| 2291 __ BranchF(instr->TrueLabel(chunk_), instr->FalseLabel(chunk_), | 2299 __ BranchF(instr->TrueLabel(chunk_), instr->FalseLabel(chunk_), |
| 2292 ne, dbl_scratch, kDoubleRegZero); | 2300 ne, dbl_scratch, kDoubleRegZero); |
| 2293 // Falls through if dbl_scratch == 0. | 2301 // Falls through if dbl_scratch == 0. |
| (...skipping 3914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6208 __ Push(at, ToRegister(instr->function())); | 6216 __ Push(at, ToRegister(instr->function())); |
| 6209 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6217 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 6210 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6218 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 6211 } | 6219 } |
| 6212 | 6220 |
| 6213 | 6221 |
| 6214 #undef __ | 6222 #undef __ |
| 6215 | 6223 |
| 6216 } // namespace internal | 6224 } // namespace internal |
| 6217 } // namespace v8 | 6225 } // namespace v8 |
| OLD | NEW |