OLD | NEW |
| (Empty) |
1 // Copyright 2017 the V8 project authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "src/builtins/builtins-utils.h" | |
6 #include "src/builtins/builtins.h" | |
7 | |
8 #include "src/debug/interface-types.h" | |
9 #include "src/objects-inl.h" | |
10 | |
11 namespace v8 { | |
12 namespace internal { | |
13 | |
14 // ----------------------------------------------------------------------------- | |
15 // Console | |
16 | |
17 #define CONSOLE_METHOD_LIST(V) \ | |
18 V(Debug) \ | |
19 V(Error) \ | |
20 V(Info) \ | |
21 V(Log) \ | |
22 V(Warn) \ | |
23 V(Dir) \ | |
24 V(DirXml) \ | |
25 V(Table) \ | |
26 V(Trace) \ | |
27 V(Group) \ | |
28 V(GroupCollapsed) \ | |
29 V(GroupEnd) \ | |
30 V(Clear) \ | |
31 V(Count) \ | |
32 V(Assert) \ | |
33 V(MarkTimeline) \ | |
34 V(Profile) \ | |
35 V(ProfileEnd) \ | |
36 V(Timeline) \ | |
37 V(TimelineEnd) \ | |
38 V(Time) \ | |
39 V(TimeEnd) \ | |
40 V(TimeStamp) | |
41 | |
42 #define CONSOLE_BUILTIN_IMPLEMENTATION(name) \ | |
43 BUILTIN(Console##name) { \ | |
44 HandleScope scope(isolate); \ | |
45 if (isolate->console_delegate()) { \ | |
46 debug::ConsoleCallArguments wrapper(args); \ | |
47 isolate->console_delegate()->name(wrapper); \ | |
48 } \ | |
49 return isolate->heap()->undefined_value(); \ | |
50 } | |
51 CONSOLE_METHOD_LIST(CONSOLE_BUILTIN_IMPLEMENTATION) | |
52 #undef CONSOLE_BUILTIN_IMPLEMENTATION | |
53 | |
54 #undef CONSOLE_METHOD_LIST | |
55 | |
56 } // namespace internal | |
57 } // namespace v8 | |
OLD | NEW |