| 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 5642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5653 LEnvironment* env = instr->environment(); | 5653 LEnvironment* env = instr->environment(); |
| 5654 // There is no LLazyBailout instruction for stack-checks. We have to | 5654 // There is no LLazyBailout instruction for stack-checks. We have to |
| 5655 // prepare for lazy deoptimization explicitly here. | 5655 // prepare for lazy deoptimization explicitly here. |
| 5656 if (instr->hydrogen()->is_function_entry()) { | 5656 if (instr->hydrogen()->is_function_entry()) { |
| 5657 // Perform stack overflow check. | 5657 // Perform stack overflow check. |
| 5658 Label done; | 5658 Label done; |
| 5659 __ LoadRoot(ip, Heap::kStackLimitRootIndex); | 5659 __ LoadRoot(ip, Heap::kStackLimitRootIndex); |
| 5660 __ cmp(sp, Operand(ip)); | 5660 __ cmp(sp, Operand(ip)); |
| 5661 __ b(hs, &done); | 5661 __ b(hs, &done); |
| 5662 PredictableCodeSizeScope predictable(masm_, 2 * Assembler::kInstrSize); | 5662 PredictableCodeSizeScope predictable(masm_, 2 * Assembler::kInstrSize); |
| 5663 CallCode(isolate()->builtins()->StackCheck(), | 5663 CallRuntime(Runtime::kStackGuard, 0, instr); |
| 5664 RelocInfo::CODE_TARGET, | |
| 5665 instr); | |
| 5666 EnsureSpaceForLazyDeopt(); | 5664 EnsureSpaceForLazyDeopt(); |
| 5667 last_lazy_deopt_pc_ = masm()->pc_offset(); | 5665 last_lazy_deopt_pc_ = masm()->pc_offset(); |
| 5668 __ bind(&done); | 5666 __ bind(&done); |
| 5669 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); | 5667 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); |
| 5670 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); | 5668 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); |
| 5671 } else { | 5669 } else { |
| 5672 ASSERT(instr->hydrogen()->is_backwards_branch()); | 5670 ASSERT(instr->hydrogen()->is_backwards_branch()); |
| 5673 // Perform stack overflow check if this goto needs it before jumping. | 5671 // Perform stack overflow check if this goto needs it before jumping. |
| 5674 DeferredStackCheck* deferred_stack_check = | 5672 DeferredStackCheck* deferred_stack_check = |
| 5675 new(zone()) DeferredStackCheck(this, instr); | 5673 new(zone()) DeferredStackCheck(this, instr); |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5793 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); | 5791 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); |
| 5794 __ ldr(result, FieldMemOperand(scratch, | 5792 __ ldr(result, FieldMemOperand(scratch, |
| 5795 FixedArray::kHeaderSize - kPointerSize)); | 5793 FixedArray::kHeaderSize - kPointerSize)); |
| 5796 __ bind(&done); | 5794 __ bind(&done); |
| 5797 } | 5795 } |
| 5798 | 5796 |
| 5799 | 5797 |
| 5800 #undef __ | 5798 #undef __ |
| 5801 | 5799 |
| 5802 } } // namespace v8::internal | 5800 } } // namespace v8::internal |
| OLD | NEW |