12#define FUNCTION_NAME(name) UnhandledExcp_##name
13#define REGISTER_FUNCTION(name, count) {"" #name, FUNCTION_NAME(name), count},
20 Instance::CheckedHandle(zone, arguments->
NativeArgAt(0));
22 Instance::CheckedHandle(zone, arguments->
NativeArgAt(1));
26 FATAL(
"Unhandled_equals fails.\n");
55#define UNHANDLED_NATIVE_LIST(V) \
56 V(Unhandled_equals, 2) \
57 V(Unhandled_invoke, 0) \
58 V(Unhandled_invoke2, 0)
60static struct NativeEntries {
68 bool* auto_setup_scope) {
69 ASSERT(auto_setup_scope !=
nullptr);
70 *auto_setup_scope =
true;
77 for (
int i = 0;
i < num_entries;
i++) {
89 const char* kScriptChars =
91 class UnhandledExceptions {
92 @pragma('vm:external-name', 'Unhandled_equals')
93 external static equals(var obj1, var obj2);
95 @pragma('vm:external-name', 'Unhandled_invoke')
96 external static invoke();
98 @pragma('vm:external-name', 'Unhandled_invoke2')
99 external static invoke2();
103 static int method1(int param) {
104 UnhandledExceptions.invoke();
107 static int method2() {
110 static int method3(int param) {
112 UnhandledExceptions.invoke2();
113 } on Second catch (e) {
120 UnhandledExceptions.equals(2, Second.method1(1));
121 UnhandledExceptions.equals(3, Second.method3(1));
static ObjectPtr UnwrapHandle(Dart_Handle object)
virtual bool CanonicalizeEquals(const Instance &other) const
ObjectPtr NativeArgAt(int index) const
static void static void PrintErr(const char *format,...) PRINTF_ATTRIBUTE(1
virtual const char * ToCString() const
static Dart_Handle LoadTestScript(const char *script, Dart_NativeEntryResolver resolver, const char *lib_uri=RESOLVED_USER_TEST_URI, bool finalize=true, bool allow_compile_errors=false)
static Thread * Current()
struct _Dart_Handle * Dart_Handle
struct _Dart_NativeArguments * Dart_NativeArguments
void(* Dart_NativeFunction)(Dart_NativeArguments arguments)
#define UNHANDLED_NATIVE_LIST(V)
#define REGISTER_FUNCTION(name, count)
#define FUNCTION_NAME(name)
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
DART_EXPORT bool Dart_ErrorHasException(Dart_Handle handle)
DART_EXPORT Dart_Handle Dart_Invoke(Dart_Handle target, Dart_Handle name, int number_of_arguments, Dart_Handle *arguments)
void FUNCTION_NAME() Unhandled_equals(Dart_NativeArguments args)
DART_EXPORT Dart_Handle Dart_GetClass(Dart_Handle library, Dart_Handle class_name)
void FUNCTION_NAME() Unhandled_invoke(Dart_NativeArguments args)
static Dart_NativeFunction native_lookup(Dart_Handle name, int argument_count, bool *auto_setup_scope)
DART_EXPORT bool Dart_IsError(Dart_Handle handle)
static struct dart::NativeEntries BuiltinEntries[]
TEST_CASE(DirectoryCurrent)
Dart_Handle NewString(const char *str)
void FUNCTION_NAME() Unhandled_invoke2(Dart_NativeArguments args)
DART_EXPORT Dart_Handle Dart_ErrorGetException(Dart_Handle handle)
DART_EXPORT Dart_Handle Dart_ThrowException(Dart_Handle exception)
const char *const function_name
Dart_NativeFunction function_
#define EXPECT_VALID(handle)