Chromium Code Reviews| Index: src/builtins/builtins-console.cc |
| diff --git a/src/builtins/builtins-console.cc b/src/builtins/builtins-console.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..3bf66324beb0a23a88ca7b3e1a346008eeb1908f |
| --- /dev/null |
| +++ b/src/builtins/builtins-console.cc |
| @@ -0,0 +1,58 @@ |
| +// Copyright 2017 the V8 project authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "src/builtins/builtins-console.h" |
| + |
| +#include "src/builtins/builtins.h" |
| + |
| +#include "src/counters.h" |
|
dgozman
2017/04/03 20:19:42
Remove?
kozy
2017/04/03 22:34:40
Done.
|
| +#include "src/objects-inl.h" |
| + |
| +namespace v8 { |
| +namespace internal { |
| + |
| +// ----------------------------------------------------------------------------- |
| +// Console |
| + |
| +#define CONSOLE_METHOD_LIST(V) \ |
| + V(Debug) \ |
| + V(Error) \ |
| + V(Info) \ |
| + V(Log) \ |
| + V(Warn) \ |
| + V(Dir) \ |
| + V(DirXml) \ |
| + V(Table) \ |
| + V(Trace) \ |
| + V(Group) \ |
| + V(GroupCollapsed) \ |
| + V(GroupEnd) \ |
| + V(Clear) \ |
| + V(Count) \ |
| + V(Assert) \ |
| + V(MarkTimeline) \ |
| + V(Profile) \ |
| + V(ProfileEnd) \ |
| + V(Timeline) \ |
| + V(TimelineEnd) \ |
| + V(Time) \ |
| + V(TimeEnd) \ |
| + V(TimeStamp) |
| + |
| +#define CONSOLE_BUILTIN_IMPLEMENTATION(name) \ |
| + BUILTIN(Console##name) { \ |
| + HandleScope scope(isolate); \ |
| + if (isolate->console_delegate()) { \ |
| + ConsoleCallArguments wrapper(args); \ |
| + isolate->console_delegate()->name(wrapper); \ |
| + } \ |
| + return isolate->heap()->undefined_value(); \ |
| + } |
| +CONSOLE_METHOD_LIST(CONSOLE_BUILTIN_IMPLEMENTATION) |
| +#undef CONSOLE_BUILTIN_IMPLEMENTATION |
| + |
| +#undef CONSOLE_METHOD_LIST |
| + |
| +} // namespace internal |
| +} // namespace v8 |