| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 return value; | 65 return value; |
| 66 } | 66 } |
| 67 | 67 |
| 68 compiler::Node* TagParameter(compiler::Node* value, ParameterMode mode) { | 68 compiler::Node* TagParameter(compiler::Node* value, ParameterMode mode) { |
| 69 if (mode != SMI_PARAMETERS) value = SmiTag(value); | 69 if (mode != SMI_PARAMETERS) value = SmiTag(value); |
| 70 return value; | 70 return value; |
| 71 } | 71 } |
| 72 | 72 |
| 73 compiler::Node* BooleanMapConstant(); | 73 compiler::Node* BooleanMapConstant(); |
| 74 compiler::Node* EmptyStringConstant(); | 74 compiler::Node* EmptyStringConstant(); |
| 75 compiler::Node* FixedArrayMapConstant(); |
| 76 compiler::Node* FixedCowArrayMapConstant(); |
| 77 compiler::Node* FixedDoubleArrayMapConstant(); |
| 75 compiler::Node* HeapNumberMapConstant(); | 78 compiler::Node* HeapNumberMapConstant(); |
| 76 compiler::Node* NoContextConstant(); | 79 compiler::Node* NoContextConstant(); |
| 77 compiler::Node* NanConstant(); | 80 compiler::Node* NanConstant(); |
| 78 compiler::Node* NullConstant(); | 81 compiler::Node* NullConstant(); |
| 79 compiler::Node* MinusZeroConstant(); | 82 compiler::Node* MinusZeroConstant(); |
| 80 compiler::Node* UndefinedConstant(); | 83 compiler::Node* UndefinedConstant(); |
| 81 compiler::Node* TheHoleConstant(); | 84 compiler::Node* TheHoleConstant(); |
| 82 compiler::Node* HashSeed(); | 85 compiler::Node* HashSeed(); |
| 83 compiler::Node* StaleRegisterConstant(); | 86 compiler::Node* StaleRegisterConstant(); |
| 84 | 87 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 // Load the Map of an HeapObject. | 206 // Load the Map of an HeapObject. |
| 204 compiler::Node* LoadMap(compiler::Node* object); | 207 compiler::Node* LoadMap(compiler::Node* object); |
| 205 // Load the instance type of an HeapObject. | 208 // Load the instance type of an HeapObject. |
| 206 compiler::Node* LoadInstanceType(compiler::Node* object); | 209 compiler::Node* LoadInstanceType(compiler::Node* object); |
| 207 // Checks that given heap object has given instance type. | 210 // Checks that given heap object has given instance type. |
| 208 void AssertInstanceType(compiler::Node* object, InstanceType instance_type); | 211 void AssertInstanceType(compiler::Node* object, InstanceType instance_type); |
| 209 // Load the properties backing store of a JSObject. | 212 // Load the properties backing store of a JSObject. |
| 210 compiler::Node* LoadProperties(compiler::Node* object); | 213 compiler::Node* LoadProperties(compiler::Node* object); |
| 211 // Load the elements backing store of a JSObject. | 214 // Load the elements backing store of a JSObject. |
| 212 compiler::Node* LoadElements(compiler::Node* object); | 215 compiler::Node* LoadElements(compiler::Node* object); |
| 216 // Load the length of a JSArray instance. |
| 217 compiler::Node* LoadJSArrayLength(compiler::Node* array); |
| 213 // Load the length of a fixed array base instance. | 218 // Load the length of a fixed array base instance. |
| 214 compiler::Node* LoadFixedArrayBaseLength(compiler::Node* array); | 219 compiler::Node* LoadFixedArrayBaseLength(compiler::Node* array); |
| 215 // Load the length of a fixed array base instance. | 220 // Load the length of a fixed array base instance. |
| 216 compiler::Node* LoadAndUntagFixedArrayBaseLength(compiler::Node* array); | 221 compiler::Node* LoadAndUntagFixedArrayBaseLength(compiler::Node* array); |
| 217 // Load the bit field of a Map. | 222 // Load the bit field of a Map. |
| 218 compiler::Node* LoadMapBitField(compiler::Node* map); | 223 compiler::Node* LoadMapBitField(compiler::Node* map); |
| 219 // Load bit field 2 of a map. | 224 // Load bit field 2 of a map. |
| 220 compiler::Node* LoadMapBitField2(compiler::Node* map); | 225 compiler::Node* LoadMapBitField2(compiler::Node* map); |
| 221 // Load bit field 3 of a map. | 226 // Load bit field 3 of a map. |
| 222 compiler::Node* LoadMapBitField3(compiler::Node* map); | 227 compiler::Node* LoadMapBitField3(compiler::Node* map); |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 compiler::Node* AllocateHeapNumberWithValue(compiler::Node* value, | 315 compiler::Node* AllocateHeapNumberWithValue(compiler::Node* value, |
| 311 MutableMode mode = IMMUTABLE); | 316 MutableMode mode = IMMUTABLE); |
| 312 // Allocate a SeqOneByteString with the given length. | 317 // Allocate a SeqOneByteString with the given length. |
| 313 compiler::Node* AllocateSeqOneByteString(int length); | 318 compiler::Node* AllocateSeqOneByteString(int length); |
| 314 compiler::Node* AllocateSeqOneByteString(compiler::Node* context, | 319 compiler::Node* AllocateSeqOneByteString(compiler::Node* context, |
| 315 compiler::Node* length); | 320 compiler::Node* length); |
| 316 // Allocate a SeqTwoByteString with the given length. | 321 // Allocate a SeqTwoByteString with the given length. |
| 317 compiler::Node* AllocateSeqTwoByteString(int length); | 322 compiler::Node* AllocateSeqTwoByteString(int length); |
| 318 compiler::Node* AllocateSeqTwoByteString(compiler::Node* context, | 323 compiler::Node* AllocateSeqTwoByteString(compiler::Node* context, |
| 319 compiler::Node* length); | 324 compiler::Node* length); |
| 320 // Allocated an JSArray | 325 // Allocate a JSArray without elements and initialize the header fields. |
| 326 compiler::Node* AllocateUninitializedJSArrayWithoutElements( |
| 327 ElementsKind kind, compiler::Node* array_map, compiler::Node* length, |
| 328 compiler::Node* allocation_site); |
| 329 // Allocate and return a JSArray and if capacity is not null, its elements. |
| 330 // Also initializes JSArray header fields. |
| 331 std::pair<compiler::Node*, compiler::Node*> AllocateUninitializedJSArray( |
| 332 ElementsKind kind, compiler::Node* array_map, compiler::Node* length, |
| 333 compiler::Node* allocation_site, compiler::Node* capacity = nullptr, |
| 334 ParameterMode capacity_mode = INTEGER_PARAMETERS); |
| 335 // Allocate a JSArray and fill elements with zero. |
| 321 compiler::Node* AllocateJSArray(ElementsKind kind, compiler::Node* array_map, | 336 compiler::Node* AllocateJSArray(ElementsKind kind, compiler::Node* array_map, |
| 322 compiler::Node* capacity, | 337 compiler::Node* capacity, |
| 323 compiler::Node* length, | 338 compiler::Node* length, |
| 324 compiler::Node* allocation_site = nullptr, | 339 compiler::Node* allocation_site = nullptr, |
| 325 ParameterMode mode = INTEGER_PARAMETERS); | 340 ParameterMode mode = INTEGER_PARAMETERS); |
| 326 | 341 |
| 327 compiler::Node* AllocateFixedArray(ElementsKind kind, | 342 compiler::Node* AllocateFixedArray(ElementsKind kind, |
| 328 compiler::Node* capacity, | 343 compiler::Node* capacity, |
| 329 ParameterMode mode = INTEGER_PARAMETERS, | 344 ParameterMode mode = INTEGER_PARAMETERS, |
| 330 AllocationFlags flags = kNone); | 345 AllocationFlags flags = kNone); |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 Label* bailout); | 749 Label* bailout); |
| 735 | 750 |
| 736 static const int kElementLoopUnrollThreshold = 8; | 751 static const int kElementLoopUnrollThreshold = 8; |
| 737 }; | 752 }; |
| 738 | 753 |
| 739 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); | 754 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); |
| 740 | 755 |
| 741 } // namespace internal | 756 } // namespace internal |
| 742 } // namespace v8 | 757 } // namespace v8 |
| 743 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 758 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
| OLD | NEW |