| 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 6205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6216 if (instr->hydrogen()->is_function_entry()) { | 6216 if (instr->hydrogen()->is_function_entry()) { |
| 6217 // Perform stack overflow check. | 6217 // Perform stack overflow check. |
| 6218 Label done; | 6218 Label done; |
| 6219 ExternalReference stack_limit = | 6219 ExternalReference stack_limit = |
| 6220 ExternalReference::address_of_stack_limit(isolate()); | 6220 ExternalReference::address_of_stack_limit(isolate()); |
| 6221 __ cmp(esp, Operand::StaticVariable(stack_limit)); | 6221 __ cmp(esp, Operand::StaticVariable(stack_limit)); |
| 6222 __ j(above_equal, &done, Label::kNear); | 6222 __ j(above_equal, &done, Label::kNear); |
| 6223 | 6223 |
| 6224 ASSERT(instr->context()->IsRegister()); | 6224 ASSERT(instr->context()->IsRegister()); |
| 6225 ASSERT(ToRegister(instr->context()).is(esi)); | 6225 ASSERT(ToRegister(instr->context()).is(esi)); |
| 6226 CallCode(isolate()->builtins()->StackCheck(), | 6226 CallRuntime(Runtime::kStackGuard, 0, instr); |
| 6227 RelocInfo::CODE_TARGET, | |
| 6228 instr); | |
| 6229 EnsureSpaceForLazyDeopt(); | 6227 EnsureSpaceForLazyDeopt(); |
| 6230 __ bind(&done); | 6228 __ bind(&done); |
| 6231 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); | 6229 RegisterEnvironmentForDeoptimization(env, Safepoint::kLazyDeopt); |
| 6232 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); | 6230 safepoints_.RecordLazyDeoptimizationIndex(env->deoptimization_index()); |
| 6233 } else { | 6231 } else { |
| 6234 ASSERT(instr->hydrogen()->is_backwards_branch()); | 6232 ASSERT(instr->hydrogen()->is_backwards_branch()); |
| 6235 // Perform stack overflow check if this goto needs it before jumping. | 6233 // Perform stack overflow check if this goto needs it before jumping. |
| 6236 DeferredStackCheck* deferred_stack_check = | 6234 DeferredStackCheck* deferred_stack_check = |
| 6237 new(zone()) DeferredStackCheck(this, instr, x87_stack_); | 6235 new(zone()) DeferredStackCheck(this, instr, x87_stack_); |
| 6238 ExternalReference stack_limit = | 6236 ExternalReference stack_limit = |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6350 FixedArray::kHeaderSize - kPointerSize)); | 6348 FixedArray::kHeaderSize - kPointerSize)); |
| 6351 __ bind(&done); | 6349 __ bind(&done); |
| 6352 } | 6350 } |
| 6353 | 6351 |
| 6354 | 6352 |
| 6355 #undef __ | 6353 #undef __ |
| 6356 | 6354 |
| 6357 } } // namespace v8::internal | 6355 } } // namespace v8::internal |
| 6358 | 6356 |
| 6359 #endif // V8_TARGET_ARCH_IA32 | 6357 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |