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

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

Issue 2498073002: [refactoring] Split CodeAssemblerState out of CodeAssembler (Closed)
Patch Set: 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
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 28 matching lines...) Expand all
39 V(TrueValue, True) \ 39 V(TrueValue, True) \
40 V(UndefinedValue, Undefined) 40 V(UndefinedValue, Undefined)
41 41
42 // Provides JavaScript-specific "macro-assembler" functionality on top of the 42 // Provides JavaScript-specific "macro-assembler" functionality on top of the
43 // CodeAssembler. By factoring the JavaScript-isms out of the CodeAssembler, 43 // CodeAssembler. By factoring the JavaScript-isms out of the CodeAssembler,
44 // it's possible to add JavaScript-specific useful CodeAssembler "macros" 44 // it's possible to add JavaScript-specific useful CodeAssembler "macros"
45 // without modifying files in the compiler directory (and requiring a review 45 // without modifying files in the compiler directory (and requiring a review
46 // from a compiler directory OWNER). 46 // from a compiler directory OWNER).
47 class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler { 47 class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
48 public: 48 public:
49 // Create with CallStub linkage. 49 CodeStubAssembler(compiler::CodeAssemblerState* state)
50 // |result_size| specifies the number of results returned by the stub. 50 : compiler::CodeAssembler(state) {}
51 // TODO(rmcilroy): move result_size to the CallInterfaceDescriptor.
52 CodeStubAssembler(Isolate* isolate, Zone* zone,
53 const CallInterfaceDescriptor& descriptor,
54 Code::Flags flags, const char* name,
55 size_t result_size = 1);
56
57 // Create with JSCall linkage.
58 CodeStubAssembler(Isolate* isolate, Zone* zone, int parameter_count,
59 Code::Flags flags, const char* name);
60 51
61 enum AllocationFlag : uint8_t { 52 enum AllocationFlag : uint8_t {
62 kNone = 0, 53 kNone = 0,
63 kDoubleAlignment = 1, 54 kDoubleAlignment = 1,
64 kPretenured = 1 << 1 55 kPretenured = 1 << 1
65 }; 56 };
66 57
67 typedef base::Flags<AllocationFlag> AllocationFlags; 58 typedef base::Flags<AllocationFlag> AllocationFlags;
68 59
69 // TODO(ishell): Fix all loads/stores from arrays by int32 offsets/indices 60 // TODO(ishell): Fix all loads/stores from arrays by int32 offsets/indices
(...skipping 1217 matching lines...) Expand 10 before | Expand all | Expand 10 after
1287 } 1278 }
1288 #else 1279 #else
1289 #define CSA_SLOW_ASSERT(csa, x) ((void)0) 1280 #define CSA_SLOW_ASSERT(csa, x) ((void)0)
1290 #endif 1281 #endif
1291 1282
1292 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); 1283 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags);
1293 1284
1294 } // namespace internal 1285 } // namespace internal
1295 } // namespace v8 1286 } // namespace v8
1296 #endif // V8_CODE_STUB_ASSEMBLER_H_ 1287 #endif // V8_CODE_STUB_ASSEMBLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698