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

Side by Side Diff: runtime/vm/class_finalizer.cc

Issue 8602004: Fix code generation issue with new factory syntax. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/lib/growable_array.dart ('k') | runtime/vm/code_generator_ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/class_finalizer.h" 5 #include "vm/class_finalizer.h"
6 6
7 #include "vm/flags.h" 7 #include "vm/flags.h"
8 #include "vm/heap.h" 8 #include "vm/heap.h"
9 #include "vm/isolate.h" 9 #include "vm/isolate.h"
10 #include "vm/longjump.h" 10 #include "vm/longjump.h"
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 expected_type_extends = expected_extends_array.TypeAt(i); 407 expected_type_extends = expected_extends_array.TypeAt(i);
408 actual_type_extends = actual_extends_array.TypeAt(i); 408 actual_type_extends = actual_extends_array.TypeAt(i);
409 if (!expected_type_name.Equals(actual_type_name) || 409 if (!expected_type_name.Equals(actual_type_name) ||
410 !expected_type_extends.Equals(actual_type_extends)) { 410 !expected_type_extends.Equals(actual_type_extends)) {
411 mismatch = true; 411 mismatch = true;
412 } 412 }
413 } 413 }
414 if (mismatch) { 414 if (mismatch) {
415 const String& interface_name = String::Handle(interface.Name()); 415 const String& interface_name = String::Handle(interface.Name());
416 const String& factory_name = String::Handle(factory_class.Name()); 416 const String& factory_name = String::Handle(factory_class.Name());
417 // TODO(regis): Report the filename and position as well.
417 ReportError("mismatch in number or names of type parameters between " 418 ReportError("mismatch in number or names of type parameters between "
418 "factory clause of interface '%s' and actual factory " 419 "factory clause of interface '%s' and actual factory "
419 "class '%s'.\n", 420 "class '%s'.\n",
420 interface_name.ToCString(), 421 interface_name.ToCString(),
421 factory_name.ToCString()); 422 factory_name.ToCString());
422 } 423 }
423 } 424 }
424 425
425 426
426 // TODO(regis): Now that we do not resolve type parameters anymore, we could 427 // TODO(regis): Now that we do not resolve type parameters anymore, we could
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 // list of the enclosing class. 721 // list of the enclosing class.
721 // See bug 5408808. 722 // See bug 5408808.
722 const Class& enclosing_class = Class::Handle(function.owner()); 723 const Class& enclosing_class = Class::Handle(function.owner());
723 function.set_signature_class(enclosing_class); 724 function.set_signature_class(enclosing_class);
724 ReportWarning("Warning: factory method '%s' should declare a list of " 725 ReportWarning("Warning: factory method '%s' should declare a list of "
725 "%d type parameter%s.\n", 726 "%d type parameter%s.\n",
726 function_name.ToCString(), 727 function_name.ToCString(),
727 type_class.NumTypeParameters(), 728 type_class.NumTypeParameters(),
728 type_class.NumTypeParameters() > 1 ? "s" : ""); 729 type_class.NumTypeParameters() > 1 ? "s" : "");
729 } else { 730 } else {
731 // TODO(regis): Report the filename and position as well.
730 ReportError("factory method '%s' must declare %d type parameter%s.\n", 732 ReportError("factory method '%s' must declare %d type parameter%s.\n",
731 function_name.ToCString(), 733 function_name.ToCString(),
732 type_class.NumTypeParameters(), 734 type_class.NumTypeParameters(),
733 type_class.NumTypeParameters() > 1 ? "s" : ""); 735 type_class.NumTypeParameters() > 1 ? "s" : "");
734 } 736 }
735 } 737 }
736 } else { 738 } else {
737 type = ResolveType(cls, type); 739 type = ResolveType(cls, type);
738 function.set_result_type(type); 740 function.set_result_type(type);
739 } 741 }
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
1274 va_end(args); 1276 va_end(args);
1275 if (FLAG_warning_as_error) { 1277 if (FLAG_warning_as_error) {
1276 isolate->long_jump_base()->Jump(1, msg_buffer); 1278 isolate->long_jump_base()->Jump(1, msg_buffer);
1277 UNREACHABLE(); 1279 UNREACHABLE();
1278 } else { 1280 } else {
1279 OS::Print(msg_buffer); 1281 OS::Print(msg_buffer);
1280 } 1282 }
1281 } 1283 }
1282 1284
1283 } // namespace dart 1285 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/growable_array.dart ('k') | runtime/vm/code_generator_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698