Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 3901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3912 | 3912 |
| 3913 // No context change required. | 3913 // No context change required. |
| 3914 CompilationInfo* outer_info = info(); | 3914 CompilationInfo* outer_info = info(); |
| 3915 if (target->context() != outer_info->closure()->context() || | 3915 if (target->context() != outer_info->closure()->context() || |
| 3916 outer_info->scope()->contains_with() || | 3916 outer_info->scope()->contains_with() || |
| 3917 outer_info->scope()->num_heap_slots() > 0) { | 3917 outer_info->scope()->num_heap_slots() > 0) { |
| 3918 TraceInline(target, "target requires context change"); | 3918 TraceInline(target, "target requires context change"); |
| 3919 return false; | 3919 return false; |
| 3920 } | 3920 } |
| 3921 | 3921 |
| 3922 // Don't inline deeper than two calls. | 3922 // Don't inline deeper than tree calls. |
|
Kevin Millikin (Chromium)
2011/04/04 13:17:10
tree --> three
Rico
2011/04/04 13:26:04
Done.
| |
| 3923 HEnvironment* env = environment(); | 3923 HEnvironment* env = environment(); |
| 3924 if (env->outer() != NULL && env->outer()->outer() != NULL) { | 3924 if (env->outer() != NULL && env->outer()->outer() != NULL && |
| 3925 env->outer()->outer()->outer() != NULL) { | |
| 3925 TraceInline(target, "inline depth limit reached"); | 3926 TraceInline(target, "inline depth limit reached"); |
| 3926 return false; | 3927 return false; |
| 3927 } | 3928 } |
| 3928 | 3929 |
| 3929 // Don't inline recursive functions. | 3930 // Don't inline recursive functions. |
| 3930 if (target->shared() == outer_info->closure()->shared()) { | 3931 if (target->shared() == outer_info->closure()->shared()) { |
| 3931 TraceInline(target, "target is recursive"); | 3932 TraceInline(target, "target is recursive"); |
| 3932 return false; | 3933 return false; |
| 3933 } | 3934 } |
| 3934 | 3935 |
| (...skipping 2016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5951 } | 5952 } |
| 5952 } | 5953 } |
| 5953 | 5954 |
| 5954 #ifdef DEBUG | 5955 #ifdef DEBUG |
| 5955 if (graph_ != NULL) graph_->Verify(); | 5956 if (graph_ != NULL) graph_->Verify(); |
| 5956 if (allocator_ != NULL) allocator_->Verify(); | 5957 if (allocator_ != NULL) allocator_->Verify(); |
| 5957 #endif | 5958 #endif |
| 5958 } | 5959 } |
| 5959 | 5960 |
| 5960 } } // namespace v8::internal | 5961 } } // namespace v8::internal |
| OLD | NEW |