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

Unified Diff: src/builtins/builtins-internal.cc

Issue 2321643002: [stubs] Introduce CSA::OptimalParameterMode(), TagParameter() and UntagParameter(). (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.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins-internal.cc
diff --git a/src/builtins/builtins-internal.cc b/src/builtins/builtins-internal.cc
index 87c5dd549c3655f9de133b14660d65af9a68f01b..b5858c64927e9849809cad4ff77fe0b3407d7ca7 100644
--- a/src/builtins/builtins-internal.cc
+++ b/src/builtins/builtins-internal.cc
@@ -64,12 +64,9 @@ void Builtins::Generate_CopyFastSmiOrObjectElements(
// Load the {object}s elements.
Node* source = assembler->LoadObjectField(object, JSObject::kElementsOffset);
- CodeStubAssembler::ParameterMode mode =
- assembler->Is64() ? CodeStubAssembler::INTEGER_PARAMETERS
- : CodeStubAssembler::SMI_PARAMETERS;
- Node* length = (mode == CodeStubAssembler::INTEGER_PARAMETERS)
- ? assembler->LoadAndUntagFixedArrayBaseLength(source)
- : assembler->LoadFixedArrayBaseLength(source);
+ CodeStubAssembler::ParameterMode mode = assembler->OptimalParameterMode();
+ Node* length = assembler->UntagParameter(
+ assembler->LoadFixedArrayBaseLength(source), mode);
// Check if we can allocate in new space.
ElementsKind kind = FAST_ELEMENTS;
« no previous file with comments | « no previous file | src/code-stub-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698