Skip to content

Commit 37056cc

Browse files
sjindel-googlecommit-bot@chromium.org
authored andcommitted
[vm] Disable unchecked entrypoints to implicit closures in precompiled mode.
The check which disables entrypoints in precompiled mode currently only triggers for regular functions. Here we make it trigger for implicit closures as well. Change-Id: I68749a2109bb24ee5d299e4b139e3b63e3be5f72 Reviewed-on: https://dart-review.googlesource.com/70340 Reviewed-by: Alexander Markov <[email protected]> Commit-Queue: Samir Jindel <[email protected]>
1 parent eb37da8 commit 37056cc

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1709,10 +1709,7 @@ StreamingFlowGraphBuilder::ChooseEntryPointStyle(
17091709
const Fragment& every_time_prologue) {
17101710
ASSERT(!dart_function.IsImplicitClosureFunction());
17111711
if (!dart_function.MayHaveUncheckedEntryPoint(I) ||
1712-
implicit_type_checks.is_empty() ||
1713-
// TODO(#34162): Enable multiple-entrypoints for AOT if we
1714-
// consider them beneficial.
1715-
FLAG_precompiled_mode) {
1712+
implicit_type_checks.is_empty()) {
17161713
return UncheckedEntryPointStyle::kNone;
17171714
}
17181715

runtime/vm/object.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8296,8 +8296,10 @@ RawCode* Function::EnsureHasCode() const {
82968296

82978297
bool Function::MayHaveUncheckedEntryPoint(Isolate* I) const {
82988298
// TODO(#34162): Support the other architectures.
8299+
// TODO(#34162): Enable multiple-entrypoints for AOT if we
8300+
// consider them beneficial.
82998301
#if defined(TARGET_ARCH_X64) || defined(TARGET_ARCH_ARM)
8300-
return FLAG_enable_multiple_entrypoints &&
8302+
return !FLAG_precompiled_mode && FLAG_enable_multiple_entrypoints &&
83018303
(NeedsArgumentTypeChecks(I) || IsImplicitClosureFunction());
83028304
#else
83038305
return false;

0 commit comments

Comments
 (0)