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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 !scope_->outer_scope_calls_non_strict_eval() && | 228 !scope_->outer_scope_calls_non_strict_eval() && |
229 !scope_->inside_with(); | 229 !scope_->inside_with(); |
230 SetMode(is_optimizable_closure ? BASE : NONOPT); | 230 SetMode(is_optimizable_closure ? BASE : NONOPT); |
231 } | 231 } |
232 | 232 |
233 | 233 |
234 // Primitive functions are unlikely to be picked up by the stack-walking | 234 // Primitive functions are unlikely to be picked up by the stack-walking |
235 // profiler, so they trigger their own optimization when they're called | 235 // profiler, so they trigger their own optimization when they're called |
236 // for the SharedFunctionInfo::kCallsUntilPrimitiveOptimization-th time. | 236 // for the SharedFunctionInfo::kCallsUntilPrimitiveOptimization-th time. |
237 bool CompilationInfo::ShouldSelfOptimize() { | 237 bool CompilationInfo::ShouldSelfOptimize() { |
238 return FLAG_self_optimization && | 238 return FLAG_crankshaft && |
239 FLAG_crankshaft && | |
240 !function()->flags()->Contains(kDontSelfOptimize) && | 239 !function()->flags()->Contains(kDontSelfOptimize) && |
241 !function()->dont_optimize() && | 240 !function()->dont_optimize() && |
242 function()->scope()->AllowsLazyCompilation() && | 241 function()->scope()->AllowsLazyCompilation() && |
243 (shared_info().is_null() || !shared_info()->optimization_disabled()); | 242 (shared_info().is_null() || !shared_info()->optimization_disabled()); |
244 } | 243 } |
245 | 244 |
246 | 245 |
247 // Determine whether to use the full compiler for all code. If the flag | 246 // Determine whether to use the full compiler for all code. If the flag |
248 // --always-full-compiler is specified this is the case. For the virtual frame | 247 // --always-full-compiler is specified this is the case. For the virtual frame |
249 // based compiler the full compiler is also used if a debugger is connected, as | 248 // based compiler the full compiler is also used if a debugger is connected, as |
(...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1361 AllowHandleDereference allow_deref; | 1360 AllowHandleDereference allow_deref; |
1362 bool tracing_on = info()->IsStub() | 1361 bool tracing_on = info()->IsStub() |
1363 ? FLAG_trace_hydrogen_stubs | 1362 ? FLAG_trace_hydrogen_stubs |
1364 : (FLAG_trace_hydrogen && | 1363 : (FLAG_trace_hydrogen && |
1365 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); | 1364 info()->closure()->PassesFilter(FLAG_trace_hydrogen_filter)); |
1366 return (tracing_on && | 1365 return (tracing_on && |
1367 OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); | 1366 OS::StrChr(const_cast<char*>(FLAG_trace_phase), name_[0]) != NULL); |
1368 } | 1367 } |
1369 | 1368 |
1370 } } // namespace v8::internal | 1369 } } // namespace v8::internal |
OLD | NEW |