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

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

Issue 2407303002: [stubs] Renames WordIsSmi to TaggedIsSmi, introducing an appropriate bitcast of the parameter. (Closed)
Patch Set: Renamed TaggedValueIsSmi to TaggedIsSmi. Created 4 years, 2 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/builtins/builtins-conversion.cc » ('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 0795b92ac80f5ceb609924bdd74b39e89fd3a6a3..b5190e66bc9d1b1d9dc37e6b3bece61ccf5be399 100644
--- a/src/builtins/builtins-array.cc
+++ b/src/builtins/builtins-array.cc
@@ -1236,7 +1236,7 @@ void Builtins::Generate_ArrayIsArray(CodeStubAssembler* assembler) {
Label call_runtime(assembler), return_true(assembler),
return_false(assembler);
- assembler->GotoIf(assembler->WordIsSmi(object), &return_false);
+ assembler->GotoIf(assembler->TaggedIsSmi(object), &return_false);
Node* instance_type = assembler->LoadInstanceType(object);
assembler->GotoIf(assembler->Word32Equal(
@@ -1296,7 +1296,7 @@ void Builtins::Generate_ArrayIncludes(CodeStubAssembler* assembler) {
{
// Handle case where JSArray length is not an Smi in the runtime
Node* len = assembler->LoadObjectField(array, JSArray::kLengthOffset);
- assembler->GotoUnless(assembler->WordIsSmi(len), &call_runtime);
+ assembler->GotoUnless(assembler->TaggedIsSmi(len), &call_runtime);
len_var.Bind(assembler->SmiToWord(len));
assembler->Branch(assembler->WordEqual(len_var.value(), intptr_zero),
@@ -1309,7 +1309,7 @@ void Builtins::Generate_ArrayIncludes(CodeStubAssembler* assembler) {
init_k_zero(assembler), init_k_n(assembler);
Node* tagged_n = assembler->ToInteger(context, start_from);
- assembler->Branch(assembler->WordIsSmi(tagged_n), &init_k_smi,
+ assembler->Branch(assembler->TaggedIsSmi(tagged_n), &init_k_smi,
&init_k_heap_num);
assembler->Bind(&init_k_smi);
@@ -1395,7 +1395,7 @@ void Builtins::Generate_ArrayIncludes(CodeStubAssembler* assembler) {
undef_loop(assembler, &index_var), not_smi(assembler),
not_heap_num(assembler);
- assembler->GotoUnless(assembler->WordIsSmi(search_element), &not_smi);
+ assembler->GotoUnless(assembler->TaggedIsSmi(search_element), &not_smi);
search_num.Bind(assembler->SmiToFloat64(search_element));
assembler->Goto(&heap_num_loop);
@@ -1464,7 +1464,7 @@ void Builtins::Generate_ArrayIncludes(CodeStubAssembler* assembler) {
Node* element_k = assembler->LoadFixedArrayElement(
elements, index_var.value(), 0,
CodeStubAssembler::INTPTR_PARAMETERS);
- assembler->GotoUnless(assembler->WordIsSmi(element_k), &not_smi);
+ assembler->GotoUnless(assembler->TaggedIsSmi(element_k), &not_smi);
assembler->Branch(
assembler->Float64Equal(search_num.value(),
assembler->SmiToFloat64(element_k)),
@@ -1492,7 +1492,7 @@ void Builtins::Generate_ArrayIncludes(CodeStubAssembler* assembler) {
Node* element_k = assembler->LoadFixedArrayElement(
elements, index_var.value(), 0,
CodeStubAssembler::INTPTR_PARAMETERS);
- assembler->GotoIf(assembler->WordIsSmi(element_k), &continue_loop);
+ assembler->GotoIf(assembler->TaggedIsSmi(element_k), &continue_loop);
assembler->GotoIf(assembler->WordNotEqual(assembler->LoadMap(element_k),
heap_number_map),
&continue_loop);
@@ -1514,7 +1514,7 @@ void Builtins::Generate_ArrayIncludes(CodeStubAssembler* assembler) {
&return_false);
Node* element_k = assembler->LoadFixedArrayElement(
elements, index_var.value(), 0, CodeStubAssembler::INTPTR_PARAMETERS);
- assembler->GotoIf(assembler->WordIsSmi(element_k), &continue_loop);
+ assembler->GotoIf(assembler->TaggedIsSmi(element_k), &continue_loop);
assembler->GotoUnless(assembler->IsStringInstanceType(
assembler->LoadInstanceType(element_k)),
&continue_loop);
@@ -1546,7 +1546,7 @@ void Builtins::Generate_ArrayIncludes(CodeStubAssembler* assembler) {
Node* element_k = assembler->LoadFixedArrayElement(
elements, index_var.value(), 0, CodeStubAssembler::INTPTR_PARAMETERS);
- assembler->GotoIf(assembler->WordIsSmi(element_k), &continue_loop);
+ assembler->GotoIf(assembler->TaggedIsSmi(element_k), &continue_loop);
Node* map_k = assembler->LoadMap(element_k);
assembler->BranchIfSimd128Equal(search_element, map, element_k, map_k,
@@ -1564,7 +1564,8 @@ void Builtins::Generate_ArrayIncludes(CodeStubAssembler* assembler) {
hole_loop(assembler, &index_var), search_notnan(assembler);
Variable search_num(assembler, MachineRepresentation::kFloat64);
- assembler->GotoUnless(assembler->WordIsSmi(search_element), &search_notnan);
+ assembler->GotoUnless(assembler->TaggedIsSmi(search_element),
+ &search_notnan);
search_num.Bind(assembler->SmiToFloat64(search_element));
assembler->Goto(&not_nan_loop);
@@ -1618,7 +1619,8 @@ void Builtins::Generate_ArrayIncludes(CodeStubAssembler* assembler) {
hole_loop(assembler, &index_var), search_notnan(assembler);
Variable search_num(assembler, MachineRepresentation::kFloat64);
- assembler->GotoUnless(assembler->WordIsSmi(search_element), &search_notnan);
+ assembler->GotoUnless(assembler->TaggedIsSmi(search_element),
+ &search_notnan);
search_num.Bind(assembler->SmiToFloat64(search_element));
assembler->Goto(&not_nan_loop);
@@ -1738,7 +1740,7 @@ void Builtins::Generate_ArrayIndexOf(CodeStubAssembler* assembler) {
{
// Handle case where JSArray length is not an Smi in the runtime
Node* len = assembler->LoadObjectField(array, JSArray::kLengthOffset);
- assembler->GotoUnless(assembler->WordIsSmi(len), &call_runtime);
+ assembler->GotoUnless(assembler->TaggedIsSmi(len), &call_runtime);
len_var.Bind(assembler->SmiToWord(len));
assembler->Branch(assembler->WordEqual(len_var.value(), intptr_zero),
@@ -1751,7 +1753,7 @@ void Builtins::Generate_ArrayIndexOf(CodeStubAssembler* assembler) {
init_k_zero(assembler), init_k_n(assembler);
Node* tagged_n = assembler->ToInteger(context, start_from);
- assembler->Branch(assembler->WordIsSmi(tagged_n), &init_k_smi,
+ assembler->Branch(assembler->TaggedIsSmi(tagged_n), &init_k_smi,
&init_k_heap_num);
assembler->Bind(&init_k_smi);
@@ -1837,7 +1839,7 @@ void Builtins::Generate_ArrayIndexOf(CodeStubAssembler* assembler) {
undef_loop(assembler, &index_var), not_smi(assembler),
not_heap_num(assembler);
- assembler->GotoUnless(assembler->WordIsSmi(search_element), &not_smi);
+ assembler->GotoUnless(assembler->TaggedIsSmi(search_element), &not_smi);
search_num.Bind(assembler->SmiToFloat64(search_element));
assembler->Goto(&heap_num_loop);
@@ -1903,7 +1905,7 @@ void Builtins::Generate_ArrayIndexOf(CodeStubAssembler* assembler) {
Node* element_k = assembler->LoadFixedArrayElement(
elements, index_var.value(), 0,
CodeStubAssembler::INTPTR_PARAMETERS);
- assembler->GotoUnless(assembler->WordIsSmi(element_k), &not_smi);
+ assembler->GotoUnless(assembler->TaggedIsSmi(element_k), &not_smi);
assembler->Branch(
assembler->Float64Equal(search_num.value(),
assembler->SmiToFloat64(element_k)),
@@ -1931,7 +1933,7 @@ void Builtins::Generate_ArrayIndexOf(CodeStubAssembler* assembler) {
&return_not_found);
Node* element_k = assembler->LoadFixedArrayElement(
elements, index_var.value(), 0, CodeStubAssembler::INTPTR_PARAMETERS);
- assembler->GotoIf(assembler->WordIsSmi(element_k), &continue_loop);
+ assembler->GotoIf(assembler->TaggedIsSmi(element_k), &continue_loop);
assembler->GotoUnless(assembler->IsStringInstanceType(
assembler->LoadInstanceType(element_k)),
&continue_loop);
@@ -1963,7 +1965,7 @@ void Builtins::Generate_ArrayIndexOf(CodeStubAssembler* assembler) {
Node* element_k = assembler->LoadFixedArrayElement(
elements, index_var.value(), 0, CodeStubAssembler::INTPTR_PARAMETERS);
- assembler->GotoIf(assembler->WordIsSmi(element_k), &continue_loop);
+ assembler->GotoIf(assembler->TaggedIsSmi(element_k), &continue_loop);
Node* map_k = assembler->LoadMap(element_k);
assembler->BranchIfSimd128Equal(search_element, map, element_k, map_k,
@@ -1980,7 +1982,8 @@ void Builtins::Generate_ArrayIndexOf(CodeStubAssembler* assembler) {
Label not_nan_loop(assembler, &index_var), search_notnan(assembler);
Variable search_num(assembler, MachineRepresentation::kFloat64);
- assembler->GotoUnless(assembler->WordIsSmi(search_element), &search_notnan);
+ assembler->GotoUnless(assembler->TaggedIsSmi(search_element),
+ &search_notnan);
search_num.Bind(assembler->SmiToFloat64(search_element));
assembler->Goto(&not_nan_loop);
@@ -2017,7 +2020,8 @@ void Builtins::Generate_ArrayIndexOf(CodeStubAssembler* assembler) {
Label not_nan_loop(assembler, &index_var), search_notnan(assembler);
Variable search_num(assembler, MachineRepresentation::kFloat64);
- assembler->GotoUnless(assembler->WordIsSmi(search_element), &search_notnan);
+ assembler->GotoUnless(assembler->TaggedIsSmi(search_element),
+ &search_notnan);
search_num.Bind(assembler->SmiToFloat64(search_element));
assembler->Goto(&not_nan_loop);
« no previous file with comments | « no previous file | src/builtins/builtins-conversion.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698