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

Unified Diff: src/code-stub-assembler.h

Issue 2321993002: [stubs] CSA::CopyFixedArrayElements() is now able to convert elements' kind while copying. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/code-stub-assembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stub-assembler.h
diff --git a/src/code-stub-assembler.h b/src/code-stub-assembler.h
index 24b8ae5718227dbacfd36cd41faf1d646cba94a9..3ce4f8b7f0c8e7b099a83fb99dbb9b5564420e40 100644
--- a/src/code-stub-assembler.h
+++ b/src/code-stub-assembler.h
@@ -333,12 +333,36 @@ class CodeStubAssembler : public compiler::CodeAssembler {
Heap::RootListIndex value_root_index,
ParameterMode mode = INTEGER_PARAMETERS);
+ // Copies all elements from |from_array| of |length| size to
+ // |to_array| of the same size respecting the elements kind.
void CopyFixedArrayElements(
ElementsKind kind, compiler::Node* from_array, compiler::Node* to_array,
- compiler::Node* element_count,
+ compiler::Node* length,
+ WriteBarrierMode barrier_mode = UPDATE_WRITE_BARRIER,
+ ParameterMode mode = INTEGER_PARAMETERS) {
+ CopyFixedArrayElements(kind, from_array, kind, to_array, length, length,
+ barrier_mode, mode);
+ }
+
+ // Copies |element_count| elements from |from_array| to |to_array| of
+ // |capacity| size respecting both array's elements kinds.
+ void CopyFixedArrayElements(
+ ElementsKind from_kind, compiler::Node* from_array, ElementsKind to_kind,
+ compiler::Node* to_array, compiler::Node* element_count,
+ compiler::Node* capacity,
WriteBarrierMode barrier_mode = UPDATE_WRITE_BARRIER,
ParameterMode mode = INTEGER_PARAMETERS);
+ // Loads an element from |array| of |from_kind| elements by given |offset|
+ // (NOTE: not index!), does a hole check if |if_hole| is provided and
+ // converts the value so that it becomes ready for storing to array of
+ // |to_kind| elements.
+ compiler::Node* LoadElementAndPrepareForStore(compiler::Node* array,
+ compiler::Node* offset,
+ ElementsKind from_kind,
+ ElementsKind to_kind,
+ Label* if_hole);
+
compiler::Node* CalculateNewElementsCapacity(
compiler::Node* old_capacity, ParameterMode mode = INTEGER_PARAMETERS);
« no previous file with comments | « no previous file | src/code-stub-assembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698