[cleanup] Remove dead code related to side-effect checks
Removes CodeStubAssembler::GotoIfDebugExecutionModeChecksSideEffects and associated test as well as the PerformSideEffectCheckForObject runtime function. Bug: v8:9396 Change-Id: Id7748be8fbf1d633f759fef8751ddca13a21748c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1824937 Reviewed-by: Simon Zünd <szuend@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Dan Elphick <delphick@chromium.org> Cr-Commit-Position: refs/heads/master@{#64130}
This commit is contained in:
parent
44c3b7b518
commit
cf182b05b7
@ -1236,19 +1236,6 @@ void CodeStubAssembler::GotoIfForceSlowPath(Label* if_true) {
|
||||
#endif
|
||||
}
|
||||
|
||||
void CodeStubAssembler::GotoIfDebugExecutionModeChecksSideEffects(
|
||||
Label* if_true) {
|
||||
STATIC_ASSERT(sizeof(DebugInfo::ExecutionMode) >= sizeof(int32_t));
|
||||
|
||||
TNode<ExternalReference> execution_mode_address = ExternalConstant(
|
||||
ExternalReference::debug_execution_mode_address(isolate()));
|
||||
TNode<Int32T> execution_mode =
|
||||
UncheckedCast<Int32T>(Load(MachineType::Int32(), execution_mode_address));
|
||||
|
||||
GotoIf(Word32Equal(execution_mode, Int32Constant(DebugInfo::kSideEffects)),
|
||||
if_true);
|
||||
}
|
||||
|
||||
TNode<HeapObject> CodeStubAssembler::AllocateRaw(TNode<IntPtrT> size_in_bytes,
|
||||
AllocationFlags flags,
|
||||
TNode<RawPtrT> top_address,
|
||||
|
@ -977,9 +977,6 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
|
||||
// Works only with V8_ENABLE_FORCE_SLOW_PATH compile time flag. Nop otherwise.
|
||||
void GotoIfForceSlowPath(Label* if_true);
|
||||
|
||||
// Branches to {if_true} when Debug::ExecutionMode is DebugInfo::kSideEffect.
|
||||
void GotoIfDebugExecutionModeChecksSideEffects(Label* if_true);
|
||||
|
||||
// Load value from current parent frame by given offset in bytes.
|
||||
Node* LoadFromParentFrame(int offset,
|
||||
MachineType type = MachineType::AnyTagged());
|
||||
|
@ -826,19 +826,6 @@ RUNTIME_FUNCTION(Runtime_LiveEditPatchScript) {
|
||||
return ReadOnlyRoots(isolate).undefined_value();
|
||||
}
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_PerformSideEffectCheckForObject) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK_EQ(1, args.length());
|
||||
CONVERT_ARG_HANDLE_CHECKED(JSReceiver, object, 0);
|
||||
|
||||
DCHECK_EQ(isolate->debug_execution_mode(), DebugInfo::kSideEffects);
|
||||
if (!isolate->debug()->PerformSideEffectCheckForObject(object)) {
|
||||
DCHECK(isolate->has_pending_exception());
|
||||
return ReadOnlyRoots(isolate).exception();
|
||||
}
|
||||
return ReadOnlyRoots(isolate).undefined_value();
|
||||
}
|
||||
|
||||
RUNTIME_FUNCTION(Runtime_ProfileCreateSnapshotDataBlob) {
|
||||
HandleScope scope(isolate);
|
||||
DCHECK_EQ(0, args.length());
|
||||
|
@ -319,7 +319,6 @@ namespace internal {
|
||||
F(ObjectValues, 1, 1) \
|
||||
F(ObjectValuesSkipFastPath, 1, 1) \
|
||||
F(OptimizeObjectForAddingMultipleProperties, 2, 1) \
|
||||
F(PerformSideEffectCheckForObject, 1, 1) \
|
||||
F(SetDataProperties, 2, 1) \
|
||||
F(SetKeyedProperty, 3, 1) \
|
||||
F(SetNamedProperty, 3, 1) \
|
||||
|
@ -3582,37 +3582,6 @@ TEST(TestCallBuiltinIndirectLoad) {
|
||||
Handle<String>::cast(result.ToHandleChecked())));
|
||||
}
|
||||
|
||||
TEST(TestGotoIfDebugExecutionModeChecksSideEffects) {
|
||||
Isolate* isolate(CcTest::InitIsolateOnce());
|
||||
CodeAssemblerTester asm_tester(isolate, 0);
|
||||
{
|
||||
CodeStubAssembler m(asm_tester.state());
|
||||
Label is_true(&m), is_false(&m);
|
||||
m.GotoIfDebugExecutionModeChecksSideEffects(&is_true);
|
||||
m.Goto(&is_false);
|
||||
m.BIND(&is_false);
|
||||
m.Return(m.BooleanConstant(false));
|
||||
|
||||
m.BIND(&is_true);
|
||||
m.Return(m.BooleanConstant(true));
|
||||
}
|
||||
|
||||
FunctionTester ft(asm_tester.GenerateCode(), 0);
|
||||
|
||||
CHECK(isolate->debug_execution_mode() != DebugInfo::kSideEffects);
|
||||
|
||||
Handle<Object> result = ft.Call().ToHandleChecked();
|
||||
CHECK(result->IsBoolean());
|
||||
CHECK_EQ(false, result->BooleanValue(isolate));
|
||||
|
||||
isolate->debug()->StartSideEffectCheckMode();
|
||||
CHECK(isolate->debug_execution_mode() == DebugInfo::kSideEffects);
|
||||
|
||||
result = ft.Call().ToHandleChecked();
|
||||
CHECK(result->IsBoolean());
|
||||
CHECK_EQ(true, result->BooleanValue(isolate));
|
||||
}
|
||||
|
||||
} // namespace compiler
|
||||
} // namespace internal
|
||||
} // namespace v8
|
||||
|
Loading…
Reference in New Issue
Block a user