982b9fad44
Now that Flutter tests that access entry points from native code have been annotated[1], we can turn on entry point checking in JIT mode. This CL also removes the A flag category from flag_list.h and the AOT_FLAG_MACRO definitions and uses from flags.[cc,h], as they were created as a temporary measure until this flag could be unconditionally defaulted to true. [1] See the following PRs: * https://github.com/flutter/engine/pull/57158 * https://github.com/flutter/flutter/pull/160158 * https://github.com/flutter/flutter/pull/160421 TEST=vm/dart/entrypoints_verification_test vm/cc/IRTest vm/cc/StreamingFlowGraphBuilder vm/cc/STC vm/cc/TTS Issue: https://github.com/dart-lang/sdk/issues/50649 Issue: https://github.com/flutter/flutter/issues/118608 Cq-Include-Trybots: luci.dart.try:vm-aot-linux-product-x64-try,vm-aot-linux-debug-x64-try,vm-aot-mac-release-arm64-try,vm-aot-mac-product-arm64-try,vm-aot-dwarf-linux-product-x64-try,vm-linux-debug-x64-try,vm-linux-release-x64-try,vm-appjit-linux-product-x64-try Change-Id: Ibe5b21bb74f1a6fb88824b71ff87b9e555216dbf Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/400301 Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Tess Strickland <sstrickl@google.com>
104 lines
2.0 KiB
Dart
104 lines
2.0 KiB
Dart
// Copyright (c) 2019, 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.
|
|
//
|
|
// SharedObjects=entrypoints_verification_test
|
|
|
|
import 'dart:ffi';
|
|
import './dylib_utils.dart';
|
|
|
|
main(List<String> args) {
|
|
final helper = dlopenPlatformSpecific('entrypoints_verification_test');
|
|
final runTest =
|
|
helper.lookupFunction<Void Function(), void Function()>('RunTests');
|
|
runTest();
|
|
}
|
|
|
|
final void Function() noop = () {};
|
|
|
|
class C {}
|
|
|
|
@pragma("vm:entry-point")
|
|
class D {
|
|
D();
|
|
|
|
@pragma("vm:entry-point")
|
|
D.defined();
|
|
|
|
@pragma("vm:entry-point")
|
|
factory D.fact() => E.ctor();
|
|
|
|
void fn0() {}
|
|
|
|
@pragma("vm:entry-point")
|
|
void fn1() {}
|
|
|
|
@pragma("vm:entry-point", "get")
|
|
void fn1_get() {}
|
|
|
|
@pragma("vm:entry-point", "call")
|
|
void fn1_call() {}
|
|
|
|
static void fn2() {}
|
|
|
|
@pragma("vm:entry-point")
|
|
static void fn3() {}
|
|
|
|
@pragma("vm:entry-point", "call")
|
|
static void fn3_call() {}
|
|
|
|
@pragma("vm:entry-point", "get")
|
|
static void fn3_get() {}
|
|
|
|
void Function()? fld0 = noop;
|
|
|
|
@pragma("vm:entry-point")
|
|
void Function()? fld1 = noop;
|
|
|
|
@pragma("vm:entry-point", "get")
|
|
void Function()? fld2 = noop;
|
|
|
|
@pragma("vm:entry-point", "set")
|
|
void Function()? fld3 = noop;
|
|
}
|
|
|
|
void fn0() {}
|
|
|
|
@pragma("vm:entry-point")
|
|
void fn1() {}
|
|
|
|
@pragma("vm:entry-point", "get")
|
|
void fn1_get() {}
|
|
|
|
@pragma("vm:entry-point", "call")
|
|
void fn1_call() {}
|
|
|
|
class E extends D {
|
|
E.ctor();
|
|
}
|
|
|
|
@pragma("vm:entry-point")
|
|
class F {
|
|
static void Function()? fld0 = noop;
|
|
|
|
@pragma("vm:entry-point")
|
|
static void Function()? fld1 = noop;
|
|
|
|
@pragma("vm:entry-point", "get")
|
|
static void Function()? fld2 = noop;
|
|
|
|
@pragma("vm:entry-point", "set")
|
|
static void Function()? fld3 = noop;
|
|
}
|
|
|
|
void Function()? fld0 = noop;
|
|
|
|
@pragma("vm:entry-point")
|
|
void Function()? fld1 = noop;
|
|
|
|
@pragma("vm:entry-point", "get")
|
|
void Function()? fld2 = noop;
|
|
|
|
@pragma("vm:entry-point", "set")
|
|
void Function()? fld3 = noop;
|