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> |
| 8 |
7 #include "src/arguments.h" | 9 #include "src/arguments.h" |
8 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
9 #include "src/frames-inl.h" | 11 #include "src/frames-inl.h" |
10 #include "src/full-codegen/full-codegen.h" | 12 #include "src/full-codegen/full-codegen.h" |
11 #include "src/isolate-inl.h" | 13 #include "src/isolate-inl.h" |
12 #include "src/snapshot/natives.h" | 14 #include "src/snapshot/natives.h" |
13 | 15 |
14 namespace v8 { | 16 namespace v8 { |
15 namespace internal { | 17 namespace internal { |
16 | 18 |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 base::OS::DebugBreak(); | 394 base::OS::DebugBreak(); |
393 return isolate->heap()->undefined_value(); | 395 return isolate->heap()->undefined_value(); |
394 } | 396 } |
395 | 397 |
396 | 398 |
397 // Sets a v8 flag. | 399 // Sets a v8 flag. |
398 RUNTIME_FUNCTION(Runtime_SetFlags) { | 400 RUNTIME_FUNCTION(Runtime_SetFlags) { |
399 SealHandleScope shs(isolate); | 401 SealHandleScope shs(isolate); |
400 DCHECK(args.length() == 1); | 402 DCHECK(args.length() == 1); |
401 CONVERT_ARG_CHECKED(String, arg, 0); | 403 CONVERT_ARG_CHECKED(String, arg, 0); |
402 base::SmartArrayPointer<char> flags = | 404 std::unique_ptr<char[]> flags = |
403 arg->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL); | 405 arg->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL); |
404 FlagList::SetFlagsFromString(flags.get(), StrLength(flags.get())); | 406 FlagList::SetFlagsFromString(flags.get(), StrLength(flags.get())); |
405 return isolate->heap()->undefined_value(); | 407 return isolate->heap()->undefined_value(); |
406 } | 408 } |
407 | 409 |
408 | 410 |
409 RUNTIME_FUNCTION(Runtime_Abort) { | 411 RUNTIME_FUNCTION(Runtime_Abort) { |
410 SealHandleScope shs(isolate); | 412 SealHandleScope shs(isolate); |
411 DCHECK(args.length() == 1); | 413 DCHECK(args.length() == 1); |
412 CONVERT_SMI_ARG_CHECKED(message_id, 0); | 414 CONVERT_SMI_ARG_CHECKED(message_id, 0); |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 | 591 |
590 RUNTIME_FUNCTION(Runtime_SpeciesProtector) { | 592 RUNTIME_FUNCTION(Runtime_SpeciesProtector) { |
591 SealHandleScope shs(isolate); | 593 SealHandleScope shs(isolate); |
592 DCHECK_EQ(0, args.length()); | 594 DCHECK_EQ(0, args.length()); |
593 return isolate->heap()->ToBoolean(isolate->IsArraySpeciesLookupChainIntact()); | 595 return isolate->heap()->ToBoolean(isolate->IsArraySpeciesLookupChainIntact()); |
594 } | 596 } |
595 | 597 |
596 | 598 |
597 } // namespace internal | 599 } // namespace internal |
598 } // namespace v8 | 600 } // namespace v8 |
OLD | NEW |