Skip to content

Commit 1dc4277

Browse files
rmacnak-googleCommit Queue
authored andcommitted
[vm] Remove dead code.
TEST=ci Change-Id: Ic162deea4a39869a158726616e5c8dc0ff058817 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/475781 Reviewed-by: Alexander Markov <alexmarkov@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
1 parent d3ecc0f commit 1dc4277

51 files changed

Lines changed: 3 additions & 660 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

runtime/bin/dartutils.cc

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -210,22 +210,6 @@ bool DartUtils::IsDartSchemeURL(const char* url_name) {
210210
return (strncmp(url_name, kDartScheme, kDartSchemeLen) == 0);
211211
}
212212

213-
bool DartUtils::IsDartIOLibURL(const char* url_name) {
214-
return (strcmp(url_name, kIOLibURL) == 0);
215-
}
216-
217-
bool DartUtils::IsDartCLILibURL(const char* url_name) {
218-
return (strcmp(url_name, kCLILibURL) == 0);
219-
}
220-
221-
bool DartUtils::IsDartHttpLibURL(const char* url_name) {
222-
return (strcmp(url_name, kHttpLibURL) == 0);
223-
}
224-
225-
bool DartUtils::IsDartBuiltinLibURL(const char* url_name) {
226-
return (strcmp(url_name, kBuiltinLibURL) == 0);
227-
}
228-
229213
char* DartUtils::DirName(const char* url) {
230214
const char* slash = strrchr(url, File::PathSeparator()[0]);
231215
if (slash == nullptr) {

runtime/bin/dartutils.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,6 @@ class DartUtils {
178178
const char* name,
179179
const char* val);
180180
static bool IsDartSchemeURL(const char* url_name);
181-
static bool IsDartIOLibURL(const char* url_name);
182-
static bool IsDartCLILibURL(const char* url_name);
183-
static bool IsDartHttpLibURL(const char* url_name);
184-
static bool IsDartBuiltinLibURL(const char* url_name);
185181

186182
// Returns directory name including the last path separator.
187183
//

runtime/vm/app_snapshot.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2481,8 +2481,7 @@ class LibraryDeserializationCluster : public DeserializationCluster {
24812481
lib->untag()->index_ = d.Read<int32_t>();
24822482
lib->untag()->num_imports_ = d.Read<uint16_t>();
24832483
lib->untag()->load_state_ = d.Read<int8_t>();
2484-
lib->untag()->flags_ =
2485-
UntaggedLibrary::InFullSnapshotBit::update(true, d.Read<uint8_t>());
2484+
lib->untag()->flags_ = d.Read<uint8_t>();
24862485
#if !defined(DART_PRECOMPILED_RUNTIME)
24872486
ASSERT(d_->kind() != Snapshot::kFullAOT);
24882487
lib->untag()->kernel_library_index_ = d.Read<uint32_t>();

runtime/vm/class_finalizer.cc

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -894,25 +894,6 @@ void ClassFinalizer::PrintClassInformation(const Class& cls) {
894894
}
895895
}
896896

897-
#endif // !defined(DART_PRECOMPILED_RUNTIME)
898-
899-
void ClassFinalizer::ReportError(const Error& error) {
900-
Report::LongJump(error);
901-
UNREACHABLE();
902-
}
903-
904-
void ClassFinalizer::ReportError(const char* format, ...) {
905-
va_list args;
906-
va_start(args, format);
907-
const Script& null_script = Script::Handle();
908-
Report::MessageV(Report::kError, null_script, TokenPosition::kNoSource,
909-
Report::AtLocation, format, args);
910-
va_end(args);
911-
UNREACHABLE();
912-
}
913-
914-
#if !defined(DART_PRECOMPILED_RUNTIME)
915-
916897
void ClassFinalizer::VerifyImplicitFieldOffsets() {
917898
#ifdef DEBUG
918899
Thread* thread = Thread::Current();

runtime/vm/class_finalizer.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,6 @@ class ClassFinalizer : public AllStatic {
9797
static void PrintClassInformation(const Class& cls);
9898
#endif // !defined(DART_PRECOMPILED_RUNTIME)
9999

100-
static void ReportError(const Error& error);
101-
static void ReportError(const char* format, ...) PRINTF_ATTRIBUTE(1, 2);
102-
103100
#if !defined(DART_PRECOMPILED_RUNTIME)
104101
// Verify implicit offsets recorded in the VM for direct access to fields of
105102
// Dart instances (e.g: _TypedListView, _ByteDataView).

runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4418,24 +4418,6 @@ Fragment StreamingFlowGraphBuilder::BuildNullLiteral(TokenPosition* position) {
44184418
return Constant(Instance::ZoneHandle(Z, Instance::null()));
44194419
}
44204420

4421-
Fragment StreamingFlowGraphBuilder::BuildFutureNullValue(
4422-
TokenPosition* position) {
4423-
if (position != nullptr) *position = TokenPosition::kNoSource;
4424-
const Class& future = Class::Handle(Z, IG->object_store()->future_class());
4425-
ASSERT(!future.IsNull());
4426-
const auto& error = future.EnsureIsFinalized(thread());
4427-
ASSERT(error == Error::null());
4428-
Function& constructor = Function::ZoneHandle(
4429-
Z, Resolver::ResolveFunction(Z, future, Symbols::FutureValue()));
4430-
ASSERT(!constructor.IsNull());
4431-
4432-
Fragment instructions;
4433-
instructions += BuildNullLiteral(position);
4434-
instructions += StaticCall(TokenPosition::kNoSource, constructor,
4435-
/* argument_count = */ 1, ICData::kStatic);
4436-
return instructions;
4437-
}
4438-
44394421
Fragment StreamingFlowGraphBuilder::BuildConstantExpression(
44404422
TokenPosition* position,
44414423
Tag tag) {

runtime/vm/compiler/frontend/kernel_binary_flowgraph.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,6 @@ class StreamingFlowGraphBuilder : public KernelReaderHelper {
340340
Fragment BuildDoubleLiteral(TokenPosition* position);
341341
Fragment BuildBoolLiteral(bool value, TokenPosition* position);
342342
Fragment BuildNullLiteral(TokenPosition* position);
343-
Fragment BuildFutureNullValue(TokenPosition* position);
344343
Fragment BuildConstantExpression(TokenPosition* position, Tag tag);
345344
Fragment BuildPartialTearoffInstantiation(TokenPosition* position);
346345
Fragment BuildLibraryPrefixAction(TokenPosition* position,

runtime/vm/compiler/frontend/kernel_fingerprints.cc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ class KernelFingerprintHelper : public KernelReaderHelper {
3939
void CalculateListOfDartTypesFingerprint();
4040
void CalculateListOfVariableDeclarationsFingerprint();
4141
void CalculateStringReferenceFingerprint();
42-
void CalculateListOfStringsFingerprint();
4342
void CalculateTypeParameterFingerprint();
4443
void CalculateTypeParametersListFingerprint();
4544
void CalculateCanonicalNameFingerprint();
@@ -138,13 +137,6 @@ void KernelFingerprintHelper::CalculateStringReferenceFingerprint() {
138137
H.DartString(ReadStringReference()).Hash()); // read ith string index.
139138
}
140139

141-
void KernelFingerprintHelper::CalculateListOfStringsFingerprint() {
142-
intptr_t list_length = ReadListLength(); // read list length.
143-
for (intptr_t i = 0; i < list_length; ++i) {
144-
CalculateStringReferenceFingerprint(); // read ith string index.
145-
}
146-
}
147-
148140
void KernelFingerprintHelper::CalculateListOfVariableDeclarationsFingerprint() {
149141
intptr_t list_length = ReadListLength(); // read list length.
150142
for (intptr_t i = 0; i < list_length; ++i) {

runtime/vm/compiler/relocation_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ struct RelocatorTestHelper {
4343
explicit RelocatorTestHelper(Thread* thread)
4444
: thread(thread),
4545
locker(thread, thread->isolate_group()->program_lock()),
46-
safepoint_and_growth_scope(thread, SafepointLevel::kGC) {
46+
safepoint_scope(thread) {
4747
// So the relocator uses the correct instruction size layout.
4848
FLAG_precompiled_mode = true;
4949

@@ -272,7 +272,7 @@ struct RelocatorTestHelper {
272272

273273
Thread* thread;
274274
SafepointWriteRwLocker locker;
275-
ForceGrowthSafepointOperationScope safepoint_and_growth_scope;
275+
GcSafepointOperationScope safepoint_scope;
276276
GrowableArray<const Code*> codes;
277277
};
278278

runtime/vm/dart.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ DEFINE_FLAG(bool, trace_shutdown, false, "Trace VM shutdown on stderr");
6464
Isolate* Dart::vm_isolate_ = nullptr;
6565
int64_t Dart::start_time_micros_ = 0;
6666
ThreadPool* Dart::thread_pool_ = nullptr;
67-
DebugInfo* Dart::pprof_symbol_generator_ = nullptr;
6867
ReadOnlyHandles* Dart::predefined_handles_ = nullptr;
6968
Snapshot::Kind Dart::vm_snapshot_kind_ = Snapshot::kInvalid;
7069
Dart_ThreadStartCallback Dart::thread_start_callback_ = nullptr;

0 commit comments

Comments
 (0)