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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 // Load the instance type of a map. | 223 // Load the instance type of a map. |
224 compiler::Node* LoadMapInstanceType(compiler::Node* map); | 224 compiler::Node* LoadMapInstanceType(compiler::Node* map); |
225 // Load the instance descriptors of a map. | 225 // Load the instance descriptors of a map. |
226 compiler::Node* LoadMapDescriptors(compiler::Node* map); | 226 compiler::Node* LoadMapDescriptors(compiler::Node* map); |
227 // Load the prototype of a map. | 227 // Load the prototype of a map. |
228 compiler::Node* LoadMapPrototype(compiler::Node* map); | 228 compiler::Node* LoadMapPrototype(compiler::Node* map); |
229 // Load the instance size of a Map. | 229 // Load the instance size of a Map. |
230 compiler::Node* LoadMapInstanceSize(compiler::Node* map); | 230 compiler::Node* LoadMapInstanceSize(compiler::Node* map); |
231 // Load the inobject properties count of a Map (valid only for JSObjects). | 231 // Load the inobject properties count of a Map (valid only for JSObjects). |
232 compiler::Node* LoadMapInobjectProperties(compiler::Node* map); | 232 compiler::Node* LoadMapInobjectProperties(compiler::Node* map); |
| 233 // Load the constructor function index of a Map (only for primitive maps). |
| 234 compiler::Node* LoadMapConstructorFunctionIndex(compiler::Node* map); |
233 // Load the constructor of a Map (equivalent to Map::GetConstructor()). | 235 // Load the constructor of a Map (equivalent to Map::GetConstructor()). |
234 compiler::Node* LoadMapConstructor(compiler::Node* map); | 236 compiler::Node* LoadMapConstructor(compiler::Node* map); |
235 | 237 |
236 // Load the hash field of a name as an uint32 value. | 238 // Load the hash field of a name as an uint32 value. |
237 compiler::Node* LoadNameHashField(compiler::Node* name); | 239 compiler::Node* LoadNameHashField(compiler::Node* name); |
238 // Load the hash value of a name as an uint32 value. | 240 // Load the hash value of a name as an uint32 value. |
239 // If {if_hash_not_computed} label is specified then it also checks if | 241 // If {if_hash_not_computed} label is specified then it also checks if |
240 // hash is actually computed. | 242 // hash is actually computed. |
241 compiler::Node* LoadNameHash(compiler::Node* name, | 243 compiler::Node* LoadNameHash(compiler::Node* name, |
242 Label* if_hash_not_computed = nullptr); | 244 Label* if_hash_not_computed = nullptr); |
243 | 245 |
244 // Load length field of a String object. | 246 // Load length field of a String object. |
245 compiler::Node* LoadStringLength(compiler::Node* object); | 247 compiler::Node* LoadStringLength(compiler::Node* object); |
246 // Load value field of a JSValue object. | 248 // Load value field of a JSValue object. |
247 compiler::Node* LoadJSValueValue(compiler::Node* object); | 249 compiler::Node* LoadJSValueValue(compiler::Node* object); |
248 // Load value field of a WeakCell object. | 250 // Load value field of a WeakCell object. |
249 compiler::Node* LoadWeakCellValue(compiler::Node* weak_cell, | 251 compiler::Node* LoadWeakCellValue(compiler::Node* weak_cell, |
250 Label* if_cleared = nullptr); | 252 Label* if_cleared = nullptr); |
251 | 253 |
252 // Load an array element from a FixedArray. | 254 // Load an array element from a FixedArray. |
253 compiler::Node* LoadFixedArrayElement( | 255 compiler::Node* LoadFixedArrayElement( |
254 compiler::Node* object, compiler::Node* int32_index, | 256 compiler::Node* object, compiler::Node* index, int additional_offset = 0, |
255 int additional_offset = 0, | |
256 ParameterMode parameter_mode = INTEGER_PARAMETERS); | 257 ParameterMode parameter_mode = INTEGER_PARAMETERS); |
257 // Load an array element from a FixedArray, untag it and return it as Word32. | 258 // Load an array element from a FixedArray, untag it and return it as Word32. |
258 compiler::Node* LoadAndUntagToWord32FixedArrayElement( | 259 compiler::Node* LoadAndUntagToWord32FixedArrayElement( |
259 compiler::Node* object, compiler::Node* int32_index, | 260 compiler::Node* object, compiler::Node* index, int additional_offset = 0, |
260 int additional_offset = 0, | |
261 ParameterMode parameter_mode = INTEGER_PARAMETERS); | 261 ParameterMode parameter_mode = INTEGER_PARAMETERS); |
262 // Load an array element from a FixedDoubleArray. | 262 // Load an array element from a FixedDoubleArray. |
263 compiler::Node* LoadFixedDoubleArrayElement( | 263 compiler::Node* LoadFixedDoubleArrayElement( |
264 compiler::Node* object, compiler::Node* int32_index, | 264 compiler::Node* object, compiler::Node* index, MachineType machine_type, |
265 MachineType machine_type, int additional_offset = 0, | 265 int additional_offset = 0, |
266 ParameterMode parameter_mode = INTEGER_PARAMETERS); | 266 ParameterMode parameter_mode = INTEGER_PARAMETERS); |
267 | 267 |
268 // Context manipulation | 268 // Context manipulation |
269 compiler::Node* LoadNativeContext(compiler::Node* context); | 269 compiler::Node* LoadNativeContext(compiler::Node* context); |
270 | 270 |
271 compiler::Node* LoadJSArrayElementsMap(ElementsKind kind, | 271 compiler::Node* LoadJSArrayElementsMap(ElementsKind kind, |
272 compiler::Node* native_context); | 272 compiler::Node* native_context); |
273 | 273 |
274 // Store the floating point value of a HeapNumber. | 274 // Store the floating point value of a HeapNumber. |
275 compiler::Node* StoreHeapNumberValue(compiler::Node* object, | 275 compiler::Node* StoreHeapNumberValue(compiler::Node* object, |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 compiler::Node* SmiShiftBitsConstant(); | 644 compiler::Node* SmiShiftBitsConstant(); |
645 | 645 |
646 static const int kElementLoopUnrollThreshold = 8; | 646 static const int kElementLoopUnrollThreshold = 8; |
647 }; | 647 }; |
648 | 648 |
649 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); | 649 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); |
650 | 650 |
651 } // namespace internal | 651 } // namespace internal |
652 } // namespace v8 | 652 } // namespace v8 |
653 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 653 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
OLD | NEW |