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 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); | 174 CONVERT_ARG_HANDLE_CHECKED(JSFunction, function, 0); |
175 if (isolate->concurrent_recompilation_enabled() && | 175 if (isolate->concurrent_recompilation_enabled() && |
176 sync_with_compiler_thread) { | 176 sync_with_compiler_thread) { |
177 while (function->IsInOptimizationQueue()) { | 177 while (function->IsInOptimizationQueue()) { |
178 isolate->optimizing_compile_dispatcher()->InstallOptimizedFunctions(); | 178 isolate->optimizing_compile_dispatcher()->InstallOptimizedFunctions(); |
179 base::OS::Sleep(50); | 179 base::OS::Sleep(50); |
180 } | 180 } |
181 } | 181 } |
182 if (FLAG_always_opt) { | 182 if (FLAG_always_opt) { |
183 // We may have always opt, but that is more best-effort than a real | 183 // With --always-opt, optimization status expectations might not |
184 // promise, so we still say "no" if it is not optimized. | 184 // match up, so just return a sentinel. |
185 return function->IsOptimized() ? Smi::FromInt(3) // 3 == "always". | 185 return Smi::FromInt(3); // 3 == "always". |
186 : Smi::FromInt(2); // 2 == "no". | |
187 } | 186 } |
188 if (FLAG_deopt_every_n_times) { | 187 if (FLAG_deopt_every_n_times) { |
189 return Smi::FromInt(6); // 6 == "maybe deopted". | 188 return Smi::FromInt(6); // 6 == "maybe deopted". |
190 } | 189 } |
191 if (function->IsOptimized() && function->code()->is_turbofanned()) { | 190 if (function->IsOptimized() && function->code()->is_turbofanned()) { |
192 return Smi::FromInt(7); // 7 == "TurboFan compiler". | 191 return Smi::FromInt(7); // 7 == "TurboFan compiler". |
193 } | 192 } |
194 return function->IsOptimized() ? Smi::FromInt(1) // 1 == "yes". | 193 return function->IsOptimized() ? Smi::FromInt(1) // 1 == "yes". |
195 : Smi::FromInt(2); // 2 == "no". | 194 : Smi::FromInt(2); // 2 == "no". |
196 } | 195 } |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 RUNTIME_FUNCTION(Runtime_HasFixed##Type##Elements) { \ | 483 RUNTIME_FUNCTION(Runtime_HasFixed##Type##Elements) { \ |
485 CONVERT_ARG_CHECKED(JSObject, obj, 0); \ | 484 CONVERT_ARG_CHECKED(JSObject, obj, 0); \ |
486 return isolate->heap()->ToBoolean(obj->HasFixed##Type##Elements()); \ | 485 return isolate->heap()->ToBoolean(obj->HasFixed##Type##Elements()); \ |
487 } | 486 } |
488 | 487 |
489 TYPED_ARRAYS(FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION) | 488 TYPED_ARRAYS(FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION) |
490 | 489 |
491 #undef FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION | 490 #undef FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION |
492 } | 491 } |
493 } // namespace v8::internal | 492 } // namespace v8::internal |
OLD | NEW |