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

Unified Diff: src/hydrogen.cc

Issue 8277034: Revert r9619. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 2 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/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
===================================================================
--- src/hydrogen.cc (revision 9635)
+++ src/hydrogen.cc (working copy)
@@ -4539,9 +4539,9 @@
return false;
}
+ CompilationInfo* outer_info = info();
#if !defined(V8_TARGET_ARCH_IA32)
// Target must be able to use caller's context.
- CompilationInfo* outer_info = info();
if (target->context() != outer_info->closure()->context() ||
outer_info->scope()->contains_with() ||
outer_info->scope()->num_heap_slots() > 0) {
@@ -4564,13 +4564,9 @@
}
// Don't inline recursive functions.
- for (FunctionState* state = function_state();
- state != NULL;
- state = state->outer()) {
- if (state->compilation_info()->closure()->shared() == *target_shared) {
- TraceInline(target, caller, "target is recursive");
- return false;
- }
+ if (*target_shared == outer_info->closure()->shared()) {
+ TraceInline(target, caller, "target is recursive");
+ return false;
}
// We don't want to add more than a certain number of nodes from inlining.
@@ -5075,25 +5071,18 @@
// The function is lingering in the deoptimization environment.
// Handle it by case analysis on the AST context.
if (ast_context()->IsEffect()) {
- if (current_block() == NULL) return;
- ASSERT(Top() == function);
Drop(1);
} else if (ast_context()->IsValue()) {
- if (current_block() == NULL) return;
HValue* result = Pop();
- ASSERT(Top() == function);
Drop(1);
Push(result);
} else if (ast_context()->IsTest()) {
- ASSERT(current_block() == NULL);
TestContext* context = TestContext::cast(ast_context());
- if (context->if_true()->HasPredecessor() &&
- context->if_true()->last_environment()->Top() == function) {
+ if (context->if_true()->HasPredecessor()) {
context->if_true()->last_environment()->Drop(1);
}
- if (context->if_false()->HasPredecessor() &&
- context->if_false()->last_environment()->Top() == function) {
- context->if_false()->last_environment()->Drop(1);
+ if (context->if_false()->HasPredecessor()) {
+ context->if_true()->last_environment()->Drop(1);
}
} else {
UNREACHABLE();
@@ -5313,6 +5302,7 @@
void HGraphBuilder::VisitNot(UnaryOperation* expr) {
+ // TODO(svenpanne) Perhaps a switch/virtual function is nicer here.
if (ast_context()->IsTest()) {
TestContext* context = TestContext::cast(ast_context());
VisitForControl(expr->expression(),
« no previous file with comments | « no previous file | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698