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

Unified Diff: src/hydrogen.cc

Issue 12071002: Allow inlining of multiple closures from shared function. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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
« no previous file with comments | « no previous file | test/mjsunit/compiler/inline-closures.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 019f39a20f96050f55cbab1d67390afbcf1b8707..1231337c889f86647c27f39c0a018b7c4b0f0c77 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -7081,8 +7081,6 @@ bool HOptimizedGraphBuilder::TryInline(CallKind call_kind,
return false;
}
- Handle<SharedFunctionInfo> target_shared(target->shared());
-
#if !defined(V8_TARGET_ARCH_IA32)
// Target must be able to use caller's context.
CompilationInfo* outer_info = info();
@@ -7113,7 +7111,7 @@ bool HOptimizedGraphBuilder::TryInline(CallKind call_kind,
for (FunctionState* state = function_state();
state != NULL;
state = state->outer()) {
- if (state->compilation_info()->closure()->shared() == *target_shared) {
+ if (*state->compilation_info()->closure() == *target) {
TraceInline(target, caller, "target is recursive");
return false;
}
@@ -7128,6 +7126,7 @@ bool HOptimizedGraphBuilder::TryInline(CallKind call_kind,
// Parse and allocate variables.
CompilationInfo target_info(target, zone());
+ Handle<SharedFunctionInfo> target_shared(target->shared());
if (!ParserApi::Parse(&target_info, kNoParsingFlags) ||
!Scope::Analyze(&target_info)) {
if (target_info.isolate()->has_pending_exception()) {
« no previous file with comments | « no previous file | test/mjsunit/compiler/inline-closures.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698