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/objects.h" | 11 #include "src/objects.h" |
12 | 12 |
13 namespace v8 { | 13 namespace v8 { |
14 namespace internal { | 14 namespace internal { |
15 | 15 |
16 class CallInterfaceDescriptor; | 16 class CallInterfaceDescriptor; |
17 class StatsCounter; | 17 class StatsCounter; |
18 class StubCache; | 18 class StubCache; |
19 | 19 |
20 enum class PrimitiveType { kBoolean, kNumber, kString, kSymbol }; | 20 enum class PrimitiveType { kBoolean, kNumber, kString, kSymbol }; |
21 | 21 |
22 enum class UnicodeEncoding { | |
23 // Different unicode encodings in a |word32|: | |
24 UTF16, // hi 16bits -> trailing surrogate or 0, low 16bits -> lead surrogate | |
25 UTF32, // full UTF32 code unit / Unicode codepoint | |
26 }; | |
27 | |
28 // Provides JavaScript-specific "macro-assembler" functionality on top of the | 22 // Provides JavaScript-specific "macro-assembler" functionality on top of the |
29 // CodeAssembler. By factoring the JavaScript-isms out of the CodeAssembler, | 23 // CodeAssembler. By factoring the JavaScript-isms out of the CodeAssembler, |
30 // it's possible to add JavaScript-specific useful CodeAssembler "macros" | 24 // it's possible to add JavaScript-specific useful CodeAssembler "macros" |
31 // without modifying files in the compiler directory (and requiring a review | 25 // without modifying files in the compiler directory (and requiring a review |
32 // from a compiler directory OWNER). | 26 // from a compiler directory OWNER). |
33 class CodeStubAssembler : public compiler::CodeAssembler { | 27 class CodeStubAssembler : public compiler::CodeAssembler { |
34 public: | 28 public: |
35 // Create with CallStub linkage. | 29 // Create with CallStub linkage. |
36 // |result_size| specifies the number of results returned by the stub. | 30 // |result_size| specifies the number of results returned by the stub. |
37 // TODO(rmcilroy): move result_size to the CallInterfaceDescriptor. | 31 // TODO(rmcilroy): move result_size to the CallInterfaceDescriptor. |
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
834 Label* bailout); | 828 Label* bailout); |
835 | 829 |
836 static const int kElementLoopUnrollThreshold = 8; | 830 static const int kElementLoopUnrollThreshold = 8; |
837 }; | 831 }; |
838 | 832 |
839 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); | 833 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); |
840 | 834 |
841 } // namespace internal | 835 } // namespace internal |
842 } // namespace v8 | 836 } // namespace v8 |
843 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 837 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
OLD | NEW |