| Index: runtime/vm/intermediate_language.cc
|
| diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc
|
| index 4d781eb5b752ae4f7831761efd799a0690177aad..7ee6a379b66aef24148d69f0f727acd0b7052394 100644
|
| --- a/runtime/vm/intermediate_language.cc
|
| +++ b/runtime/vm/intermediate_language.cc
|
| @@ -3969,9 +3969,19 @@ intptr_t MergedMathInstr::OutputIndexOf(Token::Kind token) {
|
|
|
|
|
| void NativeCallInstr::SetupNative() {
|
| + if (link_lazily()) {
|
| + // Resolution will happen during NativeEntry::LinkNativeCall.
|
| + return;
|
| + }
|
| +
|
| Zone* zone = Thread::Current()->zone();
|
| const Class& cls = Class::Handle(zone, function().Owner());
|
| const Library& library = Library::Handle(zone, cls.library());
|
| +
|
| + Dart_NativeEntryResolver resolver = library.native_entry_resolver();
|
| + bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver);
|
| + set_is_bootstrap_native(is_bootstrap_native);
|
| +
|
| const int num_params =
|
| NativeArguments::ParameterCountForResolution(function());
|
| bool auto_setup_scope = true;
|
| @@ -3983,11 +3993,8 @@ void NativeCallInstr::SetupNative() {
|
| "native function '%s' (%" Pd " arguments) cannot be found",
|
| native_name().ToCString(), function().NumParameters());
|
| }
|
| + set_is_auto_scope(auto_setup_scope);
|
| set_native_c_function(native_function);
|
| - function().SetIsNativeAutoSetupScope(auto_setup_scope);
|
| - Dart_NativeEntryResolver resolver = library.native_entry_resolver();
|
| - bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver);
|
| - set_is_bootstrap_native(is_bootstrap_native);
|
| }
|
|
|
| #undef __
|
|
|