| 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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 compiler::Node* length); | 280 compiler::Node* length); |
| 281 // Allocated an JSArray | 281 // Allocated an JSArray |
| 282 compiler::Node* AllocateJSArray(ElementsKind kind, compiler::Node* array_map, | 282 compiler::Node* AllocateJSArray(ElementsKind kind, compiler::Node* array_map, |
| 283 compiler::Node* capacity, | 283 compiler::Node* capacity, |
| 284 compiler::Node* length, | 284 compiler::Node* length, |
| 285 compiler::Node* allocation_site = nullptr, | 285 compiler::Node* allocation_site = nullptr, |
| 286 ParameterMode mode = INTEGER_PARAMETERS); | 286 ParameterMode mode = INTEGER_PARAMETERS); |
| 287 | 287 |
| 288 compiler::Node* AllocateFixedArray(ElementsKind kind, | 288 compiler::Node* AllocateFixedArray(ElementsKind kind, |
| 289 compiler::Node* capacity, | 289 compiler::Node* capacity, |
| 290 ParameterMode mode = INTEGER_PARAMETERS); | 290 ParameterMode mode = INTEGER_PARAMETERS, |
| 291 AllocationFlags flags = kNone); |
| 291 | 292 |
| 292 void FillFixedArrayWithHole(ElementsKind kind, compiler::Node* array, | 293 void FillFixedArrayWithHole(ElementsKind kind, compiler::Node* array, |
| 293 compiler::Node* from_index, | 294 compiler::Node* from_index, |
| 294 compiler::Node* to_index, | 295 compiler::Node* to_index, |
| 295 ParameterMode mode = INTEGER_PARAMETERS); | 296 ParameterMode mode = INTEGER_PARAMETERS); |
| 296 | 297 |
| 297 void CopyFixedArrayElements( | 298 void CopyFixedArrayElements( |
| 298 ElementsKind kind, compiler::Node* from_array, compiler::Node* to_array, | 299 ElementsKind kind, compiler::Node* from_array, compiler::Node* to_array, |
| 299 compiler::Node* element_count, | 300 compiler::Node* element_count, |
| 300 WriteBarrierMode barrier_mode = UPDATE_WRITE_BARRIER, | 301 WriteBarrierMode barrier_mode = UPDATE_WRITE_BARRIER, |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 void CheckEnumCache(compiler::Node* receiver, | 542 void CheckEnumCache(compiler::Node* receiver, |
| 542 CodeStubAssembler::Label* use_cache, | 543 CodeStubAssembler::Label* use_cache, |
| 543 CodeStubAssembler::Label* use_runtime); | 544 CodeStubAssembler::Label* use_runtime); |
| 544 | 545 |
| 545 // Create a new weak cell with a specified value and install it into a | 546 // Create a new weak cell with a specified value and install it into a |
| 546 // feedback vector. | 547 // feedback vector. |
| 547 compiler::Node* CreateWeakCellInFeedbackVector( | 548 compiler::Node* CreateWeakCellInFeedbackVector( |
| 548 compiler::Node* feedback_vector, compiler::Node* slot, | 549 compiler::Node* feedback_vector, compiler::Node* slot, |
| 549 compiler::Node* value); | 550 compiler::Node* value); |
| 550 | 551 |
| 552 compiler::Node* GetFixedAarrayAllocationSize(compiler::Node* element_count, |
| 553 ElementsKind kind, |
| 554 ParameterMode mode) { |
| 555 return ElementOffsetFromIndex(element_count, kind, mode, |
| 556 FixedArray::kHeaderSize); |
| 557 } |
| 558 |
| 551 private: | 559 private: |
| 552 enum ElementSupport { kOnlyProperties, kSupportElements }; | 560 enum ElementSupport { kOnlyProperties, kSupportElements }; |
| 553 | 561 |
| 554 void HandleLoadICHandlerCase( | 562 void HandleLoadICHandlerCase( |
| 555 const LoadICParameters* p, compiler::Node* handler, Label* miss, | 563 const LoadICParameters* p, compiler::Node* handler, Label* miss, |
| 556 ElementSupport support_elements = kOnlyProperties); | 564 ElementSupport support_elements = kOnlyProperties); |
| 557 void EmitBoundsCheck(compiler::Node* object, compiler::Node* elements, | 565 void EmitBoundsCheck(compiler::Node* object, compiler::Node* elements, |
| 558 compiler::Node* intptr_key, compiler::Node* is_jsarray, | 566 compiler::Node* intptr_key, compiler::Node* is_jsarray, |
| 559 Label* miss); | 567 Label* miss); |
| 560 void EmitElementLoad(compiler::Node* object, compiler::Node* elements, | 568 void EmitElementLoad(compiler::Node* object, compiler::Node* elements, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 574 AllocationFlags flags, | 582 AllocationFlags flags, |
| 575 compiler::Node* top_adddress, | 583 compiler::Node* top_adddress, |
| 576 compiler::Node* limit_address); | 584 compiler::Node* limit_address); |
| 577 | 585 |
| 578 static const int kElementLoopUnrollThreshold = 8; | 586 static const int kElementLoopUnrollThreshold = 8; |
| 579 }; | 587 }; |
| 580 | 588 |
| 581 } // namespace internal | 589 } // namespace internal |
| 582 } // namespace v8 | 590 } // namespace v8 |
| 583 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 591 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
| OLD | NEW |