| 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 "src/compiler/code-assembler.h" | 8 #include "src/compiler/code-assembler.h" |
| 9 #include "src/objects.h" | 9 #include "src/objects.h" |
| 10 | 10 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 compiler::Node* SmiAddWithOverflow(compiler::Node* a, compiler::Node* b); | 61 compiler::Node* SmiAddWithOverflow(compiler::Node* a, compiler::Node* b); |
| 62 compiler::Node* SmiSub(compiler::Node* a, compiler::Node* b); | 62 compiler::Node* SmiSub(compiler::Node* a, compiler::Node* b); |
| 63 compiler::Node* SmiSubWithOverflow(compiler::Node* a, compiler::Node* b); | 63 compiler::Node* SmiSubWithOverflow(compiler::Node* a, compiler::Node* b); |
| 64 compiler::Node* SmiEqual(compiler::Node* a, compiler::Node* b); | 64 compiler::Node* SmiEqual(compiler::Node* a, compiler::Node* b); |
| 65 compiler::Node* SmiAboveOrEqual(compiler::Node* a, compiler::Node* b); | 65 compiler::Node* SmiAboveOrEqual(compiler::Node* a, compiler::Node* b); |
| 66 compiler::Node* SmiLessThan(compiler::Node* a, compiler::Node* b); | 66 compiler::Node* SmiLessThan(compiler::Node* a, compiler::Node* b); |
| 67 compiler::Node* SmiLessThanOrEqual(compiler::Node* a, compiler::Node* b); | 67 compiler::Node* SmiLessThanOrEqual(compiler::Node* a, compiler::Node* b); |
| 68 compiler::Node* SmiMin(compiler::Node* a, compiler::Node* b); | 68 compiler::Node* SmiMin(compiler::Node* a, compiler::Node* b); |
| 69 | 69 |
| 70 // Allocate an object of the given size. | 70 // Allocate an object of the given size. |
| 71 compiler::Node* Allocate(compiler::Node* size, AllocationFlags flags = kNone); |
| 71 compiler::Node* Allocate(int size, AllocationFlags flags = kNone); | 72 compiler::Node* Allocate(int size, AllocationFlags flags = kNone); |
| 72 compiler::Node* InnerAllocate(compiler::Node* previous, int offset); | 73 compiler::Node* InnerAllocate(compiler::Node* previous, int offset); |
| 73 | 74 |
| 74 // Check a value for smi-ness | 75 // Check a value for smi-ness |
| 75 compiler::Node* WordIsSmi(compiler::Node* a); | 76 compiler::Node* WordIsSmi(compiler::Node* a); |
| 76 // Check that the value is a positive smi. | 77 // Check that the value is a positive smi. |
| 77 compiler::Node* WordIsPositiveSmi(compiler::Node* a); | 78 compiler::Node* WordIsPositiveSmi(compiler::Node* a); |
| 78 | 79 |
| 79 void BranchIfSmiLessThan(compiler::Node* a, compiler::Node* b, Label* if_true, | 80 void BranchIfSmiLessThan(compiler::Node* a, compiler::Node* b, Label* if_true, |
| 80 Label* if_false) { | 81 Label* if_false) { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 // Load the instance type of a map. | 117 // Load the instance type of a map. |
| 117 compiler::Node* LoadMapInstanceType(compiler::Node* map); | 118 compiler::Node* LoadMapInstanceType(compiler::Node* map); |
| 118 // Load the instance descriptors of a map. | 119 // Load the instance descriptors of a map. |
| 119 compiler::Node* LoadMapDescriptors(compiler::Node* map); | 120 compiler::Node* LoadMapDescriptors(compiler::Node* map); |
| 120 | 121 |
| 121 // Load the hash field of a name. | 122 // Load the hash field of a name. |
| 122 compiler::Node* LoadNameHash(compiler::Node* name); | 123 compiler::Node* LoadNameHash(compiler::Node* name); |
| 123 // Load the instance size of a Map. | 124 // Load the instance size of a Map. |
| 124 compiler::Node* LoadMapInstanceSize(compiler::Node* map); | 125 compiler::Node* LoadMapInstanceSize(compiler::Node* map); |
| 125 | 126 |
| 127 compiler::Node* AllocateUninitializedFixedArray(compiler::Node* length); |
| 128 |
| 126 // Load an array element from a FixedArray. | 129 // Load an array element from a FixedArray. |
| 127 compiler::Node* LoadFixedArrayElementInt32Index(compiler::Node* object, | 130 compiler::Node* LoadFixedArrayElementInt32Index(compiler::Node* object, |
| 128 compiler::Node* int32_index, | 131 compiler::Node* int32_index, |
| 129 int additional_offset = 0); | 132 int additional_offset = 0); |
| 130 compiler::Node* LoadFixedArrayElementSmiIndex(compiler::Node* object, | 133 compiler::Node* LoadFixedArrayElementSmiIndex(compiler::Node* object, |
| 131 compiler::Node* smi_index, | 134 compiler::Node* smi_index, |
| 132 int additional_offset = 0); | 135 int additional_offset = 0); |
| 133 compiler::Node* LoadFixedArrayElementConstantIndex(compiler::Node* object, | 136 compiler::Node* LoadFixedArrayElementConstantIndex(compiler::Node* object, |
| 134 int index); | 137 int index); |
| 135 | 138 |
| 136 // Store the floating point value of a HeapNumber. | 139 // Store the floating point value of a HeapNumber. |
| 137 compiler::Node* StoreHeapNumberValue(compiler::Node* object, | 140 compiler::Node* StoreHeapNumberValue(compiler::Node* object, |
| 138 compiler::Node* value); | 141 compiler::Node* value); |
| 139 // Store a field to an object on the heap. | 142 // Store a field to an object on the heap. |
| 143 compiler::Node* StoreObjectField( |
| 144 compiler::Node* object, int offset, compiler::Node* value); |
| 140 compiler::Node* StoreObjectFieldNoWriteBarrier( | 145 compiler::Node* StoreObjectFieldNoWriteBarrier( |
| 141 compiler::Node* object, int offset, compiler::Node* value, | 146 compiler::Node* object, int offset, compiler::Node* value, |
| 142 MachineRepresentation rep = MachineRepresentation::kTagged); | 147 MachineRepresentation rep = MachineRepresentation::kTagged); |
| 143 // Store the Map of an HeapObject. | 148 // Store the Map of an HeapObject. |
| 144 compiler::Node* StoreMapNoWriteBarrier(compiler::Node* object, | 149 compiler::Node* StoreMapNoWriteBarrier(compiler::Node* object, |
| 145 compiler::Node* map); | 150 compiler::Node* map); |
| 146 // Store an array element to a FixedArray. | 151 // Store an array element to a FixedArray. |
| 147 compiler::Node* StoreFixedArrayElementInt32Index(compiler::Node* object, | 152 compiler::Node* StoreFixedArrayElementInt32Index(compiler::Node* object, |
| 148 compiler::Node* index, | 153 compiler::Node* index, |
| 149 compiler::Node* value); | 154 compiler::Node* value); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 compiler::Node* AllocateRawUnaligned(compiler::Node* size_in_bytes, | 209 compiler::Node* AllocateRawUnaligned(compiler::Node* size_in_bytes, |
| 205 AllocationFlags flags, | 210 AllocationFlags flags, |
| 206 compiler::Node* top_adddress, | 211 compiler::Node* top_adddress, |
| 207 compiler::Node* limit_address); | 212 compiler::Node* limit_address); |
| 208 }; | 213 }; |
| 209 | 214 |
| 210 } // namespace internal | 215 } // namespace internal |
| 211 } // namespace v8 | 216 } // namespace v8 |
| 212 | 217 |
| 213 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 218 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
| OLD | NEW |