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 #if V8_TARGET_ARCH_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 // Store resume mode into generator object. | 402 // Store resume mode into generator object. |
403 __ mov(FieldOperand(ebx, JSGeneratorObject::kResumeModeOffset), edx); | 403 __ mov(FieldOperand(ebx, JSGeneratorObject::kResumeModeOffset), edx); |
404 | 404 |
405 // Load suspended function and context. | 405 // Load suspended function and context. |
406 __ mov(esi, FieldOperand(ebx, JSGeneratorObject::kContextOffset)); | 406 __ mov(esi, FieldOperand(ebx, JSGeneratorObject::kContextOffset)); |
407 __ mov(edi, FieldOperand(ebx, JSGeneratorObject::kFunctionOffset)); | 407 __ mov(edi, FieldOperand(ebx, JSGeneratorObject::kFunctionOffset)); |
408 | 408 |
409 // Flood function if we are stepping. | 409 // Flood function if we are stepping. |
410 Label prepare_step_in_if_stepping, prepare_step_in_suspended_generator; | 410 Label prepare_step_in_if_stepping, prepare_step_in_suspended_generator; |
411 Label stepping_prepared; | 411 Label stepping_prepared; |
412 ExternalReference step_in_enabled = | 412 ExternalReference last_step_action = |
413 ExternalReference::debug_step_in_enabled_address(masm->isolate()); | 413 ExternalReference::debug_last_step_action_address(masm->isolate()); |
414 __ cmpb(Operand::StaticVariable(step_in_enabled), Immediate(0)); | 414 STATIC_ASSERT(StepFrame > StepIn); |
415 __ j(not_equal, &prepare_step_in_if_stepping); | 415 __ cmpb(Operand::StaticVariable(last_step_action), Immediate(StepIn)); |
| 416 __ j(greater_equal, &prepare_step_in_if_stepping); |
416 | 417 |
417 // Flood function if we need to continue stepping in the suspended generator. | 418 // Flood function if we need to continue stepping in the suspended generator. |
418 ExternalReference debug_suspended_generator = | 419 ExternalReference debug_suspended_generator = |
419 ExternalReference::debug_suspended_generator_address(masm->isolate()); | 420 ExternalReference::debug_suspended_generator_address(masm->isolate()); |
420 __ cmp(ebx, Operand::StaticVariable(debug_suspended_generator)); | 421 __ cmp(ebx, Operand::StaticVariable(debug_suspended_generator)); |
421 __ j(equal, &prepare_step_in_suspended_generator); | 422 __ j(equal, &prepare_step_in_suspended_generator); |
422 __ bind(&stepping_prepared); | 423 __ bind(&stepping_prepared); |
423 | 424 |
424 // Pop return address. | 425 // Pop return address. |
425 __ PopReturnAddressTo(eax); | 426 __ PopReturnAddressTo(eax); |
(...skipping 2536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2962 // And "return" to the OSR entry point of the function. | 2963 // And "return" to the OSR entry point of the function. |
2963 __ ret(0); | 2964 __ ret(0); |
2964 } | 2965 } |
2965 | 2966 |
2966 | 2967 |
2967 #undef __ | 2968 #undef __ |
2968 } // namespace internal | 2969 } // namespace internal |
2969 } // namespace v8 | 2970 } // namespace v8 |
2970 | 2971 |
2971 #endif // V8_TARGET_ARCH_IA32 | 2972 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |