| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 5652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5663 | 5663 |
| 5664 ASSERT(instr->HasEnvironment()); | 5664 ASSERT(instr->HasEnvironment()); |
| 5665 LEnvironment* env = instr->environment(); | 5665 LEnvironment* env = instr->environment(); |
| 5666 // There is no LLazyBailout instruction for stack-checks. We have to | 5666 // There is no LLazyBailout instruction for stack-checks. We have to |
| 5667 // prepare for lazy deoptimization explicitly here. | 5667 // prepare for lazy deoptimization explicitly here. |
| 5668 if (instr->hydrogen()->is_function_entry()) { | 5668 if (instr->hydrogen()->is_function_entry()) { |
| 5669 // Perform stack overflow check. | 5669 // Perform stack overflow check. |
| 5670 Label done; | 5670 Label done; |
| 5671 __ LoadRoot(at, Heap::kStackLimitRootIndex); | 5671 __ LoadRoot(at, Heap::kStackLimitRootIndex); |
| 5672 __ Branch(&done, hs, sp, Operand(at)); | 5672 __ Branch(&done, hs, sp, Operand(at)); |
| 5673 StackCheckStub stub; | 5673 CallCode(isolate()->builtins()->StackCheck(), |
| 5674 CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); | 5674 RelocInfo::CODE_TARGET, |
| 5675 instr); |
| 5675 EnsureSpaceForLazyDeopt(); | 5676 EnsureSpaceForLazyDeopt(); |
| 5676 last_lazy_deopt_pc_ = masm()->pc_offset(); | 5677 last_lazy_deopt_pc_ = masm()->pc_offset(); |
| 5677 __ bind(&done); | 5678 __ bind(&done); |
| 5678 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); | 5679 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); |
| 5679 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); | 5680 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); |
| 5680 } else { | 5681 } else { |
| 5681 ASSERT(instr->hydrogen()->is_backwards_branch()); | 5682 ASSERT(instr->hydrogen()->is_backwards_branch()); |
| 5682 // Perform stack overflow check if this goto needs it before jumping. | 5683 // Perform stack overflow check if this goto needs it before jumping. |
| 5683 DeferredStackCheck* deferred_stack_check = | 5684 DeferredStackCheck* deferred_stack_check = |
| 5684 new(zone()) DeferredStackCheck(this, instr); | 5685 new(zone()) DeferredStackCheck(this, instr); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5801 __ Subu(scratch, result, scratch); | 5802 __ Subu(scratch, result, scratch); |
| 5802 __ lw(result, FieldMemOperand(scratch, | 5803 __ lw(result, FieldMemOperand(scratch, |
| 5803 FixedArray::kHeaderSize - kPointerSize)); | 5804 FixedArray::kHeaderSize - kPointerSize)); |
| 5804 __ bind(&done); | 5805 __ bind(&done); |
| 5805 } | 5806 } |
| 5806 | 5807 |
| 5807 | 5808 |
| 5808 #undef __ | 5809 #undef __ |
| 5809 | 5810 |
| 5810 } } // namespace v8::internal | 5811 } } // namespace v8::internal |
| OLD | NEW |