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

Side by Side Diff: src/code-stub-assembler.h

Issue 2498073002: [refactoring] Split CodeAssemblerState out of CodeAssembler (Closed)
Patch Set: one more attempt Created 4 years, 1 month 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-typedarray.cc ('k') | src/code-stub-assembler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 #ifndef V8_CODE_STUB_ASSEMBLER_H_ 5 #ifndef V8_CODE_STUB_ASSEMBLER_H_
6 #define V8_CODE_STUB_ASSEMBLER_H_ 6 #define V8_CODE_STUB_ASSEMBLER_H_
7 7
8 #include <functional> 8 #include <functional>
9 9
10 #include "src/compiler/code-assembler.h" 10 #include "src/compiler/code-assembler.h"
(...skipping 26 matching lines...) Expand all
37 V(TrueValue, True) \ 37 V(TrueValue, True) \
38 V(UndefinedValue, Undefined) 38 V(UndefinedValue, Undefined)
39 39
40 // Provides JavaScript-specific "macro-assembler" functionality on top of the 40 // Provides JavaScript-specific "macro-assembler" functionality on top of the
41 // CodeAssembler. By factoring the JavaScript-isms out of the CodeAssembler, 41 // CodeAssembler. By factoring the JavaScript-isms out of the CodeAssembler,
42 // it's possible to add JavaScript-specific useful CodeAssembler "macros" 42 // it's possible to add JavaScript-specific useful CodeAssembler "macros"
43 // without modifying files in the compiler directory (and requiring a review 43 // without modifying files in the compiler directory (and requiring a review
44 // from a compiler directory OWNER). 44 // from a compiler directory OWNER).
45 class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler { 45 class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
46 public: 46 public:
47 // Create with CallStub linkage. 47 CodeStubAssembler(compiler::CodeAssemblerState* state)
48 // |result_size| specifies the number of results returned by the stub. 48 : compiler::CodeAssembler(state) {}
49 // TODO(rmcilroy): move result_size to the CallInterfaceDescriptor.
50 CodeStubAssembler(Isolate* isolate, Zone* zone,
51 const CallInterfaceDescriptor& descriptor,
52 Code::Flags flags, const char* name,
53 size_t result_size = 1);
54
55 // Create with JSCall linkage.
56 CodeStubAssembler(Isolate* isolate, Zone* zone, int parameter_count,
57 Code::Flags flags, const char* name);
58 49
59 enum AllocationFlag : uint8_t { 50 enum AllocationFlag : uint8_t {
60 kNone = 0, 51 kNone = 0,
61 kDoubleAlignment = 1, 52 kDoubleAlignment = 1,
62 kPretenured = 1 << 1 53 kPretenured = 1 << 1
63 }; 54 };
64 55
65 typedef base::Flags<AllocationFlag> AllocationFlags; 56 typedef base::Flags<AllocationFlag> AllocationFlags;
66 57
67 // TODO(ishell): Fix all loads/stores from arrays by int32 offsets/indices 58 // TODO(ishell): Fix all loads/stores from arrays by int32 offsets/indices
(...skipping 1243 matching lines...) Expand 10 before | Expand all | Expand 10 after
1311 } 1302 }
1312 #else 1303 #else
1313 #define CSA_SLOW_ASSERT(csa, x) ((void)0) 1304 #define CSA_SLOW_ASSERT(csa, x) ((void)0)
1314 #endif 1305 #endif
1315 1306
1316 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); 1307 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags);
1317 1308
1318 } // namespace internal 1309 } // namespace internal
1319 } // namespace v8 1310 } // namespace v8
1320 #endif // V8_CODE_STUB_ASSEMBLER_H_ 1311 #endif // V8_CODE_STUB_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « src/builtins/builtins-typedarray.cc ('k') | src/code-stub-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698