Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: src/builtins/builtins-utils-gen.h

Issue 2752143004: [refactor] Separate generated builtins and C++ builtins into separate files (Closed)
Patch Set: tentative gcmole fix Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/builtins/builtins-utils.h ('k') | src/builtins/builtins-wasm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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 #ifndef V8_BUILTINS_BUILTINS_UTILS_GEN_H_
6 #define V8_BUILTINS_BUILTINS_UTILS_GEN_H_
7
8 namespace v8 {
9 namespace internal {
10
11 namespace compiler {
12 class CodeAssemblerState;
13 } // namespace compiler
14
15 // ----------------------------------------------------------------------------
16 // Support macro for defining builtins with Turbofan.
17 // ----------------------------------------------------------------------------
18 //
19 // A builtin function is defined by writing:
20 //
21 // TF_BUILTIN(name, code_assember_base_class) {
22 // ...
23 // }
24 //
25 // In the body of the builtin function the arguments can be accessed
26 // as "Parameter(n)".
27 #define TF_BUILTIN(Name, AssemblerBase) \
28 class Name##Assembler : public AssemblerBase { \
29 public: \
30 explicit Name##Assembler(compiler::CodeAssemblerState* state) \
31 : AssemblerBase(state) {} \
32 void Generate##Name##Impl(); \
33 }; \
34 void Builtins::Generate_##Name(compiler::CodeAssemblerState* state) { \
35 Name##Assembler assembler(state); \
36 assembler.Generate##Name##Impl(); \
37 } \
38 void Name##Assembler::Generate##Name##Impl()
39
40 } // namespace internal
41 } // namespace v8
42
43 #endif // V8_BUILTINS_BUILTINS_UTILS_GEN_H_
OLDNEW
« no previous file with comments | « src/builtins/builtins-utils.h ('k') | src/builtins/builtins-wasm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698