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

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

Issue 2380563005: [code-stubs] Add LoadMapElementsKind helper (Closed)
Patch Set: comitting all files 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-array.cc
diff --git a/src/builtins/builtins-array.cc b/src/builtins/builtins-array.cc
index 7fcc7cfba8a6b1094894d6ed98fb6be838a63b45..ba9db3523323eab8814204c6bf27f1d1db7b68fe 100644
--- a/src/builtins/builtins-array.cc
+++ b/src/builtins/builtins-array.cc
@@ -1381,9 +1381,7 @@ void Builtins::Generate_ArrayIncludes(CodeStubAssembler* assembler) {
&if_packed_doubles, &if_holey_doubles};
Node* map = assembler->LoadMap(array);
- Node* bit_field2 = assembler->LoadMapBitField2(map);
- Node* elements_kind =
- assembler->BitFieldDecode<Map::ElementsKindBits>(bit_field2);
+ Node* elements_kind = assembler->LoadMapElementsKind(map);
Node* elements = assembler->LoadElements(array);
assembler->Switch(elements_kind, &return_false, kElementsKind,
element_kind_handlers, arraysize(kElementsKind));
@@ -1828,9 +1826,7 @@ void Builtins::Generate_ArrayIndexOf(CodeStubAssembler* assembler) {
&if_packed_doubles, &if_holey_doubles};
Node* map = assembler->LoadMap(array);
- Node* bit_field2 = assembler->LoadMapBitField2(map);
- Node* elements_kind =
- assembler->BitFieldDecode<Map::ElementsKindBits>(bit_field2);
+ Node* elements_kind = assembler->LoadMapElementsKind(map);
Node* elements = assembler->LoadElements(array);
assembler->Switch(elements_kind, &return_not_found, kElementsKind,
element_kind_handlers, arraysize(kElementsKind));
« 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