Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(586)

Unified Diff: runtime/vm/precompiler.cc

Issue 2859673002: Pass type argument vector to generic functions (if --reify-generic-functions is (Closed)
Patch Set: address review comments and sync Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/regexp_assembler_ir.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/precompiler.cc
diff --git a/runtime/vm/precompiler.cc b/runtime/vm/precompiler.cc
index 16304750a0134f1699f6632778dc8e780b93637c..cc5344a85312cfe932a3eecf294cbafbf8bcdd29 100644
--- a/runtime/vm/precompiler.cc
+++ b/runtime/vm/precompiler.cc
@@ -823,11 +823,13 @@ void Precompiler::CollectCallbackFields() {
// Create arguments descriptor with fixed parameters from
// signature of field_type.
function = Type::Cast(field_type).signature();
+ if (function.IsGeneric()) continue;
if (function.HasOptionalParameters()) continue;
if (FLAG_trace_precompiler) {
THR_Print("Found callback field %s\n", field_name.ToCString());
}
- args_desc = ArgumentsDescriptor::New(function.num_fixed_parameters());
+ args_desc = ArgumentsDescriptor::New(0, // No type argument vector.
+ function.num_fixed_parameters());
cids.Clear();
if (T->cha()->ConcreteSubclasses(cls, &cids)) {
for (intptr_t j = 0; j < cids.length(); ++j) {
@@ -2513,9 +2515,8 @@ void Precompiler::PopulateWithICData(const Function& function,
if (instr->IsInstanceCall()) {
InstanceCallInstr* call = instr->AsInstanceCall();
if (!call->HasICData()) {
- const Array& arguments_descriptor = Array::Handle(
- zone, ArgumentsDescriptor::New(call->ArgumentCount(),
- call->argument_names()));
+ const Array& arguments_descriptor =
+ Array::Handle(zone, call->GetArgumentsDescriptor());
const ICData& ic_data = ICData::ZoneHandle(
zone, ICData::New(function, call->function_name(),
arguments_descriptor, call->deopt_id(),
@@ -2525,9 +2526,8 @@ void Precompiler::PopulateWithICData(const Function& function,
} else if (instr->IsStaticCall()) {
StaticCallInstr* call = instr->AsStaticCall();
if (!call->HasICData()) {
- const Array& arguments_descriptor = Array::Handle(
- zone, ArgumentsDescriptor::New(call->ArgumentCount(),
- call->argument_names()));
+ const Array& arguments_descriptor =
+ Array::Handle(zone, call->GetArgumentsDescriptor());
const Function& target = call->function();
MethodRecognizer::Kind recognized_kind =
MethodRecognizer::RecognizeKind(target);
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/regexp_assembler_ir.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698