| 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 3317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3328 if (hinstr->RequiresHoleCheck()) { | 3328 if (hinstr->RequiresHoleCheck()) { |
| 3329 if (IsFastSmiElementsKind(instr->hydrogen()->elements_kind())) { | 3329 if (IsFastSmiElementsKind(instr->hydrogen()->elements_kind())) { |
| 3330 __ SmiTst(result, scratch); | 3330 __ SmiTst(result, scratch); |
| 3331 DeoptimizeIf(ne, instr, Deoptimizer::kNotASmi, scratch, | 3331 DeoptimizeIf(ne, instr, Deoptimizer::kNotASmi, scratch, |
| 3332 Operand(zero_reg)); | 3332 Operand(zero_reg)); |
| 3333 } else { | 3333 } else { |
| 3334 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); | 3334 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); |
| 3335 DeoptimizeIf(eq, instr, Deoptimizer::kHole, result, Operand(scratch)); | 3335 DeoptimizeIf(eq, instr, Deoptimizer::kHole, result, Operand(scratch)); |
| 3336 } | 3336 } |
| 3337 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { | 3337 } else if (instr->hydrogen()->hole_mode() == CONVERT_HOLE_TO_UNDEFINED) { |
| 3338 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); | 3338 DCHECK(instr->hydrogen()->elements_kind() == FAST_HOLEY_SMI_ELEMENTS || |
| 3339 instr->hydrogen()->elements_kind() == FAST_HOLEY_ELEMENTS); |
| 3339 Label done; | 3340 Label done; |
| 3340 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); | 3341 __ LoadRoot(scratch, Heap::kTheHoleValueRootIndex); |
| 3341 __ Branch(&done, ne, result, Operand(scratch)); | 3342 __ Branch(&done, ne, result, Operand(scratch)); |
| 3342 if (info()->IsStub()) { | 3343 if (info()->IsStub()) { |
| 3343 // A stub can safely convert the hole to undefined only if the array | 3344 // A stub can safely convert the hole to undefined only if the array |
| 3344 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise | 3345 // protector cell contains (Smi) Isolate::kArrayProtectorValid. Otherwise |
| 3345 // it needs to bail out. | 3346 // it needs to bail out. |
| 3346 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); | 3347 __ LoadRoot(result, Heap::kArrayProtectorRootIndex); |
| 3347 // The comparison only needs LS bits of value, which is a smi. | 3348 // The comparison only needs LS bits of value, which is a smi. |
| 3348 __ ld(result, FieldMemOperand(result, Cell::kValueOffset)); | 3349 __ ld(result, FieldMemOperand(result, Cell::kValueOffset)); |
| (...skipping 2712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6061 __ li(at, scope_info); | 6062 __ li(at, scope_info); |
| 6062 __ Push(at, ToRegister(instr->function())); | 6063 __ Push(at, ToRegister(instr->function())); |
| 6063 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6064 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 6064 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6065 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 6065 } | 6066 } |
| 6066 | 6067 |
| 6067 | 6068 |
| 6068 #undef __ | 6069 #undef __ |
| 6069 | 6070 |
| 6070 } } // namespace v8::internal | 6071 } } // namespace v8::internal |
| OLD | NEW |