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