From 9e1eff924b32fa3a30911ce8d4e904b96eb1d9b9 Mon Sep 17 00:00:00 2001 From: Daco Harkes Date: Tue, 18 Jan 2022 19:15:25 +0000 Subject: [PATCH] [vm] Remove dead runtime entries for `WeakProperty` TEST=This is removing dead code, running one VM bot should be enough. Change-Id: I9938ecf89fa2f27e6434d39dd65d860e61c632e4 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228205 Reviewed-by: Ryan Macnak Commit-Queue: Daco Harkes --- runtime/lib/core_sources.gni | 1 - runtime/lib/weak_property.cc | 41 ---------------------------------- runtime/vm/bootstrap_natives.h | 4 ---- 3 files changed, 46 deletions(-) delete mode 100644 runtime/lib/weak_property.cc diff --git a/runtime/lib/core_sources.gni b/runtime/lib/core_sources.gni index 7e18428b5f0..c5b40f1cd6c 100644 --- a/runtime/lib/core_sources.gni +++ b/runtime/lib/core_sources.gni @@ -22,5 +22,4 @@ core_runtime_cc_files = [ "stopwatch.cc", "string.cc", "uri.cc", - "weak_property.cc", ] diff --git a/runtime/lib/weak_property.cc b/runtime/lib/weak_property.cc deleted file mode 100644 index 16eb41c6e90..00000000000 --- a/runtime/lib/weak_property.cc +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -#include "vm/bootstrap_natives.h" - -#include "vm/exceptions.h" -#include "vm/native_entry.h" -#include "vm/object.h" - -namespace dart { - -DEFINE_NATIVE_ENTRY(WeakProperty_getKey, 0, 1) { - GET_NON_NULL_NATIVE_ARGUMENT(WeakProperty, weak_property, - arguments->NativeArgAt(0)); - return weak_property.key(); -} - -DEFINE_NATIVE_ENTRY(WeakProperty_setKey, 0, 2) { - GET_NON_NULL_NATIVE_ARGUMENT(WeakProperty, weak_property, - arguments->NativeArgAt(0)); - GET_NON_NULL_NATIVE_ARGUMENT(Instance, key, arguments->NativeArgAt(1)); - weak_property.set_key(key); - return Object::null(); -} - -DEFINE_NATIVE_ENTRY(WeakProperty_getValue, 0, 1) { - GET_NON_NULL_NATIVE_ARGUMENT(WeakProperty, weak_property, - arguments->NativeArgAt(0)); - return weak_property.value(); -} - -DEFINE_NATIVE_ENTRY(WeakProperty_setValue, 0, 2) { - GET_NON_NULL_NATIVE_ARGUMENT(WeakProperty, weak_property, - arguments->NativeArgAt(0)); - GET_NON_NULL_NATIVE_ARGUMENT(Instance, value, arguments->NativeArgAt(1)); - weak_property.set_value(value); - return Object::null(); -} - -} // namespace dart diff --git a/runtime/vm/bootstrap_natives.h b/runtime/vm/bootstrap_natives.h index 69ed79e3670..4c86f333c67 100644 --- a/runtime/vm/bootstrap_natives.h +++ b/runtime/vm/bootstrap_natives.h @@ -345,10 +345,6 @@ namespace dart { V(Internal_deoptimizeFunctionsOnStack, 0) \ V(InvocationMirror_unpackTypeArguments, 2) \ V(NoSuchMethodError_existingMethodSignature, 3) \ - V(WeakProperty_getKey, 1) \ - V(WeakProperty_setKey, 2) \ - V(WeakProperty_getValue, 1) \ - V(WeakProperty_setValue, 2) \ V(Uri_isWindowsPlatform, 0) \ V(UserTag_new, 2) \ V(UserTag_label, 1) \