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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 CONVERT_ARG_HANDLE_CHECKED(String, sync, 1); | 169 CONVERT_ARG_HANDLE_CHECKED(String, sync, 1); |
170 if (sync->IsOneByteEqualTo(STATIC_CHAR_VECTOR("no sync"))) { | 170 if (sync->IsOneByteEqualTo(STATIC_CHAR_VECTOR("no sync"))) { |
171 sync_with_compiler_thread = false; | 171 sync_with_compiler_thread = false; |
172 } | 172 } |
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(base::TimeDelta::FromMilliseconds(50)); |
180 } | 180 } |
181 } | 181 } |
182 if (FLAG_always_opt) { | 182 if (FLAG_always_opt) { |
183 // With --always-opt, optimization status expectations might not | 183 // With --always-opt, optimization status expectations might not |
184 // match up, so just return a sentinel. | 184 // match up, so just return a sentinel. |
185 return Smi::FromInt(3); // 3 == "always". | 185 return Smi::FromInt(3); // 3 == "always". |
186 } | 186 } |
187 if (FLAG_deopt_every_n_times) { | 187 if (FLAG_deopt_every_n_times) { |
188 return Smi::FromInt(6); // 6 == "maybe deopted". | 188 return Smi::FromInt(6); // 6 == "maybe deopted". |
189 } | 189 } |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
483 RUNTIME_FUNCTION(Runtime_HasFixed##Type##Elements) { \ | 483 RUNTIME_FUNCTION(Runtime_HasFixed##Type##Elements) { \ |
484 CONVERT_ARG_CHECKED(JSObject, obj, 0); \ | 484 CONVERT_ARG_CHECKED(JSObject, obj, 0); \ |
485 return isolate->heap()->ToBoolean(obj->HasFixed##Type##Elements()); \ | 485 return isolate->heap()->ToBoolean(obj->HasFixed##Type##Elements()); \ |
486 } | 486 } |
487 | 487 |
488 TYPED_ARRAYS(FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION) | 488 TYPED_ARRAYS(FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION) |
489 | 489 |
490 #undef FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION | 490 #undef FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION |
491 } | 491 } |
492 } // namespace v8::internal | 492 } // namespace v8::internal |
OLD | NEW |