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