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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
359 // |to_kind| elements. | 359 // |to_kind| elements. |
360 compiler::Node* LoadElementAndPrepareForStore(compiler::Node* array, | 360 compiler::Node* LoadElementAndPrepareForStore(compiler::Node* array, |
361 compiler::Node* offset, | 361 compiler::Node* offset, |
362 ElementsKind from_kind, | 362 ElementsKind from_kind, |
363 ElementsKind to_kind, | 363 ElementsKind to_kind, |
364 Label* if_hole); | 364 Label* if_hole); |
365 | 365 |
366 compiler::Node* CalculateNewElementsCapacity( | 366 compiler::Node* CalculateNewElementsCapacity( |
367 compiler::Node* old_capacity, ParameterMode mode = INTEGER_PARAMETERS); | 367 compiler::Node* old_capacity, ParameterMode mode = INTEGER_PARAMETERS); |
368 | 368 |
369 compiler::Node* CheckAndGrowElementsCapacity(compiler::Node* context, | 369 // Tries to grow the |elements| array of given |object| to store the |key| |
370 compiler::Node* elements, | 370 // or bails out if the growing gap is too big. |
Jakob Kummerow
2016/09/09 10:49:35
nit: add "Returns the new elements." here and belo
| |
371 ElementsKind kind, | 371 compiler::Node* TryGrowElementsCapacity(compiler::Node* object, |
372 compiler::Node* key, | 372 compiler::Node* elements, |
373 Label* fail); | 373 ElementsKind kind, |
374 compiler::Node* key, Label* bailout); | |
375 | |
376 // Tries to grow the |capacity|-length |elements| array of given |object| | |
377 // to store the |key| or bails out if the growing gap is too big. | |
378 compiler::Node* TryGrowElementsCapacity(compiler::Node* object, | |
379 compiler::Node* elements, | |
380 ElementsKind kind, | |
381 compiler::Node* key, | |
382 compiler::Node* capacity, | |
383 ParameterMode mode, Label* bailout); | |
384 | |
385 // Grows elements capacity of given object. Returns new elements. | |
386 compiler::Node* GrowElementsCapacity( | |
387 compiler::Node* object, compiler::Node* elements, ElementsKind from_kind, | |
388 ElementsKind to_kind, compiler::Node* capacity, | |
389 compiler::Node* new_capacity, ParameterMode mode, Label* bailout); | |
374 | 390 |
375 // Allocation site manipulation | 391 // Allocation site manipulation |
376 void InitializeAllocationMemento(compiler::Node* base_allocation, | 392 void InitializeAllocationMemento(compiler::Node* base_allocation, |
377 int base_allocation_size, | 393 int base_allocation_size, |
378 compiler::Node* allocation_site); | 394 compiler::Node* allocation_site); |
379 | 395 |
380 compiler::Node* TruncateTaggedToFloat64(compiler::Node* context, | 396 compiler::Node* TruncateTaggedToFloat64(compiler::Node* context, |
381 compiler::Node* value); | 397 compiler::Node* value); |
382 compiler::Node* TruncateTaggedToWord32(compiler::Node* context, | 398 compiler::Node* TruncateTaggedToWord32(compiler::Node* context, |
383 compiler::Node* value); | 399 compiler::Node* value); |
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
676 compiler::Node* SmiShiftBitsConstant(); | 692 compiler::Node* SmiShiftBitsConstant(); |
677 | 693 |
678 static const int kElementLoopUnrollThreshold = 8; | 694 static const int kElementLoopUnrollThreshold = 8; |
679 }; | 695 }; |
680 | 696 |
681 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); | 697 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); |
682 | 698 |
683 } // namespace internal | 699 } // namespace internal |
684 } // namespace v8 | 700 } // namespace v8 |
685 #endif // V8_CODE_STUB_ASSEMBLER_H_ | 701 #endif // V8_CODE_STUB_ASSEMBLER_H_ |
OLD | NEW |