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

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

Issue 30533004: Report correct error message in case of super invocation (fix issue 8208). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/lib/object.cc ('k') | runtime/vm/dart_entry.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 ASSERT(factory.RedirectionTarget() == Function::null()); 389 ASSERT(factory.RedirectionTarget() == Function::null());
390 return; 390 return;
391 } 391 }
392 } 392 }
393 393
394 // Verify that the target is const if the redirecting factory is const. 394 // Verify that the target is const if the redirecting factory is const.
395 if (factory.is_const() && !target.is_const()) { 395 if (factory.is_const() && !target.is_const()) {
396 const Script& script = Script::Handle(target_class.script()); 396 const Script& script = Script::Handle(target_class.script());
397 ReportError(Error::Handle(), // No previous error. 397 ReportError(Error::Handle(), // No previous error.
398 script, target.token_pos(), 398 script, target.token_pos(),
399 "constructor '%s' must be const as required by redirecting" 399 "constructor '%s' must be const as required by redirecting "
400 "const factory '%s'", 400 "const factory '%s'",
401 String::Handle(target.name()).ToCString(), 401 String::Handle(target.name()).ToCString(),
402 String::Handle(factory.name()).ToCString()); 402 String::Handle(factory.name()).ToCString());
403 } 403 }
404 404
405 // Update redirection data with resolved target. 405 // Update redirection data with resolved target.
406 factory.SetRedirectionTarget(target); 406 factory.SetRedirectionTarget(target);
407 // Not needed anymore. 407 // Not needed anymore.
408 factory.SetRedirectionIdentifier(Object::null_string()); 408 factory.SetRedirectionIdentifier(Object::null_string());
409 if (!target.IsRedirectingFactory()) { 409 if (!target.IsRedirectingFactory()) {
(...skipping 2241 matching lines...) Expand 10 before | Expand all | Expand 10 after
2651 expected_name ^= String::New("_offset"); 2651 expected_name ^= String::New("_offset");
2652 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); 2652 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name));
2653 field ^= fields_array.At(2); 2653 field ^= fields_array.At(2);
2654 ASSERT(field.Offset() == TypedDataView::length_offset()); 2654 ASSERT(field.Offset() == TypedDataView::length_offset());
2655 name ^= field.name(); 2655 name ^= field.name();
2656 ASSERT(name.Equals("length")); 2656 ASSERT(name.Equals("length"));
2657 #endif 2657 #endif
2658 } 2658 }
2659 2659
2660 } // namespace dart 2660 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/lib/object.cc ('k') | runtime/vm/dart_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698