Commit f1441384 authored by ishell's avatar ishell Committed by Commit bot

[stubs] Remove CSA::INTEGER_PARAMETERS in favor of CSA::INTPTR_PARAMETERS.

BUG=

Review-Url: https://codereview.chromium.org/2580533002
Cr-Commit-Position: refs/heads/master@{#41722}
parent 18053154
...@@ -1570,8 +1570,8 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) { ...@@ -1570,8 +1570,8 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) {
assembler.GotoUnless( assembler.GotoUnless(
assembler.UintPtrLessThan(index_var.value(), len_var.value()), assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_false); &return_false);
Node* element_k = assembler.LoadFixedArrayElement( Node* element_k =
elements, index_var.value(), 0, CodeStubAssembler::INTPTR_PARAMETERS); assembler.LoadFixedArrayElement(elements, index_var.value());
assembler.GotoIf(assembler.WordEqual(element_k, search_element), assembler.GotoIf(assembler.WordEqual(element_k, search_element),
&return_true); &return_true);
...@@ -1584,8 +1584,8 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) { ...@@ -1584,8 +1584,8 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) {
assembler.GotoUnless( assembler.GotoUnless(
assembler.UintPtrLessThan(index_var.value(), len_var.value()), assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_false); &return_false);
Node* element_k = assembler.LoadFixedArrayElement( Node* element_k =
elements, index_var.value(), 0, CodeStubAssembler::INTPTR_PARAMETERS); assembler.LoadFixedArrayElement(elements, index_var.value());
assembler.GotoIf(assembler.WordEqual(element_k, undefined), &return_true); assembler.GotoIf(assembler.WordEqual(element_k, undefined), &return_true);
assembler.GotoIf(assembler.WordEqual(element_k, the_hole), &return_true); assembler.GotoIf(assembler.WordEqual(element_k, the_hole), &return_true);
...@@ -1606,9 +1606,8 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) { ...@@ -1606,9 +1606,8 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) {
assembler.GotoUnless( assembler.GotoUnless(
assembler.UintPtrLessThan(index_var.value(), len_var.value()), assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_false); &return_false);
Node* element_k = assembler.LoadFixedArrayElement( Node* element_k =
elements, index_var.value(), 0, assembler.LoadFixedArrayElement(elements, index_var.value());
CodeStubAssembler::INTPTR_PARAMETERS);
assembler.GotoUnless(assembler.TaggedIsSmi(element_k), &not_smi); assembler.GotoUnless(assembler.TaggedIsSmi(element_k), &not_smi);
assembler.Branch( assembler.Branch(
assembler.Float64Equal(search_num.value(), assembler.Float64Equal(search_num.value(),
...@@ -1635,9 +1634,8 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) { ...@@ -1635,9 +1634,8 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) {
assembler.GotoUnless( assembler.GotoUnless(
assembler.UintPtrLessThan(index_var.value(), len_var.value()), assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_false); &return_false);
Node* element_k = assembler.LoadFixedArrayElement( Node* element_k =
elements, index_var.value(), 0, assembler.LoadFixedArrayElement(elements, index_var.value());
CodeStubAssembler::INTPTR_PARAMETERS);
assembler.GotoIf(assembler.TaggedIsSmi(element_k), &continue_loop); assembler.GotoIf(assembler.TaggedIsSmi(element_k), &continue_loop);
assembler.GotoUnless( assembler.GotoUnless(
assembler.IsHeapNumberMap(assembler.LoadMap(element_k)), assembler.IsHeapNumberMap(assembler.LoadMap(element_k)),
...@@ -1657,8 +1655,8 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) { ...@@ -1657,8 +1655,8 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) {
assembler.GotoUnless( assembler.GotoUnless(
assembler.UintPtrLessThan(index_var.value(), len_var.value()), assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_false); &return_false);
Node* element_k = assembler.LoadFixedArrayElement( Node* element_k =
elements, index_var.value(), 0, CodeStubAssembler::INTPTR_PARAMETERS); assembler.LoadFixedArrayElement(elements, index_var.value());
assembler.GotoIf(assembler.TaggedIsSmi(element_k), &continue_loop); assembler.GotoIf(assembler.TaggedIsSmi(element_k), &continue_loop);
assembler.GotoUnless( assembler.GotoUnless(
assembler.IsStringInstanceType(assembler.LoadInstanceType(element_k)), assembler.IsStringInstanceType(assembler.LoadInstanceType(element_k)),
...@@ -1689,8 +1687,8 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) { ...@@ -1689,8 +1687,8 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) {
assembler.UintPtrLessThan(index_var.value(), len_var.value()), assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_false); &return_false);
Node* element_k = assembler.LoadFixedArrayElement( Node* element_k =
elements, index_var.value(), 0, CodeStubAssembler::INTPTR_PARAMETERS); assembler.LoadFixedArrayElement(elements, index_var.value());
assembler.GotoIf(assembler.TaggedIsSmi(element_k), &continue_loop); assembler.GotoIf(assembler.TaggedIsSmi(element_k), &continue_loop);
Node* map_k = assembler.LoadMap(element_k); Node* map_k = assembler.LoadMap(element_k);
...@@ -1732,8 +1730,7 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) { ...@@ -1732,8 +1730,7 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) {
assembler.UintPtrLessThan(index_var.value(), len_var.value()), assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_false); &return_false);
Node* element_k = assembler.LoadFixedDoubleArrayElement( Node* element_k = assembler.LoadFixedDoubleArrayElement(
elements, index_var.value(), MachineType::Float64(), 0, elements, index_var.value(), MachineType::Float64());
CodeStubAssembler::INTPTR_PARAMETERS);
assembler.Branch(assembler.Float64Equal(element_k, search_num.value()), assembler.Branch(assembler.Float64Equal(element_k, search_num.value()),
&return_true, &continue_loop); &return_true, &continue_loop);
assembler.Bind(&continue_loop); assembler.Bind(&continue_loop);
...@@ -1749,8 +1746,7 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) { ...@@ -1749,8 +1746,7 @@ void Builtins::Generate_ArrayIncludes(compiler::CodeAssemblerState* state) {
assembler.UintPtrLessThan(index_var.value(), len_var.value()), assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_false); &return_false);
Node* element_k = assembler.LoadFixedDoubleArrayElement( Node* element_k = assembler.LoadFixedDoubleArrayElement(
elements, index_var.value(), MachineType::Float64(), 0, elements, index_var.value(), MachineType::Float64());
CodeStubAssembler::INTPTR_PARAMETERS);
assembler.BranchIfFloat64IsNaN(element_k, &return_true, &continue_loop); assembler.BranchIfFloat64IsNaN(element_k, &return_true, &continue_loop);
assembler.Bind(&continue_loop); assembler.Bind(&continue_loop);
index_var.Bind(assembler.IntPtrAdd(index_var.value(), intptr_one)); index_var.Bind(assembler.IntPtrAdd(index_var.value(), intptr_one));
...@@ -2011,8 +2007,8 @@ void Builtins::Generate_ArrayIndexOf(compiler::CodeAssemblerState* state) { ...@@ -2011,8 +2007,8 @@ void Builtins::Generate_ArrayIndexOf(compiler::CodeAssemblerState* state) {
assembler.GotoUnless( assembler.GotoUnless(
assembler.UintPtrLessThan(index_var.value(), len_var.value()), assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_not_found); &return_not_found);
Node* element_k = assembler.LoadFixedArrayElement( Node* element_k =
elements, index_var.value(), 0, CodeStubAssembler::INTPTR_PARAMETERS); assembler.LoadFixedArrayElement(elements, index_var.value());
assembler.GotoIf(assembler.WordEqual(element_k, search_element), assembler.GotoIf(assembler.WordEqual(element_k, search_element),
&return_found); &return_found);
...@@ -2025,8 +2021,8 @@ void Builtins::Generate_ArrayIndexOf(compiler::CodeAssemblerState* state) { ...@@ -2025,8 +2021,8 @@ void Builtins::Generate_ArrayIndexOf(compiler::CodeAssemblerState* state) {
assembler.GotoUnless( assembler.GotoUnless(
assembler.UintPtrLessThan(index_var.value(), len_var.value()), assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_not_found); &return_not_found);
Node* element_k = assembler.LoadFixedArrayElement( Node* element_k =
elements, index_var.value(), 0, CodeStubAssembler::INTPTR_PARAMETERS); assembler.LoadFixedArrayElement(elements, index_var.value());
assembler.GotoIf(assembler.WordEqual(element_k, undefined), assembler.GotoIf(assembler.WordEqual(element_k, undefined),
&return_found); &return_found);
...@@ -2046,9 +2042,8 @@ void Builtins::Generate_ArrayIndexOf(compiler::CodeAssemblerState* state) { ...@@ -2046,9 +2042,8 @@ void Builtins::Generate_ArrayIndexOf(compiler::CodeAssemblerState* state) {
assembler.GotoUnless( assembler.GotoUnless(
assembler.UintPtrLessThan(index_var.value(), len_var.value()), assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_not_found); &return_not_found);
Node* element_k = assembler.LoadFixedArrayElement( Node* element_k =
elements, index_var.value(), 0, assembler.LoadFixedArrayElement(elements, index_var.value());
CodeStubAssembler::INTPTR_PARAMETERS);
assembler.GotoUnless(assembler.TaggedIsSmi(element_k), &not_smi); assembler.GotoUnless(assembler.TaggedIsSmi(element_k), &not_smi);
assembler.Branch( assembler.Branch(
assembler.Float64Equal(search_num.value(), assembler.Float64Equal(search_num.value(),
...@@ -2076,8 +2071,8 @@ void Builtins::Generate_ArrayIndexOf(compiler::CodeAssemblerState* state) { ...@@ -2076,8 +2071,8 @@ void Builtins::Generate_ArrayIndexOf(compiler::CodeAssemblerState* state) {
assembler.GotoUnless( assembler.GotoUnless(
assembler.UintPtrLessThan(index_var.value(), len_var.value()), assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_not_found); &return_not_found);
Node* element_k = assembler.LoadFixedArrayElement( Node* element_k =
elements, index_var.value(), 0, CodeStubAssembler::INTPTR_PARAMETERS); assembler.LoadFixedArrayElement(elements, index_var.value());
assembler.GotoIf(assembler.TaggedIsSmi(element_k), &continue_loop); assembler.GotoIf(assembler.TaggedIsSmi(element_k), &continue_loop);
assembler.GotoUnless( assembler.GotoUnless(
assembler.IsStringInstanceType(assembler.LoadInstanceType(element_k)), assembler.IsStringInstanceType(assembler.LoadInstanceType(element_k)),
...@@ -2108,8 +2103,8 @@ void Builtins::Generate_ArrayIndexOf(compiler::CodeAssemblerState* state) { ...@@ -2108,8 +2103,8 @@ void Builtins::Generate_ArrayIndexOf(compiler::CodeAssemblerState* state) {
assembler.UintPtrLessThan(index_var.value(), len_var.value()), assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_not_found); &return_not_found);
Node* element_k = assembler.LoadFixedArrayElement( Node* element_k =
elements, index_var.value(), 0, CodeStubAssembler::INTPTR_PARAMETERS); assembler.LoadFixedArrayElement(elements, index_var.value());
assembler.GotoIf(assembler.TaggedIsSmi(element_k), &continue_loop); assembler.GotoIf(assembler.TaggedIsSmi(element_k), &continue_loop);
Node* map_k = assembler.LoadMap(element_k); Node* map_k = assembler.LoadMap(element_k);
...@@ -2149,8 +2144,7 @@ void Builtins::Generate_ArrayIndexOf(compiler::CodeAssemblerState* state) { ...@@ -2149,8 +2144,7 @@ void Builtins::Generate_ArrayIndexOf(compiler::CodeAssemblerState* state) {
assembler.UintPtrLessThan(index_var.value(), len_var.value()), assembler.UintPtrLessThan(index_var.value(), len_var.value()),
&return_not_found); &return_not_found);
Node* element_k = assembler.LoadFixedDoubleArrayElement( Node* element_k = assembler.LoadFixedDoubleArrayElement(
elements, index_var.value(), MachineType::Float64(), 0, elements, index_var.value(), MachineType::Float64());
CodeStubAssembler::INTPTR_PARAMETERS);
assembler.Branch(assembler.Float64Equal(element_k, search_num.value()), assembler.Branch(assembler.Float64Equal(element_k, search_num.value()),
&return_found, &continue_loop); &return_found, &continue_loop);
assembler.Bind(&continue_loop); assembler.Bind(&continue_loop);
...@@ -2709,8 +2703,8 @@ void Builtins::Generate_ArrayIteratorPrototypeNext( ...@@ -2709,8 +2703,8 @@ void Builtins::Generate_ArrayIteratorPrototypeNext(
assembler.Int32Constant(LAST_ARRAY_KEY_VALUE_ITERATOR_TYPE)), assembler.Int32Constant(LAST_ARRAY_KEY_VALUE_ITERATOR_TYPE)),
&allocate_iterator_result); &allocate_iterator_result);
Node* elements = Node* elements = assembler.AllocateFixedArray(FAST_ELEMENTS,
assembler.AllocateFixedArray(FAST_ELEMENTS, assembler.Int32Constant(2)); assembler.IntPtrConstant(2));
assembler.StoreFixedArrayElement(elements, 0, index, SKIP_WRITE_BARRIER); assembler.StoreFixedArrayElement(elements, 0, index, SKIP_WRITE_BARRIER);
assembler.StoreFixedArrayElement(elements, 1, var_value.value(), assembler.StoreFixedArrayElement(elements, 1, var_value.value(),
SKIP_WRITE_BARRIER); SKIP_WRITE_BARRIER);
......
...@@ -452,8 +452,7 @@ void Builtins::Generate_ToObject(compiler::CodeAssemblerState* state) { ...@@ -452,8 +452,7 @@ void Builtins::Generate_ToObject(compiler::CodeAssemblerState* state) {
assembler.Bind(&if_wrapjsvalue); assembler.Bind(&if_wrapjsvalue);
Node* native_context = assembler.LoadNativeContext(context); Node* native_context = assembler.LoadNativeContext(context);
Node* constructor = assembler.LoadFixedArrayElement( Node* constructor = assembler.LoadFixedArrayElement(
native_context, constructor_function_index_var.value(), 0, native_context, constructor_function_index_var.value());
CodeStubAssembler::INTPTR_PARAMETERS);
Node* initial_map = assembler.LoadObjectField( Node* initial_map = assembler.LoadObjectField(
constructor, JSFunction::kPrototypeOrInitialMapOffset); constructor, JSFunction::kPrototypeOrInitialMapOffset);
Node* js_value = assembler.Allocate(JSValue::kSize); Node* js_value = assembler.Allocate(JSValue::kSize);
......
...@@ -371,16 +371,13 @@ void Builtins::Generate_FastFunctionPrototypeBind( ...@@ -371,16 +371,13 @@ void Builtins::Generate_FastFunctionPrototypeBind(
&empty_arguments); &empty_arguments);
Node* elements_length = assembler.ChangeUint32ToWord( Node* elements_length = assembler.ChangeUint32ToWord(
assembler.Int32Sub(argc, assembler.Int32Constant(1))); assembler.Int32Sub(argc, assembler.Int32Constant(1)));
Node* elements = assembler.AllocateFixedArray( Node* elements = assembler.AllocateFixedArray(FAST_ELEMENTS, elements_length);
FAST_ELEMENTS, elements_length, CodeStubAssembler::INTPTR_PARAMETERS);
Variable index(&assembler, MachineType::PointerRepresentation()); Variable index(&assembler, MachineType::PointerRepresentation());
index.Bind(assembler.IntPtrConstant(0)); index.Bind(assembler.IntPtrConstant(0));
CodeStubAssembler::VariableList foreach_vars({&index}, assembler.zone()); CodeStubAssembler::VariableList foreach_vars({&index}, assembler.zone());
args.ForEach(foreach_vars, args.ForEach(foreach_vars,
[&assembler, elements, &index](compiler::Node* arg) { [&assembler, elements, &index](compiler::Node* arg) {
assembler.StoreFixedArrayElement( assembler.StoreFixedArrayElement(elements, index.value(), arg);
elements, index.value(), arg, UPDATE_WRITE_BARRIER, 0,
CodeStubAssembler::INTPTR_PARAMETERS);
assembler.Increment(index); assembler.Increment(index);
}, },
assembler.IntPtrConstant(1)); assembler.IntPtrConstant(1));
......
...@@ -173,8 +173,7 @@ void Generate_NewArgumentsElements(CodeStubAssembler* assembler, ...@@ -173,8 +173,7 @@ void Generate_NewArgumentsElements(CodeStubAssembler* assembler,
assembler->Bind(&if_notempty); assembler->Bind(&if_notempty);
{ {
// Allocate a FixedArray in new space. // Allocate a FixedArray in new space.
Node* result = assembler->AllocateFixedArray( Node* result = assembler->AllocateFixedArray(kind, length);
kind, length, CodeStubAssembler::INTPTR_PARAMETERS);
// Compute the effective {offset} into the {frame}. // Compute the effective {offset} into the {frame}.
Node* offset = assembler->IntPtrAdd(length, assembler->IntPtrConstant(1)); Node* offset = assembler->IntPtrAdd(length, assembler->IntPtrConstant(1));
...@@ -200,8 +199,7 @@ void Generate_NewArgumentsElements(CodeStubAssembler* assembler, ...@@ -200,8 +199,7 @@ void Generate_NewArgumentsElements(CodeStubAssembler* assembler,
// Store the {value} into the {result}. // Store the {value} into the {result}.
assembler->StoreFixedArrayElement(result, index, value, assembler->StoreFixedArrayElement(result, index, value,
SKIP_WRITE_BARRIER, 0, SKIP_WRITE_BARRIER);
CodeStubAssembler::INTPTR_PARAMETERS);
// Continue with next {index}. // Continue with next {index}.
var_index.Bind( var_index.Bind(
......
...@@ -453,19 +453,19 @@ compiler::Node* InternalPerformPromiseThen(CodeStubAssembler* a, ...@@ -453,19 +453,19 @@ compiler::Node* InternalPerformPromiseThen(CodeStubAssembler* a,
// Create new FixedArrays to store callbacks, and migrate // Create new FixedArrays to store callbacks, and migrate
// existing callbacks. // existing callbacks.
Node* const deferreds = Node* const deferreds =
a->AllocateFixedArray(FAST_ELEMENTS, a->Int32Constant(2)); a->AllocateFixedArray(FAST_ELEMENTS, a->IntPtrConstant(2));
a->StoreFixedArrayElement(deferreds, 0, existing_deferred); a->StoreFixedArrayElement(deferreds, 0, existing_deferred);
a->StoreFixedArrayElement(deferreds, 1, deferred); a->StoreFixedArrayElement(deferreds, 1, deferred);
Node* const fulfill_reactions = Node* const fulfill_reactions =
a->AllocateFixedArray(FAST_ELEMENTS, a->Int32Constant(2)); a->AllocateFixedArray(FAST_ELEMENTS, a->IntPtrConstant(2));
a->StoreFixedArrayElement( a->StoreFixedArrayElement(
fulfill_reactions, 0, fulfill_reactions, 0,
a->LoadObjectField(promise, JSPromise::kFulfillReactionsOffset)); a->LoadObjectField(promise, JSPromise::kFulfillReactionsOffset));
a->StoreFixedArrayElement(fulfill_reactions, 1, var_on_resolve.value()); a->StoreFixedArrayElement(fulfill_reactions, 1, var_on_resolve.value());
Node* const reject_reactions = Node* const reject_reactions =
a->AllocateFixedArray(FAST_ELEMENTS, a->Int32Constant(2)); a->AllocateFixedArray(FAST_ELEMENTS, a->IntPtrConstant(2));
a->StoreFixedArrayElement( a->StoreFixedArrayElement(
reject_reactions, 0, reject_reactions, 0,
a->LoadObjectField(promise, JSPromise::kRejectReactionsOffset)); a->LoadObjectField(promise, JSPromise::kRejectReactionsOffset));
......
...@@ -183,19 +183,16 @@ Node* RegExpBuiltinsAssembler::ConstructNewResultFromMatchInfo(Node* context, ...@@ -183,19 +183,16 @@ Node* RegExpBuiltinsAssembler::ConstructNewResultFromMatchInfo(Node* context,
{ {
Node* const from_cursor = var_from_cursor.value(); Node* const from_cursor = var_from_cursor.value();
Node* const to_cursor = var_to_cursor.value(); Node* const to_cursor = var_to_cursor.value();
Node* const start = Node* const start = LoadFixedArrayElement(match_info, from_cursor);
LoadFixedArrayElement(match_info, from_cursor, 0, INTPTR_PARAMETERS);
Label next_iter(this); Label next_iter(this);
GotoIf(SmiEqual(start, SmiConstant(Smi::FromInt(-1))), &next_iter); GotoIf(SmiEqual(start, SmiConstant(Smi::FromInt(-1))), &next_iter);
Node* const from_cursor_plus1 = IntPtrAdd(from_cursor, IntPtrConstant(1)); Node* const from_cursor_plus1 = IntPtrAdd(from_cursor, IntPtrConstant(1));
Node* const end = LoadFixedArrayElement(match_info, from_cursor_plus1, 0, Node* const end = LoadFixedArrayElement(match_info, from_cursor_plus1);
INTPTR_PARAMETERS);
Node* const capture = SubString(context, string, start, end); Node* const capture = SubString(context, string, start, end);
StoreFixedArrayElement(result_elements, to_cursor, capture, StoreFixedArrayElement(result_elements, to_cursor, capture);
UPDATE_WRITE_BARRIER, 0, INTPTR_PARAMETERS);
Goto(&next_iter); Goto(&next_iter);
Bind(&next_iter); Bind(&next_iter);
...@@ -1374,9 +1371,6 @@ class GrowableFixedArray { ...@@ -1374,9 +1371,6 @@ class GrowableFixedArray {
void Push(Node* const value) { void Push(Node* const value) {
CodeStubAssembler* a = assembler_; CodeStubAssembler* a = assembler_;
const WriteBarrierMode barrier_mode = UPDATE_WRITE_BARRIER;
const ParameterMode mode = CodeStubAssembler::INTPTR_PARAMETERS;
Node* const length = var_length_.value(); Node* const length = var_length_.value();
Node* const capacity = var_capacity_.value(); Node* const capacity = var_capacity_.value();
...@@ -1386,7 +1380,7 @@ class GrowableFixedArray { ...@@ -1386,7 +1380,7 @@ class GrowableFixedArray {
a->Bind(&grow); a->Bind(&grow);
{ {
Node* const new_capacity = NewCapacity(a, capacity); Node* const new_capacity = NewCapacity(a, capacity);
Node* const new_array = ResizeFixedArray(length, new_capacity, mode); Node* const new_array = ResizeFixedArray(length, new_capacity);
var_capacity_.Bind(new_capacity); var_capacity_.Bind(new_capacity);
var_array_.Bind(new_array); var_array_.Bind(new_array);
...@@ -1396,7 +1390,7 @@ class GrowableFixedArray { ...@@ -1396,7 +1390,7 @@ class GrowableFixedArray {
a->Bind(&store); a->Bind(&store);
{ {
Node* const array = var_array_.value(); Node* const array = var_array_.value();
a->StoreFixedArrayElement(array, length, value, barrier_mode, 0, mode); a->StoreFixedArrayElement(array, length, value);
Node* const new_length = a->IntPtrAdd(length, a->IntPtrConstant(1)); Node* const new_length = a->IntPtrAdd(length, a->IntPtrConstant(1));
var_length_.Bind(new_length); var_length_.Bind(new_length);
...@@ -1407,7 +1401,6 @@ class GrowableFixedArray { ...@@ -1407,7 +1401,6 @@ class GrowableFixedArray {
CodeStubAssembler* a = assembler_; CodeStubAssembler* a = assembler_;
const ElementsKind kind = FAST_ELEMENTS; const ElementsKind kind = FAST_ELEMENTS;
const ParameterMode mode = CodeStubAssembler::INTPTR_PARAMETERS;
Node* const native_context = a->LoadNativeContext(context); Node* const native_context = a->LoadNativeContext(context);
Node* const array_map = a->LoadJSArrayElementsMap(kind, native_context); Node* const array_map = a->LoadJSArrayElementsMap(kind, native_context);
...@@ -1421,7 +1414,7 @@ class GrowableFixedArray { ...@@ -1421,7 +1414,7 @@ class GrowableFixedArray {
a->GotoIf(a->WordEqual(length, capacity), &next); a->GotoIf(a->WordEqual(length, capacity), &next);
Node* const array = ResizeFixedArray(length, length, mode); Node* const array = ResizeFixedArray(length, length);
var_array_.Bind(array); var_array_.Bind(array);
var_capacity_.Bind(length); var_capacity_.Bind(length);
a->Goto(&next); a->Goto(&next);
...@@ -1445,14 +1438,13 @@ class GrowableFixedArray { ...@@ -1445,14 +1438,13 @@ class GrowableFixedArray {
CodeStubAssembler* a = assembler_; CodeStubAssembler* a = assembler_;
const ElementsKind kind = FAST_ELEMENTS; const ElementsKind kind = FAST_ELEMENTS;
const ParameterMode mode = CodeStubAssembler::INTPTR_PARAMETERS;
static const int kInitialArraySize = 8; static const int kInitialArraySize = 8;
Node* const capacity = a->IntPtrConstant(kInitialArraySize); Node* const capacity = a->IntPtrConstant(kInitialArraySize);
Node* const array = a->AllocateFixedArray(kind, capacity, mode); Node* const array = a->AllocateFixedArray(kind, capacity);
a->FillFixedArrayWithValue(kind, array, a->IntPtrConstant(0), capacity, a->FillFixedArrayWithValue(kind, array, a->IntPtrConstant(0), capacity,
Heap::kTheHoleValueRootIndex, mode); Heap::kTheHoleValueRootIndex);
var_array_.Bind(array); var_array_.Bind(array);
var_capacity_.Bind(capacity); var_capacity_.Bind(capacity);
...@@ -1474,10 +1466,7 @@ class GrowableFixedArray { ...@@ -1474,10 +1466,7 @@ class GrowableFixedArray {
// Creates a new array with {new_capacity} and copies the first // Creates a new array with {new_capacity} and copies the first
// {element_count} elements from the current array. // {element_count} elements from the current array.
Node* ResizeFixedArray(Node* const element_count, Node* const new_capacity, Node* ResizeFixedArray(Node* const element_count, Node* const new_capacity) {
ParameterMode mode) {
DCHECK(mode == CodeStubAssembler::INTPTR_PARAMETERS);
CodeStubAssembler* a = assembler_; CodeStubAssembler* a = assembler_;
CSA_ASSERT(a, a->IntPtrGreaterThan(element_count, a->IntPtrConstant(0))); CSA_ASSERT(a, a->IntPtrGreaterThan(element_count, a->IntPtrConstant(0)));
...@@ -1486,6 +1475,7 @@ class GrowableFixedArray { ...@@ -1486,6 +1475,7 @@ class GrowableFixedArray {
const ElementsKind kind = FAST_ELEMENTS; const ElementsKind kind = FAST_ELEMENTS;
const WriteBarrierMode barrier_mode = UPDATE_WRITE_BARRIER; const WriteBarrierMode barrier_mode = UPDATE_WRITE_BARRIER;
const ParameterMode mode = CodeStubAssembler::INTPTR_PARAMETERS;
const CodeStubAssembler::AllocationFlags flags = const CodeStubAssembler::AllocationFlags flags =
CodeStubAssembler::kAllowLargeObjectAllocation; CodeStubAssembler::kAllowLargeObjectAllocation;
...@@ -2202,8 +2192,7 @@ Node* RegExpBuiltinsAssembler::ReplaceGlobalCallableFastPath( ...@@ -2202,8 +2192,7 @@ Node* RegExpBuiltinsAssembler::ReplaceGlobalCallableFastPath(
Node* const i = var_i.value(); Node* const i = var_i.value();
GotoUnless(IntPtrLessThan(i, end), &create_result); GotoUnless(IntPtrLessThan(i, end), &create_result);
ParameterMode mode = CodeStubAssembler::INTPTR_PARAMETERS; Node* const elem = LoadFixedArrayElement(res_elems, i);
Node* const elem = LoadFixedArrayElement(res_elems, i, 0, mode);
Label if_issmi(this), if_isstring(this), loop_epilogue(this); Label if_issmi(this), if_isstring(this), loop_epilogue(this);
Branch(TaggedIsSmi(elem), &if_issmi, &if_isstring); Branch(TaggedIsSmi(elem), &if_issmi, &if_isstring);
...@@ -2230,8 +2219,7 @@ Node* RegExpBuiltinsAssembler::ReplaceGlobalCallableFastPath( ...@@ -2230,8 +2219,7 @@ Node* RegExpBuiltinsAssembler::ReplaceGlobalCallableFastPath(
Node* const next_i = IntPtrAdd(i, int_one); Node* const next_i = IntPtrAdd(i, int_one);
var_i.Bind(next_i); var_i.Bind(next_i);
Node* const next_elem = Node* const next_elem = LoadFixedArrayElement(res_elems, next_i);
LoadFixedArrayElement(res_elems, next_i, 0, mode);
Node* const new_match_start = SmiSub(next_elem, elem); Node* const new_match_start = SmiSub(next_elem, elem);
var_match_start.Bind(new_match_start); var_match_start.Bind(new_match_start);
...@@ -2249,8 +2237,7 @@ Node* RegExpBuiltinsAssembler::ReplaceGlobalCallableFastPath( ...@@ -2249,8 +2237,7 @@ Node* RegExpBuiltinsAssembler::ReplaceGlobalCallableFastPath(
var_match_start.value(), string); var_match_start.value(), string);
Node* const replacement_str = ToString(context, replacement_obj); Node* const replacement_str = ToString(context, replacement_obj);
StoreFixedArrayElement(res_elems, i, replacement_str, StoreFixedArrayElement(res_elems, i, replacement_str);
UPDATE_WRITE_BARRIER, 0, mode);
Node* const elem_length = LoadStringLength(elem); Node* const elem_length = LoadStringLength(elem);
Node* const new_match_start = Node* const new_match_start =
...@@ -2270,8 +2257,6 @@ Node* RegExpBuiltinsAssembler::ReplaceGlobalCallableFastPath( ...@@ -2270,8 +2257,6 @@ Node* RegExpBuiltinsAssembler::ReplaceGlobalCallableFastPath(
Bind(&if_hasexplicitcaptures); Bind(&if_hasexplicitcaptures);
{ {
ParameterMode mode = CodeStubAssembler::INTPTR_PARAMETERS;
Node* const from = int_zero; Node* const from = int_zero;
Node* const to = SmiUntag(res_length); Node* const to = SmiUntag(res_length);
const int increment = 1; const int increment = 1;
...@@ -2279,8 +2264,8 @@ Node* RegExpBuiltinsAssembler::ReplaceGlobalCallableFastPath( ...@@ -2279,8 +2264,8 @@ Node* RegExpBuiltinsAssembler::ReplaceGlobalCallableFastPath(
BuildFastLoop( BuildFastLoop(
MachineType::PointerRepresentation(), from, to, MachineType::PointerRepresentation(), from, to,
[this, res_elems, isolate, native_context, context, undefined, [this, res_elems, isolate, native_context, context, undefined,
replace_callable, mode](Node* index) { replace_callable](Node* index) {
Node* const elem = LoadFixedArrayElement(res_elems, index, 0, mode); Node* const elem = LoadFixedArrayElement(res_elems, index);
Label do_continue(this); Label do_continue(this);
GotoIf(TaggedIsSmi(elem), &do_continue); GotoIf(TaggedIsSmi(elem), &do_continue);
...@@ -2303,8 +2288,7 @@ Node* RegExpBuiltinsAssembler::ReplaceGlobalCallableFastPath( ...@@ -2303,8 +2288,7 @@ Node* RegExpBuiltinsAssembler::ReplaceGlobalCallableFastPath(
// back from the callback function. // back from the callback function.
Node* const replacement_str = ToString(context, replacement_obj); Node* const replacement_str = ToString(context, replacement_obj);
StoreFixedArrayElement(res_elems, index, replacement_str, StoreFixedArrayElement(res_elems, index, replacement_str);
UPDATE_WRITE_BARRIER, 0, mode);
Goto(&do_continue); Goto(&do_continue);
Bind(&do_continue); Bind(&do_continue);
......
This diff is collapsed.
...@@ -64,9 +64,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler { ...@@ -64,9 +64,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
typedef base::Flags<AllocationFlag> AllocationFlags; typedef base::Flags<AllocationFlag> AllocationFlags;
// TODO(ishell): Fix all loads/stores from arrays by int32 offsets/indices enum ParameterMode { SMI_PARAMETERS, INTPTR_PARAMETERS };
// and eventually remove INTEGER_PARAMETERS in favour of INTPTR_PARAMETERS.
enum ParameterMode { INTEGER_PARAMETERS, SMI_PARAMETERS, INTPTR_PARAMETERS };
// On 32-bit platforms, there is a slight performance advantage to doing all // On 32-bit platforms, there is a slight performance advantage to doing all
// of the array offset/index arithmetic with SMIs, since it's possible // of the array offset/index arithmetic with SMIs, since it's possible
...@@ -104,28 +102,23 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler { ...@@ -104,28 +102,23 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
return value; return value;
} }
#define PARAMETER_BINOP(OpName, IntPtrOpName, SmiOpName, Int32OpName) \ #define PARAMETER_BINOP(OpName, IntPtrOpName, SmiOpName) \
Node* OpName(Node* a, Node* b, ParameterMode mode) { \ Node* OpName(Node* a, Node* b, ParameterMode mode) { \
if (mode == SMI_PARAMETERS) { \ if (mode == SMI_PARAMETERS) { \
return SmiOpName(a, b); \ return SmiOpName(a, b); \
} else if (mode == INTPTR_PARAMETERS) { \ } else { \
return IntPtrOpName(a, b); \ DCHECK_EQ(INTPTR_PARAMETERS, mode); \
} else { \ return IntPtrOpName(a, b); \
DCHECK_EQ(INTEGER_PARAMETERS, mode); \ } \
return Int32OpName(a, b); \
} \
} }
PARAMETER_BINOP(IntPtrOrSmiAdd, IntPtrAdd, SmiAdd, Int32Add) PARAMETER_BINOP(IntPtrOrSmiAdd, IntPtrAdd, SmiAdd)
PARAMETER_BINOP(IntPtrOrSmiLessThan, IntPtrLessThan, SmiLessThan, PARAMETER_BINOP(IntPtrOrSmiLessThan, IntPtrLessThan, SmiLessThan)
Int32LessThan) PARAMETER_BINOP(IntPtrOrSmiGreaterThan, IntPtrGreaterThan, SmiGreaterThan)
PARAMETER_BINOP(IntPtrOrSmiGreaterThan, IntPtrGreaterThan, SmiGreaterThan,
Int32GreaterThan)
PARAMETER_BINOP(IntPtrOrSmiGreaterThanOrEqual, IntPtrGreaterThanOrEqual, PARAMETER_BINOP(IntPtrOrSmiGreaterThanOrEqual, IntPtrGreaterThanOrEqual,
SmiGreaterThanOrEqual, Int32GreaterThanOrEqual) SmiGreaterThanOrEqual)
PARAMETER_BINOP(UintPtrOrSmiLessThan, UintPtrLessThan, SmiBelow, PARAMETER_BINOP(UintPtrOrSmiLessThan, UintPtrLessThan, SmiBelow)
Uint32LessThan)
PARAMETER_BINOP(UintPtrOrSmiGreaterThanOrEqual, UintPtrGreaterThanOrEqual, PARAMETER_BINOP(UintPtrOrSmiGreaterThanOrEqual, UintPtrGreaterThanOrEqual,
SmiAboveOrEqual, Uint32GreaterThanOrEqual) SmiAboveOrEqual)
#undef PARAMETER_BINOP #undef PARAMETER_BINOP
Node* NoContextConstant(); Node* NoContextConstant();
...@@ -372,23 +365,23 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler { ...@@ -372,23 +365,23 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
Node* LoadWeakCellValue(Node* weak_cell, Label* if_cleared = nullptr); Node* LoadWeakCellValue(Node* weak_cell, Label* if_cleared = nullptr);
// Load an array element from a FixedArray. // Load an array element from a FixedArray.
Node* LoadFixedArrayElement( Node* LoadFixedArrayElement(Node* object, Node* index,
Node* object, Node* index, int additional_offset = 0, int additional_offset = 0,
ParameterMode parameter_mode = INTEGER_PARAMETERS); ParameterMode parameter_mode = INTPTR_PARAMETERS);
Node* LoadFixedArrayElement(Node* object, int index, Node* LoadFixedArrayElement(Node* object, int index,
int additional_offset = 0) { int additional_offset = 0) {
return LoadFixedArrayElement(object, IntPtrConstant(index), return LoadFixedArrayElement(object, IntPtrConstant(index),
additional_offset, INTPTR_PARAMETERS); additional_offset);
} }
// Load an array element from a FixedArray, untag it and return it as Word32. // Load an array element from a FixedArray, untag it and return it as Word32.
Node* LoadAndUntagToWord32FixedArrayElement( Node* LoadAndUntagToWord32FixedArrayElement(
Node* object, Node* index, int additional_offset = 0, Node* object, Node* index, int additional_offset = 0,
ParameterMode parameter_mode = INTEGER_PARAMETERS); ParameterMode parameter_mode = INTPTR_PARAMETERS);
// Load an array element from a FixedDoubleArray. // Load an array element from a FixedDoubleArray.
Node* LoadFixedDoubleArrayElement( Node* LoadFixedDoubleArrayElement(
Node* object, Node* index, MachineType machine_type, Node* object, Node* index, MachineType machine_type,
int additional_offset = 0, int additional_offset = 0,
ParameterMode parameter_mode = INTEGER_PARAMETERS, ParameterMode parameter_mode = INTPTR_PARAMETERS,
Label* if_hole = nullptr); Label* if_hole = nullptr);
// Load Float64 value by |base| + |offset| address. If the value is a double // Load Float64 value by |base| + |offset| address. If the value is a double
...@@ -399,7 +392,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler { ...@@ -399,7 +392,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
MachineType machine_type = MachineType::Float64()); MachineType machine_type = MachineType::Float64());
Node* LoadFixedTypedArrayElement( Node* LoadFixedTypedArrayElement(
Node* data_pointer, Node* index_node, ElementsKind elements_kind, Node* data_pointer, Node* index_node, ElementsKind elements_kind,
ParameterMode parameter_mode = INTEGER_PARAMETERS); ParameterMode parameter_mode = INTPTR_PARAMETERS);
// Context manipulation // Context manipulation
Node* LoadContextElement(Node* context, int slot_index); Node* LoadContextElement(Node* context, int slot_index);
...@@ -433,18 +426,18 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler { ...@@ -433,18 +426,18 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
Node* object, int index, Node* value, Node* object, int index, Node* value,
WriteBarrierMode barrier_mode = UPDATE_WRITE_BARRIER) { WriteBarrierMode barrier_mode = UPDATE_WRITE_BARRIER) {
return StoreFixedArrayElement(object, IntPtrConstant(index), value, return StoreFixedArrayElement(object, IntPtrConstant(index), value,
barrier_mode, 0, INTPTR_PARAMETERS); barrier_mode);
} }
Node* StoreFixedArrayElement( Node* StoreFixedArrayElement(
Node* object, Node* index, Node* value, Node* object, Node* index, Node* value,
WriteBarrierMode barrier_mode = UPDATE_WRITE_BARRIER, WriteBarrierMode barrier_mode = UPDATE_WRITE_BARRIER,
int additional_offset = 0, int additional_offset = 0,
ParameterMode parameter_mode = INTEGER_PARAMETERS); ParameterMode parameter_mode = INTPTR_PARAMETERS);
Node* StoreFixedDoubleArrayElement( Node* StoreFixedDoubleArrayElement(
Node* object, Node* index, Node* value, Node* object, Node* index, Node* value,
ParameterMode parameter_mode = INTEGER_PARAMETERS); ParameterMode parameter_mode = INTPTR_PARAMETERS);
Node* BuildAppendJSArray(ElementsKind kind, Node* context, Node* array, Node* BuildAppendJSArray(ElementsKind kind, Node* context, Node* array,
CodeStubArguments& args, Variable& arg_index, CodeStubArguments& args, Variable& arg_index,
...@@ -522,15 +515,15 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler { ...@@ -522,15 +515,15 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
// The ParameterMode argument is only used for the capacity parameter. // The ParameterMode argument is only used for the capacity parameter.
std::pair<Node*, Node*> AllocateUninitializedJSArrayWithElements( std::pair<Node*, Node*> AllocateUninitializedJSArrayWithElements(
ElementsKind kind, Node* array_map, Node* length, Node* allocation_site, ElementsKind kind, Node* array_map, Node* length, Node* allocation_site,
Node* capacity, ParameterMode capacity_mode = INTEGER_PARAMETERS); Node* capacity, ParameterMode capacity_mode = INTPTR_PARAMETERS);
// Allocate a JSArray and fill elements with the hole. // Allocate a JSArray and fill elements with the hole.
// The ParameterMode argument is only used for the capacity parameter. // The ParameterMode argument is only used for the capacity parameter.
Node* AllocateJSArray(ElementsKind kind, Node* array_map, Node* capacity, Node* AllocateJSArray(ElementsKind kind, Node* array_map, Node* capacity,
Node* length, Node* allocation_site = nullptr, Node* length, Node* allocation_site = nullptr,
ParameterMode capacity_mode = INTEGER_PARAMETERS); ParameterMode capacity_mode = INTPTR_PARAMETERS);
Node* AllocateFixedArray(ElementsKind kind, Node* capacity, Node* AllocateFixedArray(ElementsKind kind, Node* capacity,
ParameterMode mode = INTEGER_PARAMETERS, ParameterMode mode = INTPTR_PARAMETERS,
AllocationFlags flags = kNone); AllocationFlags flags = kNone);
// Perform CreateArrayIterator (ES6 #sec-createarrayiterator). // Perform CreateArrayIterator (ES6 #sec-createarrayiterator).
...@@ -542,14 +535,14 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler { ...@@ -542,14 +535,14 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
void FillFixedArrayWithValue(ElementsKind kind, Node* array, Node* from_index, void FillFixedArrayWithValue(ElementsKind kind, Node* array, Node* from_index,
Node* to_index, Node* to_index,
Heap::RootListIndex value_root_index, Heap::RootListIndex value_root_index,
ParameterMode mode = INTEGER_PARAMETERS); ParameterMode mode = INTPTR_PARAMETERS);
// Copies all elements from |from_array| of |length| size to // Copies all elements from |from_array| of |length| size to
// |to_array| of the same size respecting the elements kind. // |to_array| of the same size respecting the elements kind.
void CopyFixedArrayElements( void CopyFixedArrayElements(
ElementsKind kind, Node* from_array, Node* to_array, Node* length, ElementsKind kind, Node* from_array, Node* to_array, Node* length,
WriteBarrierMode barrier_mode = UPDATE_WRITE_BARRIER, WriteBarrierMode barrier_mode = UPDATE_WRITE_BARRIER,
ParameterMode mode = INTEGER_PARAMETERS) { ParameterMode mode = INTPTR_PARAMETERS) {
CopyFixedArrayElements(kind, from_array, kind, to_array, length, length, CopyFixedArrayElements(kind, from_array, kind, to_array, length, length,
barrier_mode, mode); barrier_mode, mode);
} }
...@@ -560,7 +553,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler { ...@@ -560,7 +553,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
ElementsKind from_kind, Node* from_array, ElementsKind to_kind, ElementsKind from_kind, Node* from_array, ElementsKind to_kind,
Node* to_array, Node* element_count, Node* capacity, Node* to_array, Node* element_count, Node* capacity,
WriteBarrierMode barrier_mode = UPDATE_WRITE_BARRIER, WriteBarrierMode barrier_mode = UPDATE_WRITE_BARRIER,
ParameterMode mode = INTEGER_PARAMETERS); ParameterMode mode = INTPTR_PARAMETERS);
// Copies |character_count| elements from |from_string| to |to_string| // Copies |character_count| elements from |from_string| to |to_string|
// starting at the |from_index|'th character. |from_string| and |to_string| // starting at the |from_index|'th character. |from_string| and |to_string|
...@@ -585,7 +578,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler { ...@@ -585,7 +578,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler : public compiler::CodeAssembler {
ElementsKind to_kind, Label* if_hole); ElementsKind to_kind, Label* if_hole);
Node* CalculateNewElementsCapacity(Node* old_capacity, Node* CalculateNewElementsCapacity(Node* old_capacity,
ParameterMode mode = INTEGER_PARAMETERS); ParameterMode mode = INTPTR_PARAMETERS);
// Tries to grow the |elements| array of given |object| to store the |key| // Tries to grow the |elements| array of given |object| to store the |key|
// or bails out if the growing gap is too big. Returns new elements. // or bails out if the growing gap is too big. Returns new elements.
......
...@@ -2112,8 +2112,7 @@ void StoreScriptContextFieldStub::GenerateAssembly( ...@@ -2112,8 +2112,7 @@ void StoreScriptContextFieldStub::GenerateAssembly(
Node* script_context = assembler.LoadScriptContext(context, context_index()); Node* script_context = assembler.LoadScriptContext(context, context_index());
assembler.StoreFixedArrayElement( assembler.StoreFixedArrayElement(
script_context, assembler.IntPtrConstant(slot_index()), value, script_context, assembler.IntPtrConstant(slot_index()), value);
UPDATE_WRITE_BARRIER, 0, CodeStubAssembler::INTPTR_PARAMETERS);
assembler.Return(value); assembler.Return(value);
} }
...@@ -2546,8 +2545,7 @@ compiler::Node* FastNewClosureStub::Generate(CodeStubAssembler* assembler, ...@@ -2546,8 +2545,7 @@ compiler::Node* FastNewClosureStub::Generate(CodeStubAssembler* assembler,
// as the map of the allocated object. // as the map of the allocated object.
Node* native_context = assembler->LoadNativeContext(context); Node* native_context = assembler->LoadNativeContext(context);
Node* map_slot_value = Node* map_slot_value =
assembler->LoadFixedArrayElement(native_context, map_index.value(), 0, assembler->LoadFixedArrayElement(native_context, map_index.value());
CodeStubAssembler::INTPTR_PARAMETERS);
assembler->StoreMapNoWriteBarrier(result, map_slot_value); assembler->StoreMapNoWriteBarrier(result, map_slot_value);
// Initialize the rest of the function. // Initialize the rest of the function.
...@@ -3077,7 +3075,7 @@ void InternalArrayNoArgumentConstructorStub::GenerateAssembly( ...@@ -3077,7 +3075,7 @@ void InternalArrayNoArgumentConstructorStub::GenerateAssembly(
Node* array = assembler.AllocateJSArray( Node* array = assembler.AllocateJSArray(
elements_kind(), array_map, elements_kind(), array_map,
assembler.IntPtrConstant(JSArray::kPreallocatedArrayElements), assembler.IntPtrConstant(JSArray::kPreallocatedArrayElements),
assembler.SmiConstant(Smi::kZero), nullptr); assembler.SmiConstant(Smi::kZero));
assembler.Return(array); assembler.Return(array);
} }
......
...@@ -80,15 +80,14 @@ void AccessorAssemblerImpl::HandlePolymorphicCase( ...@@ -80,15 +80,14 @@ void AccessorAssemblerImpl::HandlePolymorphicCase(
BuildFastLoop( BuildFastLoop(
MachineType::PointerRepresentation(), init, length, MachineType::PointerRepresentation(), init, length,
[this, receiver_map, feedback, if_handler, var_handler](Node* index) { [this, receiver_map, feedback, if_handler, var_handler](Node* index) {
Node* cached_map = LoadWeakCellValue( Node* cached_map =
LoadFixedArrayElement(feedback, index, 0, INTPTR_PARAMETERS)); LoadWeakCellValue(LoadFixedArrayElement(feedback, index));
Label next_entry(this); Label next_entry(this);
GotoIf(WordNotEqual(receiver_map, cached_map), &next_entry); GotoIf(WordNotEqual(receiver_map, cached_map), &next_entry);
// Found, now call handler. // Found, now call handler.
Node* handler = LoadFixedArrayElement(feedback, index, kPointerSize, Node* handler = LoadFixedArrayElement(feedback, index, kPointerSize);
INTPTR_PARAMETERS);
var_handler->Bind(handler); var_handler->Bind(handler);
Goto(if_handler); Goto(if_handler);
...@@ -113,16 +112,16 @@ void AccessorAssemblerImpl::HandleKeyedStorePolymorphicCase( ...@@ -113,16 +112,16 @@ void AccessorAssemblerImpl::HandleKeyedStorePolymorphicCase(
BuildFastLoop(MachineType::PointerRepresentation(), init, length, BuildFastLoop(MachineType::PointerRepresentation(), init, length,
[this, receiver_map, feedback, if_handler, var_handler, [this, receiver_map, feedback, if_handler, var_handler,
if_transition_handler, var_transition_map_cell](Node* index) { if_transition_handler, var_transition_map_cell](Node* index) {
Node* cached_map = LoadWeakCellValue(LoadFixedArrayElement( Node* cached_map =
feedback, index, 0, INTPTR_PARAMETERS)); LoadWeakCellValue(LoadFixedArrayElement(feedback, index));
Label next_entry(this); Label next_entry(this);
GotoIf(WordNotEqual(receiver_map, cached_map), &next_entry); GotoIf(WordNotEqual(receiver_map, cached_map), &next_entry);
Node* maybe_transition_map_cell = LoadFixedArrayElement( Node* maybe_transition_map_cell =
feedback, index, kPointerSize, INTPTR_PARAMETERS); LoadFixedArrayElement(feedback, index, kPointerSize);
var_handler->Bind(LoadFixedArrayElement( var_handler->Bind(
feedback, index, 2 * kPointerSize, INTPTR_PARAMETERS)); LoadFixedArrayElement(feedback, index, 2 * kPointerSize));
GotoIf(WordEqual(maybe_transition_map_cell, GotoIf(WordEqual(maybe_transition_map_cell,
LoadRoot(Heap::kUndefinedValueRootIndex)), LoadRoot(Heap::kUndefinedValueRootIndex)),
if_handler); if_handler);
...@@ -286,8 +285,7 @@ void AccessorAssemblerImpl::HandleLoadICSmiHandlerCase( ...@@ -286,8 +285,7 @@ void AccessorAssemblerImpl::HandleLoadICSmiHandlerCase(
CSA_ASSERT(this, CSA_ASSERT(this,
UintPtrLessThan(descriptor, UintPtrLessThan(descriptor,
LoadAndUntagFixedArrayBaseLength(descriptors))); LoadAndUntagFixedArrayBaseLength(descriptors)));
Node* value = Node* value = LoadFixedArrayElement(descriptors, descriptor);
LoadFixedArrayElement(descriptors, descriptor, 0, INTPTR_PARAMETERS);
Label if_accessor_info(this); Label if_accessor_info(this);
GotoIf(IsSetWord<LoadHandler::IsAccessorInfoBits>(handler_word), GotoIf(IsSetWord<LoadHandler::IsAccessorInfoBits>(handler_word),
...@@ -422,8 +420,7 @@ Node* AccessorAssemblerImpl::EmitLoadICProtoArrayCheck( ...@@ -422,8 +420,7 @@ Node* AccessorAssemblerImpl::EmitLoadICProtoArrayCheck(
BuildFastLoop( BuildFastLoop(
MachineType::PointerRepresentation(), start_index.value(), handler_length, MachineType::PointerRepresentation(), start_index.value(), handler_length,
[this, p, handler, miss](Node* current) { [this, p, handler, miss](Node* current) {
Node* prototype_cell = Node* prototype_cell = LoadFixedArrayElement(handler, current);
LoadFixedArrayElement(handler, current, 0, INTPTR_PARAMETERS);
CheckPrototype(prototype_cell, p->name, miss); CheckPrototype(prototype_cell, p->name, miss);
}, },
1, IndexAdvanceMode::kPost); 1, IndexAdvanceMode::kPost);
...@@ -577,8 +574,8 @@ void AccessorAssemblerImpl::HandleStoreICProtoHandler( ...@@ -577,8 +574,8 @@ void AccessorAssemblerImpl::HandleStoreICProtoHandler(
BuildFastLoop(MachineType::PointerRepresentation(), BuildFastLoop(MachineType::PointerRepresentation(),
IntPtrConstant(StoreHandler::kFirstPrototypeIndex), length, IntPtrConstant(StoreHandler::kFirstPrototypeIndex), length,
[this, p, handler, miss](Node* current) { [this, p, handler, miss](Node* current) {
Node* prototype_cell = LoadFixedArrayElement( Node* prototype_cell =
handler, current, 0, INTPTR_PARAMETERS); LoadFixedArrayElement(handler, current);
CheckPrototype(prototype_cell, p->name, miss); CheckPrototype(prototype_cell, p->name, miss);
}, },
1, IndexAdvanceMode::kPost); 1, IndexAdvanceMode::kPost);
...@@ -613,8 +610,8 @@ void AccessorAssemblerImpl::HandleStoreICProtoHandler( ...@@ -613,8 +610,8 @@ void AccessorAssemblerImpl::HandleStoreICProtoHandler(
Node* value_index_in_descriptor = Node* value_index_in_descriptor =
DecodeWord<StoreHandler::DescriptorValueIndexBits>(handler_word); DecodeWord<StoreHandler::DescriptorValueIndexBits>(handler_word);
Node* descriptors = LoadMapDescriptors(transition); Node* descriptors = LoadMapDescriptors(transition);
Node* constant = LoadFixedArrayElement( Node* constant =
descriptors, value_index_in_descriptor, 0, INTPTR_PARAMETERS); LoadFixedArrayElement(descriptors, value_index_in_descriptor);
GotoIf(WordNotEqual(p->value, constant), miss); GotoIf(WordNotEqual(p->value, constant), miss);
StoreMap(p->receiver, transition); StoreMap(p->receiver, transition);
...@@ -687,8 +684,8 @@ void AccessorAssemblerImpl::HandleStoreICSmiHandlerCase(Node* handler_word, ...@@ -687,8 +684,8 @@ void AccessorAssemblerImpl::HandleStoreICSmiHandlerCase(Node* handler_word,
DecodeWord<StoreHandler::DescriptorValueIndexBits>(handler_word); DecodeWord<StoreHandler::DescriptorValueIndexBits>(handler_word);
Node* descriptors = Node* descriptors =
LoadMapDescriptors(transition ? transition : LoadMap(holder)); LoadMapDescriptors(transition ? transition : LoadMap(holder));
Node* maybe_field_type = LoadFixedArrayElement( Node* maybe_field_type =
descriptors, value_index_in_descriptor, 0, INTPTR_PARAMETERS); LoadFixedArrayElement(descriptors, value_index_in_descriptor);
Label do_store(this); Label do_store(this);
GotoIf(TaggedIsSmi(maybe_field_type), &do_store); GotoIf(TaggedIsSmi(maybe_field_type), &do_store);
// Check that value type matches the field type. // Check that value type matches the field type.
...@@ -809,14 +806,13 @@ void AccessorAssemblerImpl::EmitElementLoad( ...@@ -809,14 +806,13 @@ void AccessorAssemblerImpl::EmitElementLoad(
Bind(&if_fast_packed); Bind(&if_fast_packed);
{ {
Comment("fast packed elements"); Comment("fast packed elements");
Return(LoadFixedArrayElement(elements, intptr_index, 0, INTPTR_PARAMETERS)); Return(LoadFixedArrayElement(elements, intptr_index));
} }
Bind(&if_fast_holey); Bind(&if_fast_holey);
{ {
Comment("fast holey elements"); Comment("fast holey elements");
Node* element = Node* element = LoadFixedArrayElement(elements, intptr_index);
LoadFixedArrayElement(elements, intptr_index, 0, INTPTR_PARAMETERS);
GotoIf(WordEqual(element, TheHoleConstant()), if_hole); GotoIf(WordEqual(element, TheHoleConstant()), if_hole);
Return(element); Return(element);
} }
...@@ -824,8 +820,8 @@ void AccessorAssemblerImpl::EmitElementLoad( ...@@ -824,8 +820,8 @@ void AccessorAssemblerImpl::EmitElementLoad(
Bind(&if_fast_double); Bind(&if_fast_double);
{ {
Comment("packed double elements"); Comment("packed double elements");
var_double_value->Bind(LoadFixedDoubleArrayElement( var_double_value->Bind(LoadFixedDoubleArrayElement(elements, intptr_index,
elements, intptr_index, MachineType::Float64(), 0, INTPTR_PARAMETERS)); MachineType::Float64()));
Goto(rebox_double); Goto(rebox_double);
} }
...@@ -863,15 +859,14 @@ void AccessorAssemblerImpl::EmitElementLoad( ...@@ -863,15 +859,14 @@ void AccessorAssemblerImpl::EmitElementLoad(
// Check that the value is a data property. // Check that the value is a data property.
Node* details_index = EntryToIndex<SeededNumberDictionary>( Node* details_index = EntryToIndex<SeededNumberDictionary>(
var_entry.value(), SeededNumberDictionary::kEntryDetailsIndex); var_entry.value(), SeededNumberDictionary::kEntryDetailsIndex);
Node* details = SmiToWord32( Node* details = SmiToWord32(LoadFixedArrayElement(elements, details_index));
LoadFixedArrayElement(elements, details_index, 0, INTPTR_PARAMETERS));
Node* kind = DecodeWord32<PropertyDetails::KindField>(details); Node* kind = DecodeWord32<PropertyDetails::KindField>(details);
// TODO(jkummerow): Support accessors without missing? // TODO(jkummerow): Support accessors without missing?
GotoUnless(Word32Equal(kind, Int32Constant(kData)), miss); GotoUnless(Word32Equal(kind, Int32Constant(kData)), miss);
// Finally, load the value. // Finally, load the value.
Node* value_index = EntryToIndex<SeededNumberDictionary>( Node* value_index = EntryToIndex<SeededNumberDictionary>(
var_entry.value(), SeededNumberDictionary::kEntryValueIndex); var_entry.value(), SeededNumberDictionary::kEntryValueIndex);
Return(LoadFixedArrayElement(elements, value_index, 0, INTPTR_PARAMETERS)); Return(LoadFixedArrayElement(elements, value_index));
} }
Bind(&if_typed_array); Bind(&if_typed_array);
......
...@@ -534,7 +534,7 @@ void KeyedStoreGenericAssembler::LookupPropertyOnPrototypeChain( ...@@ -534,7 +534,7 @@ void KeyedStoreGenericAssembler::LookupPropertyOnPrototypeChain(
DescriptorArray::kDescriptorKey) * DescriptorArray::kDescriptorKey) *
kPointerSize; kPointerSize;
Node* details = LoadAndUntagToWord32FixedArrayElement( Node* details = LoadAndUntagToWord32FixedArrayElement(
descriptors, name_index, kNameToDetailsOffset, INTPTR_PARAMETERS); descriptors, name_index, kNameToDetailsOffset);
JumpIfDataProperty(details, &ok_to_write, readonly); JumpIfDataProperty(details, &ok_to_write, readonly);
// Accessor case. // Accessor case.
...@@ -553,15 +553,15 @@ void KeyedStoreGenericAssembler::LookupPropertyOnPrototypeChain( ...@@ -553,15 +553,15 @@ void KeyedStoreGenericAssembler::LookupPropertyOnPrototypeChain(
NameDictionary::kEntryKeyIndex) * NameDictionary::kEntryKeyIndex) *
kPointerSize; kPointerSize;
Node* details = LoadAndUntagToWord32FixedArrayElement( Node* details = LoadAndUntagToWord32FixedArrayElement(
dictionary, entry, kNameToDetailsOffset, INTPTR_PARAMETERS); dictionary, entry, kNameToDetailsOffset);
JumpIfDataProperty(details, &ok_to_write, readonly); JumpIfDataProperty(details, &ok_to_write, readonly);
// Accessor case. // Accessor case.
const int kNameToValueOffset = (NameDictionary::kEntryValueIndex - const int kNameToValueOffset = (NameDictionary::kEntryValueIndex -
NameDictionary::kEntryKeyIndex) * NameDictionary::kEntryKeyIndex) *
kPointerSize; kPointerSize;
var_accessor_pair->Bind(LoadFixedArrayElement( var_accessor_pair->Bind(
dictionary, entry, kNameToValueOffset, INTPTR_PARAMETERS)); LoadFixedArrayElement(dictionary, entry, kNameToValueOffset));
var_accessor_holder->Bind(holder); var_accessor_holder->Bind(holder);
Goto(accessor); Goto(accessor);
} }
...@@ -574,8 +574,8 @@ void KeyedStoreGenericAssembler::LookupPropertyOnPrototypeChain( ...@@ -574,8 +574,8 @@ void KeyedStoreGenericAssembler::LookupPropertyOnPrototypeChain(
GlobalDictionary::kEntryKeyIndex) * GlobalDictionary::kEntryKeyIndex) *
kPointerSize; kPointerSize;
Node* property_cell = LoadFixedArrayElement( Node* property_cell =
dictionary, entry, kNameToValueOffset, INTPTR_PARAMETERS); LoadFixedArrayElement(dictionary, entry, kNameToValueOffset);
Node* value = Node* value =
LoadObjectField(property_cell, PropertyCell::kValueOffset); LoadObjectField(property_cell, PropertyCell::kValueOffset);
...@@ -641,25 +641,22 @@ void KeyedStoreGenericAssembler::EmitGenericPropertyStore( ...@@ -641,25 +641,22 @@ void KeyedStoreGenericAssembler::EmitGenericPropertyStore(
NameDictionary::kEntryKeyIndex) * NameDictionary::kEntryKeyIndex) *
kPointerSize; kPointerSize;
Node* details = LoadAndUntagToWord32FixedArrayElement( Node* details = LoadAndUntagToWord32FixedArrayElement(
properties, var_name_index.value(), kNameToDetailsOffset, properties, var_name_index.value(), kNameToDetailsOffset);
INTPTR_PARAMETERS);
JumpIfDataProperty(details, &overwrite, &readonly); JumpIfDataProperty(details, &overwrite, &readonly);
// Accessor case. // Accessor case.
const int kNameToValueOffset = const int kNameToValueOffset =
(NameDictionary::kEntryValueIndex - NameDictionary::kEntryKeyIndex) * (NameDictionary::kEntryValueIndex - NameDictionary::kEntryKeyIndex) *
kPointerSize; kPointerSize;
var_accessor_pair.Bind( var_accessor_pair.Bind(LoadFixedArrayElement(
LoadFixedArrayElement(properties, var_name_index.value(), properties, var_name_index.value(), kNameToValueOffset));
kNameToValueOffset, INTPTR_PARAMETERS));
var_accessor_holder.Bind(receiver); var_accessor_holder.Bind(receiver);
Goto(&accessor); Goto(&accessor);
Bind(&overwrite); Bind(&overwrite);
{ {
StoreFixedArrayElement(properties, var_name_index.value(), p->value, StoreFixedArrayElement(properties, var_name_index.value(), p->value,
UPDATE_WRITE_BARRIER, kNameToValueOffset, UPDATE_WRITE_BARRIER, kNameToValueOffset);
INTPTR_PARAMETERS);
Return(p->value); Return(p->value);
} }
} }
......
...@@ -451,7 +451,7 @@ Node* InterpreterAssembler::BytecodeOperandIntrinsicId(int operand_index) { ...@@ -451,7 +451,7 @@ Node* InterpreterAssembler::BytecodeOperandIntrinsicId(int operand_index) {
Node* InterpreterAssembler::LoadConstantPoolEntry(Node* index) { Node* InterpreterAssembler::LoadConstantPoolEntry(Node* index) {
Node* constant_pool = LoadObjectField(BytecodeArrayTaggedPointer(), Node* constant_pool = LoadObjectField(BytecodeArrayTaggedPointer(),
BytecodeArray::kConstantPoolOffset); BytecodeArray::kConstantPoolOffset);
return LoadFixedArrayElement(constant_pool, index, 0, INTPTR_PARAMETERS); return LoadFixedArrayElement(constant_pool, index);
} }
Node* InterpreterAssembler::LoadAndUntagConstantPoolEntry(Node* index) { Node* InterpreterAssembler::LoadAndUntagConstantPoolEntry(Node* index) {
...@@ -490,13 +490,12 @@ Node* InterpreterAssembler::IncrementCallCount(Node* type_feedback_vector, ...@@ -490,13 +490,12 @@ Node* InterpreterAssembler::IncrementCallCount(Node* type_feedback_vector,
Node* slot_id) { Node* slot_id) {
Comment("increment call count"); Comment("increment call count");
Node* call_count_slot = IntPtrAdd(slot_id, IntPtrConstant(1)); Node* call_count_slot = IntPtrAdd(slot_id, IntPtrConstant(1));
Node* call_count = LoadFixedArrayElement( Node* call_count =
type_feedback_vector, call_count_slot, 0, INTPTR_PARAMETERS); LoadFixedArrayElement(type_feedback_vector, call_count_slot);
Node* new_count = SmiAdd(call_count, SmiConstant(1)); Node* new_count = SmiAdd(call_count, SmiConstant(1));
// Count is Smi, so we don't need a write barrier. // Count is Smi, so we don't need a write barrier.
return StoreFixedArrayElement(type_feedback_vector, call_count_slot, return StoreFixedArrayElement(type_feedback_vector, call_count_slot,
new_count, SKIP_WRITE_BARRIER, 0, new_count, SKIP_WRITE_BARRIER);
INTPTR_PARAMETERS);
} }
Node* InterpreterAssembler::CallJSWithFeedback(Node* function, Node* context, Node* InterpreterAssembler::CallJSWithFeedback(Node* function, Node* context,
...@@ -524,8 +523,7 @@ Node* InterpreterAssembler::CallJSWithFeedback(Node* function, Node* context, ...@@ -524,8 +523,7 @@ Node* InterpreterAssembler::CallJSWithFeedback(Node* function, Node* context,
end(this); end(this);
// The checks. First, does function match the recorded monomorphic target? // The checks. First, does function match the recorded monomorphic target?
Node* feedback_element = LoadFixedArrayElement(type_feedback_vector, slot_id, Node* feedback_element = LoadFixedArrayElement(type_feedback_vector, slot_id);
0, INTPTR_PARAMETERS);
Node* feedback_value = LoadWeakCellValueUnchecked(feedback_element); Node* feedback_value = LoadWeakCellValueUnchecked(feedback_element);
Node* is_monomorphic = WordEqual(function, feedback_value); Node* is_monomorphic = WordEqual(function, feedback_value);
GotoUnless(is_monomorphic, &extra_checks); GotoUnless(is_monomorphic, &extra_checks);
...@@ -645,7 +643,7 @@ Node* InterpreterAssembler::CallJSWithFeedback(Node* function, Node* context, ...@@ -645,7 +643,7 @@ Node* InterpreterAssembler::CallJSWithFeedback(Node* function, Node* context,
StoreFixedArrayElement( StoreFixedArrayElement(
type_feedback_vector, slot_id, type_feedback_vector, slot_id,
HeapConstant(TypeFeedbackVector::MegamorphicSentinel(isolate())), HeapConstant(TypeFeedbackVector::MegamorphicSentinel(isolate())),
SKIP_WRITE_BARRIER, 0, INTPTR_PARAMETERS); SKIP_WRITE_BARRIER);
Goto(&call); Goto(&call);
} }
} }
...@@ -706,8 +704,7 @@ Node* InterpreterAssembler::CallConstruct(Node* constructor, Node* context, ...@@ -706,8 +704,7 @@ Node* InterpreterAssembler::CallConstruct(Node* constructor, Node* context,
GotoUnless(is_js_function, &call_construct); GotoUnless(is_js_function, &call_construct);
// Check if it is a monomorphic constructor. // Check if it is a monomorphic constructor.
Node* feedback_element = LoadFixedArrayElement(type_feedback_vector, slot_id, Node* feedback_element = LoadFixedArrayElement(type_feedback_vector, slot_id);
0, INTPTR_PARAMETERS);
Node* feedback_value = LoadWeakCellValueUnchecked(feedback_element); Node* feedback_value = LoadWeakCellValueUnchecked(feedback_element);
Node* is_monomorphic = WordEqual(constructor, feedback_value); Node* is_monomorphic = WordEqual(constructor, feedback_value);
allocation_feedback.Bind(UndefinedConstant()); allocation_feedback.Bind(UndefinedConstant());
...@@ -812,7 +809,7 @@ Node* InterpreterAssembler::CallConstruct(Node* constructor, Node* context, ...@@ -812,7 +809,7 @@ Node* InterpreterAssembler::CallConstruct(Node* constructor, Node* context,
StoreFixedArrayElement( StoreFixedArrayElement(
type_feedback_vector, slot_id, type_feedback_vector, slot_id,
HeapConstant(TypeFeedbackVector::MegamorphicSentinel(isolate())), HeapConstant(TypeFeedbackVector::MegamorphicSentinel(isolate())),
SKIP_WRITE_BARRIER, 0, INTPTR_PARAMETERS); SKIP_WRITE_BARRIER);
Goto(&call_construct_function); Goto(&call_construct_function);
} }
} }
...@@ -1263,8 +1260,7 @@ Node* InterpreterAssembler::ExportRegisterFile(Node* array) { ...@@ -1263,8 +1260,7 @@ Node* InterpreterAssembler::ExportRegisterFile(Node* array) {
Node* reg_index = IntPtrSub(IntPtrConstant(Register(0).ToOperand()), index); Node* reg_index = IntPtrSub(IntPtrConstant(Register(0).ToOperand()), index);
Node* value = LoadRegister(reg_index); Node* value = LoadRegister(reg_index);
StoreFixedArrayElement(array, index, value, UPDATE_WRITE_BARRIER, 0, StoreFixedArrayElement(array, index, value);
INTPTR_PARAMETERS);
var_index.Bind(IntPtrAdd(index, IntPtrConstant(1))); var_index.Bind(IntPtrAdd(index, IntPtrConstant(1)));
Goto(&loop); Goto(&loop);
...@@ -1294,13 +1290,12 @@ Node* InterpreterAssembler::ImportRegisterFile(Node* array) { ...@@ -1294,13 +1290,12 @@ Node* InterpreterAssembler::ImportRegisterFile(Node* array) {
Node* index = var_index.value(); Node* index = var_index.value();
GotoUnless(UintPtrLessThan(index, register_count), &done_loop); GotoUnless(UintPtrLessThan(index, register_count), &done_loop);
Node* value = LoadFixedArrayElement(array, index, 0, INTPTR_PARAMETERS); Node* value = LoadFixedArrayElement(array, index);
Node* reg_index = IntPtrSub(IntPtrConstant(Register(0).ToOperand()), index); Node* reg_index = IntPtrSub(IntPtrConstant(Register(0).ToOperand()), index);
StoreRegister(value, reg_index); StoreRegister(value, reg_index);
StoreFixedArrayElement(array, index, StaleRegisterConstant(), StoreFixedArrayElement(array, index, StaleRegisterConstant());
UPDATE_WRITE_BARRIER, 0, INTPTR_PARAMETERS);
var_index.Bind(IntPtrAdd(index, IntPtrConstant(1))); var_index.Bind(IntPtrAdd(index, IntPtrConstant(1)));
Goto(&loop); Goto(&loop);
......
...@@ -884,8 +884,7 @@ void Interpreter::DoLdaModuleVariable(InterpreterAssembler* assembler) { ...@@ -884,8 +884,7 @@ void Interpreter::DoLdaModuleVariable(InterpreterAssembler* assembler) {
__ LoadObjectField(module, Module::kRegularExportsOffset); __ LoadObjectField(module, Module::kRegularExportsOffset);
// The actual array index is (cell_index - 1). // The actual array index is (cell_index - 1).
Node* export_index = __ IntPtrSub(cell_index, __ IntPtrConstant(1)); Node* export_index = __ IntPtrSub(cell_index, __ IntPtrConstant(1));
Node* cell = __ LoadFixedArrayElement(regular_exports, export_index, 0, Node* cell = __ LoadFixedArrayElement(regular_exports, export_index);
CodeStubAssembler::INTPTR_PARAMETERS);
__ SetAccumulator(__ LoadObjectField(cell, Cell::kValueOffset)); __ SetAccumulator(__ LoadObjectField(cell, Cell::kValueOffset));
__ Goto(&end); __ Goto(&end);
} }
...@@ -896,8 +895,7 @@ void Interpreter::DoLdaModuleVariable(InterpreterAssembler* assembler) { ...@@ -896,8 +895,7 @@ void Interpreter::DoLdaModuleVariable(InterpreterAssembler* assembler) {
__ LoadObjectField(module, Module::kRegularImportsOffset); __ LoadObjectField(module, Module::kRegularImportsOffset);
// The actual array index is (-cell_index - 1). // The actual array index is (-cell_index - 1).
Node* import_index = __ IntPtrSub(__ IntPtrConstant(-1), cell_index); Node* import_index = __ IntPtrSub(__ IntPtrConstant(-1), cell_index);
Node* cell = __ LoadFixedArrayElement(regular_imports, import_index, 0, Node* cell = __ LoadFixedArrayElement(regular_imports, import_index);
CodeStubAssembler::INTPTR_PARAMETERS);
__ SetAccumulator(__ LoadObjectField(cell, Cell::kValueOffset)); __ SetAccumulator(__ LoadObjectField(cell, Cell::kValueOffset));
__ Goto(&end); __ Goto(&end);
} }
...@@ -929,8 +927,7 @@ void Interpreter::DoStaModuleVariable(InterpreterAssembler* assembler) { ...@@ -929,8 +927,7 @@ void Interpreter::DoStaModuleVariable(InterpreterAssembler* assembler) {
__ LoadObjectField(module, Module::kRegularExportsOffset); __ LoadObjectField(module, Module::kRegularExportsOffset);
// The actual array index is (cell_index - 1). // The actual array index is (cell_index - 1).
Node* export_index = __ IntPtrSub(cell_index, __ IntPtrConstant(1)); Node* export_index = __ IntPtrSub(cell_index, __ IntPtrConstant(1));
Node* cell = __ LoadFixedArrayElement(regular_exports, export_index, 0, Node* cell = __ LoadFixedArrayElement(regular_exports, export_index);
CodeStubAssembler::INTPTR_PARAMETERS);
__ StoreObjectField(cell, Cell::kValueOffset, value); __ StoreObjectField(cell, Cell::kValueOffset, value);
__ Goto(&end); __ Goto(&end);
} }
...@@ -2718,8 +2715,7 @@ void Interpreter::DoForInNext(InterpreterAssembler* assembler) { ...@@ -2718,8 +2715,7 @@ void Interpreter::DoForInNext(InterpreterAssembler* assembler) {
Node* megamorphic_sentinel = Node* megamorphic_sentinel =
__ HeapConstant(TypeFeedbackVector::MegamorphicSentinel(isolate_)); __ HeapConstant(TypeFeedbackVector::MegamorphicSentinel(isolate_));
__ StoreFixedArrayElement(type_feedback_vector, vector_index, __ StoreFixedArrayElement(type_feedback_vector, vector_index,
megamorphic_sentinel, SKIP_WRITE_BARRIER, 0, megamorphic_sentinel, SKIP_WRITE_BARRIER);
CodeStubAssembler::INTPTR_PARAMETERS);
// Need to filter the {key} for the {receiver}. // Need to filter the {key} for the {receiver}.
Node* context = __ GetContext(); Node* context = __ GetContext();
......
...@@ -1897,10 +1897,10 @@ TEST(AllocatePromiseReactionJobInfo) { ...@@ -1897,10 +1897,10 @@ TEST(AllocatePromiseReactionJobInfo) {
CodeStubAssembler m(data.state()); CodeStubAssembler m(data.state());
Node* const context = m.Parameter(kNumParams + 2); Node* const context = m.Parameter(kNumParams + 2);
Node* const tasks = m.AllocateFixedArray(FAST_ELEMENTS, m.Int32Constant(1)); Node* const tasks = m.AllocateFixedArray(FAST_ELEMENTS, m.IntPtrConstant(1));
m.StoreFixedArrayElement(tasks, 0, m.UndefinedConstant()); m.StoreFixedArrayElement(tasks, 0, m.UndefinedConstant());
Node* const deferred = Node* const deferred =
m.AllocateFixedArray(FAST_ELEMENTS, m.Int32Constant(1)); m.AllocateFixedArray(FAST_ELEMENTS, m.IntPtrConstant(1));
m.StoreFixedArrayElement(deferred, 0, m.UndefinedConstant()); m.StoreFixedArrayElement(deferred, 0, m.UndefinedConstant());
Node* const info = m.AllocatePromiseReactionJobInfo(m.SmiConstant(1), tasks, Node* const info = m.AllocatePromiseReactionJobInfo(m.SmiConstant(1), tasks,
deferred, context); deferred, context);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment