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

Unified Diff: runtime/vm/stub_code_x64.cc

Issue 2981173002: Remove the debugger_ field from Isolate in a PRODUCT build (Closed)
Patch Set: Remove flag support_debugger Created 3 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') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_x64.cc
diff --git a/runtime/vm/stub_code_x64.cc b/runtime/vm/stub_code_x64.cc
index f527a8a17c7260ec74f9698a332016a3675e2acd..fd82e95184dc629255bf26cbcd365fa26be04b81 100644
--- a/runtime/vm/stub_code_x64.cc
+++ b/runtime/vm/stub_code_x64.cc
@@ -1355,14 +1355,16 @@ void StubCode::GenerateNArgsCheckInlineCacheStub(
}
#endif // DEBUG
+#if !defined(PRODUCT)
Label stepping, done_stepping;
- if (FLAG_support_debugger && !optimized) {
+ if (!optimized) {
__ Comment("Check single stepping");
__ LoadIsolate(RAX);
__ cmpb(Address(RAX, Isolate::single_step_offset()), Immediate(0));
__ j(NOT_EQUAL, &stepping);
__ Bind(&done_stepping);
}
+#endif
Label not_smi_or_overflow;
if (kind != Token::kILLEGAL) {
@@ -1478,7 +1480,8 @@ void StubCode::GenerateNArgsCheckInlineCacheStub(
__ movq(RCX, FieldAddress(RAX, Function::entry_point_offset()));
__ jmp(RCX);
- if (FLAG_support_debugger && !optimized) {
+#if !defined(PRODUCT)
+ if (!optimized) {
__ Bind(&stepping);
__ EnterStubFrame();
__ pushq(RBX);
@@ -1488,6 +1491,7 @@ void StubCode::GenerateNArgsCheckInlineCacheStub(
__ LeaveStubFrame();
__ jmp(&done_stepping);
}
+#endif
}
// Use inline cache data array to invoke the target or continue in inline
@@ -1578,20 +1582,20 @@ void StubCode::GenerateZeroArgsUnoptimizedStaticCallStub(Assembler* assembler) {
}
#endif // DEBUG
+#if !defined(PRODUCT)
// Check single stepping.
Label stepping, done_stepping;
- if (FLAG_support_debugger) {
- __ LoadIsolate(RAX);
- __ movzxb(RAX, Address(RAX, Isolate::single_step_offset()));
- __ cmpq(RAX, Immediate(0));
+ __ LoadIsolate(RAX);
+ __ movzxb(RAX, Address(RAX, Isolate::single_step_offset()));
+ __ cmpq(RAX, Immediate(0));
#if defined(DEBUG)
- static const bool kJumpLength = Assembler::kFarJump;
+ static const bool kJumpLength = Assembler::kFarJump;
#else
- static const bool kJumpLength = Assembler::kNearJump;
+ static const bool kJumpLength = Assembler::kNearJump;
#endif // DEBUG
- __ j(NOT_EQUAL, &stepping, kJumpLength);
- __ Bind(&done_stepping);
- }
+ __ j(NOT_EQUAL, &stepping, kJumpLength);
+ __ Bind(&done_stepping);
+#endif
// RBX: IC data object (preserved).
__ movq(R12, FieldAddress(RBX, ICData::ic_data_offset()));
@@ -1615,16 +1619,16 @@ void StubCode::GenerateZeroArgsUnoptimizedStaticCallStub(Assembler* assembler) {
__ movq(RCX, FieldAddress(RAX, Function::entry_point_offset()));
__ jmp(RCX);
- if (FLAG_support_debugger) {
- __ Bind(&stepping);
- __ EnterStubFrame();
- __ pushq(RBX); // Preserve IC data object.
- __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
- __ popq(RBX);
- __ RestoreCodePointer();
- __ LeaveStubFrame();
- __ jmp(&done_stepping, Assembler::kNearJump);
- }
+#if !defined(PRODUCT)
+ __ Bind(&stepping);
+ __ EnterStubFrame();
+ __ pushq(RBX); // Preserve IC data object.
+ __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
+ __ popq(RBX);
+ __ RestoreCodePointer();
+ __ LeaveStubFrame();
+ __ jmp(&done_stepping, Assembler::kNearJump);
+#endif
}
void StubCode::GenerateOneArgUnoptimizedStaticCallStub(Assembler* assembler) {
@@ -1981,15 +1985,15 @@ static void GenerateIdenticalWithNumberCheckStub(Assembler* assembler,
// Returns ZF set.
void StubCode::GenerateUnoptimizedIdenticalWithNumberCheckStub(
Assembler* assembler) {
+#if !defined(PRODUCT)
// Check single stepping.
Label stepping, done_stepping;
- if (FLAG_support_debugger) {
- __ LoadIsolate(RAX);
- __ movzxb(RAX, Address(RAX, Isolate::single_step_offset()));
- __ cmpq(RAX, Immediate(0));
- __ j(NOT_EQUAL, &stepping);
- __ Bind(&done_stepping);
- }
+ __ LoadIsolate(RAX);
+ __ movzxb(RAX, Address(RAX, Isolate::single_step_offset()));
+ __ cmpq(RAX, Immediate(0));
+ __ j(NOT_EQUAL, &stepping);
+ __ Bind(&done_stepping);
+#endif
const Register left = RAX;
const Register right = RDX;
@@ -1999,14 +2003,14 @@ void StubCode::GenerateUnoptimizedIdenticalWithNumberCheckStub(
GenerateIdenticalWithNumberCheckStub(assembler, left, right);
__ ret();
- if (FLAG_support_debugger) {
- __ Bind(&stepping);
- __ EnterStubFrame();
- __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
- __ RestoreCodePointer();
- __ LeaveStubFrame();
- __ jmp(&done_stepping);
- }
+#if !defined(PRODUCT)
+ __ Bind(&stepping);
+ __ EnterStubFrame();
+ __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
+ __ RestoreCodePointer();
+ __ LeaveStubFrame();
+ __ jmp(&done_stepping);
+#endif
}
// Called from optimized code only.
« no previous file with comments | « runtime/vm/stub_code_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698