| 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 4469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4480 outer_info->scope()->contains_with() || | 4480 outer_info->scope()->contains_with() || |
| 4481 outer_info->scope()->num_heap_slots() > 0) { | 4481 outer_info->scope()->num_heap_slots() > 0) { |
| 4482 TraceInline(target, caller, "target requires context change"); | 4482 TraceInline(target, caller, "target requires context change"); |
| 4483 return false; | 4483 return false; |
| 4484 } | 4484 } |
| 4485 | 4485 |
| 4486 // Don't inline deeper than kMaxInliningLevels calls. | 4486 // Don't inline deeper than kMaxInliningLevels calls. |
| 4487 HEnvironment* env = environment(); | 4487 HEnvironment* env = environment(); |
| 4488 int current_level = 1; | 4488 int current_level = 1; |
| 4489 while (env->outer() != NULL) { | 4489 while (env->outer() != NULL) { |
| 4490 if (current_level == Compiler::kMaxInliningLevels) { | 4490 if (FLAG_limit_inlining && current_level == Compiler::kMaxInliningLevels) { |
| 4491 TraceInline(target, caller, "inline depth limit reached"); | 4491 TraceInline(target, caller, "inline depth limit reached"); |
| 4492 return false; | 4492 return false; |
| 4493 } | 4493 } |
| 4494 current_level++; | 4494 current_level++; |
| 4495 env = env->outer(); | 4495 env = env->outer(); |
| 4496 } | 4496 } |
| 4497 | 4497 |
| 4498 // Don't inline recursive functions. | 4498 // Don't inline recursive functions. |
| 4499 if (*target_shared == outer_info->closure()->shared()) { | 4499 if (*target_shared == outer_info->closure()->shared()) { |
| 4500 TraceInline(target, caller, "target is recursive"); | 4500 TraceInline(target, caller, "target is recursive"); |
| (...skipping 2320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6821 } | 6821 } |
| 6822 } | 6822 } |
| 6823 | 6823 |
| 6824 #ifdef DEBUG | 6824 #ifdef DEBUG |
| 6825 if (graph_ != NULL) graph_->Verify(); | 6825 if (graph_ != NULL) graph_->Verify(); |
| 6826 if (allocator_ != NULL) allocator_->Verify(); | 6826 if (allocator_ != NULL) allocator_->Verify(); |
| 6827 #endif | 6827 #endif |
| 6828 } | 6828 } |
| 6829 | 6829 |
| 6830 } } // namespace v8::internal | 6830 } } // namespace v8::internal |
| OLD | NEW |