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/ast/prettyprinter.h" | 10 #include "src/ast/prettyprinter.h" |
11 #include "src/bootstrapper.h" | 11 #include "src/bootstrapper.h" |
12 #include "src/builtins/builtins.h" | |
12 #include "src/conversions.h" | 13 #include "src/conversions.h" |
13 #include "src/debug/debug.h" | 14 #include "src/debug/debug.h" |
14 #include "src/frames-inl.h" | 15 #include "src/frames-inl.h" |
15 #include "src/isolate-inl.h" | 16 #include "src/isolate-inl.h" |
16 #include "src/messages.h" | 17 #include "src/messages.h" |
17 #include "src/parsing/parse-info.h" | 18 #include "src/parsing/parse-info.h" |
18 #include "src/parsing/parsing.h" | 19 #include "src/parsing/parsing.h" |
19 #include "src/wasm/wasm-module.h" | 20 #include "src/wasm/wasm-module.h" |
20 | 21 |
21 namespace v8 { | 22 namespace v8 { |
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
485 isolate, Object::OrdinaryHasInstance(isolate, callable, object)); | 486 isolate, Object::OrdinaryHasInstance(isolate, callable, object)); |
486 } | 487 } |
487 | 488 |
488 RUNTIME_FUNCTION(Runtime_Typeof) { | 489 RUNTIME_FUNCTION(Runtime_Typeof) { |
489 HandleScope scope(isolate); | 490 HandleScope scope(isolate); |
490 DCHECK_EQ(1, args.length()); | 491 DCHECK_EQ(1, args.length()); |
491 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); | 492 CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); |
492 return *Object::TypeOf(isolate, object); | 493 return *Object::TypeOf(isolate, object); |
493 } | 494 } |
494 | 495 |
496 RUNTIME_FUNCTION(Runtime_CountUsage) { | |
gsathya
2017/01/11 17:27:31
There is IncrementUseCounter which does the same
jochen (gone - plz use gerrit)
2017/01/11 18:09:57
good catch, thx
| |
497 HandleScope scope(isolate); | |
498 DCHECK_EQ(1, args.length()); | |
499 CONVERT_INT32_ARG_CHECKED(counter_id, 0); | |
500 isolate->CountUsage(static_cast<v8::Isolate::UseCounterFeature>(counter_id)); | |
501 return isolate->heap()->undefined_value(); | |
502 } | |
503 | |
504 RUNTIME_FUNCTION(Runtime_AllowDynamicFunction) { | |
505 HandleScope scope(isolate); | |
506 DCHECK_EQ(1, args.length()); | |
507 CONVERT_ARG_HANDLE_CHECKED(JSFunction, target, 0); | |
508 Handle<JSObject> global_proxy(target->global_proxy(), isolate); | |
509 return *isolate->factory()->ToBoolean( | |
510 Builtins::AllowDynamicFunction(isolate, target, global_proxy)); | |
511 } | |
512 | |
495 } // namespace internal | 513 } // namespace internal |
496 } // namespace v8 | 514 } // namespace v8 |
OLD | NEW |