| Index: runtime/vm/parser.cc
|
| diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
|
| index 748c38d53e86745f00a67f8e4e670f79d90e65fe..8271d481700e33dc8d77611b29f6f0d4df24c8fe 100644
|
| --- a/runtime/vm/parser.cc
|
| +++ b/runtime/vm/parser.cc
|
| @@ -7339,39 +7339,20 @@ void Parser::AddFormalParamsToScope(const ParamList* params,
|
| void Parser::ParseNativeFunctionBlock(const ParamList* params,
|
| const Function& func) {
|
| ASSERT(func.is_native());
|
| - TRACE_PARSER("ParseNativeFunctionBlock");
|
| - const Class& cls = Class::Handle(Z, func.Owner());
|
| - const Library& library = Library::Handle(Z, cls.library());
|
| ASSERT(func.NumParameters() == params->parameters->length());
|
| + TRACE_PARSER("ParseNativeFunctionBlock");
|
|
|
| // Parse the function name out.
|
| - const intptr_t native_pos = TokenPos();
|
| const String& native_name = ParseNativeDeclaration();
|
|
|
| - // Now resolve the native function to the corresponding native entrypoint.
|
| - const int num_params = NativeArguments::ParameterCountForResolution(func);
|
| - bool auto_setup_scope = true;
|
| - NativeFunction native_function = NativeEntry::ResolveNative(
|
| - library, native_name, num_params, &auto_setup_scope);
|
| - if (native_function == NULL) {
|
| - ReportError(native_pos,
|
| - "native function '%s' (%" Pd " arguments) cannot be found",
|
| - native_name.ToCString(), func.NumParameters());
|
| - }
|
| - func.SetIsNativeAutoSetupScope(auto_setup_scope);
|
| -
|
| // Now add the NativeBodyNode and return statement.
|
| - Dart_NativeEntryResolver resolver = library.native_entry_resolver();
|
| - bool is_bootstrap_native = Bootstrap::IsBootstapResolver(resolver);
|
| current_block_->statements->Add(new(Z) ReturnNode(
|
| TokenPos(),
|
| new(Z) NativeBodyNode(
|
| TokenPos(),
|
| Function::ZoneHandle(Z, func.raw()),
|
| native_name,
|
| - native_function,
|
| current_block_->scope,
|
| - is_bootstrap_native,
|
| FLAG_link_natives_lazily)));
|
| }
|
|
|
|
|