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 "src/arguments.h" | 7 #include "src/arguments.h" |
8 #include "src/ast/prettyprinter.h" | 8 #include "src/ast/prettyprinter.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/conversions.h" | 10 #include "src/conversions.h" |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 HandleScope scope(isolate); | 453 HandleScope scope(isolate); |
454 DCHECK_EQ(1, args.length()); | 454 DCHECK_EQ(1, args.length()); |
455 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); | 455 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); |
456 Handle<FixedArray> result; | 456 Handle<FixedArray> result; |
457 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( | 457 ASSIGN_RETURN_FAILURE_ON_EXCEPTION( |
458 isolate, result, | 458 isolate, result, |
459 Object::CreateListFromArrayLike(isolate, object, ElementTypes::kAll)); | 459 Object::CreateListFromArrayLike(isolate, object, ElementTypes::kAll)); |
460 return *result; | 460 return *result; |
461 } | 461 } |
462 | 462 |
463 | |
464 RUNTIME_FUNCTION(Runtime_IncrementUseCounter) { | |
465 HandleScope scope(isolate); | |
466 DCHECK_EQ(1, args.length()); | |
467 CONVERT_SMI_ARG_CHECKED(counter, 0); | |
468 isolate->CountUsage(static_cast<v8::Isolate::UseCounterFeature>(counter)); | |
469 return isolate->heap()->undefined_value(); | |
470 } | |
471 | |
472 } // namespace internal | 463 } // namespace internal |
473 } // namespace v8 | 464 } // namespace v8 |
OLD | NEW |