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/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "src/arguments.h" | 9 #include "src/arguments.h" |
10 #include "src/assembler-inl.h" | 10 #include "src/assembler-inl.h" |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 // If function isn't compiled, compile it now. | 273 // If function isn't compiled, compile it now. |
274 if (!function->shared()->is_compiled() && | 274 if (!function->shared()->is_compiled() && |
275 !Compiler::Compile(function, Compiler::CLEAR_EXCEPTION)) { | 275 !Compiler::Compile(function, Compiler::CLEAR_EXCEPTION)) { |
276 return isolate->heap()->undefined_value(); | 276 return isolate->heap()->undefined_value(); |
277 } | 277 } |
278 | 278 |
279 // If the function is already optimized, just return. | 279 // If the function is already optimized, just return. |
280 if (function->IsOptimized()) return isolate->heap()->undefined_value(); | 280 if (function->IsOptimized()) return isolate->heap()->undefined_value(); |
281 | 281 |
282 function->MarkForOptimization(); | 282 function->MarkForOptimization(); |
| 283 if (FLAG_trace_opt) { |
| 284 PrintF("[manually marking "); |
| 285 function->ShortPrint(); |
| 286 PrintF(" for optimization]\n"); |
| 287 } |
283 | 288 |
284 if (args.length() == 2) { | 289 if (args.length() == 2) { |
285 CONVERT_ARG_HANDLE_CHECKED(String, type, 1); | 290 CONVERT_ARG_HANDLE_CHECKED(String, type, 1); |
286 if (type->IsOneByteEqualTo(STATIC_CHAR_VECTOR("concurrent")) && | 291 if (type->IsOneByteEqualTo(STATIC_CHAR_VECTOR("concurrent")) && |
287 isolate->concurrent_recompilation_enabled()) { | 292 isolate->concurrent_recompilation_enabled()) { |
288 function->AttemptConcurrentOptimization(); | 293 function->AttemptConcurrentOptimization(); |
289 } | 294 } |
290 } | 295 } |
291 | 296 |
292 return isolate->heap()->undefined_value(); | 297 return isolate->heap()->undefined_value(); |
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1029 return isolate->heap()->undefined_value(); | 1034 return isolate->heap()->undefined_value(); |
1030 } | 1035 } |
1031 | 1036 |
1032 RUNTIME_FUNCTION(Runtime_DecrementWaitCount) { | 1037 RUNTIME_FUNCTION(Runtime_DecrementWaitCount) { |
1033 isolate->DecrementWaitCountForTesting(); | 1038 isolate->DecrementWaitCountForTesting(); |
1034 return isolate->heap()->undefined_value(); | 1039 return isolate->heap()->undefined_value(); |
1035 } | 1040 } |
1036 | 1041 |
1037 } // namespace internal | 1042 } // namespace internal |
1038 } // namespace v8 | 1043 } // namespace v8 |
OLD | NEW |