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

Unified Diff: runtime/vm/kernel_to_il.cc

Issue 2969723002: [VM, generic functions reification, work in progress] (Closed)
Patch Set: Merge branch 'master' into slave Created 3 years, 6 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/kernel_to_il.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/kernel_to_il.cc
diff --git a/runtime/vm/kernel_to_il.cc b/runtime/vm/kernel_to_il.cc
index fb9a6aee1e9a32c861a26361141445e4692612a7..6991518178e38298ca7d00442c65371bba1914e4 100644
--- a/runtime/vm/kernel_to_il.cc
+++ b/runtime/vm/kernel_to_il.cc
@@ -1114,21 +1114,23 @@ Fragment FlowGraphBuilder::InstanceCall(TokenPosition position,
Token::Kind kind,
intptr_t argument_count,
intptr_t checked_argument_count) {
- return InstanceCall(position, name, kind, argument_count, Array::null_array(),
- checked_argument_count);
+ const intptr_t kTypeArgsLen = 0;
+ return InstanceCall(position, name, kind, kTypeArgsLen, argument_count,
+ Array::null_array(), checked_argument_count);
}
Fragment FlowGraphBuilder::InstanceCall(TokenPosition position,
const dart::String& name,
Token::Kind kind,
+ intptr_t type_args_len,
intptr_t argument_count,
const Array& argument_names,
intptr_t checked_argument_count) {
- ArgumentArray arguments = GetArguments(argument_count);
- const intptr_t kTypeArgsLen = 0; // Generic instance calls not yet supported.
+ const intptr_t total_count = argument_count + (type_args_len > 0 ? 1 : 0);
+ ArgumentArray arguments = GetArguments(total_count);
InstanceCallInstr* call = new (Z) InstanceCallInstr(
- position, name, kind, arguments, kTypeArgsLen, argument_names,
+ position, name, kind, arguments, type_args_len, argument_names,
checked_argument_count, ic_data_array_, GetNextDeoptId());
Push(call);
return Fragment(call);
@@ -2299,11 +2301,9 @@ FlowGraph* FlowGraphBuilder::BuildGraphOfInvokeFieldDispatcher(
body += ClosureCall(descriptor.TypeArgsLen(), descriptor.Count(),
argument_names);
} else {
- if (descriptor.TypeArgsLen() > 0) {
- UNIMPLEMENTED();
- }
body += InstanceCall(TokenPosition::kMinSource, Symbols::Call(),
- Token::kILLEGAL, descriptor.Count(), argument_names);
+ Token::kILLEGAL, descriptor.TypeArgsLen(),
+ descriptor.Count(), argument_names);
}
body += Return(TokenPosition::kNoSource);
« no previous file with comments | « runtime/vm/kernel_to_il.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698