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

Unified Diff: src/compiler.cc

Issue 1261973004: Add debug mode flag to force recompiling debug code for verification. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@allassert
Patch Set: small fix Created 5 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 | « no previous file | src/flag-definitions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 1815c9a8d6441176ba61503aa3ba2186ddc30abe..1aaa446a073614efc8ae5bcc7baeeee6acda6c97 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -659,8 +659,9 @@ static bool CompileUnoptimizedCode(CompilationInfo* info) {
MUST_USE_RESULT static MaybeHandle<Code> GetUnoptimizedCodeCommon(
CompilationInfo* info) {
- VMState<COMPILER> state(info->isolate());
- PostponeInterruptsScope postpone(info->isolate());
+ Isolate* isolate = info->isolate();
+ VMState<COMPILER> state(isolate);
+ PostponeInterruptsScope postpone(isolate);
// Parse and update CompilationInfo with the results.
if (!Parser::ParseStatic(info->parse_info())) return MaybeHandle<Code>();
@@ -679,13 +680,21 @@ MUST_USE_RESULT static MaybeHandle<Code> GetUnoptimizedCodeCommon(
// Update the shared function info with the scope info. Allocating the
// ScopeInfo object may cause a GC.
Handle<ScopeInfo> scope_info =
- ScopeInfo::Create(info->isolate(), info->zone(), info->scope());
+ ScopeInfo::Create(isolate, info->zone(), info->scope());
shared->set_scope_info(*scope_info);
// Update the code and feedback vector for the shared function info.
shared->ReplaceCode(*info->code());
shared->set_feedback_vector(*info->feedback_vector());
+#ifdef DEBUG
+ if (FLAG_always_recompile_debug && !isolate->debug()->is_active() &&
+ !info->closure().is_null() &&
+ info->shared_info()->IsSubjectToDebugging()) {
+ Compiler::CompileDebugCode(info->closure());
+ }
+#endif
+
return info->code();
}
« no previous file with comments | « no previous file | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698