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

Unified Diff: runtime/vm/compiler.cc

Issue 10831142: Associate the correct type to method receivers (instead of Dynamic type). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 5 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
Index: runtime/vm/compiler.cc
===================================================================
--- runtime/vm/compiler.cc (revision 10199)
+++ runtime/vm/compiler.cc (working copy)
@@ -446,6 +446,8 @@
}
// Create a dummy function object for the code generator.
+ // The function needs to be associated with a named Class: the interface
+ // Function fits the bill.
const char* kEvalConst = "eval_const";
const Function& func = Function::Handle(Function::New(
String::Handle(Symbols::New(kEvalConst)),
@@ -454,17 +456,13 @@
false, // not const function.
false, // not abstract
false, // not external.
+ Class::Handle(Type::Handle(Type::FunctionInterface()).type_class()),
fragment->token_pos()));
func.set_result_type(Type::Handle(Type::DynamicType()));
func.set_num_fixed_parameters(0);
func.set_num_optional_parameters(0);
- // The function needs to be associated with a named Class: the interface
- // Function fits the bill.
- func.set_owner(Class::Handle(
- Type::Handle(Type::FunctionInterface()).type_class()));
-
// We compile the function here, even though InvokeStatic() below
// would compile func automatically. We are checking fewer invariants
// here.

Powered by Google App Engine
This is Rietveld 408576698