[vm] Remove dead code LinkedHashMap RTEs

These natives are implemented in kernel_to_il.cc. Now that the bytecode
interpreter has been removed, the RTEs are dead code.

TEST=test/language includes many tests with Map.

Change-Id: I42bb49434f4be0b0a881353f2f24816bfda7a3ed
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-linux-debug-x64-try,vm-kernel-reload-linux-debug-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-simarm64c-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201820
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
This commit is contained in:
Daco Harkes
2021-05-31 10:25:22 +00:00
committed by commit-bot@chromium.org
parent 0742ed66a7
commit 2a130ff363
4 changed files with 5 additions and 108 deletions
-5
View File
@@ -1,5 +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.
collection_runtime_cc_files = [ "linked_hash_map.cc" ]
-86
View File
@@ -1,86 +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"
#include "vm/exceptions.h"
#include "vm/flags.h"
#include "vm/native_entry.h"
#include "vm/object.h"
namespace dart {
DEFINE_NATIVE_ENTRY(LinkedHashMap_getIndex, 0, 1) {
const LinkedHashMap& map =
LinkedHashMap::CheckedHandle(zone, arguments->NativeArgAt(0));
return map.index();
}
DEFINE_NATIVE_ENTRY(LinkedHashMap_setIndex, 0, 2) {
const LinkedHashMap& map =
LinkedHashMap::CheckedHandle(zone, arguments->NativeArgAt(0));
const TypedData& index =
TypedData::CheckedHandle(zone, arguments->NativeArgAt(1));
map.SetIndex(index);
return Object::null();
}
DEFINE_NATIVE_ENTRY(LinkedHashMap_getData, 0, 1) {
const LinkedHashMap& map =
LinkedHashMap::CheckedHandle(zone, arguments->NativeArgAt(0));
return map.data();
}
DEFINE_NATIVE_ENTRY(LinkedHashMap_setData, 0, 2) {
const LinkedHashMap& map =
LinkedHashMap::CheckedHandle(zone, arguments->NativeArgAt(0));
const Array& data = Array::CheckedHandle(zone, arguments->NativeArgAt(1));
map.SetData(data);
return Object::null();
}
DEFINE_NATIVE_ENTRY(LinkedHashMap_getHashMask, 0, 1) {
const LinkedHashMap& map =
LinkedHashMap::CheckedHandle(zone, arguments->NativeArgAt(0));
return map.hash_mask();
}
DEFINE_NATIVE_ENTRY(LinkedHashMap_setHashMask, 0, 2) {
const LinkedHashMap& map =
LinkedHashMap::CheckedHandle(zone, arguments->NativeArgAt(0));
const Smi& hashMask = Smi::CheckedHandle(zone, arguments->NativeArgAt(1));
map.SetHashMask(hashMask.Value());
return Object::null();
}
DEFINE_NATIVE_ENTRY(LinkedHashMap_getDeletedKeys, 0, 1) {
const LinkedHashMap& map =
LinkedHashMap::CheckedHandle(zone, arguments->NativeArgAt(0));
return map.deleted_keys();
}
DEFINE_NATIVE_ENTRY(LinkedHashMap_setDeletedKeys, 0, 2) {
const LinkedHashMap& map =
LinkedHashMap::CheckedHandle(zone, arguments->NativeArgAt(0));
const Smi& deletedKeys = Smi::CheckedHandle(zone, arguments->NativeArgAt(1));
map.SetDeletedKeys(deletedKeys.Value());
return Object::null();
}
DEFINE_NATIVE_ENTRY(LinkedHashMap_getUsedData, 0, 1) {
const LinkedHashMap& map =
LinkedHashMap::CheckedHandle(zone, arguments->NativeArgAt(0));
return map.used_data();
}
DEFINE_NATIVE_ENTRY(LinkedHashMap_setUsedData, 0, 2) {
const LinkedHashMap& map =
LinkedHashMap::CheckedHandle(zone, arguments->NativeArgAt(0));
const Smi& usedData = Smi::CheckedHandle(zone, arguments->NativeArgAt(1));
map.SetUsedData(usedData.Value());
return Object::null();
}
} // namespace dart
+5 -7
View File
@@ -21,7 +21,6 @@ import("../bin/cli_sources.gni")
import("../bin/io_sources.gni")
import("../configs.gni")
import("../lib/async_sources.gni")
import("../lib/collection_sources.gni")
import("../lib/convert_sources.gni")
import("../lib/core_sources.gni")
import("../lib/developer_sources.gni")
@@ -147,12 +146,11 @@ library_for_all_configs("libdart_lib") {
}
}
include_dirs = [ ".." ]
allsources = async_runtime_cc_files + collection_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
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
sources = [ "bootstrap.cc" ] + rebase_path(allsources, ".", "../lib")
snapshot_sources = []
}
-10
View File
@@ -348,16 +348,6 @@ namespace dart {
V(Internal_writeIntoTwoByteString, 3) \
V(InvocationMirror_unpackTypeArguments, 2) \
V(NoSuchMethodError_existingMethodSignature, 3) \
V(LinkedHashMap_getIndex, 1) \
V(LinkedHashMap_setIndex, 2) \
V(LinkedHashMap_getData, 1) \
V(LinkedHashMap_setData, 2) \
V(LinkedHashMap_getHashMask, 1) \
V(LinkedHashMap_setHashMask, 2) \
V(LinkedHashMap_getUsedData, 1) \
V(LinkedHashMap_setUsedData, 2) \
V(LinkedHashMap_getDeletedKeys, 1) \
V(LinkedHashMap_setDeletedKeys, 2) \
V(WeakProperty_getKey, 1) \
V(WeakProperty_setKey, 2) \
V(WeakProperty_getValue, 1) \