Skip to content

Commit

Permalink
[VM] - Minor cleanups
Browse files Browse the repository at this point in the history
TEST=ci

Change-Id: I5c2839fe48f1a4f1f48aa86cee948dc99fcca511
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/342383
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
  • Loading branch information
a-siva authored and Commit Queue committed Dec 18, 2023
1 parent 3e73f10 commit 794d3ad
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
8 changes: 2 additions & 6 deletions runtime/bin/snapshot_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ static AppSnapshot* TryReadAppSnapshotElf(
}
return new ElfAppSnapshot(handle, vm_data_buffer, vm_instructions_buffer,
isolate_data_buffer, isolate_instructions_buffer);
return nullptr;
}

#if defined(DART_TARGET_OS_MACOS)
Expand Down Expand Up @@ -621,11 +620,8 @@ AppSnapshot* Snapshot::TryReadAppSnapshot(const char* script_uri,
}
}

snapshot = TryReadAppSnapshotElf(script_name, /*file_offset=*/0,
force_load_elf_from_memory);
if (snapshot != nullptr) {
return snapshot;
}
return TryReadAppSnapshotElf(script_name, /*file_offset=*/0,
force_load_elf_from_memory);
#endif // defined(DART_PRECOMPILED_RUNTIME)
return nullptr;
}
Expand Down
4 changes: 2 additions & 2 deletions runtime/vm/object_store.cc
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ void ObjectStore::InitKnownObjects() {
ASSERT(!cls.IsNull());
set_set_impl_class(cls);

#ifdef DART_PRECOMPILED_RUNTIME
#if defined(DART_PRECOMPILED_RUNTIME)
// The rest of these objects are only needed for code generation.
return;
#else
Expand Down Expand Up @@ -409,7 +409,7 @@ void ObjectStore::InitKnownObjects() {
function_name =
Function::CreateDynamicInvocationForwarderName(Symbols::Star());
Resolver::ResolveDynamicAnyArgs(zone, smi_class, function_name);
#endif
#endif // defined(DART_PRECOMPILED_RUNTIME)
}

void ObjectStore::LazyInitCoreMembers() {
Expand Down
4 changes: 2 additions & 2 deletions runtime/vm/parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "vm/parser.h"
#include "vm/flags.h"

#ifndef DART_PRECOMPILED_RUNTIME
#if !defined(DART_PRECOMPILED_RUNTIME)

#include "lib/invocation_mirror.h"
#include "platform/utils.h"
Expand Down Expand Up @@ -368,4 +368,4 @@ ParsedFunction::EnsureDynamicClosureCallVars() {

} // namespace dart

#endif // DART_PRECOMPILED_RUNTIME
#endif // !defined(DART_PRECOMPILED_RUNTIME)

0 comments on commit 794d3ad

Please sign in to comment.