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/code_generator.h" | 7 #include "vm/code_generator.h" |
8 #include "vm/flags.h" | 8 #include "vm/flags.h" |
9 #include "vm/heap.h" | 9 #include "vm/heap.h" |
10 #include "vm/isolate.h" | 10 #include "vm/isolate.h" |
(...skipping 2241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2252 func ^= functions.At(i); | 2252 func ^= functions.At(i); |
2253 if (func.IsGenerativeConstructor()) { | 2253 if (func.IsGenerativeConstructor()) { |
2254 // A mixin class must not have explicit constructors. | 2254 // A mixin class must not have explicit constructors. |
2255 if (!func.IsImplicitConstructor()) { | 2255 if (!func.IsImplicitConstructor()) { |
2256 const Script& script = Script::Handle(cls.script()); | 2256 const Script& script = Script::Handle(cls.script()); |
2257 const Error& error = Error::Handle( | 2257 const Error& error = Error::Handle( |
2258 LanguageError::NewFormatted(Error::Handle(), | 2258 LanguageError::NewFormatted(Error::Handle(), |
2259 script, func.token_pos(), Report::AtLocation, | 2259 script, func.token_pos(), Report::AtLocation, |
2260 Report::kError, Heap::kNew, | 2260 Report::kError, Heap::kNew, |
2261 "constructor '%s' is illegal in mixin class %s", | 2261 "constructor '%s' is illegal in mixin class %s", |
2262 String::Handle(func.PrettyName()).ToCString(), | 2262 String::Handle(func.UserVisibleName()).ToCString(), |
2263 String::Handle(zone, mixin_cls.Name()).ToCString())); | 2263 String::Handle(zone, mixin_cls.Name()).ToCString())); |
2264 | 2264 |
2265 ReportErrors(error, cls, cls.token_pos(), | 2265 ReportErrors(error, cls, cls.token_pos(), |
2266 "mixin class '%s' must not have constructors", | 2266 "mixin class '%s' must not have constructors", |
2267 String::Handle(zone, mixin_cls.Name()).ToCString()); | 2267 String::Handle(zone, mixin_cls.Name()).ToCString()); |
2268 } | 2268 } |
2269 continue; // Skip the implicit constructor. | 2269 continue; // Skip the implicit constructor. |
2270 } | 2270 } |
2271 if (!func.is_static() && | 2271 if (!func.is_static() && |
2272 !func.IsMethodExtractor() && | 2272 !func.IsMethodExtractor() && |
(...skipping 1042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3315 ASSERT(fields_array.Length() == ByteBuffer::NumberOfFields()); | 3315 ASSERT(fields_array.Length() == ByteBuffer::NumberOfFields()); |
3316 field ^= fields_array.At(0); | 3316 field ^= fields_array.At(0); |
3317 ASSERT(field.Offset() == ByteBuffer::data_offset()); | 3317 ASSERT(field.Offset() == ByteBuffer::data_offset()); |
3318 name ^= field.name(); | 3318 name ^= field.name(); |
3319 expected_name ^= String::New("_data"); | 3319 expected_name ^= String::New("_data"); |
3320 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); | 3320 ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name)); |
3321 #endif | 3321 #endif |
3322 } | 3322 } |
3323 | 3323 |
3324 } // namespace dart | 3324 } // namespace dart |
OLD | NEW |