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

Unified Diff: src/compiler.cc

Issue 582703002: Widen the intake valve for TurboFan. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | « src/compiler.h ('k') | src/flag-definitions.h » ('j') | src/scopes.cc » ('J')
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 644f7e9022e6a4066664782dc986b33168787dd7..32ba947928193073c19a0c16acb079790ede6368 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -623,6 +623,7 @@ static void SetFunctionInfo(Handle<SharedFunctionInfo> function_info,
function_info->set_bailout_reason(lit->dont_optimize_reason());
function_info->set_dont_cache(lit->flags()->Contains(kDontCache));
function_info->set_kind(lit->kind());
+ function_info->set_asm_function(lit->scope()->asm_function());
}
@@ -729,6 +730,38 @@ MaybeHandle<Code> Compiler::GetUnoptimizedCode(Handle<JSFunction> function) {
MaybeHandle<Code> Compiler::GetLazyCode(Handle<JSFunction> function) {
DCHECK(!function->GetIsolate()->has_pending_exception());
DCHECK(!function->is_compiled());
+
+ if (FLAG_turbo_asm && function->shared()->asm_function()) {
+ CompilationInfoWithZone info(function);
+
+ VMState<COMPILER> state(info.isolate());
+ PostponeInterruptsScope postpone(info.isolate());
+
+ if (FLAG_trace_opt) {
+ // TODO(titzer): record and report full stats here.
+ PrintF("[optimizing asm ");
+ function->ShortPrint();
+ PrintF("]\n");
+ }
+
+ if (!Parser::Parse(&info)) return MaybeHandle<Code>();
Michael Starzinger 2014/09/18 19:12:34 I don't particularly like this duplication, in fac
titzer 2014/09/19 11:38:21 Agreed. We need to factor out into a routine to pa
+ if (!Rewriter::Rewrite(&info)) return MaybeHandle<Code>();
+ if (!Scope::Analyze(&info)) return MaybeHandle<Code>();
+ if (FLAG_turbo_deoptimization && !EnsureDeoptimizationSupport(&info)) {
+ return MaybeHandle<Code>();
+ }
+
+ info.SetOptimizing(BailoutId::None(),
+ Handle<Code>(function->shared()->code()));
+
+ info.MarkAsContextSpecializing();
+ info.MarkAsTypingEnabled();
+ info.MarkAsInliningDisabled();
+ compiler::Pipeline pipeline(&info);
+ pipeline.GenerateCode();
+ if (!info.code().is_null()) return info.code();
+ }
+
if (function->shared()->is_compiled()) {
return Handle<Code>(function->shared()->code());
}
« no previous file with comments | « src/compiler.h ('k') | src/flag-definitions.h » ('j') | src/scopes.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698