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

Side by Side Diff: src/hydrogen.cc

Issue 9618052: Avoid starting a new basic block when inlining a function. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 5282 matching lines...) Expand 10 before | Expand all | Expand 10 after
5293 // IA32 only, overwrite the caller's context in the deoptimization 5293 // IA32 only, overwrite the caller's context in the deoptimization
5294 // environment with the correct one. 5294 // environment with the correct one.
5295 // 5295 //
5296 // TODO(kmillikin): implement the same inlining on other platforms so we 5296 // TODO(kmillikin): implement the same inlining on other platforms so we
5297 // can remove the unsightly ifdefs in this function. 5297 // can remove the unsightly ifdefs in this function.
5298 HConstant* context = new HConstant(Handle<Context>(target->context()), 5298 HConstant* context = new HConstant(Handle<Context>(target->context()),
5299 Representation::Tagged()); 5299 Representation::Tagged());
5300 AddInstruction(context); 5300 AddInstruction(context);
5301 inner_env->BindContext(context); 5301 inner_env->BindContext(context);
5302 #endif 5302 #endif
5303 HBasicBlock* body_entry = CreateBasicBlock(inner_env); 5303 AddSimulate(return_id);
5304 current_block()->Goto(body_entry); 5304 current_block()->UpdateEnvironment(inner_env);
5305 body_entry->SetJoinId(return_id);
5306 set_current_block(body_entry);
5307 AddInstruction(new(zone()) HEnterInlined(target, 5305 AddInstruction(new(zone()) HEnterInlined(target,
5308 arguments->length(), 5306 arguments->length(),
5309 function, 5307 function,
5310 call_kind, 5308 call_kind,
5311 function_state()->is_construct())); 5309 function_state()->is_construct()));
5312 VisitDeclarations(target_info.scope()->declarations()); 5310 VisitDeclarations(target_info.scope()->declarations());
5313 VisitStatements(function->body()); 5311 VisitStatements(function->body());
5314 if (HasStackOverflow()) { 5312 if (HasStackOverflow()) {
5315 // Bail out if the inline function did, as we cannot residualize a call 5313 // Bail out if the inline function did, as we cannot residualize a call
5316 // instead. 5314 // instead.
(...skipping 2734 matching lines...) Expand 10 before | Expand all | Expand 10 after
8051 } 8049 }
8052 } 8050 }
8053 8051
8054 #ifdef DEBUG 8052 #ifdef DEBUG
8055 if (graph_ != NULL) graph_->Verify(false); // No full verify. 8053 if (graph_ != NULL) graph_->Verify(false); // No full verify.
8056 if (allocator_ != NULL) allocator_->Verify(); 8054 if (allocator_ != NULL) allocator_->Verify();
8057 #endif 8055 #endif
8058 } 8056 }
8059 8057
8060 } } // namespace v8::internal 8058 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698