Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(365)

Side by Side Diff: src/code-stub-assembler.h

Issue 2324863002: [stubs] Factor CSA::GrowElementsCapacity() out of existing code. (Closed)
Patch Set: Addressing comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/builtins/builtins-internal.cc ('k') | src/code-stub-assembler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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. Returns new elements.
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. Returns
378 // new elements.
379 compiler::Node* TryGrowElementsCapacity(compiler::Node* object,
380 compiler::Node* elements,
381 ElementsKind kind,
382 compiler::Node* key,
383 compiler::Node* capacity,
384 ParameterMode mode, Label* bailout);
385
386 // Grows elements capacity of given object. Returns new elements.
387 compiler::Node* GrowElementsCapacity(
388 compiler::Node* object, compiler::Node* elements, ElementsKind from_kind,
389 ElementsKind to_kind, compiler::Node* capacity,
390 compiler::Node* new_capacity, ParameterMode mode, Label* bailout);
374 391
375 // Allocation site manipulation 392 // Allocation site manipulation
376 void InitializeAllocationMemento(compiler::Node* base_allocation, 393 void InitializeAllocationMemento(compiler::Node* base_allocation,
377 int base_allocation_size, 394 int base_allocation_size,
378 compiler::Node* allocation_site); 395 compiler::Node* allocation_site);
379 396
380 compiler::Node* TruncateTaggedToFloat64(compiler::Node* context, 397 compiler::Node* TruncateTaggedToFloat64(compiler::Node* context,
381 compiler::Node* value); 398 compiler::Node* value);
382 compiler::Node* TruncateTaggedToWord32(compiler::Node* context, 399 compiler::Node* TruncateTaggedToWord32(compiler::Node* context,
383 compiler::Node* value); 400 compiler::Node* value);
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 compiler::Node* SmiShiftBitsConstant(); 693 compiler::Node* SmiShiftBitsConstant();
677 694
678 static const int kElementLoopUnrollThreshold = 8; 695 static const int kElementLoopUnrollThreshold = 8;
679 }; 696 };
680 697
681 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags); 698 DEFINE_OPERATORS_FOR_FLAGS(CodeStubAssembler::AllocationFlags);
682 699
683 } // namespace internal 700 } // namespace internal
684 } // namespace v8 701 } // namespace v8
685 #endif // V8_CODE_STUB_ASSEMBLER_H_ 702 #endif // V8_CODE_STUB_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « src/builtins/builtins-internal.cc ('k') | src/code-stub-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698