Commit 03b2be79 authored by Santiago Aboy Solanes's avatar Santiago Aboy Solanes Committed by Commit Bot

[cleanup] Remove sloppy-ness from SetAccumulator

Bug: v8:9810
Change-Id: I7bf617680e2e4029553d44ae4d11990ffd7a8a7a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1914212Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64949}
parent 7186b601
...@@ -157,8 +157,7 @@ TNode<Object> InterpreterAssembler::GetAccumulator() { ...@@ -157,8 +157,7 @@ TNode<Object> InterpreterAssembler::GetAccumulator() {
return TaggedPoisonOnSpeculation(GetAccumulatorUnchecked()); return TaggedPoisonOnSpeculation(GetAccumulatorUnchecked());
} }
// TODO(v8:6949): Remove sloppy-ness from SetAccumulator's value argument. void InterpreterAssembler::SetAccumulator(TNode<Object> value) {
void InterpreterAssembler::SetAccumulator(SloppyTNode<Object> value) {
DCHECK(Bytecodes::WritesAccumulator(bytecode_)); DCHECK(Bytecodes::WritesAccumulator(bytecode_));
accumulator_use_ = accumulator_use_ | AccumulatorUse::kWrite; accumulator_use_ = accumulator_use_ | AccumulatorUse::kWrite;
accumulator_ = value; accumulator_ = value;
......
...@@ -67,7 +67,7 @@ class V8_EXPORT_PRIVATE InterpreterAssembler : public CodeStubAssembler { ...@@ -67,7 +67,7 @@ class V8_EXPORT_PRIVATE InterpreterAssembler : public CodeStubAssembler {
TNode<Uint32T> BytecodeOperandIntrinsicId(int operand_index); TNode<Uint32T> BytecodeOperandIntrinsicId(int operand_index);
// Accumulator. // Accumulator.
TNode<Object> GetAccumulator(); TNode<Object> GetAccumulator();
void SetAccumulator(SloppyTNode<Object> value); void SetAccumulator(TNode<Object> value);
// Context. // Context.
TNode<Context> GetContext(); TNode<Context> GetContext();
......
...@@ -1692,7 +1692,7 @@ IGNITION_HANDLER(CallRuntime, InterpreterAssembler) { ...@@ -1692,7 +1692,7 @@ IGNITION_HANDLER(CallRuntime, InterpreterAssembler) {
TNode<Uint32T> function_id = BytecodeOperandRuntimeId(0); TNode<Uint32T> function_id = BytecodeOperandRuntimeId(0);
RegListNodePair args = GetRegisterListAtOperandIndex(1); RegListNodePair args = GetRegisterListAtOperandIndex(1);
TNode<Context> context = GetContext(); TNode<Context> context = GetContext();
Node* result = CallRuntimeN(function_id, context, args); TNode<Object> result = CAST(CallRuntimeN(function_id, context, args));
SetAccumulator(result); SetAccumulator(result);
Dispatch(); Dispatch();
} }
......
...@@ -46,7 +46,7 @@ InterpreterAssemblerTest::InterpreterAssemblerForTest:: ...@@ -46,7 +46,7 @@ InterpreterAssemblerTest::InterpreterAssemblerForTest::
GetAccumulator(); GetAccumulator();
} }
if (Bytecodes::WritesAccumulator(bytecode())) { if (Bytecodes::WritesAccumulator(bytecode())) {
SetAccumulator(nullptr); SetAccumulator(NullConstant());
} }
} }
......
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