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/compiler-dispatcher/optimizing-compile-dispatcher.h" | 10 #include "src/compiler-dispatcher/optimizing-compile-dispatcher.h" |
(...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 DCHECK(args.length() == 0); | 413 DCHECK(args.length() == 0); |
414 isolate->heap()->NotifyContextDisposed(true); | 414 isolate->heap()->NotifyContextDisposed(true); |
415 return isolate->heap()->undefined_value(); | 415 return isolate->heap()->undefined_value(); |
416 } | 416 } |
417 | 417 |
418 | 418 |
419 RUNTIME_FUNCTION(Runtime_SetAllocationTimeout) { | 419 RUNTIME_FUNCTION(Runtime_SetAllocationTimeout) { |
420 SealHandleScope shs(isolate); | 420 SealHandleScope shs(isolate); |
421 DCHECK(args.length() == 2 || args.length() == 3); | 421 DCHECK(args.length() == 2 || args.length() == 3); |
422 #ifdef DEBUG | 422 #ifdef DEBUG |
423 CONVERT_INT32_ARG_CHECKED(interval, 0); | 423 CONVERT_SMI_ARG_CHECKED(interval, 0); |
424 CONVERT_INT32_ARG_CHECKED(timeout, 1); | 424 CONVERT_SMI_ARG_CHECKED(timeout, 1); |
425 isolate->heap()->set_allocation_timeout(timeout); | 425 isolate->heap()->set_allocation_timeout(timeout); |
426 FLAG_gc_interval = interval; | 426 FLAG_gc_interval = interval; |
427 if (args.length() == 3) { | 427 if (args.length() == 3) { |
428 // Enable/disable inline allocation if requested. | 428 // Enable/disable inline allocation if requested. |
429 CONVERT_BOOLEAN_ARG_CHECKED(inline_allocation, 2); | 429 CONVERT_BOOLEAN_ARG_CHECKED(inline_allocation, 2); |
430 if (inline_allocation) { | 430 if (inline_allocation) { |
431 isolate->heap()->EnableInlineAllocation(); | 431 isolate->heap()->EnableInlineAllocation(); |
432 } else { | 432 } else { |
433 isolate->heap()->DisableInlineAllocation(); | 433 isolate->heap()->DisableInlineAllocation(); |
434 } | 434 } |
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 RUNTIME_FUNCTION(Runtime_ValidateWasmOrphanedInstance) { | 794 RUNTIME_FUNCTION(Runtime_ValidateWasmOrphanedInstance) { |
795 HandleScope shs(isolate); | 795 HandleScope shs(isolate); |
796 DCHECK(args.length() == 1); | 796 DCHECK(args.length() == 1); |
797 CONVERT_ARG_HANDLE_CHECKED(JSObject, instance_obj, 0); | 797 CONVERT_ARG_HANDLE_CHECKED(JSObject, instance_obj, 0); |
798 wasm::testing::ValidateOrphanedInstance(isolate, instance_obj); | 798 wasm::testing::ValidateOrphanedInstance(isolate, instance_obj); |
799 return isolate->heap()->ToBoolean(true); | 799 return isolate->heap()->ToBoolean(true); |
800 } | 800 } |
801 | 801 |
802 } // namespace internal | 802 } // namespace internal |
803 } // namespace v8 | 803 } // namespace v8 |
OLD | NEW |