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

Unified Diff: runtime/vm/stub_code_mips.cc

Issue 426083004: Remove flag enable_debugger as current debugging code has a very minor influence on unoptimzied cod… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/stub_code_ia32.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_mips.cc
===================================================================
--- runtime/vm/stub_code_mips.cc (revision 38736)
+++ runtime/vm/stub_code_mips.cc (working copy)
@@ -26,8 +26,6 @@
"Set to true for debugging & verifying the slow paths.");
DECLARE_FLAG(bool, trace_optimized_ic_calls);
-DECLARE_FLAG(bool, enable_debugger);
-
// Input parameters:
// RA : return address.
// SP : address of last argument in argument array.
@@ -1405,13 +1403,11 @@
Label stepping, done_stepping;
- if (FLAG_enable_debugger) {
- // Check single stepping.
- __ lw(T0, FieldAddress(CTX, Context::isolate_offset()));
- __ lbu(T0, Address(T0, Isolate::single_step_offset()));
- __ BranchNotEqual(T0, 0, &stepping);
- __ Bind(&done_stepping);
- }
+ // Check single stepping.
+ __ lw(T0, FieldAddress(CTX, Context::isolate_offset()));
+ __ lbu(T0, Address(T0, Isolate::single_step_offset()));
+ __ BranchNotEqual(T0, 0, &stepping);
+ __ Bind(&done_stepping);
// Load argument descriptor into S4.
__ lw(S4, FieldAddress(S5, ICData::arguments_descriptor_offset()));
@@ -1546,20 +1542,18 @@
__ AddImmediate(T4, Instructions::HeaderSize() - kHeapObjectTag);
__ jr(T4);
- if (FLAG_enable_debugger) {
- // Call single step callback in debugger.
- __ Bind(&stepping);
- __ EnterStubFrame();
- __ addiu(SP, SP, Immediate(-2 * kWordSize));
- __ sw(S5, Address(SP, 1 * kWordSize)); // Preserve IC data.
- __ sw(RA, Address(SP, 0 * kWordSize)); // Return address.
- __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
- __ lw(RA, Address(SP, 0 * kWordSize));
- __ lw(S5, Address(SP, 1 * kWordSize));
- __ addiu(SP, SP, Immediate(2 * kWordSize));
- __ LeaveStubFrame();
- __ b(&done_stepping);
- }
+ // Call single step callback in debugger.
+ __ Bind(&stepping);
+ __ EnterStubFrame();
+ __ addiu(SP, SP, Immediate(-2 * kWordSize));
+ __ sw(S5, Address(SP, 1 * kWordSize)); // Preserve IC data.
+ __ sw(RA, Address(SP, 0 * kWordSize)); // Return address.
+ __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
+ __ lw(RA, Address(SP, 0 * kWordSize));
+ __ lw(S5, Address(SP, 1 * kWordSize));
+ __ addiu(SP, SP, Immediate(2 * kWordSize));
+ __ LeaveStubFrame();
+ __ b(&done_stepping);
}
@@ -1643,24 +1637,22 @@
}
#endif // DEBUG
- if (FLAG_enable_debugger) {
- // Check single stepping.
- Label not_stepping;
- __ lw(T0, FieldAddress(CTX, Context::isolate_offset()));
- __ lbu(T0, Address(T0, Isolate::single_step_offset()));
- __ BranchEqual(T0, 0, &not_stepping);
- // Call single step callback in debugger.
- __ EnterStubFrame();
- __ addiu(SP, SP, Immediate(-2 * kWordSize));
- __ sw(S5, Address(SP, 1 * kWordSize)); // Preserve IC data.
- __ sw(RA, Address(SP, 0 * kWordSize)); // Return address.
- __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
- __ lw(RA, Address(SP, 0 * kWordSize));
- __ lw(S5, Address(SP, 1 * kWordSize));
- __ addiu(SP, SP, Immediate(2 * kWordSize));
- __ LeaveStubFrame();
- __ Bind(&not_stepping);
- }
+ // Check single stepping.
+ Label not_stepping;
+ __ lw(T0, FieldAddress(CTX, Context::isolate_offset()));
+ __ lbu(T0, Address(T0, Isolate::single_step_offset()));
+ __ BranchEqual(T0, 0, &not_stepping);
+ // Call single step callback in debugger.
+ __ EnterStubFrame();
+ __ addiu(SP, SP, Immediate(-2 * kWordSize));
+ __ sw(S5, Address(SP, 1 * kWordSize)); // Preserve IC data.
+ __ sw(RA, Address(SP, 0 * kWordSize)); // Return address.
+ __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
+ __ lw(RA, Address(SP, 0 * kWordSize));
+ __ lw(S5, Address(SP, 1 * kWordSize));
+ __ addiu(SP, SP, Immediate(2 * kWordSize));
+ __ LeaveStubFrame();
+ __ Bind(&not_stepping);
// S5: IC data object (preserved).
__ lw(T0, FieldAddress(S5, ICData::ic_data_offset()));
@@ -1786,22 +1778,21 @@
// Called only from unoptimized code. All relevant registers have been saved.
// RA: return address.
void StubCode::GenerateDebugStepCheckStub(Assembler* assembler) {
- if (FLAG_enable_debugger) {
- // Check single stepping.
- Label not_stepping;
- __ lw(T0, FieldAddress(CTX, Context::isolate_offset()));
- __ lbu(T0, Address(T0, Isolate::single_step_offset()));
- __ BranchEqual(T0, 0, &not_stepping);
- // Call single step callback in debugger.
- __ EnterStubFrame();
- __ addiu(SP, SP, Immediate(-1 * kWordSize));
- __ sw(RA, Address(SP, 0 * kWordSize)); // Return address.
- __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
- __ lw(RA, Address(SP, 0 * kWordSize));
- __ addiu(SP, SP, Immediate(1 * kWordSize));
- __ LeaveStubFrame();
- __ Bind(&not_stepping);
- }
+ // Check single stepping.
+ Label not_stepping;
+ __ lw(T0, FieldAddress(CTX, Context::isolate_offset()));
+ __ lbu(T0, Address(T0, Isolate::single_step_offset()));
+ __ BranchEqual(T0, 0, &not_stepping);
+ // Call single step callback in debugger.
+ __ EnterStubFrame();
+ __ addiu(SP, SP, Immediate(-1 * kWordSize));
+ __ sw(RA, Address(SP, 0 * kWordSize)); // Return address.
+ __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
+ __ lw(RA, Address(SP, 0 * kWordSize));
+ __ addiu(SP, SP, Immediate(1 * kWordSize));
+ __ LeaveStubFrame();
+ __ Bind(&not_stepping);
+
__ Ret();
}
@@ -2072,22 +2063,20 @@
// Returns: CMPRES1 is zero if equal, non-zero otherwise.
void StubCode::GenerateUnoptimizedIdenticalWithNumberCheckStub(
Assembler* assembler) {
- if (FLAG_enable_debugger) {
- // Check single stepping.
- Label not_stepping;
- __ lw(T0, FieldAddress(CTX, Context::isolate_offset()));
- __ lbu(T0, Address(T0, Isolate::single_step_offset()));
- __ BranchEqual(T0, 0, &not_stepping);
- // Call single step callback in debugger.
- __ EnterStubFrame();
- __ addiu(SP, SP, Immediate(-1 * kWordSize));
- __ sw(RA, Address(SP, 0 * kWordSize)); // Return address.
- __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
- __ lw(RA, Address(SP, 0 * kWordSize));
- __ addiu(SP, SP, Immediate(1 * kWordSize));
- __ LeaveStubFrame();
- __ Bind(&not_stepping);
- }
+ // Check single stepping.
+ Label not_stepping;
+ __ lw(T0, FieldAddress(CTX, Context::isolate_offset()));
+ __ lbu(T0, Address(T0, Isolate::single_step_offset()));
+ __ BranchEqual(T0, 0, &not_stepping);
+ // Call single step callback in debugger.
+ __ EnterStubFrame();
+ __ addiu(SP, SP, Immediate(-1 * kWordSize));
+ __ sw(RA, Address(SP, 0 * kWordSize)); // Return address.
+ __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
+ __ lw(RA, Address(SP, 0 * kWordSize));
+ __ addiu(SP, SP, Immediate(1 * kWordSize));
+ __ LeaveStubFrame();
+ __ Bind(&not_stepping);
const Register temp1 = T2;
const Register temp2 = T3;
« no previous file with comments | « runtime/vm/stub_code_ia32.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698