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

Unified Diff: runtime/vm/assembler_mips.cc

Issue 1574993003: Add --check-code-pointer flag for debug builds (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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
Index: runtime/vm/assembler_mips.cc
diff --git a/runtime/vm/assembler_mips.cc b/runtime/vm/assembler_mips.cc
index 0f15e3fd5aa59918168fb7d130d65a0ba4704011..957b5495b8e0e23b339dfe92a1dd3b343da76a7a 100644
--- a/runtime/vm/assembler_mips.cc
+++ b/runtime/vm/assembler_mips.cc
@@ -14,12 +14,14 @@
namespace dart {
+DECLARE_FLAG(bool, allow_absolute_addresses);
+DECLARE_FLAG(bool, check_code_pointer);
+DECLARE_FLAG(bool, inline_alloc);
#if defined(USING_SIMULATOR)
DECLARE_FLAG(int, trace_sim_after);
#endif
-DECLARE_FLAG(bool, allow_absolute_addresses);
+
DEFINE_FLAG(bool, print_stop_message, false, "Print stop message.");
-DECLARE_FLAG(bool, inline_alloc);
void Assembler::InitializeMemoryWithBreakpoints(uword data, intptr_t length) {
ASSERT(Utils::IsAligned(data, 4));
@@ -461,6 +463,9 @@ void Assembler::SubuDetectOverflow(Register rd, Register rs, Register rt,
void Assembler::CheckCodePointer() {
#ifdef DEBUG
+ if (!FLAG_check_code_pointer) {
+ return;
+ }
Comment("CheckCodePointer");
Label cid_ok, instructions_ok;
Push(CMPRES1);

Powered by Google App Engine
This is Rietveld 408576698