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

Side by Side Diff: src/hydrogen.cc

Issue 19504006: More aggressively inline optimized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/flag-definitions.h ('k') | src/isolate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 6335 matching lines...) Expand 10 before | Expand all | Expand 10 after
6346 CompilationInfo* outer_info = current_info(); 6346 CompilationInfo* outer_info = current_info();
6347 if (target->context() != outer_info->closure()->context() || 6347 if (target->context() != outer_info->closure()->context() ||
6348 outer_info->scope()->contains_with() || 6348 outer_info->scope()->contains_with() ||
6349 outer_info->scope()->num_heap_slots() > 0) { 6349 outer_info->scope()->num_heap_slots() > 0) {
6350 TraceInline(target, caller, "target requires context change"); 6350 TraceInline(target, caller, "target requires context change");
6351 return false; 6351 return false;
6352 } 6352 }
6353 #endif 6353 #endif
6354 6354
6355 6355
6356 // Don't inline deeper than kMaxInliningLevels calls. 6356 // Don't inline deeper than the maximum number of inlining levels.
6357 HEnvironment* env = environment(); 6357 HEnvironment* env = environment();
6358 int current_level = 1; 6358 int current_level = 1;
6359 while (env->outer() != NULL) { 6359 while (env->outer() != NULL) {
6360 if (current_level == Compiler::kMaxInliningLevels) { 6360 if (current_level == FLAG_max_inlining_levels) {
6361 TraceInline(target, caller, "inline depth limit reached"); 6361 TraceInline(target, caller, "inline depth limit reached");
6362 return false; 6362 return false;
6363 } 6363 }
6364 if (env->outer()->frame_type() == JS_FUNCTION) { 6364 if (env->outer()->frame_type() == JS_FUNCTION) {
6365 current_level++; 6365 current_level++;
6366 } 6366 }
6367 env = env->outer(); 6367 env = env->outer();
6368 } 6368 }
6369 6369
6370 // Don't inline recursive functions. 6370 // Don't inline recursive functions.
(...skipping 3636 matching lines...) Expand 10 before | Expand all | Expand 10 after
10007 if (ShouldProduceTraceOutput()) { 10007 if (ShouldProduceTraceOutput()) {
10008 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 10008 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
10009 } 10009 }
10010 10010
10011 #ifdef DEBUG 10011 #ifdef DEBUG
10012 graph_->Verify(false); // No full verify. 10012 graph_->Verify(false); // No full verify.
10013 #endif 10013 #endif
10014 } 10014 }
10015 10015
10016 } } // namespace v8::internal 10016 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698