OLD | NEW |
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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 // to use the Hydrogen-based optimizing compiler. We already have | 233 // to use the Hydrogen-based optimizing compiler. We already have |
234 // generated code for this from the shared function object. | 234 // generated code for this from the shared function object. |
235 if (AlwaysFullCompiler(info()->isolate())) { | 235 if (AlwaysFullCompiler(info()->isolate())) { |
236 info()->SetCode(code); | 236 info()->SetCode(code); |
237 return SetLastStatus(BAILED_OUT); | 237 return SetLastStatus(BAILED_OUT); |
238 } | 238 } |
239 | 239 |
240 // Limit the number of times we re-compile a functions with | 240 // Limit the number of times we re-compile a functions with |
241 // the optimizing compiler. | 241 // the optimizing compiler. |
242 const int kMaxOptCount = | 242 const int kMaxOptCount = |
243 FLAG_deopt_every_n_times == 0 ? Compiler::kDefaultMaxOptCount : 1000; | 243 FLAG_deopt_every_n_times == 0 ? FLAG_max_opt_count : 1000; |
244 if (info()->shared_info()->opt_count() > kMaxOptCount) { | 244 if (info()->shared_info()->opt_count() > kMaxOptCount) { |
245 return AbortOptimization(); | 245 return AbortOptimization(); |
246 } | 246 } |
247 | 247 |
248 // Due to an encoding limit on LUnallocated operands in the Lithium | 248 // Due to an encoding limit on LUnallocated operands in the Lithium |
249 // language, we cannot optimize functions with too many formal parameters | 249 // language, we cannot optimize functions with too many formal parameters |
250 // or perform on-stack replacement for function with too many | 250 // or perform on-stack replacement for function with too many |
251 // stack-allocated local variables. | 251 // stack-allocated local variables. |
252 // | 252 // |
253 // The encoding is as a signed value, with parameters and receiver using | 253 // The encoding is as a signed value, with parameters and receiver using |
(...skipping 773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1027 } | 1027 } |
1028 } | 1028 } |
1029 | 1029 |
1030 GDBJIT(AddCode(Handle<String>(shared->DebugName()), | 1030 GDBJIT(AddCode(Handle<String>(shared->DebugName()), |
1031 Handle<Script>(info->script()), | 1031 Handle<Script>(info->script()), |
1032 Handle<Code>(info->code()), | 1032 Handle<Code>(info->code()), |
1033 info)); | 1033 info)); |
1034 } | 1034 } |
1035 | 1035 |
1036 } } // namespace v8::internal | 1036 } } // namespace v8::internal |
OLD | NEW |