Reviewers: mvstanton,
Description:
Add debug mode flag to force recompiling debug code for verification.
The flag is called --always-recompile-debug
Please review this at https://codereview.chromium.org/1261973004/
Base URL: https://chromium.googlesource.com/v8/v8.git@allassert
Affected files (+9, -0 lines):
M src/compiler.cc
M src/flag-definitions.h
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index
1815c9a8d6441176ba61503aa3ba2186ddc30abe..a9e3d26138ab2b3ecc6e17eb634b0976c3ac0c26
100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -890,6 +890,12 @@ MaybeHandle<Code>
Compiler::GetLazyCode(Handle<JSFunction> function) {
ASSIGN_RETURN_ON_EXCEPTION(isolate, result,
GetUnoptimizedCodeCommon(&info),
Code);
+#ifdef DEBUG
+ if (FLAG_always_recompile_debug
&& !isolate->debug()->live_edit_enabled()) {
+ Compiler::CompileDebugCode(function);
+ }
+#endif
+
if (FLAG_always_opt) {
Handle<Code> opt_code;
if (Compiler::GetOptimizedCode(
Index: src/flag-definitions.h
diff --git a/src/flag-definitions.h b/src/flag-definitions.h
index
acc7edaa6eb1a638fdf71bd370d063d224823395..e1fac5d99a676927d090821cc25f5ba67e3fef6c
100644
--- a/src/flag-definitions.h
+++ b/src/flag-definitions.h
@@ -535,6 +535,9 @@ DEFINE_BOOL(prepare_always_opt, false, "prepare for
turning on always opt")
DEFINE_BOOL(trace_deopt, false, "trace optimize function deoptimization")
DEFINE_BOOL(trace_stub_failures, false,
"trace deoptimization of generated code stubs")
+#ifdef DEBUG
+DEFINE_BOOL(always_recompile_debug, true, "always recompile for debug
code")
+#endif
DEFINE_BOOL(serialize_toplevel, true, "enable caching of toplevel scripts")
DEFINE_BOOL(serialize_inner, true, "enable caching of inner functions")
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.