| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 // Fall back to using the full code generator if it's not possible | 200 // Fall back to using the full code generator if it's not possible |
| 201 // to use the Hydrogen-based optimizing compiler. We already have | 201 // to use the Hydrogen-based optimizing compiler. We already have |
| 202 // generated code for this from the shared function object. | 202 // generated code for this from the shared function object. |
| 203 if (AlwaysFullCompiler() || !FLAG_use_hydrogen) { | 203 if (AlwaysFullCompiler() || !FLAG_use_hydrogen) { |
| 204 info->SetCode(code); | 204 info->SetCode(code); |
| 205 return true; | 205 return true; |
| 206 } | 206 } |
| 207 | 207 |
| 208 // Limit the number of times we re-compile a functions with | 208 // Limit the number of times we re-compile a functions with |
| 209 // the optimizing compiler. | 209 // the optimizing compiler. |
| 210 const int kMaxOptCount = FLAG_deopt_every_n_times == 0 ? 10 : 1000; | 210 const int kMaxOptCount = |
| 211 FLAG_deopt_every_n_times == 0 ? Compiler::kDefaultMaxOptCount : 1000; |
| 211 if (info->shared_info()->opt_count() > kMaxOptCount) { | 212 if (info->shared_info()->opt_count() > kMaxOptCount) { |
| 212 AbortAndDisable(info); | 213 AbortAndDisable(info); |
| 213 // True indicates the compilation pipeline is still going, not | 214 // True indicates the compilation pipeline is still going, not |
| 214 // necessarily that we optimized the code. | 215 // necessarily that we optimized the code. |
| 215 return true; | 216 return true; |
| 216 } | 217 } |
| 217 | 218 |
| 218 // Due to an encoding limit on LUnallocated operands in the Lithium | 219 // Due to an encoding limit on LUnallocated operands in the Lithium |
| 219 // language, we cannot optimize functions with too many formal parameters | 220 // language, we cannot optimize functions with too many formal parameters |
| 220 // or perform on-stack replacement for function with too many | 221 // or perform on-stack replacement for function with too many |
| (...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 *code, | 790 *code, |
| 790 *name)); | 791 *name)); |
| 791 OPROFILE(CreateNativeCodeRegion(*name, | 792 OPROFILE(CreateNativeCodeRegion(*name, |
| 792 code->instruction_start(), | 793 code->instruction_start(), |
| 793 code->instruction_size())); | 794 code->instruction_size())); |
| 794 } | 795 } |
| 795 } | 796 } |
| 796 } | 797 } |
| 797 | 798 |
| 798 } } // namespace v8::internal | 799 } } // namespace v8::internal |
| OLD | NEW |