diff --git a/src/code-stub-assembler.h b/src/code-stub-assembler.h index 31d76f6e34..068d6a1b5b 100644 --- a/src/code-stub-assembler.h +++ b/src/code-stub-assembler.h @@ -1890,18 +1890,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler Variable* var_numeric, Variable* var_feedback); - // TODO(ishell): drop this version once all usages are fixed. - TNode TimesPointerSize(SloppyTNode value) { - STATIC_ASSERT(kTaggedSize == kSystemPointerSize); - return TimesSystemPointerSize(value); - } - TNode TimesPointerSize(TNode value) { - return Signed(TimesPointerSize(implicit_cast>(value))); - } - TNode TimesPointerSize(TNode value) { - return Unsigned(TimesPointerSize(implicit_cast>(value))); - } - TNode TimesSystemPointerSize(SloppyTNode value); TNode TimesSystemPointerSize(TNode value) { return Signed(TimesSystemPointerSize(implicit_cast>(value))); diff --git a/src/interpreter/bytecode-array-writer.cc b/src/interpreter/bytecode-array-writer.cc index 3dbd009879..a563ff4fc3 100644 --- a/src/interpreter/bytecode-array-writer.cc +++ b/src/interpreter/bytecode-array-writer.cc @@ -42,7 +42,7 @@ Handle BytecodeArrayWriter::ToBytecodeArray( DCHECK_EQ(0, unbound_jumps_); int bytecode_size = static_cast(bytecodes()->size()); - int frame_size = register_count * kPointerSize; + int frame_size = register_count * kSystemPointerSize; Handle constant_pool = constant_array_builder()->ToFixedArray(isolate); Handle source_position_table = diff --git a/src/interpreter/bytecode-register.cc b/src/interpreter/bytecode-register.cc index d79bf9a9d0..56f6297016 100644 --- a/src/interpreter/bytecode-register.cc +++ b/src/interpreter/bytecode-register.cc @@ -11,27 +11,27 @@ namespace interpreter { static const int kLastParamRegisterIndex = (InterpreterFrameConstants::kRegisterFileFromFp - InterpreterFrameConstants::kLastParamFromFp) / - kPointerSize; + kSystemPointerSize; static const int kFunctionClosureRegisterIndex = (InterpreterFrameConstants::kRegisterFileFromFp - StandardFrameConstants::kFunctionOffset) / - kPointerSize; + kSystemPointerSize; static const int kCurrentContextRegisterIndex = (InterpreterFrameConstants::kRegisterFileFromFp - StandardFrameConstants::kContextOffset) / - kPointerSize; + kSystemPointerSize; static const int kBytecodeArrayRegisterIndex = (InterpreterFrameConstants::kRegisterFileFromFp - InterpreterFrameConstants::kBytecodeArrayFromFp) / - kPointerSize; + kSystemPointerSize; static const int kBytecodeOffsetRegisterIndex = (InterpreterFrameConstants::kRegisterFileFromFp - InterpreterFrameConstants::kBytecodeOffsetFromFp) / - kPointerSize; + kSystemPointerSize; static const int kCallerPCOffsetRegisterIndex = (InterpreterFrameConstants::kRegisterFileFromFp - InterpreterFrameConstants::kCallerPCOffsetFromFp) / - kPointerSize; + kSystemPointerSize; Register Register::FromParameterIndex(int index, int parameter_count) { DCHECK_GE(index, 0); diff --git a/src/interpreter/bytecode-register.h b/src/interpreter/bytecode-register.h index b5420f7e72..ae8bbe4275 100644 --- a/src/interpreter/bytecode-register.h +++ b/src/interpreter/bytecode-register.h @@ -91,7 +91,7 @@ class V8_EXPORT_PRIVATE Register final { static const int kInvalidIndex = kMaxInt; static const int kRegisterFileStartOffset = - InterpreterFrameConstants::kRegisterFileFromFp / kPointerSize; + InterpreterFrameConstants::kRegisterFileFromFp / kSystemPointerSize; int index_; }; diff --git a/src/interpreter/interpreter-assembler.cc b/src/interpreter/interpreter-assembler.cc index f6175a74d8..dadfaa8783 100644 --- a/src/interpreter/interpreter-assembler.cc +++ b/src/interpreter/interpreter-assembler.cc @@ -232,7 +232,7 @@ Node* InterpreterAssembler::RegisterLocation(Register reg) { } Node* InterpreterAssembler::RegisterFrameOffset(Node* index) { - return TimesPointerSize(index); + return TimesSystemPointerSize(index); } Node* InterpreterAssembler::LoadRegister(Node* reg_index) { @@ -242,12 +242,12 @@ Node* InterpreterAssembler::LoadRegister(Node* reg_index) { Node* InterpreterAssembler::LoadRegister(Register reg) { return Load(MachineType::AnyTagged(), GetInterpretedFramePointer(), - IntPtrConstant(reg.ToOperand() << kPointerSizeLog2)); + IntPtrConstant(reg.ToOperand() << kSystemPointerSizeLog2)); } Node* InterpreterAssembler::LoadAndUntagRegister(Register reg) { - return LoadAndUntagSmi(GetInterpretedFramePointer(), reg.ToOperand() - << kPointerSizeLog2); + return LoadAndUntagSmi(GetInterpretedFramePointer(), + reg.ToOperand() << kSystemPointerSizeLog2); } Node* InterpreterAssembler::LoadRegisterAtOperandIndex(int operand_index) { @@ -298,7 +298,7 @@ Node* InterpreterAssembler::RegisterLocationInRegisterList( void InterpreterAssembler::StoreRegister(Node* value, Register reg) { StoreNoWriteBarrier( MachineRepresentation::kTagged, GetInterpretedFramePointer(), - IntPtrConstant(reg.ToOperand() << kPointerSizeLog2), value); + IntPtrConstant(reg.ToOperand() << kSystemPointerSizeLog2), value); } void InterpreterAssembler::StoreRegister(Node* value, Node* reg_index) { @@ -308,7 +308,7 @@ void InterpreterAssembler::StoreRegister(Node* value, Node* reg_index) { } void InterpreterAssembler::StoreAndTagRegister(Node* value, Register reg) { - int offset = reg.ToOperand() << kPointerSizeLog2; + int offset = reg.ToOperand() << kSystemPointerSizeLog2; StoreAndTagSmi(GetInterpretedFramePointer(), offset, value); } @@ -710,7 +710,7 @@ void InterpreterAssembler::IncrementCallCount(Node* feedback_vector, Node* slot_id) { Comment("increment call count"); TNode call_count = - CAST(LoadFeedbackVectorSlot(feedback_vector, slot_id, kPointerSize)); + CAST(LoadFeedbackVectorSlot(feedback_vector, slot_id, kTaggedSize)); // The lowest {FeedbackNexus::CallCountField::kShift} bits of the call // count are used as flags. To increment the call count by 1 we hence // have to increment by 1 << {FeedbackNexus::CallCountField::kShift}. @@ -718,7 +718,7 @@ void InterpreterAssembler::IncrementCallCount(Node* feedback_vector, call_count, SmiConstant(1 << FeedbackNexus::CallCountField::kShift)); // Count is Smi, so we don't need a write barrier. StoreFeedbackVectorSlot(feedback_vector, slot_id, new_count, - SKIP_WRITE_BARRIER, kPointerSize); + SKIP_WRITE_BARRIER, kTaggedSize); } void InterpreterAssembler::CollectCallableFeedback(Node* target, Node* context, @@ -1419,7 +1419,7 @@ Node* InterpreterAssembler::DispatchToBytecode(Node* target_bytecode, Node* target_code_entry = Load(MachineType::Pointer(), DispatchTableRawPointer(), - TimesPointerSize(target_bytecode)); + TimesSystemPointerSize(target_bytecode)); return DispatchToBytecodeHandlerEntry(target_code_entry, new_bytecode_offset, target_bytecode); @@ -1476,7 +1476,7 @@ void InterpreterAssembler::DispatchWide(OperandScale operand_scale) { Node* target_index = IntPtrAdd(base_index, next_bytecode); Node* target_code_entry = Load(MachineType::Pointer(), DispatchTableRawPointer(), - TimesPointerSize(target_index)); + TimesSystemPointerSize(target_index)); DispatchToBytecodeHandlerEntry(target_code_entry, next_bytecode_offset, next_bytecode); @@ -1563,8 +1563,8 @@ void InterpreterAssembler::TraceBytecodeDispatch(Node* target_bytecode) { Node* source_bytecode_table_index = IntPtrConstant( static_cast(bytecode_) * (static_cast(Bytecode::kLast) + 1)); - Node* counter_offset = - TimesPointerSize(IntPtrAdd(source_bytecode_table_index, target_bytecode)); + Node* counter_offset = TimesSystemPointerSize( + IntPtrAdd(source_bytecode_table_index, target_bytecode)); Node* old_counter = Load(MachineType::IntPtr(), counters_table, counter_offset);