OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
8 #include "src/deoptimizer.h" | 8 #include "src/deoptimizer.h" |
9 #include "src/full-codegen.h" | 9 #include "src/full-codegen.h" |
10 #include "src/runtime/runtime-utils.h" | 10 #include "src/runtime/runtime-utils.h" |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 } | 173 } |
174 } | 174 } |
175 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); | 175 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); |
176 if (isolate->concurrent_recompilation_enabled() && | 176 if (isolate->concurrent_recompilation_enabled() && |
177 sync_with_compiler_thread) { | 177 sync_with_compiler_thread) { |
178 while (function->IsInOptimizationQueue()) { | 178 while (function->IsInOptimizationQueue()) { |
179 isolate->optimizing_compile_dispatcher()->InstallOptimizedFunctions(); | 179 isolate->optimizing_compile_dispatcher()->InstallOptimizedFunctions(); |
180 base::OS::Sleep(base::TimeDelta::FromMilliseconds(50)); | 180 base::OS::Sleep(base::TimeDelta::FromMilliseconds(50)); |
181 } | 181 } |
182 } | 182 } |
183 if (FLAG_always_opt) { | 183 if (FLAG_always_opt || FLAG_prepare_always_opt) { |
184 // With --always-opt, optimization status expectations might not | 184 // With --always-opt, optimization status expectations might not |
185 // match up, so just return a sentinel. | 185 // match up, so just return a sentinel. |
186 return Smi::FromInt(3); // 3 == "always". | 186 return Smi::FromInt(3); // 3 == "always". |
187 } | 187 } |
188 if (FLAG_deopt_every_n_times) { | 188 if (FLAG_deopt_every_n_times) { |
189 return Smi::FromInt(6); // 6 == "maybe deopted". | 189 return Smi::FromInt(6); // 6 == "maybe deopted". |
190 } | 190 } |
191 if (function->IsOptimized() && function->code()->is_turbofanned()) { | 191 if (function->IsOptimized() && function->code()->is_turbofanned()) { |
192 return Smi::FromInt(7); // 7 == "TurboFan compiler". | 192 return Smi::FromInt(7); // 7 == "TurboFan compiler". |
193 } | 193 } |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 RUNTIME_FUNCTION(Runtime_HasFixed##Type##Elements) { \ | 501 RUNTIME_FUNCTION(Runtime_HasFixed##Type##Elements) { \ |
502 CONVERT_ARG_CHECKED(JSObject, obj, 0); \ | 502 CONVERT_ARG_CHECKED(JSObject, obj, 0); \ |
503 return isolate->heap()->ToBoolean(obj->HasFixed##Type##Elements()); \ | 503 return isolate->heap()->ToBoolean(obj->HasFixed##Type##Elements()); \ |
504 } | 504 } |
505 | 505 |
506 TYPED_ARRAYS(FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION) | 506 TYPED_ARRAYS(FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION) |
507 | 507 |
508 #undef FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION | 508 #undef FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION |
509 } // namespace internal | 509 } // namespace internal |
510 } // namespace v8 | 510 } // namespace v8 |
OLD | NEW |