From d8093982aa834127e3f04a2fcacadbafd453a013 Mon Sep 17 00:00:00 2001 From: Daco Harkes Date: Fri, 27 Aug 2021 07:09:26 +0000 Subject: [PATCH] [vm] Cleanup dead code RTE ClassID_getID This has been dead code since the bytecode interpreter has been removed. TEST=This removes dead code. Building the SDK tests this code is not imported. Running the CQ tests it was not executed. Change-Id: I75ce3fc2dfccb57d3287db7e716901a8b5a0c20e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211264 Auto-Submit: Daco Harkes Reviewed-by: Tess Strickland Commit-Queue: Tess Strickland --- runtime/lib/class_id.cc | 16 ---------------- runtime/lib/internal_sources.gni | 6 ------ runtime/vm/BUILD.gn | 9 ++++----- runtime/vm/bootstrap_natives.h | 1 - sdk/lib/_internal/vm/lib/class_id.dart | 14 -------------- 5 files changed, 4 insertions(+), 42 deletions(-) delete mode 100644 runtime/lib/class_id.cc delete mode 100644 runtime/lib/internal_sources.gni delete mode 100644 sdk/lib/_internal/vm/lib/class_id.dart diff --git a/runtime/lib/class_id.cc b/runtime/lib/class_id.cc deleted file mode 100644 index c0f5295bd82..00000000000 --- a/runtime/lib/class_id.cc +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) 2014, 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 "platform/assert.h" -#include "vm/bootstrap_natives.h" - -namespace dart { - -DEFINE_NATIVE_ENTRY(ClassID_getID, 0, 1) { - const Instance& instance = - Instance::CheckedHandle(zone, arguments->NativeArgAt(0)); - return Smi::New(instance.GetClassId()); -} - -} // namespace dart diff --git a/runtime/lib/internal_sources.gni b/runtime/lib/internal_sources.gni deleted file mode 100644 index b16eafe80ca..00000000000 --- a/runtime/lib/internal_sources.gni +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright (c) 2017, 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. - -# Sources that patch the library "dart:_internal". -internal_runtime_cc_files = [ "class_id.cc" ] diff --git a/runtime/vm/BUILD.gn b/runtime/vm/BUILD.gn index ab184be6d7a..69dfc4bff05 100644 --- a/runtime/vm/BUILD.gn +++ b/runtime/vm/BUILD.gn @@ -25,7 +25,6 @@ import("../lib/convert_sources.gni") import("../lib/core_sources.gni") import("../lib/developer_sources.gni") import("../lib/ffi_sources.gni") -import("../lib/internal_sources.gni") import("../lib/isolate_sources.gni") import("../lib/math_sources.gni") import("../lib/mirrors_sources.gni") @@ -153,10 +152,10 @@ library_for_all_configs("libdart_lib") { } include_dirs = [ ".." ] allsources = async_runtime_cc_files + core_runtime_cc_files + - developer_runtime_cc_files + internal_runtime_cc_files + - isolate_runtime_cc_files + math_runtime_cc_files + - mirrors_runtime_cc_files + typed_data_runtime_cc_files + - vmservice_runtime_cc_files + ffi_runtime_cc_files + developer_runtime_cc_files + isolate_runtime_cc_files + + math_runtime_cc_files + mirrors_runtime_cc_files + + typed_data_runtime_cc_files + vmservice_runtime_cc_files + + ffi_runtime_cc_files sources = [ "bootstrap.cc" ] + rebase_path(allsources, ".", "../lib") snapshot_sources = [] } diff --git a/runtime/vm/bootstrap_natives.h b/runtime/vm/bootstrap_natives.h index 717040f22ca..4911d25fc68 100644 --- a/runtime/vm/bootstrap_natives.h +++ b/runtime/vm/bootstrap_natives.h @@ -356,7 +356,6 @@ namespace dart { V(UserTag_defaultTag, 0) \ V(UserTag_makeCurrent, 1) \ V(Profiler_getCurrentTag, 0) \ - V(ClassID_getID, 1) \ V(VMService_SendIsolateServiceMessage, 2) \ V(VMService_SendRootServiceMessage, 1) \ V(VMService_SendObjectRootServiceMessage, 1) \ diff --git a/sdk/lib/_internal/vm/lib/class_id.dart b/sdk/lib/_internal/vm/lib/class_id.dart deleted file mode 100644 index ff9d0b6d329..00000000000 --- a/sdk/lib/_internal/vm/lib/class_id.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (c) 2014, 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. - -// part of "internal_patch.dart"; - -@pragma("vm:entry-point") -class ClassID { - @pragma("vm:entry-point") - @pragma("vm:exact-result-type", "dart:core#_Smi") - static int getID(Object value) native "ClassID_getID"; - - // VM injects class id constants into this class. -}