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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 compiler::Node* value); | 213 compiler::Node* value); |
214 // Store a field to an object on the heap. | 214 // Store a field to an object on the heap. |
215 compiler::Node* StoreObjectField( | 215 compiler::Node* StoreObjectField( |
216 compiler::Node* object, int offset, compiler::Node* value); | 216 compiler::Node* object, int offset, compiler::Node* value); |
217 compiler::Node* StoreObjectFieldNoWriteBarrier( | 217 compiler::Node* StoreObjectFieldNoWriteBarrier( |
218 compiler::Node* object, int offset, compiler::Node* value, | 218 compiler::Node* object, int offset, compiler::Node* value, |
219 MachineRepresentation rep = MachineRepresentation::kTagged); | 219 MachineRepresentation rep = MachineRepresentation::kTagged); |
220 // Store the Map of an HeapObject. | 220 // Store the Map of an HeapObject. |
221 compiler::Node* StoreMapNoWriteBarrier(compiler::Node* object, | 221 compiler::Node* StoreMapNoWriteBarrier(compiler::Node* object, |
222 compiler::Node* map); | 222 compiler::Node* map); |
| 223 compiler::Node* StoreObjectFieldRoot(compiler::Node* object, int offset, |
| 224 Heap::RootListIndex root); |
223 // Store an array element to a FixedArray. | 225 // Store an array element to a FixedArray. |
224 compiler::Node* StoreFixedArrayElement( | 226 compiler::Node* StoreFixedArrayElement( |
225 compiler::Node* object, compiler::Node* index, compiler::Node* value, | 227 compiler::Node* object, compiler::Node* index, compiler::Node* value, |
226 WriteBarrierMode barrier_mode = UPDATE_WRITE_BARRIER, | 228 WriteBarrierMode barrier_mode = UPDATE_WRITE_BARRIER, |
227 ParameterMode parameter_mode = INTEGER_PARAMETERS); | 229 ParameterMode parameter_mode = INTEGER_PARAMETERS); |
228 | 230 |
229 compiler::Node* StoreFixedDoubleArrayElement( | 231 compiler::Node* StoreFixedDoubleArrayElement( |
230 compiler::Node* object, compiler::Node* index, compiler::Node* value, | 232 compiler::Node* object, compiler::Node* index, compiler::Node* value, |
231 ParameterMode parameter_mode = INTEGER_PARAMETERS); | 233 ParameterMode parameter_mode = INTEGER_PARAMETERS); |
232 | 234 |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 | 480 |
479 // Get the enumerable length from |map| and return the result as a Smi. | 481 // Get the enumerable length from |map| and return the result as a Smi. |
480 compiler::Node* EnumLength(compiler::Node* map); | 482 compiler::Node* EnumLength(compiler::Node* map); |
481 | 483 |
482 // Check the cache validity for |receiver|. Branch to |use_cache| if | 484 // Check the cache validity for |receiver|. Branch to |use_cache| if |
483 // the cache is valid, otherwise branch to |use_runtime|. | 485 // the cache is valid, otherwise branch to |use_runtime|. |
484 void CheckEnumCache(compiler::Node* receiver, | 486 void CheckEnumCache(compiler::Node* receiver, |
485 CodeStubAssembler::Label* use_cache, | 487 CodeStubAssembler::Label* use_cache, |
486 CodeStubAssembler::Label* use_runtime); | 488 CodeStubAssembler::Label* use_runtime); |
487 | 489 |
| 490 // Create a new weak cell with a specified value and install it into a |
| 491 // feedback vector. |
| 492 compiler::Node* CreateWeakCellInFeedbackVector( |
| 493 compiler::Node* feedback_vector, compiler::Node* slot, |
| 494 compiler::Node* value); |
| 495 |
488 private: | 496 private: |
489 compiler::Node* ElementOffsetFromIndex(compiler::Node* index, | 497 compiler::Node* ElementOffsetFromIndex(compiler::Node* index, |
490 ElementsKind kind, ParameterMode mode, | 498 ElementsKind kind, ParameterMode mode, |
491 int base_size = 0); | 499 int base_size = 0); |
492 | 500 |
493 compiler::Node* AllocateRawAligned(compiler::Node* size_in_bytes, | 501 compiler::Node* AllocateRawAligned(compiler::Node* size_in_bytes, |
494 AllocationFlags flags, | 502 AllocationFlags flags, |
495 compiler::Node* top_address, | 503 compiler::Node* top_address, |
496 compiler::Node* limit_address); | 504 compiler::Node* limit_address); |
497 compiler::Node* AllocateRawUnaligned(compiler::Node* size_in_bytes, | 505 compiler::Node* AllocateRawUnaligned(compiler::Node* size_in_bytes, |
498 AllocationFlags flags, | 506 AllocationFlags flags, |
499 compiler::Node* top_adddress, | 507 compiler::Node* top_adddress, |
500 compiler::Node* limit_address); | 508 compiler::Node* limit_address); |
501 | 509 |
502 static const int kElementLoopUnrollThreshold = 8; | 510 static const int kElementLoopUnrollThreshold = 8; |
503 }; | 511 }; |
504 | 512 |
505 } // namespace internal | 513 } // namespace internal |
506 } // namespace v8 | 514 } // namespace v8 |
507 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 515 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
OLD | NEW |