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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 base::OS::DebugBreak(); | 335 base::OS::DebugBreak(); |
336 return isolate->heap()->undefined_value(); | 336 return isolate->heap()->undefined_value(); |
337 } | 337 } |
338 | 338 |
339 | 339 |
340 // Sets a v8 flag. | 340 // Sets a v8 flag. |
341 RUNTIME_FUNCTION(Runtime_SetFlags) { | 341 RUNTIME_FUNCTION(Runtime_SetFlags) { |
342 SealHandleScope shs(isolate); | 342 SealHandleScope shs(isolate); |
343 DCHECK(args.length() == 1); | 343 DCHECK(args.length() == 1); |
344 CONVERT_ARG_CHECKED(String, arg, 0); | 344 CONVERT_ARG_CHECKED(String, arg, 0); |
345 SmartArrayPointer<char> flags = | 345 base::SmartArrayPointer<char> flags = |
346 arg->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL); | 346 arg->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL); |
347 FlagList::SetFlagsFromString(flags.get(), StrLength(flags.get())); | 347 FlagList::SetFlagsFromString(flags.get(), StrLength(flags.get())); |
348 return isolate->heap()->undefined_value(); | 348 return isolate->heap()->undefined_value(); |
349 } | 349 } |
350 | 350 |
351 | 351 |
352 RUNTIME_FUNCTION(Runtime_Abort) { | 352 RUNTIME_FUNCTION(Runtime_Abort) { |
353 SealHandleScope shs(isolate); | 353 SealHandleScope shs(isolate); |
354 DCHECK(args.length() == 1); | 354 DCHECK(args.length() == 1); |
355 CONVERT_SMI_ARG_CHECKED(message_id, 0); | 355 CONVERT_SMI_ARG_CHECKED(message_id, 0); |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
501 RUNTIME_FUNCTION(Runtime_HasFixed##Type##Elements) { \ | 501 RUNTIME_FUNCTION(Runtime_HasFixed##Type##Elements) { \ |
502 CONVERT_ARG_CHECKED(JSObject, obj, 0); \ | 502 CONVERT_ARG_CHECKED(JSObject, obj, 0); \ |
503 return isolate->heap()->ToBoolean(obj->HasFixed##Type##Elements()); \ | 503 return isolate->heap()->ToBoolean(obj->HasFixed##Type##Elements()); \ |
504 } | 504 } |
505 | 505 |
506 TYPED_ARRAYS(FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION) | 506 TYPED_ARRAYS(FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION) |
507 | 507 |
508 #undef FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION | 508 #undef FIXED_TYPED_ARRAYS_CHECK_RUNTIME_FUNCTION |
509 } // namespace internal | 509 } // namespace internal |
510 } // namespace v8 | 510 } // namespace v8 |
OLD | NEW |