Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(398)

Side by Side Diff: src/x64/builtins-x64.cc

Issue 2068603002: [debugger] simplify debug stepping. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix completion callback Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_X64 5 #if V8_TARGET_ARCH_X64
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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 // Store resume mode into generator object. 475 // Store resume mode into generator object.
476 __ movp(FieldOperand(rbx, JSGeneratorObject::kResumeModeOffset), rdx); 476 __ movp(FieldOperand(rbx, JSGeneratorObject::kResumeModeOffset), rdx);
477 477
478 // Load suspended function and context. 478 // Load suspended function and context.
479 __ movp(rsi, FieldOperand(rbx, JSGeneratorObject::kContextOffset)); 479 __ movp(rsi, FieldOperand(rbx, JSGeneratorObject::kContextOffset));
480 __ movp(rdi, FieldOperand(rbx, JSGeneratorObject::kFunctionOffset)); 480 __ movp(rdi, FieldOperand(rbx, JSGeneratorObject::kFunctionOffset));
481 481
482 // Flood function if we are stepping. 482 // Flood function if we are stepping.
483 Label prepare_step_in_if_stepping, prepare_step_in_suspended_generator; 483 Label prepare_step_in_if_stepping, prepare_step_in_suspended_generator;
484 Label stepping_prepared; 484 Label stepping_prepared;
485 ExternalReference step_in_enabled = 485 ExternalReference last_step_action =
486 ExternalReference::debug_step_in_enabled_address(masm->isolate()); 486 ExternalReference::debug_last_step_action_address(masm->isolate());
487 Operand step_in_enabled_operand = masm->ExternalOperand(step_in_enabled); 487 Operand last_step_action_operand = masm->ExternalOperand(last_step_action);
488 __ cmpb(step_in_enabled_operand, Immediate(0)); 488 STATIC_ASSERT(StepFrame > StepIn);
489 __ j(not_equal, &prepare_step_in_if_stepping); 489 __ cmpb(last_step_action_operand, Immediate(StepIn));
490 __ j(greater_equal, &prepare_step_in_if_stepping);
490 491
491 // Flood function if we need to continue stepping in the suspended generator. 492 // Flood function if we need to continue stepping in the suspended generator.
492 ExternalReference debug_suspended_generator = 493 ExternalReference debug_suspended_generator =
493 ExternalReference::debug_suspended_generator_address(masm->isolate()); 494 ExternalReference::debug_suspended_generator_address(masm->isolate());
494 Operand debug_suspended_generator_operand = 495 Operand debug_suspended_generator_operand =
495 masm->ExternalOperand(debug_suspended_generator); 496 masm->ExternalOperand(debug_suspended_generator);
496 __ cmpp(rbx, debug_suspended_generator_operand); 497 __ cmpp(rbx, debug_suspended_generator_operand);
497 __ j(equal, &prepare_step_in_suspended_generator); 498 __ j(equal, &prepare_step_in_suspended_generator);
498 __ bind(&stepping_prepared); 499 __ bind(&stepping_prepared);
499 500
(...skipping 2524 matching lines...) Expand 10 before | Expand all | Expand 10 after
3024 __ ret(0); 3025 __ ret(0);
3025 } 3026 }
3026 3027
3027 3028
3028 #undef __ 3029 #undef __
3029 3030
3030 } // namespace internal 3031 } // namespace internal
3031 } // namespace v8 3032 } // namespace v8
3032 3033
3033 #endif // V8_TARGET_ARCH_X64 3034 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/runtime/runtime-debug.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698