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 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1100 compiler::Node* context); | 1100 compiler::Node* context); |
1101 | 1101 |
1102 compiler::Node* Typeof(compiler::Node* value, compiler::Node* context); | 1102 compiler::Node* Typeof(compiler::Node* value, compiler::Node* context); |
1103 | 1103 |
1104 compiler::Node* InstanceOf(compiler::Node* object, compiler::Node* callable, | 1104 compiler::Node* InstanceOf(compiler::Node* object, compiler::Node* callable, |
1105 compiler::Node* context); | 1105 compiler::Node* context); |
1106 | 1106 |
1107 // TypedArray/ArrayBuffer helpers | 1107 // TypedArray/ArrayBuffer helpers |
1108 compiler::Node* IsDetachedBuffer(compiler::Node* buffer); | 1108 compiler::Node* IsDetachedBuffer(compiler::Node* buffer); |
1109 | 1109 |
| 1110 protected: |
| 1111 compiler::Node* ElementOffsetFromIndex(compiler::Node* index, |
| 1112 ElementsKind kind, ParameterMode mode, |
| 1113 int base_size = 0); |
| 1114 |
| 1115 void HandleStoreICHandlerCase(const StoreICParameters* p, |
| 1116 compiler::Node* handler, Label* miss); |
| 1117 |
1110 private: | 1118 private: |
1111 friend class CodeStubArguments; | 1119 friend class CodeStubArguments; |
1112 | 1120 |
1113 enum ElementSupport { kOnlyProperties, kSupportElements }; | 1121 enum ElementSupport { kOnlyProperties, kSupportElements }; |
1114 | 1122 |
1115 void DescriptorLookupLinear(compiler::Node* unique_name, | 1123 void DescriptorLookupLinear(compiler::Node* unique_name, |
1116 compiler::Node* descriptors, compiler::Node* nof, | 1124 compiler::Node* descriptors, compiler::Node* nof, |
1117 Label* if_found, Variable* var_name_index, | 1125 Label* if_found, Variable* var_name_index, |
1118 Label* if_not_found); | 1126 Label* if_not_found); |
1119 compiler::Node* CallGetterIfAccessor(compiler::Node* value, | 1127 compiler::Node* CallGetterIfAccessor(compiler::Node* value, |
(...skipping 21 matching lines...) Expand all Loading... |
1141 compiler::Node* holder, | 1149 compiler::Node* holder, |
1142 Representation representation, | 1150 Representation representation, |
1143 compiler::Node* value, | 1151 compiler::Node* value, |
1144 bool transition_to_field, Label* miss); | 1152 bool transition_to_field, Label* miss); |
1145 | 1153 |
1146 void HandleStoreICSmiHandlerCase(compiler::Node* handler_word, | 1154 void HandleStoreICSmiHandlerCase(compiler::Node* handler_word, |
1147 compiler::Node* holder, | 1155 compiler::Node* holder, |
1148 compiler::Node* value, | 1156 compiler::Node* value, |
1149 bool transition_to_field, Label* miss); | 1157 bool transition_to_field, Label* miss); |
1150 | 1158 |
1151 void HandleStoreICHandlerCase(const StoreICParameters* p, | |
1152 compiler::Node* handler, Label* miss); | |
1153 | |
1154 compiler::Node* TryToIntptr(compiler::Node* key, Label* miss); | 1159 compiler::Node* TryToIntptr(compiler::Node* key, Label* miss); |
1155 void EmitFastElementsBoundsCheck(compiler::Node* object, | 1160 void EmitFastElementsBoundsCheck(compiler::Node* object, |
1156 compiler::Node* elements, | 1161 compiler::Node* elements, |
1157 compiler::Node* intptr_index, | 1162 compiler::Node* intptr_index, |
1158 compiler::Node* is_jsarray_condition, | 1163 compiler::Node* is_jsarray_condition, |
1159 Label* miss); | 1164 Label* miss); |
1160 void EmitElementLoad(compiler::Node* object, compiler::Node* elements, | 1165 void EmitElementLoad(compiler::Node* object, compiler::Node* elements, |
1161 compiler::Node* elements_kind, compiler::Node* key, | 1166 compiler::Node* elements_kind, compiler::Node* key, |
1162 compiler::Node* is_jsarray_condition, Label* if_hole, | 1167 compiler::Node* is_jsarray_condition, Label* if_hole, |
1163 Label* rebox_double, Variable* var_double_value, | 1168 Label* rebox_double, Variable* var_double_value, |
1164 Label* unimplemented_elements_kind, Label* out_of_bounds, | 1169 Label* unimplemented_elements_kind, Label* out_of_bounds, |
1165 Label* miss); | 1170 Label* miss); |
1166 void BranchIfPrototypesHaveNoElements(compiler::Node* receiver_map, | 1171 void BranchIfPrototypesHaveNoElements(compiler::Node* receiver_map, |
1167 Label* definitely_no_elements, | 1172 Label* definitely_no_elements, |
1168 Label* possibly_elements); | 1173 Label* possibly_elements); |
1169 | 1174 |
1170 compiler::Node* ElementOffsetFromIndex(compiler::Node* index, | |
1171 ElementsKind kind, ParameterMode mode, | |
1172 int base_size = 0); | |
1173 | |
1174 compiler::Node* AllocateRawAligned(compiler::Node* size_in_bytes, | 1175 compiler::Node* AllocateRawAligned(compiler::Node* size_in_bytes, |
1175 AllocationFlags flags, | 1176 AllocationFlags flags, |
1176 compiler::Node* top_address, | 1177 compiler::Node* top_address, |
1177 compiler::Node* limit_address); | 1178 compiler::Node* limit_address); |
1178 compiler::Node* AllocateRawUnaligned(compiler::Node* size_in_bytes, | 1179 compiler::Node* AllocateRawUnaligned(compiler::Node* size_in_bytes, |
1179 AllocationFlags flags, | 1180 AllocationFlags flags, |
1180 compiler::Node* top_adddress, | 1181 compiler::Node* top_adddress, |
1181 compiler::Node* limit_address); | 1182 compiler::Node* limit_address); |
1182 // Allocate and return a JSArray of given total size in bytes with header | 1183 // Allocate and return a JSArray of given total size in bytes with header |
1183 // fields initialized. | 1184 // fields initialized. |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1265 } | 1266 } |
1266 #else | 1267 #else |
1267 #define CSA_SLOW_ASSERT(x) | 1268 #define CSA_SLOW_ASSERT(x) |
1268 #endif | 1269 #endif |
1269 | 1270 |
1270 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); | 1271 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); |
1271 | 1272 |
1272 } // namespace internal | 1273 } // namespace internal |
1273 } // namespace v8 | 1274 } // namespace v8 |
1274 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 1275 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
OLD | NEW |