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" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 | 46 |
47 // Provides JavaScript-specific "macro-assembler" functionality on top of the | 47 // Provides JavaScript-specific "macro-assembler" functionality on top of the |
48 // CodeAssembler. By factoring the JavaScript-isms out of the CodeAssembler, | 48 // CodeAssembler. By factoring the JavaScript-isms out of the CodeAssembler, |
49 // it's possible to add JavaScript-specific useful CodeAssembler "macros" | 49 // it's possible to add JavaScript-specific useful CodeAssembler "macros" |
50 // without modifying files in the compiler directory (and requiring a review | 50 // without modifying files in the compiler directory (and requiring a review |
51 // from a compiler directory OWNER). | 51 // from a compiler directory OWNER). |
52 class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler { | 52 class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler { |
53 public: | 53 public: |
54 typedef compiler::Node Node; | 54 typedef compiler::Node Node; |
55 | 55 |
56 CodeStubAssembler(compiler::CodeAssemblerState* state) | 56 CodeStubAssembler(compiler::CodeAssemblerState* state); |
57 : compiler::CodeAssembler(state) {} | |
58 | 57 |
59 enum AllocationFlag : uint8_t { | 58 enum AllocationFlag : uint8_t { |
60 kNone = 0, | 59 kNone = 0, |
61 kDoubleAlignment = 1, | 60 kDoubleAlignment = 1, |
62 kPretenured = 1 << 1, | 61 kPretenured = 1 << 1, |
63 kAllowLargeObjectAllocation = 1 << 2, | 62 kAllowLargeObjectAllocation = 1 << 2, |
64 }; | 63 }; |
65 | 64 |
66 typedef base::Flags<AllocationFlag> AllocationFlags; | 65 typedef base::Flags<AllocationFlag> AllocationFlags; |
67 | 66 |
(...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1116 | 1115 |
1117 Node* TryToIntptr(Node* key, Label* miss); | 1116 Node* TryToIntptr(Node* key, Label* miss); |
1118 | 1117 |
1119 void BranchIfPrototypesHaveNoElements(Node* receiver_map, | 1118 void BranchIfPrototypesHaveNoElements(Node* receiver_map, |
1120 Label* definitely_no_elements, | 1119 Label* definitely_no_elements, |
1121 Label* possibly_elements); | 1120 Label* possibly_elements); |
1122 | 1121 |
1123 private: | 1122 private: |
1124 friend class CodeStubArguments; | 1123 friend class CodeStubArguments; |
1125 | 1124 |
| 1125 void HandleBreakOnNode(); |
| 1126 |
1126 Node* AllocateRawAligned(Node* size_in_bytes, AllocationFlags flags, | 1127 Node* AllocateRawAligned(Node* size_in_bytes, AllocationFlags flags, |
1127 Node* top_address, Node* limit_address); | 1128 Node* top_address, Node* limit_address); |
1128 Node* AllocateRawUnaligned(Node* size_in_bytes, AllocationFlags flags, | 1129 Node* AllocateRawUnaligned(Node* size_in_bytes, AllocationFlags flags, |
1129 Node* top_adddress, Node* limit_address); | 1130 Node* top_adddress, Node* limit_address); |
1130 // Allocate and return a JSArray of given total size in bytes with header | 1131 // Allocate and return a JSArray of given total size in bytes with header |
1131 // fields initialized. | 1132 // fields initialized. |
1132 Node* AllocateUninitializedJSArray(ElementsKind kind, Node* array_map, | 1133 Node* AllocateUninitializedJSArray(ElementsKind kind, Node* array_map, |
1133 Node* length, Node* allocation_site, | 1134 Node* length, Node* allocation_site, |
1134 Node* size_in_bytes); | 1135 Node* size_in_bytes); |
1135 | 1136 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1208 } | 1209 } |
1209 #else | 1210 #else |
1210 #define CSA_SLOW_ASSERT(csa, x) ((void)0) | 1211 #define CSA_SLOW_ASSERT(csa, x) ((void)0) |
1211 #endif | 1212 #endif |
1212 | 1213 |
1213 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); | 1214 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); |
1214 | 1215 |
1215 } // namespace internal | 1216 } // namespace internal |
1216 } // namespace v8 | 1217 } // namespace v8 |
1217 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 1218 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
OLD | NEW |