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

Unified Diff: runtime/vm/code_generator_x64.cc

Issue 9285031: Remove support for obsolete syntax of factory methods and default classes. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 11 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/code_generator_x64.cc
===================================================================
--- runtime/vm/code_generator_x64.cc (revision 3577)
+++ runtime/vm/code_generator_x64.cc (working copy)
@@ -2292,19 +2292,8 @@
// Pushes the type arguments of the instantiator on the stack.
void CodeGenerator::GenerateInstantiatorTypeArguments(intptr_t token_index) {
- Class& instantiator_class = Class::Handle();
- Function& outer_function =
- Function::Handle(parsed_function().function().raw());
- while (outer_function.IsLocalFunction()) {
- outer_function = outer_function.parent_function();
- }
- // TODO(regis): Remove support for type parameters on factories.
- if (outer_function.IsFactory() &&
- (outer_function.signature_class() != Class::null())) {
- instantiator_class = outer_function.signature_class();
- } else {
- instantiator_class = outer_function.owner();
- }
+ const Class& instantiator_class = Class::Handle(
+ parsed_function().function().owner());
if (instantiator_class.NumTypeParameters() == 0) {
// The type arguments are compile time constants.
AbstractTypeArguments& type_arguments = AbstractTypeArguments::ZoneHandle();
@@ -2323,6 +2312,11 @@
} else {
ASSERT(parsed_function().instantiator() != NULL);
parsed_function().instantiator()->Visit(this);
+ Function& outer_function =
+ Function::Handle(parsed_function().function().raw());
+ while (outer_function.IsLocalFunction()) {
+ outer_function = outer_function.parent_function();
+ }
if (!outer_function.IsFactory()) {
__ popq(RAX); // Pop instantiator.
// The instantiator is the receiver of the caller, which is not a factory.

Powered by Google App Engine
This is Rietveld 408576698