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 #include "src/debug/interface-types.h" | |
8 #include "src/objects-inl.h" | |
9 | |
10 namespace v8 { | |
11 namespace internal { | |
12 | |
13 // ----------------------------------------------------------------------------- | |
14 // Console | |
15 | |
16 #define CONSOLE_METHOD_LIST(V) \ | |
17 V(Debug) \ | |
18 V(Error) \ | |
19 V(Info) \ | |
20 V(Log) \ | |
21 V(Warn) \ | |
22 V(Dir) \ | |
23 V(DirXml) \ | |
24 V(Table) \ | |
25 V(Trace) \ | |
26 V(Group) \ | |
27 V(GroupCollapsed) \ | |
28 V(GroupEnd) \ | |
29 V(Clear) \ | |
30 V(Count) \ | |
31 V(Assert) \ | |
32 V(MarkTimeline) \ | |
33 V(Profile) \ | |
34 V(ProfileEnd) \ | |
35 V(Timeline) \ | |
36 V(TimelineEnd) \ | |
37 V(Time) \ | |
38 V(TimeEnd) \ | |
39 V(TimeStamp) | |
40 | |
41 #define CONSOLE_BUILTIN_IMPLEMENTATION(name) \ | |
42 BUILTIN(Console##name) { \ | |
43 HandleScope scope(isolate); \ | |
44 if (isolate->console_delegate()) { \ | |
45 debug::ConsoleCallArguments wrapper(args); \ | |
46 isolate->console_delegate()->name(wrapper); \ | |
47 } \ | |
48 return isolate->heap()->undefined_value(); \ | |
49 } | |
50 CONSOLE_METHOD_LIST(CONSOLE_BUILTIN_IMPLEMENTATION) | |
51 #undef CONSOLE_BUILTIN_IMPLEMENTATION | |
52 | |
53 #undef CONSOLE_METHOD_LIST | |
54 | |
55 } // namespace internal | |
56 } // namespace v8 | |
OLD | NEW |