| OLD | NEW | 
|     1 // Copyright 2013 the V8 project authors. All rights reserved. |     1 // Copyright 2013 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 5401 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  5412  |  5412  | 
|  5413   ASSERT(instr->HasEnvironment()); |  5413   ASSERT(instr->HasEnvironment()); | 
|  5414   LEnvironment* env = instr->environment(); |  5414   LEnvironment* env = instr->environment(); | 
|  5415   // There is no LLazyBailout instruction for stack-checks. We have to |  5415   // There is no LLazyBailout instruction for stack-checks. We have to | 
|  5416   // prepare for lazy deoptimization explicitly here. |  5416   // prepare for lazy deoptimization explicitly here. | 
|  5417   if (instr->hydrogen()->is_function_entry()) { |  5417   if (instr->hydrogen()->is_function_entry()) { | 
|  5418     // Perform stack overflow check. |  5418     // Perform stack overflow check. | 
|  5419     Label done; |  5419     Label done; | 
|  5420     __ CompareRoot(rsp, Heap::kStackLimitRootIndex); |  5420     __ CompareRoot(rsp, Heap::kStackLimitRootIndex); | 
|  5421     __ j(above_equal, &done, Label::kNear); |  5421     __ j(above_equal, &done, Label::kNear); | 
|  5422     StackCheckStub stub; |  5422     CallCode(isolate()->builtins()->StackCheck(), | 
|  5423     CallCode(stub.GetCode(isolate()), RelocInfo::CODE_TARGET, instr); |  5423              RelocInfo::CODE_TARGET, | 
 |  5424              instr); | 
|  5424     EnsureSpaceForLazyDeopt(Deoptimizer::patch_size()); |  5425     EnsureSpaceForLazyDeopt(Deoptimizer::patch_size()); | 
|  5425     last_lazy_deopt_pc_ = masm()->pc_offset(); |  5426     last_lazy_deopt_pc_ = masm()->pc_offset(); | 
|  5426     __ bind(&done); |  5427     __ bind(&done); | 
|  5427     RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); |  5428     RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); | 
|  5428     safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); |  5429     safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); | 
|  5429   } else { |  5430   } else { | 
|  5430     ASSERT(instr->hydrogen()->is_backwards_branch()); |  5431     ASSERT(instr->hydrogen()->is_backwards_branch()); | 
|  5431     // Perform stack overflow check if this goto needs it before jumping. |  5432     // Perform stack overflow check if this goto needs it before jumping. | 
|  5432     DeferredStackCheck* deferred_stack_check = |  5433     DeferredStackCheck* deferred_stack_check = | 
|  5433         new(zone()) DeferredStackCheck(this, instr); |  5434         new(zone()) DeferredStackCheck(this, instr); | 
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  5549                                FixedArray::kHeaderSize - kPointerSize)); |  5550                                FixedArray::kHeaderSize - kPointerSize)); | 
|  5550   __ bind(&done); |  5551   __ bind(&done); | 
|  5551 } |  5552 } | 
|  5552  |  5553  | 
|  5553  |  5554  | 
|  5554 #undef __ |  5555 #undef __ | 
|  5555  |  5556  | 
|  5556 } }  // namespace v8::internal |  5557 } }  // namespace v8::internal | 
|  5557  |  5558  | 
|  5558 #endif  // V8_TARGET_ARCH_X64 |  5559 #endif  // V8_TARGET_ARCH_X64 | 
| OLD | NEW |