Index: runtime/vm/stub_code_x64.cc |
=================================================================== |
--- runtime/vm/stub_code_x64.cc (revision 38736) |
+++ runtime/vm/stub_code_x64.cc (working copy) |
@@ -27,8 +27,6 @@ |
"Set to true for debugging & verifying the slow paths."); |
DECLARE_FLAG(bool, trace_optimized_ic_calls); |
-DECLARE_FLAG(bool, enable_debugger); |
- |
// Input parameters: |
// RSP : points to return address. |
// RSP + 8 : address of last argument in argument array. |
@@ -1268,13 +1266,11 @@ |
#endif // DEBUG |
Label stepping, done_stepping; |
- if (FLAG_enable_debugger) { |
- // Check single stepping. |
- __ movq(RAX, FieldAddress(CTX, Context::isolate_offset())); |
- __ cmpb(Address(RAX, Isolate::single_step_offset()), Immediate(0)); |
- __ j(NOT_EQUAL, &stepping); |
- __ Bind(&done_stepping); |
- } |
+ // Check single stepping. |
+ __ movq(RAX, FieldAddress(CTX, Context::isolate_offset())); |
+ __ cmpb(Address(RAX, Isolate::single_step_offset()), Immediate(0)); |
+ __ j(NOT_EQUAL, &stepping); |
+ __ Bind(&done_stepping); |
// Load arguments descriptor into R10. |
__ movq(R10, FieldAddress(RBX, ICData::arguments_descriptor_offset())); |
@@ -1378,15 +1374,13 @@ |
__ addq(RCX, Immediate(Instructions::HeaderSize() - kHeapObjectTag)); |
__ jmp(RCX); |
- if (FLAG_enable_debugger) { |
- __ Bind(&stepping); |
- __ EnterStubFrame(); |
- __ pushq(RBX); |
- __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0); |
- __ popq(RBX); |
- __ LeaveStubFrame(); |
- __ jmp(&done_stepping); |
- } |
+ __ Bind(&stepping); |
+ __ EnterStubFrame(); |
+ __ pushq(RBX); |
+ __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0); |
+ __ popq(RBX); |
+ __ LeaveStubFrame(); |
+ __ jmp(&done_stepping); |
} |
@@ -1481,20 +1475,18 @@ |
} |
#endif // DEBUG |
- if (FLAG_enable_debugger) { |
- // Check single stepping. |
- Label not_stepping; |
- __ movq(RAX, FieldAddress(CTX, Context::isolate_offset())); |
- __ movzxb(RAX, Address(RAX, Isolate::single_step_offset())); |
- __ cmpq(RAX, Immediate(0)); |
- __ j(EQUAL, ¬_stepping, Assembler::kNearJump); |
- __ EnterStubFrame(); |
- __ pushq(RBX); // Preserve IC data object. |
- __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0); |
- __ popq(RBX); |
- __ LeaveStubFrame(); |
- __ Bind(¬_stepping); |
- } |
+ // Check single stepping. |
+ Label not_stepping; |
+ __ movq(RAX, FieldAddress(CTX, Context::isolate_offset())); |
+ __ movzxb(RAX, Address(RAX, Isolate::single_step_offset())); |
+ __ cmpq(RAX, Immediate(0)); |
+ __ j(EQUAL, ¬_stepping, Assembler::kNearJump); |
+ __ EnterStubFrame(); |
+ __ pushq(RBX); // Preserve IC data object. |
+ __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0); |
+ __ popq(RBX); |
+ __ LeaveStubFrame(); |
+ __ Bind(¬_stepping); |
// RBX: IC data object (preserved). |
__ movq(R12, FieldAddress(RBX, ICData::ic_data_offset())); |
@@ -1608,19 +1600,18 @@ |
// Called only from unoptimized code. |
void StubCode::GenerateDebugStepCheckStub(Assembler* assembler) { |
- if (FLAG_enable_debugger) { |
- // Check single stepping. |
- Label not_stepping; |
- __ movq(RAX, FieldAddress(CTX, Context::isolate_offset())); |
- __ movzxb(RAX, Address(RAX, Isolate::single_step_offset())); |
- __ cmpq(RAX, Immediate(0)); |
- __ j(EQUAL, ¬_stepping, Assembler::kNearJump); |
+ // Check single stepping. |
+ Label not_stepping; |
+ __ movq(RAX, FieldAddress(CTX, Context::isolate_offset())); |
+ __ movzxb(RAX, Address(RAX, Isolate::single_step_offset())); |
+ __ cmpq(RAX, Immediate(0)); |
+ __ j(EQUAL, ¬_stepping, Assembler::kNearJump); |
- __ EnterStubFrame(); |
- __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0); |
- __ LeaveStubFrame(); |
- __ Bind(¬_stepping); |
- } |
+ __ EnterStubFrame(); |
+ __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0); |
+ __ LeaveStubFrame(); |
+ __ Bind(¬_stepping); |
+ |
__ ret(); |
} |
@@ -1875,18 +1866,16 @@ |
// Returns ZF set. |
void StubCode::GenerateUnoptimizedIdenticalWithNumberCheckStub( |
Assembler* assembler) { |
- if (FLAG_enable_debugger) { |
- // Check single stepping. |
- Label not_stepping; |
- __ movq(RAX, FieldAddress(CTX, Context::isolate_offset())); |
- __ movzxb(RAX, Address(RAX, Isolate::single_step_offset())); |
- __ cmpq(RAX, Immediate(0)); |
- __ j(EQUAL, ¬_stepping, Assembler::kNearJump); |
- __ EnterStubFrame(); |
- __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0); |
- __ LeaveStubFrame(); |
- __ Bind(¬_stepping); |
- } |
+ // Check single stepping. |
+ Label not_stepping; |
+ __ movq(RAX, FieldAddress(CTX, Context::isolate_offset())); |
+ __ movzxb(RAX, Address(RAX, Isolate::single_step_offset())); |
+ __ cmpq(RAX, Immediate(0)); |
+ __ j(EQUAL, ¬_stepping, Assembler::kNearJump); |
+ __ EnterStubFrame(); |
+ __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0); |
+ __ LeaveStubFrame(); |
+ __ Bind(¬_stepping); |
const Register left = RAX; |
const Register right = RDX; |