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

Unified Diff: runtime/vm/kernel_to_il.cc

Issue 3001883002: [vm] Read interface_target_reference from kernel binaries (Closed)
Patch Set: Add assertion Created 3 years, 4 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') | runtime/vm/object.h » ('j') | 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 71ccb80a866303ade260fe9dede2deb04b8ea63f..5c3164aeede000ed35c6e42c4200705ec294cf6e 100644
--- a/runtime/vm/kernel_to_il.cc
+++ b/runtime/vm/kernel_to_il.cc
@@ -1056,28 +1056,20 @@ Fragment FlowGraphBuilder::IntConstant(int64_t value) {
Constant(Integer::ZoneHandle(Z, Integer::New(value, Heap::kOld))));
}
-Fragment FlowGraphBuilder::InstanceCall(TokenPosition position,
- const dart::String& name,
- Token::Kind kind,
- intptr_t argument_count,
- intptr_t 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) {
+ intptr_t checked_argument_count,
+ const Function& interface_target) {
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, type_args_len, argument_names,
- checked_argument_count, ic_data_array_, GetNextDeoptId());
+ InstanceCallInstr* call = new (Z)
+ InstanceCallInstr(position, name, kind, arguments, type_args_len,
+ argument_names, checked_argument_count, ic_data_array_,
+ GetNextDeoptId(), interface_target);
Push(call);
return Fragment(call);
}
@@ -1511,6 +1503,12 @@ RawFunction* FlowGraphBuilder::LookupMethodByMember(
dart::Class::Handle(Z, H.LookupClassByKernelClass(kernel_class));
RawFunction* function = klass.LookupFunctionAllowPrivate(method_name);
+#ifdef DEBUG
+ if (function == Object::null()) {
+ OS::PrintErr("Unable to find \'%s\' in %s\n", method_name.ToCString(),
+ klass.ToCString());
+ }
+#endif
ASSERT(function != Object::null());
return function;
}
@@ -2172,8 +2170,11 @@ FlowGraph* FlowGraphBuilder::BuildGraphOfInvokeFieldDispatcher(
// Invoke the getter to get the field value.
body += LoadLocal(scope->VariableAt(0));
body += PushArgument();
- body +=
- InstanceCall(TokenPosition::kMinSource, getter_name, Token::kGET, 1);
+ const intptr_t kTypeArgsLen = 0;
+ const intptr_t kNumArgsChecked = 1;
+ body += InstanceCall(TokenPosition::kMinSource, getter_name, Token::kGET,
+ kTypeArgsLen, 1, Array::null_array(), kNumArgsChecked,
+ Function::null_function());
}
body += PushArgument();
@@ -2193,9 +2194,11 @@ FlowGraph* FlowGraphBuilder::BuildGraphOfInvokeFieldDispatcher(
body += ClosureCall(descriptor.TypeArgsLen(), descriptor.Count(),
argument_names);
} else {
+ const intptr_t kNumArgsChecked = 1;
body += InstanceCall(TokenPosition::kMinSource, Symbols::Call(),
Token::kILLEGAL, descriptor.TypeArgsLen(),
- descriptor.Count(), argument_names);
+ descriptor.Count(), argument_names, kNumArgsChecked,
+ Function::null_function());
}
body += Return(TokenPosition::kNoSource);
« no previous file with comments | « runtime/vm/kernel_to_il.h ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698