OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |