OLD | NEW |
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" |
| 11 #include "src/globals.h" |
11 #include "src/objects.h" | 12 #include "src/objects.h" |
12 | 13 |
13 namespace v8 { | 14 namespace v8 { |
14 namespace internal { | 15 namespace internal { |
15 | 16 |
16 class CallInterfaceDescriptor; | 17 class CallInterfaceDescriptor; |
17 class StatsCounter; | 18 class StatsCounter; |
18 class StubCache; | 19 class StubCache; |
19 | 20 |
20 enum class PrimitiveType { kBoolean, kNumber, kString, kSymbol }; | 21 enum class PrimitiveType { kBoolean, kNumber, kString, kSymbol }; |
(...skipping 12 matching lines...) Expand all Loading... |
33 V(NullValue, Null) \ | 34 V(NullValue, Null) \ |
34 V(TheHoleValue, TheHole) \ | 35 V(TheHoleValue, TheHole) \ |
35 V(TrueValue, True) \ | 36 V(TrueValue, True) \ |
36 V(UndefinedValue, Undefined) | 37 V(UndefinedValue, Undefined) |
37 | 38 |
38 // Provides JavaScript-specific "macro-assembler" functionality on top of the | 39 // Provides JavaScript-specific "macro-assembler" functionality on top of the |
39 // CodeAssembler. By factoring the JavaScript-isms out of the CodeAssembler, | 40 // CodeAssembler. By factoring the JavaScript-isms out of the CodeAssembler, |
40 // it's possible to add JavaScript-specific useful CodeAssembler "macros" | 41 // it's possible to add JavaScript-specific useful CodeAssembler "macros" |
41 // without modifying files in the compiler directory (and requiring a review | 42 // without modifying files in the compiler directory (and requiring a review |
42 // from a compiler directory OWNER). | 43 // from a compiler directory OWNER). |
43 class CodeStubAssembler : public compiler::CodeAssembler { | 44 class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler { |
44 public: | 45 public: |
45 // Create with CallStub linkage. | 46 // Create with CallStub linkage. |
46 // |result_size| specifies the number of results returned by the stub. | 47 // |result_size| specifies the number of results returned by the stub. |
47 // TODO(rmcilroy): move result_size to the CallInterfaceDescriptor. | 48 // TODO(rmcilroy): move result_size to the CallInterfaceDescriptor. |
48 CodeStubAssembler(Isolate* isolate, Zone* zone, | 49 CodeStubAssembler(Isolate* isolate, Zone* zone, |
49 const CallInterfaceDescriptor& descriptor, | 50 const CallInterfaceDescriptor& descriptor, |
50 Code::Flags flags, const char* name, | 51 Code::Flags flags, const char* name, |
51 size_t result_size = 1); | 52 size_t result_size = 1); |
52 | 53 |
53 // Create with JSCall linkage. | 54 // Create with JSCall linkage. |
(...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
990 static const int kElementLoopUnrollThreshold = 8; | 991 static const int kElementLoopUnrollThreshold = 8; |
991 }; | 992 }; |
992 | 993 |
993 #define CSA_ASSERT(x) Assert((x), #x, __FILE__, __LINE__) | 994 #define CSA_ASSERT(x) Assert((x), #x, __FILE__, __LINE__) |
994 | 995 |
995 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); | 996 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); |
996 | 997 |
997 } // namespace internal | 998 } // namespace internal |
998 } // namespace v8 | 999 } // namespace v8 |
999 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 1000 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
OLD | NEW |